@sitevision/api 1.0.19 → 1.1.0-alpha.1

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 (299) hide show
  1. package/common/router/index.d.ts +1 -1
  2. package/hidden/javax/jcr/Binary/index.d.ts +86 -0
  3. package/hidden/javax/jcr/Credentials/index.d.ts +11 -0
  4. package/hidden/javax/jcr/ImportUUIDBehavior/index.d.ts +11 -0
  5. package/hidden/javax/jcr/Item/index.d.ts +353 -0
  6. package/hidden/javax/jcr/ItemVisitor/index.d.ts +41 -0
  7. package/hidden/javax/jcr/NamespaceRegistry/index.d.ts +100 -0
  8. package/hidden/javax/jcr/Node/index.d.ts +2808 -0
  9. package/hidden/javax/jcr/NodeIterator/index.d.ts +18 -0
  10. package/hidden/javax/jcr/Property/index.d.ts +801 -0
  11. package/hidden/javax/jcr/PropertyIterator/index.d.ts +17 -0
  12. package/hidden/javax/jcr/RangeIterator/index.d.ts +75 -0
  13. package/hidden/javax/jcr/Repository/index.d.ts +318 -0
  14. package/hidden/javax/jcr/RepositoryFactory/index.d.ts +90 -0
  15. package/hidden/javax/jcr/Value/index.d.ts +190 -0
  16. package/hidden/javax/jcr/ValueFactory/index.d.ts +179 -0
  17. package/hidden/javax/jcr/Workspace/index.d.ts +1061 -0
  18. package/hidden/javax/jcr/lock/Lock/index.d.ts +142 -0
  19. package/hidden/javax/jcr/lock/LockManager/index.d.ts +217 -0
  20. package/hidden/javax/jcr/nodetype/ItemDefinition/index.d.ts +219 -0
  21. package/hidden/javax/jcr/nodetype/NodeDefinition/index.d.ts +158 -0
  22. package/hidden/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +74 -0
  23. package/hidden/javax/jcr/nodetype/NodeType/index.d.ts +349 -0
  24. package/hidden/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +248 -0
  25. package/hidden/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +16 -0
  26. package/hidden/javax/jcr/nodetype/NodeTypeManager/index.d.ts +218 -0
  27. package/hidden/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +98 -0
  28. package/hidden/javax/jcr/nodetype/PropertyDefinition/index.d.ts +536 -0
  29. package/hidden/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +97 -0
  30. package/hidden/javax/jcr/observation/Event/index.d.ts +133 -0
  31. package/hidden/javax/jcr/observation/EventIterator/index.d.ts +20 -0
  32. package/hidden/javax/jcr/observation/EventJournal/index.d.ts +22 -0
  33. package/hidden/javax/jcr/observation/EventListener/index.d.ts +23 -0
  34. package/hidden/javax/jcr/observation/EventListenerIterator/index.d.ts +20 -0
  35. package/hidden/javax/jcr/observation/ObservationManager/index.d.ts +227 -0
  36. package/hidden/javax/jcr/query/Query/index.d.ts +201 -0
  37. package/hidden/javax/jcr/query/QueryManager/index.d.ts +73 -0
  38. package/hidden/javax/jcr/query/QueryResult/index.d.ts +51 -0
  39. package/hidden/javax/jcr/query/Row/index.d.ts +159 -0
  40. package/hidden/javax/jcr/query/RowIterator/index.d.ts +20 -0
  41. package/hidden/javax/jcr/query/qom/And/index.d.ts +26 -0
  42. package/hidden/javax/jcr/query/qom/BindVariableValue/index.d.ts +15 -0
  43. package/hidden/javax/jcr/query/qom/ChildNode/index.d.ts +27 -0
  44. package/hidden/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +27 -0
  45. package/hidden/javax/jcr/query/qom/Column/index.d.ts +39 -0
  46. package/hidden/javax/jcr/query/qom/Comparison/index.d.ts +82 -0
  47. package/hidden/javax/jcr/query/qom/Constraint/index.d.ts +13 -0
  48. package/hidden/javax/jcr/query/qom/DescendantNode/index.d.ts +31 -0
  49. package/hidden/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +29 -0
  50. package/hidden/javax/jcr/query/qom/DynamicOperand/index.d.ts +9 -0
  51. package/hidden/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +41 -0
  52. package/hidden/javax/jcr/query/qom/FullTextSearch/index.d.ts +89 -0
  53. package/hidden/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +24 -0
  54. package/hidden/javax/jcr/query/qom/Join/index.d.ts +36 -0
  55. package/hidden/javax/jcr/query/qom/JoinCondition/index.d.ts +9 -0
  56. package/hidden/javax/jcr/query/qom/Length/index.d.ts +24 -0
  57. package/hidden/javax/jcr/query/qom/Literal/index.d.ts +18 -0
  58. package/hidden/javax/jcr/query/qom/LowerCase/index.d.ts +26 -0
  59. package/hidden/javax/jcr/query/qom/NodeLocalName/index.d.ts +16 -0
  60. package/hidden/javax/jcr/query/qom/NodeName/index.d.ts +16 -0
  61. package/hidden/javax/jcr/query/qom/Not/index.d.ts +20 -0
  62. package/hidden/javax/jcr/query/qom/Operand/index.d.ts +9 -0
  63. package/hidden/javax/jcr/query/qom/Or/index.d.ts +30 -0
  64. package/hidden/javax/jcr/query/qom/Ordering/index.d.ts +53 -0
  65. package/hidden/javax/jcr/query/qom/PropertyExistence/index.d.ts +24 -0
  66. package/hidden/javax/jcr/query/qom/PropertyValue/index.d.ts +25 -0
  67. package/hidden/javax/jcr/query/qom/QueryObjectModel/index.d.ts +64 -0
  68. package/hidden/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +9 -0
  69. package/hidden/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +638 -0
  70. package/hidden/javax/jcr/query/qom/SameNode/index.d.ts +27 -0
  71. package/hidden/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +36 -0
  72. package/hidden/javax/jcr/query/qom/Selector/index.d.ts +35 -0
  73. package/hidden/javax/jcr/query/qom/Source/index.d.ts +9 -0
  74. package/hidden/javax/jcr/query/qom/StaticOperand/index.d.ts +10 -0
  75. package/hidden/javax/jcr/query/qom/UpperCase/index.d.ts +26 -0
  76. package/hidden/javax/jcr/retention/Hold/index.d.ts +34 -0
  77. package/hidden/javax/jcr/retention/RetentionManager/index.d.ts +189 -0
  78. package/hidden/javax/jcr/retention/RetentionPolicy/index.d.ts +21 -0
  79. package/hidden/javax/jcr/security/AccessControlEntry/index.d.ts +24 -0
  80. package/hidden/javax/jcr/security/AccessControlList/index.d.ts +91 -0
  81. package/hidden/javax/jcr/security/AccessControlManager/index.d.ts +297 -0
  82. package/hidden/javax/jcr/security/AccessControlPolicy/index.d.ts +11 -0
  83. package/hidden/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +20 -0
  84. package/hidden/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +22 -0
  85. package/hidden/javax/jcr/security/Privilege/index.d.ts +117 -0
  86. package/hidden/javax/jcr/version/Version/index.d.ts +121 -0
  87. package/hidden/javax/jcr/version/VersionHistory/index.d.ts +307 -0
  88. package/hidden/javax/jcr/version/VersionIterator/index.d.ts +20 -0
  89. package/hidden/javax/jcr/version/VersionManager/index.d.ts +1082 -0
  90. package/hidden/senselogic/sitevision/api/base/Builder/index.d.ts +102 -0
  91. package/hidden/senselogic/sitevision/api/base/Filter/index.d.ts +25 -0
  92. package/hidden/senselogic/sitevision/api/base/FilterSplit/index.d.ts +50 -0
  93. package/hidden/senselogic/sitevision/api/base/Loadable/index.d.ts +15 -0
  94. package/hidden/senselogic/sitevision/api/base/Resolver/index.d.ts +31 -0
  95. package/hidden/senselogic/sitevision/api/base/Wrapper/index.d.ts +24 -0
  96. package/hidden/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +417 -0
  97. package/hidden/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +80 -0
  98. package/hidden/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +100 -0
  99. package/hidden/senselogic/sitevision/api/i18n/Currency/index.d.ts +120 -0
  100. package/hidden/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +45 -0
  101. package/hidden/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +65 -0
  102. package/hidden/senselogic/sitevision/api/mail/Mail/index.d.ts +32 -0
  103. package/hidden/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +15 -0
  104. package/hidden/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +23 -0
  105. package/hidden/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +23 -0
  106. package/hidden/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +642 -0
  107. package/hidden/senselogic/sitevision/api/render/BuddyIconRenderer/BuddyIconInfo/index.d.ts +51 -0
  108. package/hidden/senselogic/sitevision/api/render/ImageScaler/index.d.ts +58 -0
  109. package/hidden/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +301 -0
  110. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ArticleUtilConstants/index.d.ts +85 -0
  111. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ExceptionSuppressingProxyConstants/index.d.ts +31 -0
  112. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/IndexingUtilConstants/index.d.ts +31 -0
  113. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/LinkPageUtilConstants/index.d.ts +67 -0
  114. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MathInstanceConstants/index.d.ts +25 -0
  115. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MimeTypeUtilConstants/index.d.ts +19 -0
  116. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/NodeTypeUtilConstants/index.d.ts +1243 -0
  117. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/OutputUtilConstants/index.d.ts +31 -0
  118. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PageUtilConstants/index.d.ts +91 -0
  119. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletContextUtilConstants/index.d.ts +27 -0
  120. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletUtilConstants/index.d.ts +19 -0
  121. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/QueryStringUtilConstants/index.d.ts +19 -0
  122. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchHitConstants/index.d.ts +25 -0
  123. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchResultConstants/index.d.ts +37 -0
  124. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/VersionUtilConstants/index.d.ts +25 -0
  125. package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +8 -0
  126. package/hidden/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +50 -0
  127. package/hidden/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +89 -0
  128. package/hidden/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +119 -0
  129. package/hidden/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +272 -0
  130. package/hidden/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +43 -0
  131. package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +94 -0
  132. package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +117 -0
  133. package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +90 -0
  134. package/hidden/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +89 -0
  135. package/hidden/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +45 -0
  136. package/hidden/senselogic/sitevision/api/search/SearchHit/index.d.ts +1176 -0
  137. package/hidden/senselogic/sitevision/api/search/SearchResult/index.d.ts +414 -0
  138. package/hidden/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +27 -0
  139. package/hidden/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +61 -0
  140. package/hidden/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +277 -0
  141. package/hidden/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +25 -0
  142. package/hidden/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +29 -0
  143. package/hidden/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +25 -0
  144. package/hidden/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +35 -0
  145. package/hidden/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +25 -0
  146. package/hidden/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +29 -0
  147. package/hidden/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +82 -0
  148. package/hidden/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +21 -0
  149. package/hidden/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +70 -0
  150. package/hidden/senselogic/sitevision/api/security/MessageDigester/index.d.ts +50 -0
  151. package/hidden/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +72 -0
  152. package/hidden/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +29 -0
  153. package/hidden/senselogic/sitevision/api/security/SecretStore/index.d.ts +55 -0
  154. package/hidden/senselogic/sitevision/api/security/UserUtil/index.d.ts +80 -0
  155. package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +36 -0
  156. package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +32 -0
  157. package/hidden/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +599 -0
  158. package/hidden/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +20 -0
  159. package/hidden/senselogic/sitevision/api/xml/XmlElement/index.d.ts +55 -0
  160. package/hidden/senselogic/sitevision/api/xml/XmlElementHandler/index.d.ts +17 -0
  161. package/package.json +2 -4
  162. package/server/AliasUtil/index.d.ts +25 -0
  163. package/server/AliasUtil/index.js +10 -0
  164. package/server/ArchiveUtil/index.d.ts +65 -11
  165. package/server/ArraysInstance/index.d.ts +1846 -0
  166. package/server/ArticleUtil/index.d.ts +381 -69
  167. package/server/AuthenticationUtil/index.d.ts +106 -0
  168. package/server/BookmarkUtil/index.d.ts +36 -28
  169. package/server/BuddyIconRenderer/index.d.ts +240 -0
  170. package/server/ClientUtil/index.d.ts +18 -4
  171. package/server/CollaborationFactory/index.d.ts +42 -25
  172. package/server/CollaborationGroupFolderUtil/index.d.ts +40 -29
  173. package/server/CollaborationGroupTemplateUtil/index.d.ts +71 -39
  174. package/server/CollaborationGroupUtil/index.d.ts +128 -55
  175. package/server/CollectionsInstance/index.d.ts +738 -0
  176. package/server/ColorUtil/index.d.ts +22 -17
  177. package/server/CompoundAndFilterBuilder/index.d.ts +60 -0
  178. package/server/CompoundComparatorBuilder/index.d.ts +63 -0
  179. package/server/CompoundOrFilterBuilder/index.d.ts +59 -0
  180. package/server/ContentNodeUtil/index.d.ts +76 -0
  181. package/server/CurrencyFactory/index.d.ts +135 -0
  182. package/server/DateUtil/index.d.ts +154 -77
  183. package/server/DecorationUtil/index.d.ts +23 -0
  184. package/server/DeviceUtil/index.d.ts +36 -0
  185. package/server/DirectoryUtil/index.d.ts +107 -47
  186. package/server/DocTypeUtil/index.d.ts +149 -0
  187. package/server/EndecUtil/index.d.ts +537 -91
  188. package/server/ExtendedDismaxParserBuilder/index.d.ts +311 -0
  189. package/server/FileIconRenderer/index.d.ts +346 -0
  190. package/server/FileUtil/index.d.ts +462 -0
  191. package/server/FilterBuilder/index.d.ts +120 -0
  192. package/server/FolderUtil/index.d.ts +161 -0
  193. package/server/FontUtil/index.d.ts +49 -0
  194. package/server/FormatterBuilderFactory/index.d.ts +129 -0
  195. package/server/HighlightBuilder/index.d.ts +194 -0
  196. package/server/IconUtil/index.d.ts +37 -0
  197. package/server/ImageLinkRenderer/index.d.ts +134 -0
  198. package/server/ImageRenderer/index.d.ts +613 -231
  199. package/server/ImageUtil/index.d.ts +430 -0
  200. package/server/IndexUtil/index.d.ts +71 -0
  201. package/server/IndexingUtil/index.d.ts +92 -0
  202. package/server/InstanceCreatorUtil/index.d.ts +661 -0
  203. package/server/InstanceTypeUtil/index.d.ts +202 -0
  204. package/server/JwtUtil/index.d.ts +217 -0
  205. package/server/LandingPageUtil/index.d.ts +67 -50
  206. package/server/LinkPageUtil/index.d.ts +468 -0
  207. package/server/LinkRenderer/index.d.ts +1157 -0
  208. package/server/LinkTargetBuilder/index.d.ts +146 -0
  209. package/server/LinkValueBuilder/index.d.ts +129 -52
  210. package/server/ListWrapper/index.d.ts +172 -0
  211. package/server/LocaleUtil/index.d.ts +695 -61
  212. package/server/LogUtil/index.d.ts +118 -77
  213. package/server/MailBuilder/index.d.ts +238 -0
  214. package/server/MailUtil/index.d.ts +98 -0
  215. package/server/MathInstance/index.d.ts +681 -0
  216. package/server/MessageDigesterFactory/index.d.ts +49 -0
  217. package/server/MetadataDefinitionUtil/index.d.ts +118 -0
  218. package/server/MetadataUtil/index.d.ts +524 -79
  219. package/server/MimeTypeUtil/index.d.ts +316 -0
  220. package/server/MonitorBuilder/index.d.ts +51 -0
  221. package/server/NodeComparatorUtil/index.d.ts +397 -0
  222. package/server/NodeFactoryUtil/index.d.ts +32 -0
  223. package/server/NodeFilterUtil/index.d.ts +924 -0
  224. package/server/NodeIteratorUtil/index.d.ts +322 -72
  225. package/server/NodeResolverUtil/index.d.ts +767 -0
  226. package/server/NodeTreeUtil/index.d.ts +339 -63
  227. package/server/NodeTypeUtil/index.d.ts +391 -197
  228. package/server/OfflineVersionPropertyUtil/index.d.ts +30 -0
  229. package/server/OnlineVersionPropertyUtil/index.d.ts +30 -0
  230. package/server/OutputUtil/index.d.ts +641 -0
  231. package/server/PageUtil/index.d.ts +330 -0
  232. package/server/PermissionUtil/index.d.ts +650 -0
  233. package/server/PortletContextUtil/index.d.ts +118 -37
  234. package/server/PortletContextUtil/index.js +1 -0
  235. package/server/PortletUtil/index.d.ts +40 -0
  236. package/server/PrincipalUtil/index.d.ts +51 -0
  237. package/server/Properties/index.d.ts +185 -38
  238. package/server/PropertyUtil/index.d.ts +2330 -406
  239. package/server/PublishingUtil/index.d.ts +385 -49
  240. package/server/QueryStringUtil/index.d.ts +737 -0
  241. package/server/RedirectUtil/index.d.ts +98 -0
  242. package/server/RelatedValueBuilder/index.d.ts +81 -39
  243. package/server/Requester/index.d.ts +441 -65
  244. package/server/ResourceLocatorUtil/index.d.ts +483 -227
  245. package/server/RestApi/index.d.ts +208 -23
  246. package/server/RestAppInvokerFactory/index.d.ts +73 -0
  247. package/server/RoleAssignmentBuilder/index.d.ts +60 -0
  248. package/server/RoleMatcherBuilder/index.d.ts +59 -0
  249. package/server/RoleUtil/index.d.ts +57 -0
  250. package/server/ScriptUtil/index.d.ts +625 -143
  251. package/server/SearchFactory/index.d.ts +133 -0
  252. package/server/SearchUtil/index.d.ts +164 -0
  253. package/server/SearcherBuilder/index.d.ts +260 -0
  254. package/server/Session/index.d.ts +1758 -0
  255. package/server/SimpleUserUtil/index.d.ts +39 -30
  256. package/server/SiteCookieUtil/index.d.ts +78 -53
  257. package/server/SortBuilder/index.d.ts +111 -0
  258. package/server/SpellCheckBuilder/index.d.ts +68 -0
  259. package/server/StandardParserBuilder/index.d.ts +112 -0
  260. package/server/StructureUtil/index.d.ts +167 -0
  261. package/server/SubscriberUtil/index.d.ts +122 -0
  262. package/server/SubscriptionUtil/index.d.ts +197 -0
  263. package/server/SystemUserUtil/index.d.ts +201 -98
  264. package/server/TagUtil/index.d.ts +193 -0
  265. package/server/TemplateUtil/index.d.ts +217 -0
  266. package/server/TemporaryFileNodeBuilder/index.d.ts +63 -0
  267. package/server/TemporaryNodeBuilder/index.d.ts +241 -0
  268. package/server/TextModuleRendererBuilder/index.d.ts +68 -0
  269. package/server/TimestampUtil/index.d.ts +98 -82
  270. package/server/TranslationUtil/index.d.ts +175 -0
  271. package/server/TrashcanUtil/index.d.ts +193 -24
  272. package/server/UserDataUtil/index.d.ts +167 -85
  273. package/server/UserFactory/index.d.ts +45 -30
  274. package/server/UserFieldRenderer/index.d.ts +258 -0
  275. package/server/UserIdentityUtil/index.d.ts +61 -29
  276. package/server/UserUtil/index.d.ts +69 -28
  277. package/server/Utils/index.d.ts +870 -12
  278. package/server/VelocityRenderer/index.d.ts +248 -0
  279. package/server/VersionUtil/index.d.ts +15 -12
  280. package/server/WebContentUtil/index.d.ts +644 -0
  281. package/server/WebResourceFactory/index.d.ts +66 -0
  282. package/server/XSLTUtil/index.d.ts +49 -10
  283. package/server/XmlParserUtil/index.d.ts +82 -81
  284. package/builtins/Binary/index.d.ts +0 -3
  285. package/builtins/Calendar/index.d.ts +0 -3
  286. package/builtins/Collection/index.d.ts +0 -3
  287. package/builtins/Date/index.d.ts +0 -3
  288. package/builtins/InputStream/index.d.ts +0 -3
  289. package/builtins/Instant/index.d.ts +0 -3
  290. package/builtins/List/index.d.ts +0 -3
  291. package/builtins/LocalDateTime/index.d.ts +0 -3
  292. package/builtins/Locale/index.d.ts +0 -3
  293. package/builtins/Node/index.d.ts +0 -3
  294. package/builtins/NodeIterator/index.d.ts +0 -27
  295. package/builtins/Property/index.d.ts +0 -3
  296. package/builtins/Serializable/index.d.ts +0 -3
  297. package/builtins/Set/index.d.ts +0 -3
  298. package/builtins/Throwable/index.d.ts +0 -3
  299. package/builtins/byte/index.d.ts +0 -3
@@ -1,214 +1,696 @@
1
- import List from "../../builtins/List";
2
1
  /**
3
- * Flattens a multi-lined string to a trimmed single-line string.
4
- * @param {string} aString - the multi-lined string
5
- * @returns {string} a single-line trimmed string with sequential whitespace removed, or null if aString is null.
6
- */
7
- export function flatten(aString: string): string;
2
+ * Gets the boolean true primitive.
3
+ * @return <code>true</code>
4
+ */
5
+ export function getTrue(): boolean;
8
6
 
9
7
  /**
10
- * Gets the boolean false primitive.
11
- * @returns {boolean} false
12
- */
8
+ * Gets the boolean false primitive.
9
+ * @return <code>false</code>
10
+ */
13
11
  export function getFalse(): boolean;
14
12
 
15
13
  /**
16
- * Methods that returns a human presentable size with an appropriate byte-suffix (bytes/kB/MB/GB/TB).
17
- * @param {number} aSize - a size that should be presented for humans
18
- * @returns {string} a human presentable byte-suffixed size with two significant digits. If aSize is less than 0 or larger than 1125899906842624 (1024 TB), an empty String will be returned.
19
- */
20
- export function getHumanPresentableSize(aSize: number): string;
14
+ * Gets the null reference.
15
+ * @return <code>null</code>
16
+ */
17
+ export function getNull(): unknown;
21
18
 
22
19
  /**
23
- * Methods that wraps an array in a List.
24
- * @param {any[]} anArray - an array that needs to be wrapped
25
- * @returns {List} a list containing the array elements. If the array is null, null is returned
26
- */
27
- export function getList(anArray: any[]): List;
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;
28
59
 
29
60
  /**
30
- * Gets an object that is ensured not to be null or a whitespace only string.
31
- * @param {string} aString - the string that might be null or whitespace only
32
- * @returns {(string|boolean)} aString if aString is non-null and not whitespace only, Boolean.FALSE otherwise
33
- */
34
- export function getNonBlank(aString: string): string | boolean;
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;
35
126
 
36
127
  /**
37
- * Gets a default value if a string is null or whitespace only.
38
- * @param {string} aString - the string that might be null or whitespace only
39
- * @param {any} aDefaultValue - the default value to return if aString is null or whitespace only
40
- * @returns {(string|any)} aString if aString is non-null and not whitespace only, aDefaultValue otherwise
41
- */
42
- export function getNonBlank(aString: string, aDefaultValue: any): string | any;
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;
43
136
 
44
137
  /**
45
- * Gets an object that is ensured not to be null.
46
- * @param {any} anObject - the object that might be null
47
- * @returns {any} anObject if non-null, Boolean.FALSE otherwise
48
- */
49
- export function getNonNull(anObject: any): any | boolean;
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;
50
146
 
51
147
  /**
52
- * Gets a default value if an object is null.
53
- * @param {any} anObject - the object that might be null
54
- * @param {any} aDefaultValue - the default value to return if anObject is null
55
- * @returns {any} anObject if non-null, aDefaultValue otherwise
56
- */
57
- export function getNonNull(anObject: any, aDefaultValue: any): any;
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;
58
155
 
59
156
  /**
60
- * Gets the null reference.
61
- * @returns {null} null
62
- */
63
- export function getNull(): null;
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;
64
164
 
65
165
  /**
66
- * Gets the boolean true primitive.
67
- * @returns {boolean} true
68
- */
69
- export function getTrue(): boolean;
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;
70
173
 
71
174
  /**
72
- * Checks if a string is null, empty or whitespace only.
73
- * @param {string} aString - the string to check
74
- * @returns {boolean} true if aString is null, empty or whitespace only - false otherwise
75
- */
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
+ */
76
181
  export function isBlank(aString: string): boolean;
77
182
 
78
183
  /**
79
- * Checks if a string is null or empty.
80
- * @param {string} aString - the string to check
81
- * @returns {boolean} true if aString is null or empty, false otherwise
82
- */
83
- export function isEmpty(aString: string): boolean;
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;
84
213
 
85
214
  /**
86
- * Method that returns true for values that can be interpreted as the false value.
87
- * @param {Object} anObject - an Object that might be interpreted as a false value
88
- * @returns {boolean} returns true if anObject is a Boolean with a false valueor a String with a "false" value, false otherwise.
89
- */
90
- export function isFalse(anObject: Object): boolean;
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;
91
221
 
92
222
  /**
93
- * Checks if a string is not null, not empty and not whitespace only.
94
- * @param {string} aString - the string to check
95
- * @returns {boolean} true if aString is not null, not empty and not whitespace only - false otherwise
96
- */
97
- export function isNotBlank(aString: string): boolean;
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[];
98
229
 
99
230
  /**
100
- * Checks if a string is not null and not empty.
101
- * @param {string} aString - the string to check
102
- * @returns {boolean} true if aString is not null and not empty, false otherwise
103
- */
104
- export function isNotEmpty(aString: string): boolean;
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;
105
238
 
106
239
  /**
107
- * Method that returns true for values that can be interpreted as the true value.
108
- * @param {Object} anObject - an Object that might be interpreted as a true value
109
- * @returns {boolean} returns true if anObject is a Boolean with a true valueor a String with a "true" value, false otherwise.
110
- */
111
- export function isTrue(anObject: Object): boolean;
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;
112
248
 
113
249
  /**
114
- * Joins the elements of an array to a single String.
115
- * @param {Object[]} anArray - the array that should be joined to a single string. null elements will be treated as empty ("") and for non-String elements toString() will be invoked on the element to get a string representation.
116
- * @param {string} aSeparator - the separator that should delimit the elements of anArray in the resulting joined string. null will be treated as empty ("")
117
- * @returns {string} the joined String. If anArray is null, null will be returned
118
- */
119
- export function joinArray(anArray: Object[], aSeparator: string): string;
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;
120
261
 
121
262
  /**
122
- * Joins the items of a Collection to a single String.
123
- * @param {Collection} aCollection - the collection that should be joined to a single string. null items will be treated as empty ("") and for non-String items toString() will be invoked on the item to get a string representation.
124
- * @param {string} aSeparator - the separator that should delimit the items of aCollection in the resulting joined string. null will be treated as empty ("")
125
- * @returns {string} the joined String. If aCollection is null, null will be returned
126
- */
127
- export function joinCollection(aCollection: Collection, aSeparator: string): string;
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;
128
275
 
129
276
  /**
130
- * A utility method to get a formatted string based on a pattern and some pattern arguments.
131
- * @param {string} aMessageFormatPattern - a pattern accepted by the Java MessageFormat class
132
- * @param {List} anArguments - arguments needed by the pattern
133
- * @returns {string} the result of the pattern evaluation or null if evaluation fails. Returns null ifaMessageFormatPattern is null or if anArguments doesn't contain any arguments.
134
- */
135
- export function messageFormat(aMessageFormatPattern: string, anArguments: List): string;
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;
136
283
 
137
284
  /**
138
- * Method that converts a string to a double.
139
- * @param {string} aString - the string to be converted
140
- * @returns {number} aString as double. If aString is null or can't be converted, -1.0 is returned
141
- */
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
+ */
142
298
  export function stringToDouble(aString: string): number;
143
299
 
144
300
  /**
145
- * Method that converts a string to a float.
146
- * @param {string} aString - the string to be converted
147
- * @returns {number} aString as float. If aString is null or can't be converted, -1.0 is returned
148
- */
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
+ */
149
306
  export function stringToFloat(aString: string): number;
150
307
 
151
308
  /**
152
- * Method that converts a string to an int.
153
- * @param {string} aString - the string to be converted
154
- * @returns {number} aString as int. If aString is null or can't be converted, -1 is returned
155
- */
156
- export function stringToInt(aString: string): number;
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;
157
315
 
158
316
  /**
159
- * Method that converts a string to a long.
160
- * @param {string} aString - the string to be converted
161
- * @returns {number} aString as long. If aString is null or can't be converted, -1 is returned
162
- */
163
- export function stringToLong(aString: string): number;
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;
164
323
 
165
324
  /**
166
- * A utility method that can be used to prevent method invocation return values to be added to the Velocity output.
167
- * @param {any} anObject - the object that should be "swallowed"
168
- */
169
- export function swallow(anObject: any): void;
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;
170
342
 
171
343
  /**
172
- * Removes leading and ending control characters (char <= 32) from a String and returns the result (empty String ("") if the string is empty or null).
173
- * @param {string} aString - the string that should be trimmed
174
- * @returns {string} the trimmed String. Returns empty ("") if aString is null or the trimmed String is empty.
175
- */
176
- export function trimToEmpty(aString: string): string;
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;
177
359
 
178
360
  /**
179
- * Removes leading and ending control characters (char <= 32) from a String and returns the result (null if the string is empty or null).
180
- * @param {string} aString - the string that should be trimmed
181
- * @returns {string} the trimmed String. Returns null if aString is null or the trimmed String is empty.
182
- */
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
+ */
183
436
  export function trimToNull(aString: string): string;
184
437
 
185
- declare namespace scriptUtil {
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
+ /**
464
+ * Scripting utility interface that might be needed when using a limited scripting or template language (such as Velocity).
465
+ *
466
+ * <p>
467
+ * An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getScriptUtil()}.
468
+ * See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the <code>Utils</code> interface.
469
+ * </p>Gets the boolean true primitive.Gets the boolean false primitive.Gets the null reference.Gets an object that is ensured not to be null.
470
+ *
471
+ * <p>
472
+ * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
473
+ * </p>
474
+ *
475
+ * <p>
476
+ * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
477
+ * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
478
+ * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
479
+ * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
480
+ * can be used to avoid such problems.
481
+ * </p>
482
+ *
483
+ * <p>
484
+ * <strong>An example</strong><br>
485
+ * This Velocity code:
486
+ * </p>
487
+ * <pre><code> #if ($anObject.getPersonOrNull())
488
+ * #set ($person = $anObject.getPersonOrNull())
489
+ * $person.getName()
490
+ * ...
491
+ * #end</code></pre>
492
+ * Can be better utilized as:
493
+ * <pre><code> #set ($scriptUtil = ...)
494
+ *
495
+ * #set ($person = $scriptUtil.getNonNull(${anObject.getPersonOrNull()}))
496
+ * #if ($person)
497
+ * $person.getName()
498
+ * ...
499
+ * #end
500
+ * </code></pre>Gets an object that is ensured not to be null or a whitespace only string.
501
+ *
502
+ * <p>
503
+ * This is a convenience method that can be used to avoid unnecessary subsequent method invocations in Velocity.
504
+ * </p>
505
+ *
506
+ * <p>
507
+ * Velocity ignores <code>null</code> assignments and trying to assign a null reference will be logged as a WARNING message.
508
+ * A common strategy to work around this is to use the the Velocity <code>#if</code> clause. It allows for easy non-null
509
+ * checks - a <code>null</code> object is considered to be <code>false</code>. The downside with this strategy is that it
510
+ * requires two subsequent method invocations. That can of course be a really bad thing if the method does costly things. This method
511
+ * can be used to avoid such problems.
512
+ * </p>
513
+ *
514
+ * <p>
515
+ * <strong>An example</strong><br>
516
+ * This Velocity code:
517
+ * </p>
518
+ * <pre><code> #if ($anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
519
+ * #set ($name = $anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly())
520
+ * #if ($name.trim().length() &gt; 0)
521
+ * &lt;p&gt;
522
+ * $name
523
+ * &lt;/p&gt;
524
+ * #end
525
+ * #end</code></pre>
526
+ * Can be better utilized as:
527
+ * <pre><code> #set ($scriptUtil = ...)
528
+ *
529
+ * #set ($name = $scriptUtil.getNonBlank(${anObject.getPersonNameThatCanBeNullOrEmptyOrWhitespaceOnly()}))
530
+ * #if ($name)
531
+ * &lt;p&gt;
532
+ * $name
533
+ * &lt;/p&gt;
534
+ * #end
535
+ * </code></pre>
536
+ *
537
+ * <p>
538
+ * <strong>A typical example when using {@link senselogic.sitevision.api.property.PropertyUtil} and whitespace is an issue</strong><br>
539
+ * This Velocity code:
540
+ * </p>
541
+ * <pre><code> #if ($propertyUtil.getString($theNode, 'thePropertyName'))
542
+ * #set ($propertyValue = $propertyUtil.getString($theNode, 'thePropertyName'))
543
+ * #if ($propertyValue.trim().length() &gt; 0)
544
+ * &lt;p&gt;
545
+ * $propertyValue
546
+ * &lt;/p&gt;
547
+ * #end
548
+ * #end</code></pre>
549
+ * Can be better utilized as:
550
+ * <pre><code> #set ($scriptUtil = ...)
551
+ *
552
+ * #set ($propertyValue = $scriptUtil.getNonBlank(${propertyUtil.getString($theNode, 'thePropertyName')}))
553
+ * #if ($propertyValue)
554
+ * &lt;p&gt;
555
+ * $propertyValue
556
+ * &lt;/p&gt;
557
+ * #end
558
+ * </code></pre>Gets a default value if an object is null.Gets a default value if a string is null or whitespace only.Checks if a string is not null and not empty.Checks if a string is null or empty.Checks if a string is not null, not empty and not whitespace only.Checks if a string is null, empty or whitespace only.Gets a system property. This method invokes the getProperty method of the java.lang.System class, i.e <code>System.getProperty(String)</code>.
559
+ *
560
+ * <p>
561
+ * <strong>Important note!</strong><br>
562
+ * This method can be used to reveal potential sensitive information about the server.
563
+ * </p>
564
+ * <p>
565
+ * Allowed properties:
566
+ * </p>
567
+ * <ul>
568
+ * <li>"sitevision.version" (5.1)</li>
569
+ * <li>"sitevision.build" (5.1)</li>
570
+ * <li>"sitevision.environment.type" (5.2.1)</li>
571
+ * </ul>
572
+ * <p>
573
+ * A legacy mode that enables the API to return all properties can be enabled using the following system property:<br>
574
+ * <em>sitevision.api.scriptutil.legacy_system_properties=true</em>
575
+ * </p>
576
+ *
577
+ * <p>
578
+ * A tip if you need to do backward compatibility workarounds: The Sitevision version is accessible as a system property
579
+ * named <em>sitevision.version</em>.
580
+ * </p>Creates and returns an instance of a Java class.Methods that wraps an array in a <code>List</code>. Arrays are sub optimal in Velocity and JavaScript.Gets the date format pattern used in the Sitevision editor for a specific Locale.Methods that formats a date according to a <code>SimpleDateFormat</code> patternMethods that formats the date of a calendar according to a <code>SimpleDateFormat</code> patternMethods that returns a human presentable size with an appropriate byte-suffix (bytes/kB/MB/GB/TB).
581
+ * <p>
582
+ * Note! This method uses two significant digits and 1024 as base. Some examples:<br>
583
+ * &nbsp;&nbsp; <code>126</code> -&gt; "<code>130 bytes</code>"<br>
584
+ * &nbsp;&nbsp; <code>126975</code> -&gt; "<code>120 kB</code>"<br>
585
+ * &nbsp;&nbsp; <code>456456456</code> -&gt; "<code>440 MB</code>"
586
+ * </p>Method that converts a string to an int.Method that converts a string to a long.Method that converts a string to a double.Method that converts a string to a float.Method that returns true for values that can be interpreted as the true value.Method that returns true for values that can be interpreted as the false value.Joins the elements of an array to a single String.
587
+ *
588
+ * <p>Some examples:</p>
589
+ * <pre><code>
590
+ * joinArray(["one", "two", "three"], ";") -&gt; "one;two;three"
591
+ * joinArray(["a", myTwoInteger], "-") -&gt; "a-2"
592
+ * joinArray(["", null, "three"], "-") -&gt; "--three"
593
+ * joinArray([], "-") -&gt; ""
594
+ * joinArray(null, "-") -&gt; null
595
+ * </code></pre>Joins the items of a Collection to a single String.
596
+ *
597
+ * <p>
598
+ * For examples, see {@link #joinArray(Object[], String)}
599
+ * </p>A utility method to get a formatted string based on a pattern and some pattern arguments.
600
+ *
601
+ * <p>
602
+ * <strong>A Velocity example:</strong>
603
+ * </p>
604
+ * <pre><code>
605
+ * #set ($instanceCreatorUtil = ...)
606
+ * #set ($scriptUtil = ...)
607
+ * #set ($searchPhrase = ...)
608
+ *
609
+ * <em>## Determine pattern</em>
610
+ * #if ($language == 'sv')
611
+ * #set ($pattern = 'Din sökning {0} gav inga träffar')
612
+ * #else
613
+ * #set ($pattern = 'No hits for your search {0}')
614
+ * #end
615
+ *
616
+ * <em>## Set up pattern argument(s)</em>
617
+ * #set ($argsList = $instanceCreatorUtil.list)
618
+ * $scriptUtil.swallow(${argsList.add($searchPhrase)})
619
+ *
620
+ * <em>## Format and print result</em>
621
+ * &lt;p&gt;$scriptUtil.messageFormat($pattern, $argsList)&lt;/p&gt;
622
+ * </code></pre>A utility method that can be used to prevent method invocation return values to be added to the Velocity output.
623
+ *
624
+ * <p>
625
+ * <strong>An example:</strong><br>This Velocity code:
626
+ * </p>
627
+ * <pre><code>
628
+ * #set ($myList = $instanceCreatorUtil.list)
629
+ * $myList.add("Magnus Lövgren")
630
+ * $myList.add("Mikael Wikblom")
631
+ * </code></pre>
632
+ * will result in the following Velocity output (the <code>add</code> method of <code>ArrayList</code> returns a <code>boolean</code>):
633
+ * <pre><code>true true</code></pre>
634
+ * <p>
635
+ * If a non-void method is invoked and the return value isn't handled, it will be part of the Velocity output.
636
+ * The <code>swallow</code> method can be used to prevent that (i.e. use it to "swallow" the result):
637
+ * </p>
638
+ * <pre><code>
639
+ * #set ($myList = $instanceCreatorUtil.list)
640
+ * $scriptUtil.swallow(${myList.add("Magnus Lövgren")})
641
+ * $scriptUtil.swallow(${myList.add("Mikael Wikblom")})</code></pre>
642
+ * <p>
643
+ * <em>Note! The code above is just an example that illustrates a common problem. When creating and working with a
644
+ * List from Velocity, you should probably use a {@link senselogic.sitevision.api.script.factory.ListWrapper} instead</em>
645
+ * </p>Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (<code>null</code>
646
+ * if the string is empty or <code>null</code>).
647
+ *
648
+ * <p>
649
+ * The String is trimmed using <code>String.trim()</code>
650
+ * </p>Removes leading and ending control characters (char &lt;= 32) from a String and returns the result (empty String (<code>""</code>)
651
+ * if the string is empty or <code>null</code>).
652
+ *
653
+ * <p>
654
+ * The String is trimmed using <code>String.trim()</code>
655
+ * </p>Flattens a multi-lined string to a trimmed single-line string.
656
+ *
657
+ * <p>
658
+ * This method replaces all whitespace (space, line break and such) with a space, but will never add multiple spaces.
659
+ * </p>
660
+ * @author Magnus Lövgren
661
+ */
662
+ declare namespace ScriptUtil {
186
663
  export {
187
- flatten,
664
+ getTrue,
188
665
  getFalse,
189
- getHumanPresentableSize,
190
- getList,
191
- getNonBlank,
192
- getNonNull,
193
666
  getNull,
194
- getTrue,
195
- isBlank,
667
+ getNonNull,
668
+ getNonBlank,
669
+ isNotEmpty,
196
670
  isEmpty,
197
- isFalse,
198
671
  isNotBlank,
199
- isNotEmpty,
672
+ isBlank,
673
+ getSystemProperty,
674
+ getInstance,
675
+ getList,
676
+ getFormatPattern,
677
+ getDateAsString,
678
+ getCalendarAsString,
679
+ getHumanPresentableSize,
680
+ stringToInt,
681
+ stringToLong,
682
+ stringToDouble,
683
+ stringToFloat,
200
684
  isTrue,
685
+ isFalse,
201
686
  joinArray,
202
687
  joinCollection,
203
688
  messageFormat,
204
- stringToDouble,
205
- stringToFloat,
206
- stringToInt,
207
- stringToLong,
208
689
  swallow,
209
- trimToEmpty,
210
690
  trimToNull,
691
+ trimToEmpty,
692
+ flatten,
211
693
  };
212
694
  }
213
695
 
214
- export default scriptUtil;
696
+ export default ScriptUtil;