@sitevision/api 2.0.0-alpha.1 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/index.d.ts +8 -0
  2. package/package.json +1 -1
  3. package/server/AliasUtil/index.d.ts +13 -11
  4. package/server/ArchiveUtil/index.d.ts +45 -43
  5. package/server/ArraysInstance/index.d.ts +1667 -1808
  6. package/server/ArticleUtil/index.d.ts +294 -226
  7. package/server/AuthenticationUtil/index.d.ts +73 -85
  8. package/server/BookmarkUtil/index.d.ts +76 -81
  9. package/server/BuddyIconRenderer/index.d.ts +124 -132
  10. package/server/BuddyIconRenderer.BuddyIconSize/index.d.ts +41 -0
  11. package/server/BuddyIconRenderer.BuddyIconSize/index.js +25 -0
  12. package/server/ClientUtil/index.d.ts +11 -9
  13. package/server/CollaborationFactory/index.d.ts +37 -40
  14. package/server/CollaborationGroupFolderUtil/index.d.ts +30 -28
  15. package/server/CollaborationGroupState/index.d.ts +27 -0
  16. package/server/CollaborationGroupState/index.js +11 -0
  17. package/server/CollaborationGroupTemplateUtil/index.d.ts +48 -50
  18. package/server/CollaborationGroupType/index.d.ts +28 -0
  19. package/server/CollaborationGroupType/index.js +12 -0
  20. package/server/CollaborationGroupUtil/index.d.ts +86 -82
  21. package/server/CollectionsInstance/index.d.ts +642 -705
  22. package/server/ColorUtil/index.d.ts +36 -37
  23. package/server/CompoundAndFilterBuilder/index.d.ts +31 -29
  24. package/server/CompoundComparatorBuilder/index.d.ts +35 -33
  25. package/server/CompoundOrFilterBuilder/index.d.ts +31 -29
  26. package/server/ContentNodeUtil/index.d.ts +36 -34
  27. package/server/CurrencyFactory/index.d.ts +72 -70
  28. package/server/DateUtil/index.d.ts +132 -142
  29. package/server/DecorationUtil/index.d.ts +13 -11
  30. package/server/DeviceUtil/index.d.ts +21 -19
  31. package/server/DimensionMode/index.d.ts +17 -0
  32. package/server/DimensionMode/index.js +12 -0
  33. package/server/DirectoryUtil/index.d.ts +90 -88
  34. package/server/DocType/index.d.ts +30 -0
  35. package/server/DocType/index.js +14 -0
  36. package/server/DocTypeUtil/index.d.ts +129 -135
  37. package/server/EndecUtil/index.d.ts +330 -347
  38. package/server/ExtendedDismaxParserBuilder/index.d.ts +156 -170
  39. package/server/FileIconRenderer/index.d.ts +153 -172
  40. package/server/FileUtil/index.d.ts +274 -300
  41. package/server/FilterBuilder/index.d.ts +42 -40
  42. package/server/FolderUtil/index.d.ts +93 -94
  43. package/server/FontUtil/index.d.ts +36 -37
  44. package/server/FormatterBuilderFactory/index.d.ts +76 -84
  45. package/server/HighlightBuilder/index.d.ts +79 -86
  46. package/server/IconUtil/index.d.ts +27 -25
  47. package/server/ImageLinkRenderer/index.d.ts +34 -32
  48. package/server/ImageRenderer/index.d.ts +343 -379
  49. package/server/ImageUtil/index.d.ts +247 -265
  50. package/server/IndexUtil/index.d.ts +40 -37
  51. package/server/IndexUtil.IndexType/index.d.ts +29 -0
  52. package/server/IndexUtil.IndexType/index.js +13 -0
  53. package/server/IndexingUtil/index.d.ts +69 -47
  54. package/server/InstanceCreatorUtil/index.d.ts +421 -457
  55. package/server/InstanceTypeUtil/index.d.ts +168 -189
  56. package/server/JwtUtil/index.d.ts +131 -129
  57. package/server/LandingPageUtil/index.d.ts +84 -87
  58. package/server/LandingPageUtil/index.js +1 -0
  59. package/server/LinkPageUtil/index.d.ts +297 -251
  60. package/server/LinkRenderer/index.d.ts +651 -715
  61. package/server/LinkTargetBuilder/index.d.ts +69 -77
  62. package/server/LinkValueBuilder/index.d.ts +70 -77
  63. package/server/ListWrapper/index.d.ts +82 -91
  64. package/server/LocaleUtil/index.d.ts +382 -394
  65. package/server/LogUtil/index.d.ts +119 -128
  66. package/server/MailBuilder/index.d.ts +109 -124
  67. package/server/MailUtil/index.d.ts +58 -63
  68. package/server/MathInstance/index.d.ts +625 -657
  69. package/server/MessageDigesterFactory/index.d.ts +30 -28
  70. package/server/MetadataDefinitionUtil/index.d.ts +79 -83
  71. package/server/MetadataUtil/index.d.ts +322 -346
  72. package/server/MimeTypeUtil/index.d.ts +209 -215
  73. package/server/MonitorBuilder/index.d.ts +20 -20
  74. package/server/NodeComparatorUtil/index.d.ts +215 -225
  75. package/server/NodeFactoryUtil/index.d.ts +18 -16
  76. package/server/NodeFilterUtil/index.d.ts +652 -739
  77. package/server/NodeIteratorUtil/index.d.ts +214 -229
  78. package/server/NodeResolverUtil/index.d.ts +400 -406
  79. package/server/NodeTreeUtil/index.d.ts +214 -229
  80. package/server/NodeTypeUtil/index.d.ts +1432 -548
  81. package/server/OfflineVersionPropertyUtil/index.d.ts +8 -6
  82. package/server/OnlineVersionPropertyUtil/index.d.ts +8 -6
  83. package/server/OutputUtil/index.d.ts +385 -380
  84. package/server/PageUtil/index.d.ts +266 -188
  85. package/server/PermissionUtil/index.d.ts +393 -430
  86. package/server/PermissionUtil.Permission/index.d.ts +54 -0
  87. package/server/PermissionUtil.Permission/index.js +38 -0
  88. package/server/PortletContextUtil/index.d.ts +112 -107
  89. package/server/PortletUtil/index.d.ts +32 -22
  90. package/server/PrincipalUtil/index.d.ts +35 -33
  91. package/server/Properties/index.d.ts +69 -76
  92. package/server/PropertyUtil/index.d.ts +1422 -1464
  93. package/server/PublishingUtil/index.d.ts +248 -249
  94. package/server/QueryStringUtil/index.d.ts +404 -415
  95. package/server/RedirectUtil/index.d.ts +64 -68
  96. package/server/RelatedValueBuilder/index.d.ts +45 -43
  97. package/server/Requester/index.d.ts +125 -125
  98. package/server/ResourceLocatorUtil/index.d.ts +436 -476
  99. package/server/RestApi/index.d.ts +158 -138
  100. package/server/RestAppInvokerFactory/index.d.ts +28 -26
  101. package/server/RoleAssignmentBuilder/index.d.ts +39 -37
  102. package/server/RoleMatcherBuilder/index.d.ts +39 -37
  103. package/server/RoleUtil/index.d.ts +35 -37
  104. package/server/ScriptUtil/index.d.ts +458 -495
  105. package/server/SearchFactory/index.d.ts +90 -105
  106. package/server/SearchUtil/index.d.ts +75 -73
  107. package/server/SearcherBuilder/index.d.ts +117 -124
  108. package/server/Session/index.d.ts +261 -1103
  109. package/server/Session/index.js +1 -20
  110. package/server/SimpleUserUtil/index.d.ts +28 -29
  111. package/server/SiteCookieUtil/index.d.ts +152 -175
  112. package/server/SortBuilder/index.d.ts +27 -25
  113. package/server/SourceSetMode/index.d.ts +12 -0
  114. package/server/SourceSetMode/index.js +12 -0
  115. package/server/SpellCheckBuilder/index.d.ts +30 -30
  116. package/server/StandardParserBuilder/index.d.ts +36 -34
  117. package/server/StructureUtil/index.d.ts +85 -83
  118. package/server/SubscriberUtil/index.d.ts +60 -67
  119. package/server/SubscriptionUtil/index.d.ts +123 -130
  120. package/server/SystemUserUtil/index.d.ts +148 -146
  121. package/server/TagUtil/index.d.ts +115 -120
  122. package/server/TemplateUtil/index.d.ts +115 -120
  123. package/server/TemporaryFileNodeBuilder/index.d.ts +32 -30
  124. package/server/TemporaryNodeBuilder/index.d.ts +139 -177
  125. package/server/TextModuleRendererBuilder/index.d.ts +22 -20
  126. package/server/TimestampUtil/index.d.ts +103 -117
  127. package/server/TranslationUtil/index.d.ts +98 -104
  128. package/server/TrashcanUtil/index.d.ts +114 -117
  129. package/server/UserDataUtil/index.d.ts +110 -111
  130. package/server/UserFactory/index.d.ts +47 -54
  131. package/server/UserFieldRenderer/index.d.ts +120 -128
  132. package/server/UserIdentityUtil/index.d.ts +38 -36
  133. package/server/UserUtil/index.d.ts +32 -30
  134. package/server/Utils/index.d.ts +634 -723
  135. package/server/VelocityRenderer/index.d.ts +96 -94
  136. package/server/VersionUtil/index.d.ts +25 -9
  137. package/server/WebContentUtil/index.d.ts +277 -284
  138. package/server/WebResourceFactory/index.d.ts +41 -46
  139. package/server/XSLTUtil/index.d.ts +34 -32
  140. package/server/XmlParserUtil/index.d.ts +50 -48
  141. package/types/javax/jcr/Binary/index.d.ts +3 -21
  142. package/types/javax/jcr/Binary/index.js +0 -1
  143. package/types/javax/jcr/Credentials/index.d.ts +3 -1
  144. package/types/javax/jcr/ImportUUIDBehavior/index.d.ts +27 -1
  145. package/types/javax/jcr/Item/index.d.ts +6 -119
  146. package/types/javax/jcr/Item/index.js +0 -6
  147. package/types/javax/jcr/ItemVisitor/index.d.ts +5 -3
  148. package/types/javax/jcr/NamespaceRegistry/index.d.ts +69 -43
  149. package/types/javax/jcr/NamespaceRegistry/index.js +0 -2
  150. package/types/javax/jcr/Node/index.d.ts +37 -1506
  151. package/types/javax/jcr/Node/index.js +1 -34
  152. package/types/javax/jcr/NodeIterator/index.d.ts +5 -3
  153. package/types/javax/jcr/Property/index.d.ts +494 -494
  154. package/types/javax/jcr/Property/index.js +0 -5
  155. package/types/javax/jcr/PropertyIterator/index.d.ts +5 -3
  156. package/types/javax/jcr/RangeIterator/index.d.ts +2 -42
  157. package/types/javax/jcr/RangeIterator/index.js +1 -5
  158. package/types/javax/jcr/Repository/index.d.ts +465 -263
  159. package/types/javax/jcr/Repository/index.js +0 -4
  160. package/types/javax/jcr/RepositoryFactory/index.d.ts +4 -2
  161. package/types/javax/jcr/Value/index.d.ts +4 -31
  162. package/types/javax/jcr/Value/index.js +0 -2
  163. package/types/javax/jcr/ValueFactory/index.d.ts +6 -74
  164. package/types/javax/jcr/ValueFactory/index.js +1 -2
  165. package/types/javax/jcr/Workspace/index.d.ts +103 -577
  166. package/types/javax/jcr/Workspace/index.js +1 -12
  167. package/types/javax/jcr/lock/Lock/index.d.ts +4 -2
  168. package/types/javax/jcr/lock/LockManager/index.d.ts +4 -2
  169. package/types/javax/jcr/nodetype/ItemDefinition/index.d.ts +4 -105
  170. package/types/javax/jcr/nodetype/ItemDefinition/index.js +0 -5
  171. package/types/javax/jcr/nodetype/NodeDefinition/index.d.ts +5 -3
  172. package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +4 -2
  173. package/types/javax/jcr/nodetype/NodeType/index.d.ts +262 -269
  174. package/types/javax/jcr/nodetype/NodeType/index.js +1 -12
  175. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +5 -107
  176. package/types/javax/jcr/nodetype/NodeTypeDefinition/index.js +1 -7
  177. package/types/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +5 -3
  178. package/types/javax/jcr/nodetype/NodeTypeManager/index.d.ts +9 -130
  179. package/types/javax/jcr/nodetype/NodeTypeManager/index.js +1 -8
  180. package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +4 -2
  181. package/types/javax/jcr/nodetype/PropertyDefinition/index.d.ts +5 -272
  182. package/types/javax/jcr/nodetype/PropertyDefinition/index.js +1 -7
  183. package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +5 -3
  184. package/types/javax/jcr/observation/Event/index.d.ts +85 -42
  185. package/types/javax/jcr/observation/EventIterator/index.d.ts +5 -3
  186. package/types/javax/jcr/observation/EventJournal/index.d.ts +4 -2
  187. package/types/javax/jcr/observation/EventListener/index.d.ts +4 -2
  188. package/types/javax/jcr/observation/EventListenerIterator/index.d.ts +5 -3
  189. package/types/javax/jcr/observation/ObservationManager/index.d.ts +6 -4
  190. package/types/javax/jcr/query/Query/index.d.ts +35 -12
  191. package/types/javax/jcr/query/QueryManager/index.d.ts +6 -4
  192. package/types/javax/jcr/query/QueryResult/index.d.ts +5 -3
  193. package/types/javax/jcr/query/Row/index.d.ts +5 -3
  194. package/types/javax/jcr/query/RowIterator/index.d.ts +5 -3
  195. package/types/javax/jcr/query/qom/And/index.d.ts +4 -2
  196. package/types/javax/jcr/query/qom/BindVariableValue/index.d.ts +4 -2
  197. package/types/javax/jcr/query/qom/ChildNode/index.d.ts +4 -2
  198. package/types/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +4 -2
  199. package/types/javax/jcr/query/qom/Column/index.d.ts +3 -1
  200. package/types/javax/jcr/query/qom/Comparison/index.d.ts +6 -4
  201. package/types/javax/jcr/query/qom/Constraint/index.d.ts +3 -1
  202. package/types/javax/jcr/query/qom/DescendantNode/index.d.ts +4 -2
  203. package/types/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +4 -2
  204. package/types/javax/jcr/query/qom/DynamicOperand/index.d.ts +4 -2
  205. package/types/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +4 -2
  206. package/types/javax/jcr/query/qom/FullTextSearch/index.d.ts +5 -3
  207. package/types/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +4 -2
  208. package/types/javax/jcr/query/qom/Join/index.d.ts +5 -3
  209. package/types/javax/jcr/query/qom/JoinCondition/index.d.ts +3 -1
  210. package/types/javax/jcr/query/qom/Length/index.d.ts +5 -3
  211. package/types/javax/jcr/query/qom/Literal/index.d.ts +5 -3
  212. package/types/javax/jcr/query/qom/LowerCase/index.d.ts +4 -2
  213. package/types/javax/jcr/query/qom/NodeLocalName/index.d.ts +4 -2
  214. package/types/javax/jcr/query/qom/NodeName/index.d.ts +4 -2
  215. package/types/javax/jcr/query/qom/Not/index.d.ts +4 -2
  216. package/types/javax/jcr/query/qom/Operand/index.d.ts +3 -1
  217. package/types/javax/jcr/query/qom/Or/index.d.ts +4 -2
  218. package/types/javax/jcr/query/qom/Ordering/index.d.ts +4 -2
  219. package/types/javax/jcr/query/qom/PropertyExistence/index.d.ts +4 -2
  220. package/types/javax/jcr/query/qom/PropertyValue/index.d.ts +4 -2
  221. package/types/javax/jcr/query/qom/QueryObjectModel/index.d.ts +8 -6
  222. package/types/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +76 -2
  223. package/types/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +37 -35
  224. package/types/javax/jcr/query/qom/SameNode/index.d.ts +4 -2
  225. package/types/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +4 -2
  226. package/types/javax/jcr/query/qom/Selector/index.d.ts +4 -2
  227. package/types/javax/jcr/query/qom/Source/index.d.ts +3 -1
  228. package/types/javax/jcr/query/qom/StaticOperand/index.d.ts +4 -2
  229. package/types/javax/jcr/query/qom/UpperCase/index.d.ts +4 -2
  230. package/types/javax/jcr/retention/Hold/index.d.ts +3 -1
  231. package/types/javax/jcr/retention/RetentionManager/index.d.ts +5 -3
  232. package/types/javax/jcr/retention/RetentionPolicy/index.d.ts +3 -1
  233. package/types/javax/jcr/security/AccessControlEntry/index.d.ts +4 -2
  234. package/types/javax/jcr/security/AccessControlList/index.d.ts +6 -4
  235. package/types/javax/jcr/security/AccessControlManager/index.d.ts +6 -4
  236. package/types/javax/jcr/security/AccessControlPolicy/index.d.ts +3 -1
  237. package/types/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +5 -3
  238. package/types/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +4 -2
  239. package/types/javax/jcr/security/Privilege/index.d.ts +130 -44
  240. package/types/javax/jcr/version/Version/index.d.ts +5 -3
  241. package/types/javax/jcr/version/VersionHistory/index.d.ts +7 -5
  242. package/types/javax/jcr/version/VersionIterator/index.d.ts +5 -3
  243. package/types/javax/jcr/version/VersionManager/index.d.ts +7 -5
  244. package/types/senselogic/sitevision/api/base/Builder/index.d.ts +3 -1
  245. package/types/senselogic/sitevision/api/base/Filter/index.d.ts +3 -1
  246. package/types/senselogic/sitevision/api/base/FilterSplit/index.d.ts +4 -2
  247. package/types/senselogic/sitevision/api/base/Loadable/index.d.ts +3 -1
  248. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.d.ts +9 -0
  249. package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.js +11 -0
  250. package/types/senselogic/sitevision/api/base/Resolver/index.d.ts +3 -1
  251. package/types/senselogic/sitevision/api/base/Wrapper/index.d.ts +3 -1
  252. package/types/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +13 -7
  253. package/types/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +3 -1
  254. package/types/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +5 -3
  255. package/types/senselogic/sitevision/api/i18n/Currency/index.d.ts +3 -1
  256. package/types/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +5 -3
  257. package/types/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +3 -1
  258. package/types/senselogic/sitevision/api/mail/Mail/index.d.ts +3 -1
  259. package/types/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +3 -1
  260. package/types/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +3 -1
  261. package/types/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +3 -1
  262. package/types/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +4 -2
  263. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.d.ts +51 -0
  264. package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.js +12 -0
  265. package/types/senselogic/sitevision/api/render/ImageScaler/index.d.ts +4 -2
  266. package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +4 -2
  267. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +3 -1
  268. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.d.ts +85 -0
  269. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.js +21 -0
  270. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.d.ts +31 -0
  271. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.js +12 -0
  272. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.d.ts +31 -0
  273. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.js +12 -0
  274. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.d.ts +67 -0
  275. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.js +18 -0
  276. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.d.ts +25 -0
  277. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.js +11 -0
  278. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.d.ts +19 -0
  279. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.js +10 -0
  280. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.d.ts +1243 -0
  281. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.js +189 -0
  282. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.d.ts +31 -0
  283. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.js +12 -0
  284. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.d.ts +91 -0
  285. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.js +22 -0
  286. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.d.ts +27 -0
  287. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.js +11 -0
  288. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.d.ts +19 -0
  289. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.js +10 -0
  290. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.d.ts +19 -0
  291. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.js +10 -0
  292. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.d.ts +25 -0
  293. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.js +11 -0
  294. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.d.ts +37 -0
  295. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.js +13 -0
  296. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.d.ts +25 -0
  297. package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.js +11 -0
  298. package/types/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +3 -1
  299. package/types/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +3 -1
  300. package/types/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +4 -2
  301. package/types/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +3 -1
  302. package/types/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +3 -1
  303. package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +3 -1
  304. package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +4 -2
  305. package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +24 -2
  306. package/types/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +3 -1
  307. package/types/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +4 -2
  308. package/types/senselogic/sitevision/api/search/SearchHit/index.d.ts +19 -3
  309. package/types/senselogic/sitevision/api/search/SearchResult/index.d.ts +31 -7
  310. package/types/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +3 -1
  311. package/types/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +3 -1
  312. package/types/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +4 -2
  313. package/types/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +3 -1
  314. package/types/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +3 -1
  315. package/types/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +3 -1
  316. package/types/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +3 -1
  317. package/types/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +3 -1
  318. package/types/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +3 -1
  319. package/types/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +3 -1
  320. package/types/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +3 -1
  321. package/types/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +3 -1
  322. package/types/senselogic/sitevision/api/security/MessageDigester/index.d.ts +3 -1
  323. package/types/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +4 -2
  324. package/types/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +4 -2
  325. package/types/senselogic/sitevision/api/security/SecretStore/index.d.ts +3 -1
  326. package/types/senselogic/sitevision/api/security/UserUtil/index.d.ts +4 -2
  327. package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +35 -3
  328. package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +3 -1
  329. package/types/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +5 -3
  330. package/types/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +3 -1
  331. package/types/senselogic/sitevision/api/xml/XmlElement/index.d.ts +3 -1
  332. package/types/senselogic/sitevision/api/xml/XmlElementHandler/index.d.ts +4 -2
@@ -1,465 +1,3 @@
1
- /**
2
- * Gets the boolean true primitive.
3
- * @return <code>true</code>
4
- */
5
- export function getTrue(): boolean;
6
-
7
- /**
8
- * Gets the boolean false primitive.
9
- * @return <code>false</code>
10
- */
11
- export function getFalse(): boolean;
12
-
13
- /**
14
- * Gets the null reference.
15
- * @return <code>null</code>
16
- */
17
- export function getNull(): unknown;
18
-
19
- /**
20
- * Gets an object that is ensured not to be null.
21
- *
22
- * <p>
23
- * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
24
- * </p>
25
- *
26
- * <p>
27
- * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
28
- * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
29
- * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
30
- * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
31
- * can be used to avoid such problems.
32
- * </p>
33
- *
34
- * <p>
35
- * <strong>An example</strong><br>
36
- * This Velocity code:
37
- * </p>
38
- * <pre><code> #if ($anObject.getPersonOrNull())
39
- * #set ($person = $anObject.getPersonOrNull())
40
- * $person.getName()
41
- * ...
42
- * #end</code></pre>
43
- * Can be better utilized as:
44
- * <pre><code> #set ($scriptUtil = ...)
45
- *
46
- * #set ($person = $scriptUtil.getNonNull(${anObject.getPersonOrNull()}))
47
- * #if ($person)
48
- * $person.getName()
49
- * ...
50
- * #end
51
- * </code></pre>
52
- * @param anObject the object that might be <code>null</code>
53
- * @return anObject if non-null, <code>Boolean.FALSE</code> otherwise
54
- * @see #getNonNull(Object, Object)
55
- * @see #getNonBlank(String)
56
- * @since Sitevision 2.6.2
57
- */
58
- export function getNonNull(anObject: unknown): unknown;
59
-
60
- /**
61
- * Gets an object that is ensured not to be null or a whitespace only string.
62
- *
63
- * <p>
64
- * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
65
- * </p>
66
- *
67
- * <p>
68
- * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
69
- * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
70
- * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
71
- * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
72
- * can be used to avoid such problems.
73
- * </p>
74
- *
75
- * <p>
76
- * <strong>An example</strong><br>
77
- * This Velocity code:
78
- * </p>
79
- * <pre><code> #if ($anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
80
- * #set ($name = $anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
81
- * #if ($name.trim().length() &gt; 0)
82
- * &lt;p&gt;
83
- * $name
84
- * &lt;/p&gt;
85
- * #end
86
- * #end</code></pre>
87
- * Can be better utilized as:
88
- * <pre><code> #set ($scriptUtil = ...)
89
- *
90
- * #set ($name = $scriptUtil.getNonBlank(${anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly()}))
91
- * #if ($name)
92
- * &lt;p&gt;
93
- * $name
94
- * &lt;/p&gt;
95
- * #end
96
- * </code></pre>
97
- *
98
- * <p>
99
- * <strong>A typical example when using {@link senselogic.sitevision.api.property.PropertyUtil} and whitespace is an issue</strong><br>
100
- * This Velocity code:
101
- * </p>
102
- * <pre><code> #if ($propertyUtil.getString($theNode, 'thePropertyName'))
103
- * #set ($propertyValue = $propertyUtil.getString($theNode, 'thePropertyName'))
104
- * #if ($propertyValue.trim().length() &gt; 0)
105
- * &lt;p&gt;
106
- * $propertyValue
107
- * &lt;/p&gt;
108
- * #end
109
- * #end</code></pre>
110
- * Can be better utilized as:
111
- * <pre><code> #set ($scriptUtil = ...)
112
- *
113
- * #set ($propertyValue = $scriptUtil.getNonBlank(${propertyUtil.getString($theNode, 'thePropertyName')}))
114
- * #if ($propertyValue)
115
- * &lt;p&gt;
116
- * $propertyValue
117
- * &lt;/p&gt;
118
- * #end
119
- * </code></pre>
120
- * @param aString the string that might be <code>null</code> or whitespace only
121
- * @return aString if <code>aString</code> is non-null and not whitespace only, <code>Boolean.FALSE</code> otherwise
122
- * @see #getNonBlank(String, Object)
123
- * @since Sitevision 3.6
124
- */
125
- export function getNonBlank(aString: string): unknown;
126
-
127
- /**
128
- * Gets a default value if an object is null.
129
- * @param anObject the object that might be <code>null</code>
130
- * @param aDefaultValue the default value to return if <code>anObject</code> is <code>null</code>
131
- * @return anObject if non-null, <code>aDefaultValue</code> otherwise
132
- * @see #getNonNull(Object)
133
- * @since Sitevision 2.6.2
134
- */
135
- export function getNonNull(anObject: unknown, aDefaultValue: unknown): unknown;
136
-
137
- /**
138
- * Gets a default value if a string is null or whitespace only.
139
- * @param aString the string that might be <code>null</code> or whitespace only
140
- * @param aDefaultValue the default value to return if <code>aString</code> is <code>null</code> or whitespace only
141
- * @return aString if <code>aString</code> is non-null and not whitespace only, <code>aDefaultValue</code> otherwise
142
- * @see #getNonBlank(String)
143
- * @since Sitevision 3.6
144
- */
145
- export function getNonBlank(aString: string, aDefaultValue: unknown): unknown;
146
-
147
- /**
148
- * Checks if a string is not null and not empty.
149
- * @param aString the string to check
150
- * @return <code>true</code> if <code>aString</code> is not <code>null</code> and not empty, <code>false</code> otherwise
151
- * @see #isNotBlank(String)
152
- * @since Sitevision 2.6
153
- */
154
- export function isNotEmpty(aString: string): boolean;
155
-
156
- /**
157
- * Checks if a string is null or empty.
158
- * @param aString the string to check
159
- * @return <code>true</code> if <code>aString</code> is <code>null</code> or empty, <code>false</code> otherwise
160
- * @see #isBlank(String)
161
- * @since Sitevision 3.6.2
162
- */
163
- export function isEmpty(aString: string): boolean;
164
-
165
- /**
166
- * Checks if a string is not null, not empty and not whitespace only.
167
- * @param aString the string to check
168
- * @return <code>true</code> if <code>aString</code> is not <code>null</code>, not empty and not whitespace only - <code>false</code> otherwise
169
- * @see #isNotEmpty(String)
170
- * @since Sitevision 2.6
171
- */
172
- export function isNotBlank(aString: string): boolean;
173
-
174
- /**
175
- * Checks if a string is null, empty or whitespace only.
176
- * @param aString the string to check
177
- * @return <code>true</code> if <code>aString</code> is <code>null</code>, empty or whitespace only - <code>false</code> otherwise
178
- * @see #isEmpty(String)
179
- * @since Sitevision 3.6.2
180
- */
181
- export function isBlank(aString: string): boolean;
182
-
183
- /**
184
- * Gets a system property. This method invokes the getProperty method of the java.lang.System class, i.e <code>System.getProperty(String)</code>.
185
- *
186
- * <p>
187
- * <strong>Important note!</strong><br>
188
- * This method can be used to reveal potential sensitive information about the server.
189
- * </p>
190
- * <p>
191
- * Allowed properties:
192
- * </p>
193
- * <ul>
194
- * <li>"sitevision.version" (5.1)</li>
195
- * <li>"sitevision.build" (5.1)</li>
196
- * <li>"sitevision.environment.type" (5.2.1)</li>
197
- * </ul>
198
- * <p>
199
- * A legacy mode that enables the API to return all properties can be enabled using the following system property:<br>
200
- * <em>sitevision.api.scriptutil.legacy_system_properties=true</em>
201
- * </p>
202
- *
203
- * <p>
204
- * A tip if you need to do backward compatibility workarounds: The Sitevision version is accessible as a system property
205
- * named <em>sitevision.version</em>.
206
- * </p>
207
- * @param aName the name of the system property
208
- * @return the value of the system property, or <code>null</code> if indeterminable (e.g. no accessible property named <code>aName</code> exist)
209
- * @since Sitevision 2.6_02
210
- * @deprecated Exposes server information and will therefore be removed in future releases of Sitevision
211
- */
212
- export function getSystemProperty(aName: string): string;
213
-
214
- /**
215
- * Creates and returns an instance of a Java class.
216
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
217
- * @return an instance of the class, or <code>null</code> if an instance can not be created
218
- * @deprecated Use {@link senselogic.sitevision.api.script.factory.InstanceCreatorUtil#getDefaultInstance(String)} instead
219
- */
220
- export function getInstance(aQualifiedClassName: string): unknown;
221
-
222
- /**
223
- * Methods that wraps an array in a <code>List</code>. Arrays are sub optimal in Velocity and JavaScript.
224
- * @param anArray an array that needs to be wrapped
225
- * @return a list containing the array elements. If the array is <code>null</code>, <code>null</code> is returned
226
- * @since Sitevision 2.6_06
227
- */
228
- export function getList(anArray: unknown): unknown;
229
-
230
- /**
231
- * Gets the date format pattern used in the Sitevision editor for a specific Locale.
232
- * @param aLocale the <code>Locale</code> that specifies the date format pattern
233
- * @return the date format pattern used in the Sitevision editor that corresponds to <code>aLocale</code>. If <code>aLocale</code> is <code>null</code> then the current locale (as of {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()}) is used to locate the format pattern. If no pattern exist for <code>aLocale</code> then the pattern that corresponds to <code>Locale.ENGLISH</code> will be returned.
234
- * @since Sitevision 2.6.1_02
235
- * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getEditorFormatPattern(java.util.Locale)} instead
236
- */
237
- export function getFormatPattern(aLocale: unknown): string;
238
-
239
- /**
240
- * Methods that formats a date according to a <code>SimpleDateFormat</code> pattern
241
- * @param aFormatPattern date to string pattern according to <code>SimpleDateFormat</code>. If <code>null</code> is specified the default format is used
242
- * @param aDate the <code>Date</code>
243
- * @return returns a <code>String</code> representation of <code>aDate</code> according to <code>aFormatPattern</code>. Returns <code>null</code> if <code>aDate</code> is <code>null</code>.
244
- * @since Sitevision 2.6_06
245
- * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getDateAsString(String, java.util.Date)} instead
246
- */
247
- export function getDateAsString(aFormatPattern: string, aDate: unknown): string;
248
-
249
- /**
250
- * Methods that formats the date of a calendar according to a <code>SimpleDateFormat</code> pattern
251
- * @param aFormatPattern date to string pattern according to <code>SimpleDateFormat</code>. If <code>null</code> is specified the default format is used
252
- * @param aCalendar the <code>Calendar</code>
253
- * @return returns a <code>String</code> representation of the date of <code>aCalendar</code> according to <code>aFormatPattern</code>. Returns <code>null</code> if <code>aDate</code> is <code>null</code>.
254
- * @since Sitevision 2.6.1_02
255
- * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getCalendarAsString(String, java.util.Calendar)} instead
256
- */
257
- export function getCalendarAsString(
258
- aFormatPattern: string,
259
- aCalendar: unknown
260
- ): string;
261
-
262
- /**
263
- * Methods that returns a human presentable size with an appropriate byte-suffix (bytes/kB/MB/GB/TB).
264
- * <p>
265
- * Note! This method uses two significant digits and 1024 as base. Some examples:<br>
266
- * &nbsp;&nbsp; <code>126</code> -&gt; "<code>130 bytes</code>"<br>
267
- * &nbsp;&nbsp; <code>126975</code> -&gt; "<code>120 kB</code>"<br>
268
- * &nbsp;&nbsp; <code>456456456</code> -&gt; "<code>440 MB</code>"
269
- * </p>
270
- * @param aSize a size that should be presented for humans
271
- * @return a human presentable byte-suffixed size with two significant digits. If <code>aSize</code> is less than 0 or larger than 1125899906842624 (1024 TB), an empty String will be returned.
272
- * @since Sitevision 2.6.1_04
273
- */
274
- export function getHumanPresentableSize(aSize: number): string;
275
-
276
- /**
277
- * Method that converts a string to an int.
278
- * @param aString the string to be converted
279
- * @return <code>aString</code> as <code>int</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1 is returned
280
- * @since Sitevision 2.6.1_04
281
- */
282
- export function stringToInt(aString: string): number;
283
-
284
- /**
285
- * Method that converts a string to a long.
286
- * @param aString the string to be converted
287
- * @return <code>aString</code> as <code>long</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1 is returned
288
- * @since Sitevision 2.6.1_04
289
- */
290
- export function stringToLong(aString: string): number;
291
-
292
- /**
293
- * Method that converts a string to a double.
294
- * @param aString the string to be converted
295
- * @return <code>aString</code> as <code>double</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1.0 is returned
296
- * @since Sitevision 2.6.1_04
297
- */
298
- export function stringToDouble(aString: string): number;
299
-
300
- /**
301
- * Method that converts a string to a float.
302
- * @param aString the string to be converted
303
- * @return <code>aString</code> as <code>float</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1.0 is returned
304
- * @since Sitevision 2.6.1_04
305
- */
306
- export function stringToFloat(aString: string): number;
307
-
308
- /**
309
- * Method that returns true for values that can be interpreted as the true value.
310
- * @param anObject an Object that might be interpreted as a true value
311
- * @return returns <code>true</code> if <code>anObject</code> is a <code>Boolean</code> with a <code>true</code> value or a <code>String</code> with a "<code>true</code>" value, <code>false</code> otherwise.
312
- * @since Sitevision 2.6.1_04
313
- */
314
- export function isTrue(anObject: unknown): boolean;
315
-
316
- /**
317
- * Method that returns true for values that can be interpreted as the false value.
318
- * @param anObject an Object that might be interpreted as a false value
319
- * @return returns <code>true</code> if <code>anObject</code> is a <code>Boolean</code> with a <code>false</code> value or a <code>String</code> with a "<code>false</code>" value, <code>false</code> otherwise.
320
- * @since Sitevision 2.6.1_04
321
- */
322
- export function isFalse(anObject: unknown): boolean;
323
-
324
- /**
325
- * Joins the elements of an array to a single String.
326
- *
327
- * <p>Some examples:</p>
328
- * <pre><code>
329
- * joinArray(["one", "two", "three"], ";") -&gt; "one;two;three"
330
- * joinArray(["a", myTwoInteger], "-") -&gt; "a-2"
331
- * joinArray(["", null, "three"], "-") -&gt; "--three"
332
- * joinArray([], "-") -&gt; ""
333
- * joinArray(null, "-") -&gt; null
334
- * </code></pre>
335
- * @param anArray the array that should be joined to a single string. <code>null</code> elements will be treated as empty (<code>""</code>) and for non-String elements <code>toString()</code> will be invoked on the element to get a string representation.
336
- * @param aSeparator the separator that should delimit the elements of <code>anArray</code> in the resulting joined string. <code>null</code> will be treated as empty (<code>""</code>)
337
- * @return the joined <code>String</code>. If <code>anArray</code> is <code>null</code>, <code>null</code> will be returned
338
- * @see #joinCollection(java.util.Collection, String)
339
- * @since Sitevision 2.6.1_04
340
- */
341
- export function joinArray(anArray: unknown, aSeparator: string): string;
342
-
343
- /**
344
- * Joins the items of a Collection to a single String.
345
- *
346
- * <p>
347
- * For examples, see {@link #joinArray(Object[], String)}
348
- * </p>
349
- * @param aCollection the collection that should be joined to a single string. <code>null</code> items will be treated as empty (<code>""</code>) and for non-String items <code>toString()</code> will be invoked on the item to get a string representation.
350
- * @param aSeparator the separator that should delimit the items of <code>aCollection</code> in the resulting joined string. <code>null</code> will be treated as empty (<code>""</code>)
351
- * @return the joined <code>String</code>. If <code>aCollection</code> is <code>null</code>, <code>null</code> will be returned
352
- * @see #joinArray(Object[], String)
353
- * @since Sitevision 2.6.1_04
354
- */
355
- export function joinCollection(
356
- aCollection: unknown,
357
- aSeparator: string
358
- ): string;
359
-
360
- /**
361
- * A utility method to get a formatted string based on a pattern and some pattern arguments.
362
- *
363
- * <p>
364
- * <strong>A Velocity example:</strong>
365
- * </p>
366
- * <pre><code>
367
- * #set ($instanceCreatorUtil = ...)
368
- * #set ($scriptUtil = ...)
369
- * #set ($searchPhrase = ...)
370
- *
371
- * <em>## Determine pattern</em>
372
- * #if ($language == 'sv')
373
- * #set ($pattern = 'Din sökning {0} gav inga träffar')
374
- * #else
375
- * #set ($pattern = 'No hits for your search {0}')
376
- * #end
377
- *
378
- * <em>## Set up pattern argument(s)</em>
379
- * #set ($argsList = $instanceCreatorUtil.list)
380
- * $scriptUtil.swallow(${argsList.add($searchPhrase)})
381
- *
382
- * <em>## Format and print result</em>
383
- * &lt;p&gt;$scriptUtil.messageFormat($pattern, $argsList)&lt;/p&gt;
384
- * </code></pre>
385
- * @param aMessageFormatPattern a pattern accepted by the Java <a href="http://docs.oracle.com/javase/8/docs/api/java/text/MessageFormat.html">MessageFormat</a> class
386
- * @param anArguments arguments needed by the pattern
387
- * @return the result of the pattern evaluation or <code>null</code> if evaluation fails. Returns <code>null</code> if <code>aMessageFormatPattern</code> is <code>null</code> or if <code>anArguments</code> doesn't contain any arguments.
388
- * @since Sitevision 3.0
389
- */
390
- export function messageFormat(
391
- aMessageFormatPattern: string,
392
- anArguments: unknown
393
- ): string;
394
-
395
- /**
396
- * A utility method that can be used to prevent method invocation return values to be added to the Velocity output.
397
- *
398
- * <p>
399
- * <strong>An example:</strong><br>This Velocity code:
400
- * </p>
401
- * <pre><code>
402
- * #set ($myList = $instanceCreatorUtil.list)
403
- * $myList.add("Magnus Lövgren")
404
- * $myList.add("Mikael Wikblom")
405
- * </code></pre>
406
- * will result in the following Velocity output (the <code>add</code> method of <code>ArrayList</code> returns a <code>boolean</code>):
407
- * <pre><code>true true</code></pre>
408
- * <p>
409
- * If a non-void method is invoked and the return value isn't handled, it will be part of the Velocity output.
410
- * The <code>swallow</code> method can be used to prevent that (i.e. use it to "swallow" the result):
411
- * </p>
412
- * <pre><code>
413
- * #set ($myList = $instanceCreatorUtil.list)
414
- * $scriptUtil.swallow(${myList.add("Magnus Lövgren")})
415
- * $scriptUtil.swallow(${myList.add("Mikael Wikblom")})</code></pre>
416
- * <p>
417
- * <em>Note! The code above is just an example that illustrates a common problem. When creating and working with a
418
- * List from Velocity, you should probably use a {@link senselogic.sitevision.api.script.factory.ListWrapper} instead</em>
419
- * </p>
420
- * @param anObject the object that should be "swallowed"
421
- * @since Sitevision 3.0
422
- */
423
- export function swallow(anObject: unknown): void;
424
-
425
- /**
426
- * Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (<code>null</code>
427
- * if the string is empty or <code>null</code>).
428
- *
429
- * <p>
430
- * The String is trimmed using <code>String.trim()</code>
431
- * </p>
432
- * @param aString the string that should be trimmed
433
- * @return the trimmed String. Returns <code>null</code> if <code>aString</code> is <code>null</code> or the trimmed String is empty.
434
- * @since Sitevision 2.6.1_04
435
- */
436
- export function trimToNull(aString: string): string;
437
-
438
- /**
439
- * Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (empty String (<code>""</code>)
440
- * if the string is empty or <code>null</code>).
441
- *
442
- * <p>
443
- * The String is trimmed using <code>String.trim()</code>
444
- * </p>
445
- * @param aString the string that should be trimmed
446
- * @return the trimmed String. Returns empty (<code>""</code>) if <code>aString</code> is <code>null</code> or the trimmed String is empty.
447
- * @since Sitevision 2.6.1_04
448
- */
449
- export function trimToEmpty(aString: string): string;
450
-
451
- /**
452
- * Flattens a multi-lined string to a trimmed single-line string.
453
- *
454
- * <p>
455
- * This method replaces all whitespace (space, line break and such) with a space, but will never add multiple spaces.
456
- * </p>
457
- * @param aString the multi-lined string
458
- * @return a single-line trimmed string with sequential whitespace removed, or <code>null</code> if <code>aString</code> is <code>null</code>.
459
- * @since Sitevision 3.6
460
- */
461
- export function flatten(aString: string): string;
462
-
463
1
  /**
464
2
  * Scripting utility interface that might be needed when using a limited scripting or template language (such as Velocity).
465
3
  *
@@ -469,38 +7,463 @@ export function flatten(aString: string): string;
469
7
  * </p>
470
8
  * @author Magnus Lövgren
471
9
  */
472
- declare namespace scriptUtil {
473
- export {
474
- getTrue,
475
- getFalse,
476
- getNull,
477
- getNonNull,
478
- getNonBlank,
479
- isNotEmpty,
480
- isEmpty,
481
- isNotBlank,
482
- isBlank,
483
- getSystemProperty,
484
- getInstance,
485
- getList,
486
- getFormatPattern,
487
- getDateAsString,
488
- getCalendarAsString,
489
- getHumanPresentableSize,
490
- stringToInt,
491
- stringToLong,
492
- stringToDouble,
493
- stringToFloat,
494
- isTrue,
495
- isFalse,
496
- joinArray,
497
- joinCollection,
498
- messageFormat,
499
- swallow,
500
- trimToNull,
501
- trimToEmpty,
502
- flatten,
503
- };
10
+ export interface ScriptUtil {
11
+ /**
12
+ * Gets the boolean true primitive.
13
+ * @return <code>true</code>
14
+ */
15
+ getTrue(): boolean;
16
+
17
+ /**
18
+ * Gets the boolean false primitive.
19
+ * @return <code>false</code>
20
+ */
21
+ getFalse(): boolean;
22
+
23
+ /**
24
+ * Gets the null reference.
25
+ * @return <code>null</code>
26
+ */
27
+ getNull(): unknown;
28
+
29
+ /**
30
+ * Gets an object that is ensured not to be null.
31
+ *
32
+ * <p>
33
+ * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
34
+ * </p>
35
+ *
36
+ * <p>
37
+ * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
38
+ * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
39
+ * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
40
+ * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
41
+ * can be used to avoid such problems.
42
+ * </p>
43
+ *
44
+ * <p>
45
+ * <strong>An example</strong><br>
46
+ * This Velocity code:
47
+ * </p>
48
+ * <pre><code> #if ($anObject.getPersonOrNull())
49
+ * #set ($person = $anObject.getPersonOrNull())
50
+ * $person.getName()
51
+ * ...
52
+ * #end</code></pre>
53
+ * Can be better utilized as:
54
+ * <pre><code> #set ($scriptUtil = ...)
55
+ *
56
+ * #set ($person = $scriptUtil.getNonNull(${anObject.getPersonOrNull()}))
57
+ * #if ($person)
58
+ * $person.getName()
59
+ * ...
60
+ * #end
61
+ * </code></pre>
62
+ * @param anObject the object that might be <code>null</code>
63
+ * @return anObject if non-null, <code>Boolean.FALSE</code> otherwise
64
+ * @see #getNonNull(Object, Object)
65
+ * @see #getNonBlank(String)
66
+ * @since Sitevision 2.6.2
67
+ */
68
+ getNonNull(anObject: unknown): unknown;
69
+
70
+ /**
71
+ * Gets an object that is ensured not to be null or a whitespace only string.
72
+ *
73
+ * <p>
74
+ * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
75
+ * </p>
76
+ *
77
+ * <p>
78
+ * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
79
+ * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
80
+ * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
81
+ * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
82
+ * can be used to avoid such problems.
83
+ * </p>
84
+ *
85
+ * <p>
86
+ * <strong>An example</strong><br>
87
+ * This Velocity code:
88
+ * </p>
89
+ * <pre><code> #if ($anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
90
+ * #set ($name = $anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
91
+ * #if ($name.trim().length() &gt; 0)
92
+ * &lt;p&gt;
93
+ * $name
94
+ * &lt;/p&gt;
95
+ * #end
96
+ * #end</code></pre>
97
+ * Can be better utilized as:
98
+ * <pre><code> #set ($scriptUtil = ...)
99
+ *
100
+ * #set ($name = $scriptUtil.getNonBlank(${anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly()}))
101
+ * #if ($name)
102
+ * &lt;p&gt;
103
+ * $name
104
+ * &lt;/p&gt;
105
+ * #end
106
+ * </code></pre>
107
+ *
108
+ * <p>
109
+ * <strong>A typical example when using {@link senselogic.sitevision.api.property.PropertyUtil} and whitespace is an issue</strong><br>
110
+ * This Velocity code:
111
+ * </p>
112
+ * <pre><code> #if ($propertyUtil.getString($theNode, 'thePropertyName'))
113
+ * #set ($propertyValue = $propertyUtil.getString($theNode, 'thePropertyName'))
114
+ * #if ($propertyValue.trim().length() &gt; 0)
115
+ * &lt;p&gt;
116
+ * $propertyValue
117
+ * &lt;/p&gt;
118
+ * #end
119
+ * #end</code></pre>
120
+ * Can be better utilized as:
121
+ * <pre><code> #set ($scriptUtil = ...)
122
+ *
123
+ * #set ($propertyValue = $scriptUtil.getNonBlank(${propertyUtil.getString($theNode, 'thePropertyName')}))
124
+ * #if ($propertyValue)
125
+ * &lt;p&gt;
126
+ * $propertyValue
127
+ * &lt;/p&gt;
128
+ * #end
129
+ * </code></pre>
130
+ * @param aString the string that might be <code>null</code> or whitespace only
131
+ * @return aString if <code>aString</code> is non-null and not whitespace only, <code>Boolean.FALSE</code> otherwise
132
+ * @see #getNonBlank(String, Object)
133
+ * @since Sitevision 3.6
134
+ */
135
+ getNonBlank(aString: string): unknown;
136
+
137
+ /**
138
+ * Gets a default value if an object is null.
139
+ * @param anObject the object that might be <code>null</code>
140
+ * @param aDefaultValue the default value to return if <code>anObject</code> is <code>null</code>
141
+ * @return anObject if non-null, <code>aDefaultValue</code> otherwise
142
+ * @see #getNonNull(Object)
143
+ * @since Sitevision 2.6.2
144
+ */
145
+ getNonNull(anObject: unknown, aDefaultValue: unknown): unknown;
146
+
147
+ /**
148
+ * Gets a default value if a string is null or whitespace only.
149
+ * @param aString the string that might be <code>null</code> or whitespace only
150
+ * @param aDefaultValue the default value to return if <code>aString</code> is <code>null</code> or whitespace only
151
+ * @return aString if <code>aString</code> is non-null and not whitespace only, <code>aDefaultValue</code> otherwise
152
+ * @see #getNonBlank(String)
153
+ * @since Sitevision 3.6
154
+ */
155
+ getNonBlank(aString: string, aDefaultValue: unknown): unknown;
156
+
157
+ /**
158
+ * Checks if a string is not null and not empty.
159
+ * @param aString the string to check
160
+ * @return <code>true</code> if <code>aString</code> is not <code>null</code> and not empty, <code>false</code> otherwise
161
+ * @see #isNotBlank(String)
162
+ * @since Sitevision 2.6
163
+ */
164
+ isNotEmpty(aString: string): boolean;
165
+
166
+ /**
167
+ * Checks if a string is null or empty.
168
+ * @param aString the string to check
169
+ * @return <code>true</code> if <code>aString</code> is <code>null</code> or empty, <code>false</code> otherwise
170
+ * @see #isBlank(String)
171
+ * @since Sitevision 3.6.2
172
+ */
173
+ isEmpty(aString: string): boolean;
174
+
175
+ /**
176
+ * Checks if a string is not null, not empty and not whitespace only.
177
+ * @param aString the string to check
178
+ * @return <code>true</code> if <code>aString</code> is not <code>null</code>, not empty and not whitespace only - <code>false</code> otherwise
179
+ * @see #isNotEmpty(String)
180
+ * @since Sitevision 2.6
181
+ */
182
+ isNotBlank(aString: string): boolean;
183
+
184
+ /**
185
+ * Checks if a string is null, empty or whitespace only.
186
+ * @param aString the string to check
187
+ * @return <code>true</code> if <code>aString</code> is <code>null</code>, empty or whitespace only - <code>false</code> otherwise
188
+ * @see #isEmpty(String)
189
+ * @since Sitevision 3.6.2
190
+ */
191
+ isBlank(aString: string): boolean;
192
+
193
+ /**
194
+ * Gets a system property. This method invokes the getProperty method of the java.lang.System class, i.e <code>System.getProperty(String)</code>.
195
+ *
196
+ * <p>
197
+ * <strong>Important note!</strong><br>
198
+ * This method can be used to reveal potential sensitive information about the server.
199
+ * </p>
200
+ * <p>
201
+ * Allowed properties:
202
+ * </p>
203
+ * <ul>
204
+ * <li>"sitevision.version" (5.1)</li>
205
+ * <li>"sitevision.build" (5.1)</li>
206
+ * <li>"sitevision.environment.type" (5.2.1)</li>
207
+ * </ul>
208
+ * <p>
209
+ * A legacy mode that enables the API to return all properties can be enabled using the following system property:<br>
210
+ * <em>sitevision.api.scriptutil.legacy_system_properties=true</em>
211
+ * </p>
212
+ *
213
+ * <p>
214
+ * A tip if you need to do backward compatibility workarounds: The Sitevision version is accessible as a system property
215
+ * named <em>sitevision.version</em>.
216
+ * </p>
217
+ * @param aName the name of the system property
218
+ * @return the value of the system property, or <code>null</code> if indeterminable (e.g. no accessible property named <code>aName</code> exist)
219
+ * @since Sitevision 2.6_02
220
+ * @deprecated Exposes server information and will therefore be removed in future releases of Sitevision
221
+ */
222
+ getSystemProperty(aName: string): string;
223
+
224
+ /**
225
+ * Creates and returns an instance of a Java class.
226
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
227
+ * @return an instance of the class, or <code>null</code> if an instance can not be created
228
+ * @deprecated Use {@link senselogic.sitevision.api.script.factory.InstanceCreatorUtil#getDefaultInstance(String)} instead
229
+ */
230
+ getInstance(aQualifiedClassName: string): unknown;
231
+
232
+ /**
233
+ * Methods that wraps an array in a <code>List</code>. Arrays are sub optimal in Velocity and JavaScript.
234
+ * @param anArray an array that needs to be wrapped
235
+ * @return a list containing the array elements. If the array is <code>null</code>, <code>null</code> is returned
236
+ * @since Sitevision 2.6_06
237
+ */
238
+ getList(anArray: unknown): unknown;
239
+
240
+ /**
241
+ * Gets the date format pattern used in the Sitevision editor for a specific Locale.
242
+ * @param aLocale the <code>Locale</code> that specifies the date format pattern
243
+ * @return the date format pattern used in the Sitevision editor that corresponds to <code>aLocale</code>. If <code>aLocale</code> is <code>null</code> then the current locale (as of {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()}) is used to locate the format pattern. If no pattern exist for <code>aLocale</code> then the pattern that corresponds to <code>Locale.ENGLISH</code> will be returned.
244
+ * @since Sitevision 2.6.1_02
245
+ * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getEditorFormatPattern(java.util.Locale)} instead
246
+ */
247
+ getFormatPattern(aLocale: unknown): string;
248
+
249
+ /**
250
+ * Methods that formats a date according to a <code>SimpleDateFormat</code> pattern
251
+ * @param aFormatPattern date to string pattern according to <code>SimpleDateFormat</code>. If <code>null</code> is specified the default format is used
252
+ * @param aDate the <code>Date</code>
253
+ * @return returns a <code>String</code> representation of <code>aDate</code> according to <code>aFormatPattern</code>. Returns <code>null</code> if <code>aDate</code> is <code>null</code>.
254
+ * @since Sitevision 2.6_06
255
+ * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getDateAsString(String, java.util.Date)} instead
256
+ */
257
+ getDateAsString(aFormatPattern: string, aDate: unknown): string;
258
+
259
+ /**
260
+ * Methods that formats the date of a calendar according to a <code>SimpleDateFormat</code> pattern
261
+ * @param aFormatPattern date to string pattern according to <code>SimpleDateFormat</code>. If <code>null</code> is specified the default format is used
262
+ * @param aCalendar the <code>Calendar</code>
263
+ * @return returns a <code>String</code> representation of the date of <code>aCalendar</code> according to <code>aFormatPattern</code>. Returns <code>null</code> if <code>aDate</code> is <code>null</code>.
264
+ * @since Sitevision 2.6.1_02
265
+ * @deprecated use {@link senselogic.sitevision.api.date.DateUtil#getCalendarAsString(String, java.util.Calendar)} instead
266
+ */
267
+ getCalendarAsString(aFormatPattern: string, aCalendar: unknown): string;
268
+
269
+ /**
270
+ * Methods that returns a human presentable size with an appropriate byte-suffix (bytes/kB/MB/GB/TB).
271
+ * <p>
272
+ * Note! This method uses two significant digits and 1024 as base. Some examples:<br>
273
+ * &nbsp;&nbsp; <code>126</code> -&gt; "<code>130 bytes</code>"<br>
274
+ * &nbsp;&nbsp; <code>126975</code> -&gt; "<code>120 kB</code>"<br>
275
+ * &nbsp;&nbsp; <code>456456456</code> -&gt; "<code>440 MB</code>"
276
+ * </p>
277
+ * @param aSize a size that should be presented for humans
278
+ * @return a human presentable byte-suffixed size with two significant digits. If <code>aSize</code> is less than 0 or larger than 1125899906842624 (1024 TB), an empty String will be returned.
279
+ * @since Sitevision 2.6.1_04
280
+ */
281
+ getHumanPresentableSize(aSize: number): string;
282
+
283
+ /**
284
+ * Method that converts a string to an int.
285
+ * @param aString the string to be converted
286
+ * @return <code>aString</code> as <code>int</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1 is returned
287
+ * @since Sitevision 2.6.1_04
288
+ */
289
+ stringToInt(aString: string): number;
290
+
291
+ /**
292
+ * Method that converts a string to a long.
293
+ * @param aString the string to be converted
294
+ * @return <code>aString</code> as <code>long</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1 is returned
295
+ * @since Sitevision 2.6.1_04
296
+ */
297
+ stringToLong(aString: string): number;
298
+
299
+ /**
300
+ * Method that converts a string to a double.
301
+ * @param aString the string to be converted
302
+ * @return <code>aString</code> as <code>double</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1.0 is returned
303
+ * @since Sitevision 2.6.1_04
304
+ */
305
+ stringToDouble(aString: string): number;
306
+
307
+ /**
308
+ * Method that converts a string to a float.
309
+ * @param aString the string to be converted
310
+ * @return <code>aString</code> as <code>float</code>. If <code>aString</code> is <code>null</code> or can't be converted, -1.0 is returned
311
+ * @since Sitevision 2.6.1_04
312
+ */
313
+ stringToFloat(aString: string): number;
314
+
315
+ /**
316
+ * Method that returns true for values that can be interpreted as the true value.
317
+ * @param anObject an Object that might be interpreted as a true value
318
+ * @return returns <code>true</code> if <code>anObject</code> is a <code>Boolean</code> with a <code>true</code> value or a <code>String</code> with a "<code>true</code>" value, <code>false</code> otherwise.
319
+ * @since Sitevision 2.6.1_04
320
+ */
321
+ isTrue(anObject: unknown): boolean;
322
+
323
+ /**
324
+ * Method that returns true for values that can be interpreted as the false value.
325
+ * @param anObject an Object that might be interpreted as a false value
326
+ * @return returns <code>true</code> if <code>anObject</code> is a <code>Boolean</code> with a <code>false</code> value or a <code>String</code> with a "<code>false</code>" value, <code>false</code> otherwise.
327
+ * @since Sitevision 2.6.1_04
328
+ */
329
+ isFalse(anObject: unknown): boolean;
330
+
331
+ /**
332
+ * Joins the elements of an array to a single String.
333
+ *
334
+ * <p>Some examples:</p>
335
+ * <pre><code>
336
+ * joinArray(["one", "two", "three"], ";") -&gt; "one;two;three"
337
+ * joinArray(["a", myTwoInteger], "-") -&gt; "a-2"
338
+ * joinArray(["", null, "three"], "-") -&gt; "--three"
339
+ * joinArray([], "-") -&gt; ""
340
+ * joinArray(null, "-") -&gt; null
341
+ * </code></pre>
342
+ * @param anArray the array that should be joined to a single string. <code>null</code> elements will be treated as empty (<code>""</code>) and for non-String elements <code>toString()</code> will be invoked on the element to get a string representation.
343
+ * @param aSeparator the separator that should delimit the elements of <code>anArray</code> in the resulting joined string. <code>null</code> will be treated as empty (<code>""</code>)
344
+ * @return the joined <code>String</code>. If <code>anArray</code> is <code>null</code>, <code>null</code> will be returned
345
+ * @see #joinCollection(java.util.Collection, String)
346
+ * @since Sitevision 2.6.1_04
347
+ */
348
+ joinArray(anArray: unknown, aSeparator: string): string;
349
+
350
+ /**
351
+ * Joins the items of a Collection to a single String.
352
+ *
353
+ * <p>
354
+ * For examples, see {@link #joinArray(Object[], String)}
355
+ * </p>
356
+ * @param aCollection the collection that should be joined to a single string. <code>null</code> items will be treated as empty (<code>""</code>) and for non-String items <code>toString()</code> will be invoked on the item to get a string representation.
357
+ * @param aSeparator the separator that should delimit the items of <code>aCollection</code> in the resulting joined string. <code>null</code> will be treated as empty (<code>""</code>)
358
+ * @return the joined <code>String</code>. If <code>aCollection</code> is <code>null</code>, <code>null</code> will be returned
359
+ * @see #joinArray(Object[], String)
360
+ * @since Sitevision 2.6.1_04
361
+ */
362
+ joinCollection(aCollection: unknown, aSeparator: string): string;
363
+
364
+ /**
365
+ * A utility method to get a formatted string based on a pattern and some pattern arguments.
366
+ *
367
+ * <p>
368
+ * <strong>A Velocity example:</strong>
369
+ * </p>
370
+ * <pre><code>
371
+ * #set ($instanceCreatorUtil = ...)
372
+ * #set ($scriptUtil = ...)
373
+ * #set ($searchPhrase = ...)
374
+ *
375
+ * <em>## Determine pattern</em>
376
+ * #if ($language == 'sv')
377
+ * #set ($pattern = 'Din sökning {0} gav inga träffar')
378
+ * #else
379
+ * #set ($pattern = 'No hits for your search {0}')
380
+ * #end
381
+ *
382
+ * <em>## Set up pattern argument(s)</em>
383
+ * #set ($argsList = $instanceCreatorUtil.list)
384
+ * $scriptUtil.swallow(${argsList.add($searchPhrase)})
385
+ *
386
+ * <em>## Format and print result</em>
387
+ * &lt;p&gt;$scriptUtil.messageFormat($pattern, $argsList)&lt;/p&gt;
388
+ * </code></pre>
389
+ * @param aMessageFormatPattern a pattern accepted by the Java <a href="http://docs.oracle.com/javase/8/docs/api/java/text/MessageFormat.html">MessageFormat</a> class
390
+ * @param anArguments arguments needed by the pattern
391
+ * @return the result of the pattern evaluation or <code>null</code> if evaluation fails. Returns <code>null</code> if <code>aMessageFormatPattern</code> is <code>null</code> or if <code>anArguments</code> doesn't contain any arguments.
392
+ * @since Sitevision 3.0
393
+ */
394
+ messageFormat(aMessageFormatPattern: string, anArguments: unknown): string;
395
+
396
+ /**
397
+ * A utility method that can be used to prevent method invocation return values to be added to the Velocity output.
398
+ *
399
+ * <p>
400
+ * <strong>An example:</strong><br>This Velocity code:
401
+ * </p>
402
+ * <pre><code>
403
+ * #set ($myList = $instanceCreatorUtil.list)
404
+ * $myList.add("Magnus Lövgren")
405
+ * $myList.add("Mikael Wikblom")
406
+ * </code></pre>
407
+ * will result in the following Velocity output (the <code>add</code> method of <code>ArrayList</code> returns a <code>boolean</code>):
408
+ * <pre><code>true true</code></pre>
409
+ * <p>
410
+ * If a non-void method is invoked and the return value isn't handled, it will be part of the Velocity output.
411
+ * The <code>swallow</code> method can be used to prevent that (i.e. use it to "swallow" the result):
412
+ * </p>
413
+ * <pre><code>
414
+ * #set ($myList = $instanceCreatorUtil.list)
415
+ * $scriptUtil.swallow(${myList.add("Magnus Lövgren")})
416
+ * $scriptUtil.swallow(${myList.add("Mikael Wikblom")})</code></pre>
417
+ * <p>
418
+ * <em>Note! The code above is just an example that illustrates a common problem. When creating and working with a
419
+ * List from Velocity, you should probably use a {@link senselogic.sitevision.api.script.factory.ListWrapper} instead</em>
420
+ * </p>
421
+ * @param anObject the object that should be "swallowed"
422
+ * @since Sitevision 3.0
423
+ */
424
+ swallow(anObject: unknown): void;
425
+
426
+ /**
427
+ * Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (<code>null</code>
428
+ * if the string is empty or <code>null</code>).
429
+ *
430
+ * <p>
431
+ * The String is trimmed using <code>String.trim()</code>
432
+ * </p>
433
+ * @param aString the string that should be trimmed
434
+ * @return the trimmed String. Returns <code>null</code> if <code>aString</code> is <code>null</code> or the trimmed String is empty.
435
+ * @since Sitevision 2.6.1_04
436
+ */
437
+ trimToNull(aString: string): string;
438
+
439
+ /**
440
+ * Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (empty String (<code>""</code>)
441
+ * if the string is empty or <code>null</code>).
442
+ *
443
+ * <p>
444
+ * The String is trimmed using <code>String.trim()</code>
445
+ * </p>
446
+ * @param aString the string that should be trimmed
447
+ * @return the trimmed String. Returns empty (<code>""</code>) if <code>aString</code> is <code>null</code> or the trimmed String is empty.
448
+ * @since Sitevision 2.6.1_04
449
+ */
450
+ trimToEmpty(aString: string): string;
451
+
452
+ /**
453
+ * Flattens a multi-lined string to a trimmed single-line string.
454
+ *
455
+ * <p>
456
+ * This method replaces all whitespace (space, line break and such) with a space, but will never add multiple spaces.
457
+ * </p>
458
+ * @param aString the multi-lined string
459
+ * @return a single-line trimmed string with sequential whitespace removed, or <code>null</code> if <code>aString</code> is <code>null</code>.
460
+ * @since Sitevision 3.6
461
+ */
462
+ flatten(aString: string): string;
504
463
  }
505
464
 
506
- export default scriptUtil;
465
+ declare namespace ScriptUtil {}
466
+
467
+ declare var scriptUtil: ScriptUtil;
468
+
469
+ export = scriptUtil;