@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,428 +1,10 @@
1
- import type { TypedArgument } from "../../types/senselogic/sitevision/api/script/factory/TypedArgument";
1
+ import type TypedArgument from "../../types/senselogic/sitevision/api/script/factory/TypedArgument";
2
2
 
3
3
  import ListWrapper from "../ListWrapper";
4
4
  import ArraysInstance from "../ArraysInstance";
5
5
  import CollectionsInstance from "../CollectionsInstance";
6
6
  import MathInstance from "../MathInstance";
7
7
 
8
- /**
9
- * Creates and returns an instance of a specified Java class using the default constructor.
10
- *
11
- * <p>
12
- * Example of how to create a <code>Date</code> instance in Velocity:
13
- * </p>
14
- * <pre><code>
15
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
16
- * #set ($now = $instanceCreatorUtil.getDefaultInstance('java.util.Date'))
17
- * </code></pre>
18
- *
19
- * <p>
20
- * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name
21
- * that starts with <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
22
- * </p>
23
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
24
- * @return an instance of the class, or <code>null</code> if an instance can not be created
25
- * @see InstanceCreatorUtil#getArgumentInstance(String, TypedArgument)
26
- * @see InstanceCreatorUtil#getArgumentsInstance(String, java.util.List)
27
- */
28
- export function getDefaultInstance(aQualifiedClassName: string): unknown;
29
-
30
- /**
31
- * Creates and returns an instance of a specified Java class using a single argument constructor.
32
- *
33
- * <p>
34
- * Example of how to create an <code>StringBuilder</code> instance with the initial capacity 500 in Velocity
35
- * (i.e. invoke the StringBuilder(int) constructor):
36
- * </p>
37
- * <pre><code>
38
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
39
- * #set ($capacityIntArgument = $instanceCreatorUtil.getIntArgument(500))
40
- * #set ($buffer = $instanceCreatorUtil.getArgumentInstance('java.lang.StringBuilder', $capacityIntArgument))
41
- * </code></pre>
42
- *
43
- * <p>
44
- * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name that starts with
45
- * <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
46
- * </p>
47
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
48
- * @param aConstructorArgument a typed argument that describes the value and the type of the constructor argument
49
- * @return an instance of the class, or <code>null</code> if an instance can not be created
50
- * @see InstanceCreatorUtil#getDefaultInstance(String)
51
- * @see InstanceCreatorUtil#getArgumentsInstance(String, java.util.List)
52
- */
53
- export function getArgumentInstance(
54
- aQualifiedClassName: string,
55
- aConstructorArgument: TypedArgument
56
- ): unknown;
57
-
58
- /**
59
- * Creates and returns an instance of a specified Java class using a multiple argument constructor.
60
- *
61
- * <p>
62
- * Example of how to create an <code>Locale</code> instance with language "en" and country "US" in Velocity
63
- * (i.e. invoke the Locale(String,String) constructor):
64
- * </p>
65
- * <pre><code>
66
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
67
- *
68
- * <em>## Set up arguments</em>
69
- * #set ($args = $instanceCreatorUtil.listWrapper) <em>## Use ListWrapper to prohibit output when invoking the "add" method...</em>
70
- * $args.add($instanceCreatorUtil.getObjectArgument('en')) <em>## Add first argument (language)</em>
71
- * $args.add($instanceCreatorUtil.getObjectArgument('US')) <em>## Add second argument (country)</em>
72
- *
73
- * <em>## Create instance with arguments</em>
74
- * #set ($americanLocale = $instanceCreatorUtil.getArgumentsInstance('java.util.Locale', $args.unwrap())) <em>## unwrap() to get actual List</em>
75
- * </code></pre>
76
- *
77
- * <p>
78
- * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name that
79
- * starts with <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
80
- * </p>
81
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
82
- * @param aConstructorArguments a list of typed arguments that describes the values and types of the constructor arguments
83
- * @return an instance of the class, or <code>null</code> if an instance can not be created
84
- * @see InstanceCreatorUtil#getDefaultInstance(String)
85
- * @see InstanceCreatorUtil#getArgumentInstance(String, TypedArgument)
86
- */
87
- export function getArgumentsInstance(
88
- aQualifiedClassName: string,
89
- aConstructorArguments: unknown
90
- ): unknown;
91
-
92
- /**
93
- * Gets a typed argument for a <code>byte</code> primitive.
94
- * @param aByte a byte value
95
- * @return a typed argument for the <code>byte</code> primitive.
96
- */
97
- export function getByteArgument(aByte: unknown): TypedArgument;
98
-
99
- /**
100
- * Gets a typed argument for a <code>short</code> primitive.
101
- * @param aShort a short value
102
- * @return a typed argument for the <code>short</code> primitive.
103
- */
104
- export function getShortArgument(aShort: number): TypedArgument;
105
-
106
- /**
107
- * Gets a typed argument for a <code>int</code> primitive.
108
- * @param anInt an int value
109
- * @return a typed argument for the <code>int</code> primitive.
110
- */
111
- export function getIntArgument(anInt: number): TypedArgument;
112
-
113
- /**
114
- * Gets a typed argument for a <code>long</code> primitive.
115
- * @param aLong a long value
116
- * @return a typed argument for the <code>long</code> primitive.
117
- */
118
- export function getLongArgument(aLong: number): TypedArgument;
119
-
120
- /**
121
- * Gets a typed argument for a <code>float</code> primitive.
122
- * @param aFloat a float value
123
- * @return a typed argument for the <code>float</code> primitive.
124
- */
125
- export function getFloatArgument(aFloat: number): TypedArgument;
126
-
127
- /**
128
- * Gets a typed argument for a <code>double</code> primitive.
129
- * @param aDouble a double value
130
- * @return a typed argument for the <code>double</code> primitive.
131
- */
132
- export function getDoubleArgument(aDouble: number): TypedArgument;
133
-
134
- /**
135
- * Gets a typed argument for a <code>char</code> primitive.
136
- * @param aChar a char value
137
- * @return a typed argument for the <code>char</code> primitive.
138
- */
139
- export function getCharArgument(aChar: string): TypedArgument;
140
-
141
- /**
142
- * Gets a typed argument for a <code>boolean</code> primitive.
143
- * @param aBoolean a boolean value
144
- * @return a typed argument for the <code>boolean</code> primitive.
145
- */
146
- export function getBooleanArgument(aBoolean: boolean): TypedArgument;
147
-
148
- /**
149
- * Gets a typed argument for an <code>Object</code>.
150
- *
151
- * <p>
152
- * <strong>Note!</strong> This method can <strong>only</strong> be used if the class of your actual
153
- * <em>instance exactly match the type required</em> by the constructor you are trying to invoke! If types mismatch, you must use
154
- * {@link #getCustomArgument(String, Object)} instead.
155
- * </p>
156
- * @param aValue an object, not <code>null</code>
157
- * @return a typed argument for <code>aValue</code> object, <code>null</code> if <code>aValue</code> is <code>null</code>. The class value of <code>TypedArgument</code> will be set via <code>aValue.getClass()</code>.
158
- * @see InstanceCreatorUtil#getNullArgument(String)
159
- * @see InstanceCreatorUtil#getCustomArgument(String, Object)
160
- */
161
- export function getObjectArgument(aValue: unknown): TypedArgument;
162
-
163
- /**
164
- * Gets a typed argument for a <code>null</code> value for a specified class/interface.
165
- *
166
- * <p>
167
- * <strong>Note!</strong> This method <strong>must</strong> be used if you should pass a <code>null</code> value to a constructor!
168
- * </p>
169
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
170
- * @return a null argument that uses a specified class/interface as type, or <code>null</code> if an <code>aQualifiedClassName</code> is invalid)
171
- */
172
- export function getNullArgument(aQualifiedClassName: string): TypedArgument;
173
-
174
- /**
175
- * Gets a typed argument that specifies a certain class/interface for an object.
176
- *
177
- * <p>
178
- * <strong>Note!</strong> This method <strong>must</strong> be used if the class of your actual
179
- * <em>instance doesn't exactly match the type required</em> by the constructor you are trying to invoke! Typical cases for when to use
180
- * this method are:
181
- * </p>
182
- * <ul>
183
- * <li>The class of your instance <em>extends</em> the type required (class) by the constructor</li>
184
- * <li>The class of your instance <em>implements</em> the type required (interface) by the constructor</li>
185
- * </ul>
186
- *
187
- * <p>
188
- * Example of how to create a <code>ArrayList</code> instance in Velocity via the <code>ArrayList(Collection)</code> constructor:
189
- * </p>
190
- * <pre><code>
191
- * #set ($myList = ...) <em>## $myList.class is NOT Collection, it's ArrayList, Vector or another Collection implementation...</em>
192
- *
193
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
194
- * #set ($aCollectionsTypeArgument = $instanceCreatorUtil.getCustomArgument('java.util.Collection', $myList))
195
- * #set ($anArrayList = $instanceCreatorUtil.getArgumentInstance('java.util.ArrayList', $aCollectionsTypeArgument))
196
- * </code></pre>
197
- * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
198
- * @param aValue an object
199
- * @return a typed argument that uses a specified class/interface as type, or <code>null</code> if an <code>aQualifiedClassName</code> is invalid
200
- * @see InstanceCreatorUtil#getObjectArgument(Object)
201
- * @see InstanceCreatorUtil#getNullArgument(String)
202
- */
203
- export function getCustomArgument(
204
- aQualifiedClassName: string,
205
- aValue: unknown
206
- ): TypedArgument;
207
-
208
- /**
209
- * Gets a typed argument for an <code>Enum</code> value for a specified enum class.
210
- * @param aQualifiedEnumClassName a fully qualified name of the enum class (i.e. including packages)
211
- * @param anEnum an Enum instance or a String with the name of the Enum
212
- * @return a typed argument that uses a specified enum as type, or <code>null</code> if an <code>aQualifiedEnumClassName</code> or <code>anEnum</code> is invalid
213
- * @see #getEnumInstance(String, String)
214
- */
215
- export function getEnumArgument(
216
- aQualifiedEnumClassName: string,
217
- anEnum: unknown
218
- ): TypedArgument;
219
-
220
- /**
221
- * Gets an enum instance for a specified enum class.
222
- *
223
- * <p>
224
- * Example of how to create the {@link senselogic.sitevision.api.webresource.doctype.DocType#HTML5} instance
225
- * of {@link senselogic.sitevision.api.webresource.doctype.DocType} in Velocity:
226
- * </p>
227
- * <pre><code>
228
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
229
- * #set ($html5Enum = $instanceCreatorUtil.getEnumInstance('senselogic.sitevision.api.webresource.doctype.DocType', 'HTML5'))
230
- * </code></pre>
231
- *
232
- * <p>
233
- * Example of how to create the <code>SECONDS</code> instance of <code>java.util.concurrent.TimeUnit</code> in Velocity:
234
- * </p>
235
- * <pre><code>
236
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
237
- * #set ($secondsEnum = $instanceCreatorUtil.getEnumInstance('java.util.concurrent.TimeUnit', 'SECONDS'))
238
- * </code></pre>
239
- *
240
- * <p>
241
- * Example of how to create the {@link senselogic.sitevision.api.search.index.IndexUtil.IndexType#USER_IDENTITY} instance
242
- * of {@link senselogic.sitevision.api.search.index.IndexUtil.IndexType} (note that <code>IndexType</code> is an "inner"
243
- * enum of <code>IndexUtil</code>) in Velocity:
244
- * </p>
245
- * <pre><code>
246
- * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
247
- *
248
- * <em>## Note that '$' is used to separate outer class from inner enum</em>
249
- * #set ($enumClassName = 'senselogic.sitevision.api.search.index.IndexUtil$IndexType')
250
- * #set ($userIdentityType = $instanceCreatorUtil.getEnumInstance($enumClassName, 'USER_IDENTITY'))
251
- * </code></pre>
252
- * @param aQualifiedEnumClassName a fully qualified name of the enum class (i.e. including packages)
253
- * @param anEnumName the name of the enum value
254
- * @return an Enum instance, or <code>null</code> if an <code>aQualifiedEnumClassName</code> or <code>anEnumName</code> is invalid
255
- */
256
- export function getEnumInstance(
257
- aQualifiedEnumClassName: string,
258
- anEnumName: string
259
- ): unknown;
260
-
261
- /**
262
- * Convenience method to get an <code>ArrayList</code> instance.
263
- * @return a <code>java.util.ArrayList</code> instance
264
- * @see #getListWrapper()
265
- */
266
- export function getList(): unknown;
267
-
268
- /**
269
- * Convenience method to get a <code>HashSet</code> instance.
270
- * @return a <code>java.util.HashSet</code> instance
271
- */
272
- export function getSet(): unknown;
273
-
274
- /**
275
- * Convenience method to get a <code>HashMap</code> instance.
276
- * @return a <code>java.util.HashMap</code> instance
277
- */
278
- export function getMap(): unknown;
279
-
280
- /**
281
- * Convenience method to get a <code>LinkedHashMap</code> instance.
282
- * @return a <code>java.util.LinkedHashMap</code> instance
283
- * @since Sitevision 4.5.4.1
284
- */
285
- export function getLinkedMap(): unknown;
286
-
287
- /**
288
- * Gets a <code>ListWrapper</code> instance.
289
- *
290
- * <p>
291
- * <em>The <code>java.util.List</code> interface specifies that the <code>add</code> method should return a <code>boolean</code>.
292
- * This is a problem if your scripting language (e.g. Velocity) requires you to suppress the returned value so it won't end up
293
- * in the resulting output. A <code>ListWrapper</code> instance enables such suppressing.</em>
294
- * </p>
295
- * @return a ListWrapper instance
296
- * @since Sitevision 3.5
297
- */
298
- export function getListWrapper(): ListWrapper;
299
-
300
- /**
301
- * Gets a <code>java.util.Arrays</code> wrapper instance.
302
- *
303
- * <p>
304
- * <em>The <code>Arrays</code> class contains static methods only and can't be instantiated. This is a problem if your
305
- * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
306
- * An <code>ArraysInstance</code> instance enables <code>Arrays</code> method invocations.</em>
307
- * </p>
308
- * @return a wrapper instance for <code>java.util.Arrays</code>
309
- */
310
- export function getArraysInstance(): ArraysInstance;
311
-
312
- /**
313
- * Gets a <code>java.util.Collections</code> wrapper instance.
314
- *
315
- * <p>
316
- * <em>The <code>Collections</code> class contains static methods only and can't be instantiated. This is a problem if your
317
- * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
318
- * A <code>CollectionsInstance</code> instance enables <code>Collections</code> method invocations.</em>
319
- * </p>
320
- * @return a wrapper instance for <code>java.util.Collections</code>
321
- */
322
- export function getCollectionsInstance(): CollectionsInstance;
323
-
324
- /**
325
- * Gets a <code>java.lang.Math</code> wrapper instance.
326
- *
327
- * <p>
328
- * <em>The <code>Math</code> class contains static methods only and can't be instantiated. This is a problem if your
329
- * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
330
- * A <code>MathInstance</code> instance enables <code>Math</code> method invocations.</em>
331
- * </p>
332
- * @return a wrapper instance for <code>java.lang.Math</code>
333
- */
334
- export function getMathInstance(): MathInstance;
335
-
336
- /**
337
- * Creates a boolean array with a given size.
338
- * @param aSize the array size
339
- * @return a boolean array with aSize length, or empty array if aSize is zero or negative
340
- * @see ArraysInstance
341
- * @since Sitevision 4.5.5
342
- */
343
- export function getBooleanArray(aSize: number): boolean;
344
-
345
- /**
346
- * Creates a byte array with a given size.
347
- * @param aSize the array size
348
- * @return a byte array with aSize length, or empty array if aSize is zero or negative
349
- * @see ArraysInstance
350
- * @since Sitevision 4.5.5
351
- */
352
- export function getByteArray(aSize: number): unknown;
353
-
354
- /**
355
- * Creates a char array with a given size.
356
- * @param aSize the array size
357
- * @return a char array with aSize length, or empty array if aSize is zero or negative
358
- * @see ArraysInstance
359
- * @since Sitevision 4.5.5
360
- */
361
- export function getCharArray(aSize: number): string;
362
-
363
- /**
364
- * Creates a double array with a given size.
365
- * @param aSize the array size
366
- * @return a double array with aSize length, or empty array if aSize is zero or negative
367
- * @see ArraysInstance
368
- * @since Sitevision 4.5.5
369
- */
370
- export function getDoubleArray(aSize: number): number;
371
-
372
- /**
373
- * Creates a float array with a given size.
374
- * @param aSize the array size
375
- * @return a float array with aSize length, or empty array if aSize is zero or negative
376
- * @see ArraysInstance
377
- * @since Sitevision 4.5.5
378
- */
379
- export function getFloatArray(aSize: number): number;
380
-
381
- /**
382
- * Creates a int array with a given size.
383
- * @param aSize the array size
384
- * @return a int array with aSize length, or empty array if aSize is zero or negative
385
- * @see ArraysInstance
386
- * @since Sitevision 4.5.5
387
- */
388
- export function getIntArray(aSize: number): number;
389
-
390
- /**
391
- * Creates a long array with a given size.
392
- * @param aSize the array size
393
- * @return a long array with aSize length, or empty array if aSize is zero or negative
394
- * @see ArraysInstance
395
- * @since Sitevision 4.5.5
396
- */
397
- export function getLongArray(aSize: number): number;
398
-
399
- /**
400
- * Creates a short array with a given size.
401
- * @param aSize the array size
402
- * @return a short array with aSize length, or empty array if aSize is zero or negative
403
- * @see ArraysInstance
404
- * @since Sitevision 4.5.5
405
- */
406
- export function getShortArray(aSize: number): number;
407
-
408
- /**
409
- * Creates a String array with a given size.
410
- * @param aSize the array size
411
- * @return a String array with aSize length, or empty array if aSize is zero or negative
412
- * @see ArraysInstance
413
- * @since Sitevision 4.5.5
414
- */
415
- export function getStringArray(aSize: number): string;
416
-
417
- /**
418
- * Creates a Object array with a given size.
419
- * @param aSize the array size
420
- * @return a Object array with aSize length, or empty array if aSize is zero or negative
421
- * @see ArraysInstance
422
- * @since Sitevision 4.5.5
423
- */
424
- export function getObjectArray(aSize: number): unknown;
425
-
426
8
  /**
427
9
  * Instance creation utility that can be used in limited scripting languages (such as Velocity).
428
10
  *
@@ -486,43 +68,425 @@ export function getObjectArray(aSize: number): unknown;
486
68
  * @author Magnus Lövgren
487
69
  * @since Sitevision 3.1
488
70
  */
489
- declare namespace instanceCreatorUtil {
490
- export {
491
- getDefaultInstance,
492
- getArgumentInstance,
493
- getArgumentsInstance,
494
- getByteArgument,
495
- getShortArgument,
496
- getIntArgument,
497
- getLongArgument,
498
- getFloatArgument,
499
- getDoubleArgument,
500
- getCharArgument,
501
- getBooleanArgument,
502
- getObjectArgument,
503
- getNullArgument,
504
- getCustomArgument,
505
- getEnumArgument,
506
- getEnumInstance,
507
- getList,
508
- getSet,
509
- getMap,
510
- getLinkedMap,
511
- getListWrapper,
512
- getArraysInstance,
513
- getCollectionsInstance,
514
- getMathInstance,
515
- getBooleanArray,
516
- getByteArray,
517
- getCharArray,
518
- getDoubleArray,
519
- getFloatArray,
520
- getIntArray,
521
- getLongArray,
522
- getShortArray,
523
- getStringArray,
524
- getObjectArray,
525
- };
71
+ export interface InstanceCreatorUtil {
72
+ /**
73
+ * Creates and returns an instance of a specified Java class using the default constructor.
74
+ *
75
+ * <p>
76
+ * Example of how to create a <code>Date</code> instance in Velocity:
77
+ * </p>
78
+ * <pre><code>
79
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
80
+ * #set ($now = $instanceCreatorUtil.getDefaultInstance('java.util.Date'))
81
+ * </code></pre>
82
+ *
83
+ * <p>
84
+ * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name
85
+ * that starts with <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
86
+ * </p>
87
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
88
+ * @return an instance of the class, or <code>null</code> if an instance can not be created
89
+ * @see InstanceCreatorUtil#getArgumentInstance(String, TypedArgument)
90
+ * @see InstanceCreatorUtil#getArgumentsInstance(String, java.util.List)
91
+ */
92
+ getDefaultInstance(aQualifiedClassName: string): unknown;
93
+
94
+ /**
95
+ * Creates and returns an instance of a specified Java class using a single argument constructor.
96
+ *
97
+ * <p>
98
+ * Example of how to create an <code>StringBuilder</code> instance with the initial capacity 500 in Velocity
99
+ * (i.e. invoke the StringBuilder(int) constructor):
100
+ * </p>
101
+ * <pre><code>
102
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
103
+ * #set ($capacityIntArgument = $instanceCreatorUtil.getIntArgument(500))
104
+ * #set ($buffer = $instanceCreatorUtil.getArgumentInstance('java.lang.StringBuilder', $capacityIntArgument))
105
+ * </code></pre>
106
+ *
107
+ * <p>
108
+ * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name that starts with
109
+ * <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
110
+ * </p>
111
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
112
+ * @param aConstructorArgument a typed argument that describes the value and the type of the constructor argument
113
+ * @return an instance of the class, or <code>null</code> if an instance can not be created
114
+ * @see InstanceCreatorUtil#getDefaultInstance(String)
115
+ * @see InstanceCreatorUtil#getArgumentsInstance(String, java.util.List)
116
+ */
117
+ getArgumentInstance(
118
+ aQualifiedClassName: string,
119
+ aConstructorArgument: TypedArgument
120
+ ): unknown;
121
+
122
+ /**
123
+ * Creates and returns an instance of a specified Java class using a multiple argument constructor.
124
+ *
125
+ * <p>
126
+ * Example of how to create an <code>Locale</code> instance with language "en" and country "US" in Velocity
127
+ * (i.e. invoke the Locale(String,String) constructor):
128
+ * </p>
129
+ * <pre><code>
130
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
131
+ *
132
+ * <em>## Set up arguments</em>
133
+ * #set ($args = $instanceCreatorUtil.listWrapper) <em>## Use ListWrapper to prohibit output when invoking the "add" method...</em>
134
+ * $args.add($instanceCreatorUtil.getObjectArgument('en')) <em>## Add first argument (language)</em>
135
+ * $args.add($instanceCreatorUtil.getObjectArgument('US')) <em>## Add second argument (country)</em>
136
+ *
137
+ * <em>## Create instance with arguments</em>
138
+ * #set ($americanLocale = $instanceCreatorUtil.getArgumentsInstance('java.util.Locale', $args.unwrap())) <em>## unwrap() to get actual List</em>
139
+ * </code></pre>
140
+ *
141
+ * <p>
142
+ * <strong>Note!</strong> This method will <em>not</em> create any objects of any classes that has a fully qualified class name that
143
+ * starts with <code>senselogic.sitevision</code> and resides outside the <code>api</code> package.
144
+ * </p>
145
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
146
+ * @param aConstructorArguments a list of typed arguments that describes the values and types of the constructor arguments
147
+ * @return an instance of the class, or <code>null</code> if an instance can not be created
148
+ * @see InstanceCreatorUtil#getDefaultInstance(String)
149
+ * @see InstanceCreatorUtil#getArgumentInstance(String, TypedArgument)
150
+ */
151
+ getArgumentsInstance(
152
+ aQualifiedClassName: string,
153
+ aConstructorArguments: unknown
154
+ ): unknown;
155
+
156
+ /**
157
+ * Gets a typed argument for a <code>byte</code> primitive.
158
+ * @param aByte a byte value
159
+ * @return a typed argument for the <code>byte</code> primitive.
160
+ */
161
+ getByteArgument(aByte: unknown): TypedArgument;
162
+
163
+ /**
164
+ * Gets a typed argument for a <code>short</code> primitive.
165
+ * @param aShort a short value
166
+ * @return a typed argument for the <code>short</code> primitive.
167
+ */
168
+ getShortArgument(aShort: number): TypedArgument;
169
+
170
+ /**
171
+ * Gets a typed argument for a <code>int</code> primitive.
172
+ * @param anInt an int value
173
+ * @return a typed argument for the <code>int</code> primitive.
174
+ */
175
+ getIntArgument(anInt: number): TypedArgument;
176
+
177
+ /**
178
+ * Gets a typed argument for a <code>long</code> primitive.
179
+ * @param aLong a long value
180
+ * @return a typed argument for the <code>long</code> primitive.
181
+ */
182
+ getLongArgument(aLong: number): TypedArgument;
183
+
184
+ /**
185
+ * Gets a typed argument for a <code>float</code> primitive.
186
+ * @param aFloat a float value
187
+ * @return a typed argument for the <code>float</code> primitive.
188
+ */
189
+ getFloatArgument(aFloat: number): TypedArgument;
190
+
191
+ /**
192
+ * Gets a typed argument for a <code>double</code> primitive.
193
+ * @param aDouble a double value
194
+ * @return a typed argument for the <code>double</code> primitive.
195
+ */
196
+ getDoubleArgument(aDouble: number): TypedArgument;
197
+
198
+ /**
199
+ * Gets a typed argument for a <code>char</code> primitive.
200
+ * @param aChar a char value
201
+ * @return a typed argument for the <code>char</code> primitive.
202
+ */
203
+ getCharArgument(aChar: string): TypedArgument;
204
+
205
+ /**
206
+ * Gets a typed argument for a <code>boolean</code> primitive.
207
+ * @param aBoolean a boolean value
208
+ * @return a typed argument for the <code>boolean</code> primitive.
209
+ */
210
+ getBooleanArgument(aBoolean: boolean): TypedArgument;
211
+
212
+ /**
213
+ * Gets a typed argument for an <code>Object</code>.
214
+ *
215
+ * <p>
216
+ * <strong>Note!</strong> This method can <strong>only</strong> be used if the class of your actual
217
+ * <em>instance exactly match the type required</em> by the constructor you are trying to invoke! If types mismatch, you must use
218
+ * {@link #getCustomArgument(String, Object)} instead.
219
+ * </p>
220
+ * @param aValue an object, not <code>null</code>
221
+ * @return a typed argument for <code>aValue</code> object, <code>null</code> if <code>aValue</code> is <code>null</code>. The class value of <code>TypedArgument</code> will be set via <code>aValue.getClass()</code>.
222
+ * @see InstanceCreatorUtil#getNullArgument(String)
223
+ * @see InstanceCreatorUtil#getCustomArgument(String, Object)
224
+ */
225
+ getObjectArgument(aValue: unknown): TypedArgument;
226
+
227
+ /**
228
+ * Gets a typed argument for a <code>null</code> value for a specified class/interface.
229
+ *
230
+ * <p>
231
+ * <strong>Note!</strong> This method <strong>must</strong> be used if you should pass a <code>null</code> value to a constructor!
232
+ * </p>
233
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
234
+ * @return a null argument that uses a specified class/interface as type, or <code>null</code> if an <code>aQualifiedClassName</code> is invalid)
235
+ */
236
+ getNullArgument(aQualifiedClassName: string): TypedArgument;
237
+
238
+ /**
239
+ * Gets a typed argument that specifies a certain class/interface for an object.
240
+ *
241
+ * <p>
242
+ * <strong>Note!</strong> This method <strong>must</strong> be used if the class of your actual
243
+ * <em>instance doesn't exactly match the type required</em> by the constructor you are trying to invoke! Typical cases for when to use
244
+ * this method are:
245
+ * </p>
246
+ * <ul>
247
+ * <li>The class of your instance <em>extends</em> the type required (class) by the constructor</li>
248
+ * <li>The class of your instance <em>implements</em> the type required (interface) by the constructor</li>
249
+ * </ul>
250
+ *
251
+ * <p>
252
+ * Example of how to create a <code>ArrayList</code> instance in Velocity via the <code>ArrayList(Collection)</code> constructor:
253
+ * </p>
254
+ * <pre><code>
255
+ * #set ($myList = ...) <em>## $myList.class is NOT Collection, it's ArrayList, Vector or another Collection implementation...</em>
256
+ *
257
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
258
+ * #set ($aCollectionsTypeArgument = $instanceCreatorUtil.getCustomArgument('java.util.Collection', $myList))
259
+ * #set ($anArrayList = $instanceCreatorUtil.getArgumentInstance('java.util.ArrayList', $aCollectionsTypeArgument))
260
+ * </code></pre>
261
+ * @param aQualifiedClassName a fully qualified name of the class (i.e. including packages)
262
+ * @param aValue an object
263
+ * @return a typed argument that uses a specified class/interface as type, or <code>null</code> if an <code>aQualifiedClassName</code> is invalid
264
+ * @see InstanceCreatorUtil#getObjectArgument(Object)
265
+ * @see InstanceCreatorUtil#getNullArgument(String)
266
+ */
267
+ getCustomArgument(
268
+ aQualifiedClassName: string,
269
+ aValue: unknown
270
+ ): TypedArgument;
271
+
272
+ /**
273
+ * Gets a typed argument for an <code>Enum</code> value for a specified enum class.
274
+ * @param aQualifiedEnumClassName a fully qualified name of the enum class (i.e. including packages)
275
+ * @param anEnum an Enum instance or a String with the name of the Enum
276
+ * @return a typed argument that uses a specified enum as type, or <code>null</code> if an <code>aQualifiedEnumClassName</code> or <code>anEnum</code> is invalid
277
+ * @see #getEnumInstance(String, String)
278
+ */
279
+ getEnumArgument(
280
+ aQualifiedEnumClassName: string,
281
+ anEnum: unknown
282
+ ): TypedArgument;
283
+
284
+ /**
285
+ * Gets an enum instance for a specified enum class.
286
+ *
287
+ * <p>
288
+ * Example of how to create the {@link senselogic.sitevision.api.webresource.doctype.DocType#HTML5} instance
289
+ * of {@link senselogic.sitevision.api.webresource.doctype.DocType} in Velocity:
290
+ * </p>
291
+ * <pre><code>
292
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
293
+ * #set ($html5Enum = $instanceCreatorUtil.getEnumInstance('senselogic.sitevision.api.webresource.doctype.DocType', 'HTML5'))
294
+ * </code></pre>
295
+ *
296
+ * <p>
297
+ * Example of how to create the <code>SECONDS</code> instance of <code>java.util.concurrent.TimeUnit</code> in Velocity:
298
+ * </p>
299
+ * <pre><code>
300
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
301
+ * #set ($secondsEnum = $instanceCreatorUtil.getEnumInstance('java.util.concurrent.TimeUnit', 'SECONDS'))
302
+ * </code></pre>
303
+ *
304
+ * <p>
305
+ * Example of how to create the {@link senselogic.sitevision.api.search.index.IndexUtil.IndexType#USER_IDENTITY} instance
306
+ * of {@link senselogic.sitevision.api.search.index.IndexUtil.IndexType} (note that <code>IndexType</code> is an "inner"
307
+ * enum of <code>IndexUtil</code>) in Velocity:
308
+ * </p>
309
+ * <pre><code>
310
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
311
+ *
312
+ * <em>## Note that '$' is used to separate outer class from inner enum</em>
313
+ * #set ($enumClassName = 'senselogic.sitevision.api.search.index.IndexUtil$IndexType')
314
+ * #set ($userIdentityType = $instanceCreatorUtil.getEnumInstance($enumClassName, 'USER_IDENTITY'))
315
+ * </code></pre>
316
+ * @param aQualifiedEnumClassName a fully qualified name of the enum class (i.e. including packages)
317
+ * @param anEnumName the name of the enum value
318
+ * @return an Enum instance, or <code>null</code> if an <code>aQualifiedEnumClassName</code> or <code>anEnumName</code> is invalid
319
+ */
320
+ getEnumInstance(aQualifiedEnumClassName: string, anEnumName: string): unknown;
321
+
322
+ /**
323
+ * Convenience method to get an <code>ArrayList</code> instance.
324
+ * @return a <code>java.util.ArrayList</code> instance
325
+ * @see #getListWrapper()
326
+ */
327
+ getList(): unknown;
328
+
329
+ /**
330
+ * Convenience method to get a <code>HashSet</code> instance.
331
+ * @return a <code>java.util.HashSet</code> instance
332
+ */
333
+ getSet(): unknown;
334
+
335
+ /**
336
+ * Convenience method to get a <code>HashMap</code> instance.
337
+ * @return a <code>java.util.HashMap</code> instance
338
+ */
339
+ getMap(): unknown;
340
+
341
+ /**
342
+ * Convenience method to get a <code>LinkedHashMap</code> instance.
343
+ * @return a <code>java.util.LinkedHashMap</code> instance
344
+ * @since Sitevision 4.5.4.1
345
+ */
346
+ getLinkedMap(): unknown;
347
+
348
+ /**
349
+ * Gets a <code>ListWrapper</code> instance.
350
+ *
351
+ * <p>
352
+ * <em>The <code>java.util.List</code> interface specifies that the <code>add</code> method should return a <code>boolean</code>.
353
+ * This is a problem if your scripting language (e.g. Velocity) requires you to suppress the returned value so it won't end up
354
+ * in the resulting output. A <code>ListWrapper</code> instance enables such suppressing.</em>
355
+ * </p>
356
+ * @return a ListWrapper instance
357
+ * @since Sitevision 3.5
358
+ */
359
+ getListWrapper(): ListWrapper;
360
+
361
+ /**
362
+ * Gets a <code>java.util.Arrays</code> wrapper instance.
363
+ *
364
+ * <p>
365
+ * <em>The <code>Arrays</code> class contains static methods only and can't be instantiated. This is a problem if your
366
+ * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
367
+ * An <code>ArraysInstance</code> instance enables <code>Arrays</code> method invocations.</em>
368
+ * </p>
369
+ * @return a wrapper instance for <code>java.util.Arrays</code>
370
+ */
371
+ getArraysInstance(): ArraysInstance;
372
+
373
+ /**
374
+ * Gets a <code>java.util.Collections</code> wrapper instance.
375
+ *
376
+ * <p>
377
+ * <em>The <code>Collections</code> class contains static methods only and can't be instantiated. This is a problem if your
378
+ * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
379
+ * A <code>CollectionsInstance</code> instance enables <code>Collections</code> method invocations.</em>
380
+ * </p>
381
+ * @return a wrapper instance for <code>java.util.Collections</code>
382
+ */
383
+ getCollectionsInstance(): CollectionsInstance;
384
+
385
+ /**
386
+ * Gets a <code>java.lang.Math</code> wrapper instance.
387
+ *
388
+ * <p>
389
+ * <em>The <code>Math</code> class contains static methods only and can't be instantiated. This is a problem if your
390
+ * scripting language (e.g. Velocity) doesn't support static class access (i.e. need an instance/object to invoke methods).
391
+ * A <code>MathInstance</code> instance enables <code>Math</code> method invocations.</em>
392
+ * </p>
393
+ * @return a wrapper instance for <code>java.lang.Math</code>
394
+ */
395
+ getMathInstance(): MathInstance;
396
+
397
+ /**
398
+ * Creates a boolean array with a given size.
399
+ * @param aSize the array size
400
+ * @return a boolean array with aSize length, or empty array if aSize is zero or negative
401
+ * @see ArraysInstance
402
+ * @since Sitevision 4.5.5
403
+ */
404
+ getBooleanArray(aSize: number): boolean;
405
+
406
+ /**
407
+ * Creates a byte array with a given size.
408
+ * @param aSize the array size
409
+ * @return a byte array with aSize length, or empty array if aSize is zero or negative
410
+ * @see ArraysInstance
411
+ * @since Sitevision 4.5.5
412
+ */
413
+ getByteArray(aSize: number): unknown;
414
+
415
+ /**
416
+ * Creates a char array with a given size.
417
+ * @param aSize the array size
418
+ * @return a char array with aSize length, or empty array if aSize is zero or negative
419
+ * @see ArraysInstance
420
+ * @since Sitevision 4.5.5
421
+ */
422
+ getCharArray(aSize: number): string;
423
+
424
+ /**
425
+ * Creates a double array with a given size.
426
+ * @param aSize the array size
427
+ * @return a double array with aSize length, or empty array if aSize is zero or negative
428
+ * @see ArraysInstance
429
+ * @since Sitevision 4.5.5
430
+ */
431
+ getDoubleArray(aSize: number): number;
432
+
433
+ /**
434
+ * Creates a float array with a given size.
435
+ * @param aSize the array size
436
+ * @return a float array with aSize length, or empty array if aSize is zero or negative
437
+ * @see ArraysInstance
438
+ * @since Sitevision 4.5.5
439
+ */
440
+ getFloatArray(aSize: number): number;
441
+
442
+ /**
443
+ * Creates a int array with a given size.
444
+ * @param aSize the array size
445
+ * @return a int array with aSize length, or empty array if aSize is zero or negative
446
+ * @see ArraysInstance
447
+ * @since Sitevision 4.5.5
448
+ */
449
+ getIntArray(aSize: number): number;
450
+
451
+ /**
452
+ * Creates a long array with a given size.
453
+ * @param aSize the array size
454
+ * @return a long array with aSize length, or empty array if aSize is zero or negative
455
+ * @see ArraysInstance
456
+ * @since Sitevision 4.5.5
457
+ */
458
+ getLongArray(aSize: number): number;
459
+
460
+ /**
461
+ * Creates a short array with a given size.
462
+ * @param aSize the array size
463
+ * @return a short array with aSize length, or empty array if aSize is zero or negative
464
+ * @see ArraysInstance
465
+ * @since Sitevision 4.5.5
466
+ */
467
+ getShortArray(aSize: number): number;
468
+
469
+ /**
470
+ * Creates a String array with a given size.
471
+ * @param aSize the array size
472
+ * @return a String array with aSize length, or empty array if aSize is zero or negative
473
+ * @see ArraysInstance
474
+ * @since Sitevision 4.5.5
475
+ */
476
+ getStringArray(aSize: number): string;
477
+
478
+ /**
479
+ * Creates a Object array with a given size.
480
+ * @param aSize the array size
481
+ * @return a Object array with aSize length, or empty array if aSize is zero or negative
482
+ * @see ArraysInstance
483
+ * @since Sitevision 4.5.5
484
+ */
485
+ getObjectArray(aSize: number): unknown;
526
486
  }
527
487
 
528
- export default instanceCreatorUtil;
488
+ declare namespace InstanceCreatorUtil {}
489
+
490
+ declare var instanceCreatorUtil: InstanceCreatorUtil;
491
+
492
+ export = instanceCreatorUtil;