@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.
- package/index.d.ts +8 -0
- package/package.json +1 -1
- package/server/AliasUtil/index.d.ts +13 -11
- package/server/ArchiveUtil/index.d.ts +45 -43
- package/server/ArraysInstance/index.d.ts +1667 -1808
- package/server/ArticleUtil/index.d.ts +294 -226
- package/server/AuthenticationUtil/index.d.ts +73 -85
- package/server/BookmarkUtil/index.d.ts +76 -81
- package/server/BuddyIconRenderer/index.d.ts +124 -132
- package/server/BuddyIconRenderer.BuddyIconSize/index.d.ts +41 -0
- package/server/BuddyIconRenderer.BuddyIconSize/index.js +25 -0
- package/server/ClientUtil/index.d.ts +11 -9
- package/server/CollaborationFactory/index.d.ts +37 -40
- package/server/CollaborationGroupFolderUtil/index.d.ts +30 -28
- package/server/CollaborationGroupState/index.d.ts +27 -0
- package/server/CollaborationGroupState/index.js +11 -0
- package/server/CollaborationGroupTemplateUtil/index.d.ts +48 -50
- package/server/CollaborationGroupType/index.d.ts +28 -0
- package/server/CollaborationGroupType/index.js +12 -0
- package/server/CollaborationGroupUtil/index.d.ts +86 -82
- package/server/CollectionsInstance/index.d.ts +642 -705
- package/server/ColorUtil/index.d.ts +36 -37
- package/server/CompoundAndFilterBuilder/index.d.ts +31 -29
- package/server/CompoundComparatorBuilder/index.d.ts +35 -33
- package/server/CompoundOrFilterBuilder/index.d.ts +31 -29
- package/server/ContentNodeUtil/index.d.ts +36 -34
- package/server/CurrencyFactory/index.d.ts +72 -70
- package/server/DateUtil/index.d.ts +132 -142
- package/server/DecorationUtil/index.d.ts +13 -11
- package/server/DeviceUtil/index.d.ts +21 -19
- package/server/DimensionMode/index.d.ts +17 -0
- package/server/DimensionMode/index.js +12 -0
- package/server/DirectoryUtil/index.d.ts +90 -88
- package/server/DocType/index.d.ts +30 -0
- package/server/DocType/index.js +14 -0
- package/server/DocTypeUtil/index.d.ts +129 -135
- package/server/EndecUtil/index.d.ts +330 -347
- package/server/ExtendedDismaxParserBuilder/index.d.ts +156 -170
- package/server/FileIconRenderer/index.d.ts +153 -172
- package/server/FileUtil/index.d.ts +274 -300
- package/server/FilterBuilder/index.d.ts +42 -40
- package/server/FolderUtil/index.d.ts +93 -94
- package/server/FontUtil/index.d.ts +36 -37
- package/server/FormatterBuilderFactory/index.d.ts +76 -84
- package/server/HighlightBuilder/index.d.ts +79 -86
- package/server/IconUtil/index.d.ts +27 -25
- package/server/ImageLinkRenderer/index.d.ts +34 -32
- package/server/ImageRenderer/index.d.ts +343 -379
- package/server/ImageUtil/index.d.ts +247 -265
- package/server/IndexUtil/index.d.ts +40 -37
- package/server/IndexUtil.IndexType/index.d.ts +29 -0
- package/server/IndexUtil.IndexType/index.js +13 -0
- package/server/IndexingUtil/index.d.ts +69 -47
- package/server/InstanceCreatorUtil/index.d.ts +421 -457
- package/server/InstanceTypeUtil/index.d.ts +168 -189
- package/server/JwtUtil/index.d.ts +131 -129
- package/server/LandingPageUtil/index.d.ts +84 -87
- package/server/LandingPageUtil/index.js +1 -0
- package/server/LinkPageUtil/index.d.ts +297 -251
- package/server/LinkRenderer/index.d.ts +651 -715
- package/server/LinkTargetBuilder/index.d.ts +69 -77
- package/server/LinkValueBuilder/index.d.ts +70 -77
- package/server/ListWrapper/index.d.ts +82 -91
- package/server/LocaleUtil/index.d.ts +382 -394
- package/server/LogUtil/index.d.ts +119 -128
- package/server/MailBuilder/index.d.ts +109 -124
- package/server/MailUtil/index.d.ts +58 -63
- package/server/MathInstance/index.d.ts +625 -657
- package/server/MessageDigesterFactory/index.d.ts +30 -28
- package/server/MetadataDefinitionUtil/index.d.ts +79 -83
- package/server/MetadataUtil/index.d.ts +322 -346
- package/server/MimeTypeUtil/index.d.ts +209 -215
- package/server/MonitorBuilder/index.d.ts +20 -20
- package/server/NodeComparatorUtil/index.d.ts +215 -225
- package/server/NodeFactoryUtil/index.d.ts +18 -16
- package/server/NodeFilterUtil/index.d.ts +652 -739
- package/server/NodeIteratorUtil/index.d.ts +214 -229
- package/server/NodeResolverUtil/index.d.ts +400 -406
- package/server/NodeTreeUtil/index.d.ts +214 -229
- package/server/NodeTypeUtil/index.d.ts +1432 -548
- package/server/OfflineVersionPropertyUtil/index.d.ts +8 -6
- package/server/OnlineVersionPropertyUtil/index.d.ts +8 -6
- package/server/OutputUtil/index.d.ts +385 -380
- package/server/PageUtil/index.d.ts +266 -188
- package/server/PermissionUtil/index.d.ts +393 -430
- package/server/PermissionUtil.Permission/index.d.ts +54 -0
- package/server/PermissionUtil.Permission/index.js +38 -0
- package/server/PortletContextUtil/index.d.ts +112 -107
- package/server/PortletUtil/index.d.ts +32 -22
- package/server/PrincipalUtil/index.d.ts +35 -33
- package/server/Properties/index.d.ts +69 -76
- package/server/PropertyUtil/index.d.ts +1422 -1464
- package/server/PublishingUtil/index.d.ts +248 -249
- package/server/QueryStringUtil/index.d.ts +404 -415
- package/server/RedirectUtil/index.d.ts +64 -68
- package/server/RelatedValueBuilder/index.d.ts +45 -43
- package/server/Requester/index.d.ts +125 -125
- package/server/ResourceLocatorUtil/index.d.ts +436 -476
- package/server/RestApi/index.d.ts +158 -138
- package/server/RestAppInvokerFactory/index.d.ts +28 -26
- package/server/RoleAssignmentBuilder/index.d.ts +39 -37
- package/server/RoleMatcherBuilder/index.d.ts +39 -37
- package/server/RoleUtil/index.d.ts +35 -37
- package/server/ScriptUtil/index.d.ts +458 -495
- package/server/SearchFactory/index.d.ts +90 -105
- package/server/SearchUtil/index.d.ts +75 -73
- package/server/SearcherBuilder/index.d.ts +117 -124
- package/server/Session/index.d.ts +261 -1103
- package/server/Session/index.js +1 -20
- package/server/SimpleUserUtil/index.d.ts +28 -29
- package/server/SiteCookieUtil/index.d.ts +152 -175
- package/server/SortBuilder/index.d.ts +27 -25
- package/server/SourceSetMode/index.d.ts +12 -0
- package/server/SourceSetMode/index.js +12 -0
- package/server/SpellCheckBuilder/index.d.ts +30 -30
- package/server/StandardParserBuilder/index.d.ts +36 -34
- package/server/StructureUtil/index.d.ts +85 -83
- package/server/SubscriberUtil/index.d.ts +60 -67
- package/server/SubscriptionUtil/index.d.ts +123 -130
- package/server/SystemUserUtil/index.d.ts +148 -146
- package/server/TagUtil/index.d.ts +115 -120
- package/server/TemplateUtil/index.d.ts +115 -120
- package/server/TemporaryFileNodeBuilder/index.d.ts +32 -30
- package/server/TemporaryNodeBuilder/index.d.ts +139 -177
- package/server/TextModuleRendererBuilder/index.d.ts +22 -20
- package/server/TimestampUtil/index.d.ts +103 -117
- package/server/TranslationUtil/index.d.ts +98 -104
- package/server/TrashcanUtil/index.d.ts +114 -117
- package/server/UserDataUtil/index.d.ts +110 -111
- package/server/UserFactory/index.d.ts +47 -54
- package/server/UserFieldRenderer/index.d.ts +120 -128
- package/server/UserIdentityUtil/index.d.ts +38 -36
- package/server/UserUtil/index.d.ts +32 -30
- package/server/Utils/index.d.ts +634 -723
- package/server/VelocityRenderer/index.d.ts +96 -94
- package/server/VersionUtil/index.d.ts +25 -9
- package/server/WebContentUtil/index.d.ts +277 -284
- package/server/WebResourceFactory/index.d.ts +41 -46
- package/server/XSLTUtil/index.d.ts +34 -32
- package/server/XmlParserUtil/index.d.ts +50 -48
- package/types/javax/jcr/Binary/index.d.ts +3 -21
- package/types/javax/jcr/Binary/index.js +0 -1
- package/types/javax/jcr/Credentials/index.d.ts +3 -1
- package/types/javax/jcr/ImportUUIDBehavior/index.d.ts +27 -1
- package/types/javax/jcr/Item/index.d.ts +6 -119
- package/types/javax/jcr/Item/index.js +0 -6
- package/types/javax/jcr/ItemVisitor/index.d.ts +5 -3
- package/types/javax/jcr/NamespaceRegistry/index.d.ts +69 -43
- package/types/javax/jcr/NamespaceRegistry/index.js +0 -2
- package/types/javax/jcr/Node/index.d.ts +37 -1506
- package/types/javax/jcr/Node/index.js +1 -34
- package/types/javax/jcr/NodeIterator/index.d.ts +5 -3
- package/types/javax/jcr/Property/index.d.ts +494 -494
- package/types/javax/jcr/Property/index.js +0 -5
- package/types/javax/jcr/PropertyIterator/index.d.ts +5 -3
- package/types/javax/jcr/RangeIterator/index.d.ts +2 -42
- package/types/javax/jcr/RangeIterator/index.js +1 -5
- package/types/javax/jcr/Repository/index.d.ts +465 -263
- package/types/javax/jcr/Repository/index.js +0 -4
- package/types/javax/jcr/RepositoryFactory/index.d.ts +4 -2
- package/types/javax/jcr/Value/index.d.ts +4 -31
- package/types/javax/jcr/Value/index.js +0 -2
- package/types/javax/jcr/ValueFactory/index.d.ts +6 -74
- package/types/javax/jcr/ValueFactory/index.js +1 -2
- package/types/javax/jcr/Workspace/index.d.ts +103 -577
- package/types/javax/jcr/Workspace/index.js +1 -12
- package/types/javax/jcr/lock/Lock/index.d.ts +4 -2
- package/types/javax/jcr/lock/LockManager/index.d.ts +4 -2
- package/types/javax/jcr/nodetype/ItemDefinition/index.d.ts +4 -105
- package/types/javax/jcr/nodetype/ItemDefinition/index.js +0 -5
- package/types/javax/jcr/nodetype/NodeDefinition/index.d.ts +5 -3
- package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +4 -2
- package/types/javax/jcr/nodetype/NodeType/index.d.ts +262 -269
- package/types/javax/jcr/nodetype/NodeType/index.js +1 -12
- package/types/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +5 -107
- package/types/javax/jcr/nodetype/NodeTypeDefinition/index.js +1 -7
- package/types/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +5 -3
- package/types/javax/jcr/nodetype/NodeTypeManager/index.d.ts +9 -130
- package/types/javax/jcr/nodetype/NodeTypeManager/index.js +1 -8
- package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +4 -2
- package/types/javax/jcr/nodetype/PropertyDefinition/index.d.ts +5 -272
- package/types/javax/jcr/nodetype/PropertyDefinition/index.js +1 -7
- package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +5 -3
- package/types/javax/jcr/observation/Event/index.d.ts +85 -42
- package/types/javax/jcr/observation/EventIterator/index.d.ts +5 -3
- package/types/javax/jcr/observation/EventJournal/index.d.ts +4 -2
- package/types/javax/jcr/observation/EventListener/index.d.ts +4 -2
- package/types/javax/jcr/observation/EventListenerIterator/index.d.ts +5 -3
- package/types/javax/jcr/observation/ObservationManager/index.d.ts +6 -4
- package/types/javax/jcr/query/Query/index.d.ts +35 -12
- package/types/javax/jcr/query/QueryManager/index.d.ts +6 -4
- package/types/javax/jcr/query/QueryResult/index.d.ts +5 -3
- package/types/javax/jcr/query/Row/index.d.ts +5 -3
- package/types/javax/jcr/query/RowIterator/index.d.ts +5 -3
- package/types/javax/jcr/query/qom/And/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/BindVariableValue/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/ChildNode/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Column/index.d.ts +3 -1
- package/types/javax/jcr/query/qom/Comparison/index.d.ts +6 -4
- package/types/javax/jcr/query/qom/Constraint/index.d.ts +3 -1
- package/types/javax/jcr/query/qom/DescendantNode/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/DynamicOperand/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/FullTextSearch/index.d.ts +5 -3
- package/types/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Join/index.d.ts +5 -3
- package/types/javax/jcr/query/qom/JoinCondition/index.d.ts +3 -1
- package/types/javax/jcr/query/qom/Length/index.d.ts +5 -3
- package/types/javax/jcr/query/qom/Literal/index.d.ts +5 -3
- package/types/javax/jcr/query/qom/LowerCase/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/NodeLocalName/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/NodeName/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Not/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Operand/index.d.ts +3 -1
- package/types/javax/jcr/query/qom/Or/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Ordering/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/PropertyExistence/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/PropertyValue/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/QueryObjectModel/index.d.ts +8 -6
- package/types/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +76 -2
- package/types/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +37 -35
- package/types/javax/jcr/query/qom/SameNode/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Selector/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/Source/index.d.ts +3 -1
- package/types/javax/jcr/query/qom/StaticOperand/index.d.ts +4 -2
- package/types/javax/jcr/query/qom/UpperCase/index.d.ts +4 -2
- package/types/javax/jcr/retention/Hold/index.d.ts +3 -1
- package/types/javax/jcr/retention/RetentionManager/index.d.ts +5 -3
- package/types/javax/jcr/retention/RetentionPolicy/index.d.ts +3 -1
- package/types/javax/jcr/security/AccessControlEntry/index.d.ts +4 -2
- package/types/javax/jcr/security/AccessControlList/index.d.ts +6 -4
- package/types/javax/jcr/security/AccessControlManager/index.d.ts +6 -4
- package/types/javax/jcr/security/AccessControlPolicy/index.d.ts +3 -1
- package/types/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +5 -3
- package/types/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +4 -2
- package/types/javax/jcr/security/Privilege/index.d.ts +130 -44
- package/types/javax/jcr/version/Version/index.d.ts +5 -3
- package/types/javax/jcr/version/VersionHistory/index.d.ts +7 -5
- package/types/javax/jcr/version/VersionIterator/index.d.ts +5 -3
- package/types/javax/jcr/version/VersionManager/index.d.ts +7 -5
- package/types/senselogic/sitevision/api/base/Builder/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/base/Filter/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/base/FilterSplit/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/base/Loadable/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.d.ts +9 -0
- package/types/senselogic/sitevision/api/base/Requireable/ScriptEngine/index.js +11 -0
- package/types/senselogic/sitevision/api/base/Resolver/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/base/Wrapper/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +13 -7
- package/types/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +5 -3
- package/types/senselogic/sitevision/api/i18n/Currency/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +5 -3
- package/types/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/mail/Mail/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.d.ts +51 -0
- package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.js +12 -0
- package/types/senselogic/sitevision/api/render/ImageScaler/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.d.ts +85 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.js +21 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.d.ts +31 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.js +12 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.d.ts +31 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.js +12 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.d.ts +67 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.js +18 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.d.ts +25 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.js +11 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.d.ts +19 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.js +10 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.d.ts +1243 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.js +189 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.d.ts +31 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.js +12 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.d.ts +91 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.js +22 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.d.ts +27 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.js +11 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.d.ts +19 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.js +10 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.d.ts +19 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.js +10 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.d.ts +25 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.js +11 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.d.ts +37 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.js +13 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.d.ts +25 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.js +11 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +24 -2
- package/types/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/search/SearchHit/index.d.ts +19 -3
- package/types/senselogic/sitevision/api/search/SearchResult/index.d.ts +31 -7
- package/types/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/security/MessageDigester/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/security/SecretStore/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/security/UserUtil/index.d.ts +4 -2
- package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +35 -3
- package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +5 -3
- package/types/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/xml/XmlElement/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/xml/XmlElementHandler/index.d.ts +4 -2
|
@@ -1,219 +1,5 @@
|
|
|
1
1
|
import CompoundComparatorBuilder from "../CompoundComparatorBuilder";
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Returns a comparator that compares nodes by the string value of a property in a case-insensitive manner.
|
|
6
|
-
*
|
|
7
|
-
* <p>
|
|
8
|
-
* This is a convenience for the {@link #getPropertyComparator(String, java.util.Locale)} method, using the
|
|
9
|
-
* current locale as returned by {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()}.
|
|
10
|
-
* </p>
|
|
11
|
-
* <p>
|
|
12
|
-
* <strong>Example</strong>
|
|
13
|
-
* <br>This Velocity code will sort the $listOfNodes List by comparing the 'displayName' property for each Node
|
|
14
|
-
* </p>
|
|
15
|
-
* <pre><code>
|
|
16
|
-
* #set ($nodeComparatorUtil = $sitevisionUtils.NodeComparatorUtil)
|
|
17
|
-
* #set ($displayNameComparator = $nodeComparatorUtil.getPropertyComparator('displayName'))
|
|
18
|
-
*
|
|
19
|
-
* #set ($instanceCreatorUtil = $sitevisionUtils.InstanceCreatorUtil)
|
|
20
|
-
* #set ($collections = $instanceCreatorUtil.CollectionsInstance)
|
|
21
|
-
*
|
|
22
|
-
* $collections.sort($listOfNodes, $displayNameComparator)
|
|
23
|
-
* </code></pre>
|
|
24
|
-
* <p>
|
|
25
|
-
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
26
|
-
* </p>
|
|
27
|
-
* @param aPropertyName the name of the property
|
|
28
|
-
* @return a comparator
|
|
29
|
-
* @see #getPropertyComparator(String, java.util.Locale)
|
|
30
|
-
*/
|
|
31
|
-
export function getPropertyComparator(aPropertyName: string): unknown;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Returns a comparator that compares nodes by the string value of a property in a case-insensitive manner using a specified locale.
|
|
35
|
-
*
|
|
36
|
-
* <p>
|
|
37
|
-
* The property value will be extracted as a string using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
38
|
-
* and a <code>null</code> value will be treated as an empty string.
|
|
39
|
-
* </p>
|
|
40
|
-
*
|
|
41
|
-
* <p><strong>Why using proper Locale is important</strong></p>
|
|
42
|
-
* <p>
|
|
43
|
-
* The comparators returned from this method will rely on a <code>Collator</code> and they have different comparison
|
|
44
|
-
* rules for different locales. The returned comparator might give unexpected results if a locale is used that doesn't
|
|
45
|
-
* match actual property values.
|
|
46
|
-
*
|
|
47
|
-
* This is best illustrated by an example of how typical <em>swedish</em> values will be compared with different locales.
|
|
48
|
-
* Assume we have a List of nodes that should be compared by a certain property and these are the actual string values
|
|
49
|
-
* for the property of the nodes in the list:
|
|
50
|
-
* </p>
|
|
51
|
-
* <p>
|
|
52
|
-
* <code>"a", "A", "b", "B", "z", "Z", "å", "Å", "ä", "Ä", "ö", "Ö"</code>
|
|
53
|
-
* </p>
|
|
54
|
-
* <p>
|
|
55
|
-
* When using the
|
|
56
|
-
* {@link senselogic.sitevision.api.script.factory.CollectionsInstance#sort(java.util.List, java.util.Comparator)
|
|
57
|
-
* Collections.sort(List<Node>, Comparator<Node>)}
|
|
58
|
-
* method to sort the list, this is how they typically(*) will be sorted with different locales:
|
|
59
|
-
* </p>
|
|
60
|
-
* <table style="border:1px solid black" summary="">
|
|
61
|
-
* <caption style="text-align:left">Some examples</caption>
|
|
62
|
-
* <tr>
|
|
63
|
-
* <th style="text-align:left">Locale</th><th style="text-align:left">Result (*)</th>
|
|
64
|
-
* </tr>
|
|
65
|
-
* <tr>
|
|
66
|
-
* <td>Swedish</td><td><code>"a", "A", "b", "B", "z", "Z", "å", "Å", "ä", "Ä", "ö", "Ö"</code></td>
|
|
67
|
-
* </tr>
|
|
68
|
-
* <tr>
|
|
69
|
-
* <td>Norwegian</td><td><code>"a", "A", "b", "B", "z", "Z", "ä", "Ä", "ö", "Ö", "å", "Å"</code></td>
|
|
70
|
-
* </tr>
|
|
71
|
-
* <tr>
|
|
72
|
-
* <td>English</td><td><code>"a", "A", "å", "Å", "ä", "Ä", "b", "B", "ö", "Ö", "z", "Z"</code></td>
|
|
73
|
-
* </tr>
|
|
74
|
-
* <tr>
|
|
75
|
-
* <td>German</td><td><code>"a", "A", "å", "Å", "ä", "Ä", "b", "B", "ö", "Ö", "z", "Z"</code></td>
|
|
76
|
-
* </tr>
|
|
77
|
-
* </table>
|
|
78
|
-
* <p>
|
|
79
|
-
* <em>(* this comparator is case-insensitive so <code>["a", "A"]</code> can as well be ordered <code>["A", "a"]</code>
|
|
80
|
-
* depending on initial order)</em>
|
|
81
|
-
* </p>
|
|
82
|
-
*
|
|
83
|
-
* <p>
|
|
84
|
-
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
85
|
-
* </p>
|
|
86
|
-
* @param aPropertyName the name of the property. <em>Note! If aPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
87
|
-
* @param aLocale the locale that should be used when comparing two properties. If aLocale is <code>null</code>, the current locale (as of {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()} will be used).
|
|
88
|
-
* @return a comparator
|
|
89
|
-
*/
|
|
90
|
-
export function getPropertyComparator(
|
|
91
|
-
aPropertyName: string,
|
|
92
|
-
aLocale: unknown
|
|
93
|
-
): unknown;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Returns a comparator that compares nodes by the value of a calendar property.
|
|
97
|
-
*
|
|
98
|
-
* <p>
|
|
99
|
-
* The property value will be extracted as a calendar using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
100
|
-
* and comparing a <code>null</code> value will result in <code>-1</code> (i.e. less than a non-null).
|
|
101
|
-
* </p>
|
|
102
|
-
*
|
|
103
|
-
* <p>
|
|
104
|
-
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
105
|
-
* </p>
|
|
106
|
-
* @param aCalendarPropertyName the name of the calendar property <em>Note! If aCalendarPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
107
|
-
* @return a comparator
|
|
108
|
-
* @since Sitevision 3.6.3
|
|
109
|
-
*/
|
|
110
|
-
export function getCalendarPropertyComparator(
|
|
111
|
-
aCalendarPropertyName: string
|
|
112
|
-
): unknown;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Returns a comparator that compares nodes by the value of a calendar property.
|
|
116
|
-
*
|
|
117
|
-
* <p>
|
|
118
|
-
* The property value will be extracted as an int using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
119
|
-
* and a <em>no value</em> value will be treated as <code>0</code>.
|
|
120
|
-
* </p>
|
|
121
|
-
*
|
|
122
|
-
* <p>
|
|
123
|
-
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
124
|
-
* </p>
|
|
125
|
-
* @param aIntPropertyName the name of the int property <em>Note! If aIntPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
126
|
-
* @return a comparator
|
|
127
|
-
* @since Sitevision 3.6.3
|
|
128
|
-
*/
|
|
129
|
-
export function getIntPropertyComparator(aIntPropertyName: string): unknown;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Returns a comparator that reverses the result of another.
|
|
133
|
-
*
|
|
134
|
-
* <p>
|
|
135
|
-
* The compareTo method of this comparator multiplies the result of another comparator's compareTo method with -1.
|
|
136
|
-
* This will typically lead to a completely reversed order when sorted.
|
|
137
|
-
* </p>
|
|
138
|
-
*
|
|
139
|
-
* <p>
|
|
140
|
-
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
141
|
-
* </p>
|
|
142
|
-
* @param aNodeComparator a comparator <em>Note! If aNodeComparator is <code>null</code>, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
143
|
-
* @return a comparator
|
|
144
|
-
* @since Sitevision 3.6.3
|
|
145
|
-
*/
|
|
146
|
-
export function getReversedComparator(aNodeComparator: unknown): unknown;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Gets a builder for creating a compound comparator that allows comparison based on multiple node comparators.
|
|
150
|
-
* @return a CompoundComparatorBuilder
|
|
151
|
-
* @since Sitevision 3.6.3
|
|
152
|
-
*/
|
|
153
|
-
export function getCompoundComparatorBuilder(): CompoundComparatorBuilder;
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Gets a comparator that compares nodes by the values extracted by a resolver.
|
|
157
|
-
*
|
|
158
|
-
* <p>
|
|
159
|
-
* <strong>Example</strong><br>
|
|
160
|
-
* This Comparator can be helpful when you want to sort <code>sv:collaborationGroup</code> nodes in "most active" order.
|
|
161
|
-
* An example of how this can be implemented this in server-side Javascript is demonstrated below:
|
|
162
|
-
* </p>
|
|
163
|
-
* <pre><code> var myIdentity = require('PortletContextUtil').getCurrentUserIdentity(),
|
|
164
|
-
* userIdentityWrapper = require('UserFactory').getUserIdentityWrapper(myIdentity),
|
|
165
|
-
* myGroups,
|
|
166
|
-
* group,
|
|
167
|
-
* count,
|
|
168
|
-
* i;
|
|
169
|
-
*
|
|
170
|
-
* if (userIdentityWrapper) {
|
|
171
|
-
* myGroups = userIdentityWrapper.getCollaborationGroups();
|
|
172
|
-
* myGroups = toSortedList(myGroups);
|
|
173
|
-
* count = myGroups.size();
|
|
174
|
-
*
|
|
175
|
-
* <em>// Render my groups</em>
|
|
176
|
-
* for (i = 0; i < count; i++) {
|
|
177
|
-
* group = myGroups.get(i);
|
|
178
|
-
* ...
|
|
179
|
-
* }
|
|
180
|
-
* }
|
|
181
|
-
*
|
|
182
|
-
* <em>// Helper function that uses a ResolverComparator to sort a collection of Collaboration groups</em>
|
|
183
|
-
* function toSortedList(groups) {
|
|
184
|
-
* var sortedGroups = require('InstanceCreatorUtil').getList(),
|
|
185
|
-
* collections,
|
|
186
|
-
* groupDateResolver,
|
|
187
|
-
* resolverComparator;
|
|
188
|
-
*
|
|
189
|
-
* sortedGroups.addAll(groups); <em>// Wrap in list to make it sortable</em>
|
|
190
|
-
*
|
|
191
|
-
* if (sortedGroups.size() > 1) {
|
|
192
|
-
* <em>// Create a resolver that can resolve appropriate Date from a collaboration group</em>
|
|
193
|
-
* groupDateResolver = require('NodeResolverUtil').getCollaborationDateResolver();
|
|
194
|
-
*
|
|
195
|
-
* <em>// Create a comparator that compares values extracted by the resolver</em>
|
|
196
|
-
* resolverComparator = require('NodeComparatorUtil').getResolverComparator(groupDateResolver);
|
|
197
|
-
*
|
|
198
|
-
* <em>// Get Collections and Sort!</em>
|
|
199
|
-
* collections = require('CollectionsInstance');
|
|
200
|
-
* collections.sort(sortedGroups, resolverComparator);
|
|
201
|
-
* collections.reverse(sortedGroups); <em>// ...and reverse result to get 'latest' first</em>
|
|
202
|
-
* }
|
|
203
|
-
* return sortedGroups;
|
|
204
|
-
* }
|
|
205
|
-
* </code></pre>
|
|
206
|
-
*
|
|
207
|
-
* <p>
|
|
208
|
-
* <em>Note!</em> Beware of resolved <code>null</code> values (null will always be "less" than a non-null)!
|
|
209
|
-
* </p>
|
|
210
|
-
* @param aResolver the node value resolver
|
|
211
|
-
* @param <V> The comparable value type
|
|
212
|
-
* @return a node comparator. Note! If aResolver is null, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.
|
|
213
|
-
* @see NodeResolverUtil
|
|
214
|
-
* @since Sitevision 4.1
|
|
215
|
-
*/
|
|
216
|
-
export function getResolverComparator(aResolver: Resolver): unknown;
|
|
2
|
+
import type Resolver from "../../types/senselogic/sitevision/api/base/Resolver";
|
|
217
3
|
|
|
218
4
|
/**
|
|
219
5
|
* Node comparator utility interface.
|
|
@@ -231,15 +17,219 @@ export function getResolverComparator(aResolver: Resolver): unknown;
|
|
|
231
17
|
* @author Magnus Lövgren
|
|
232
18
|
* @since Sitevision 3.6
|
|
233
19
|
*/
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
20
|
+
export interface NodeComparatorUtil {
|
|
21
|
+
/**
|
|
22
|
+
* Returns a comparator that compares nodes by the string value of a property in a case-insensitive manner.
|
|
23
|
+
*
|
|
24
|
+
* <p>
|
|
25
|
+
* This is a convenience for the {@link #getPropertyComparator(String, java.util.Locale)} method, using the
|
|
26
|
+
* current locale as returned by {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()}.
|
|
27
|
+
* </p>
|
|
28
|
+
* <p>
|
|
29
|
+
* <strong>Example</strong>
|
|
30
|
+
* <br>This Velocity code will sort the $listOfNodes List by comparing the 'displayName' property for each Node
|
|
31
|
+
* </p>
|
|
32
|
+
* <pre><code>
|
|
33
|
+
* #set ($nodeComparatorUtil = $sitevisionUtils.NodeComparatorUtil)
|
|
34
|
+
* #set ($displayNameComparator = $nodeComparatorUtil.getPropertyComparator('displayName'))
|
|
35
|
+
*
|
|
36
|
+
* #set ($instanceCreatorUtil = $sitevisionUtils.InstanceCreatorUtil)
|
|
37
|
+
* #set ($collections = $instanceCreatorUtil.CollectionsInstance)
|
|
38
|
+
*
|
|
39
|
+
* $collections.sort($listOfNodes, $displayNameComparator)
|
|
40
|
+
* </code></pre>
|
|
41
|
+
* <p>
|
|
42
|
+
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
43
|
+
* </p>
|
|
44
|
+
* @param aPropertyName the name of the property
|
|
45
|
+
* @return a comparator
|
|
46
|
+
* @see #getPropertyComparator(String, java.util.Locale)
|
|
47
|
+
*/
|
|
48
|
+
getPropertyComparator(aPropertyName: string): unknown;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Returns a comparator that compares nodes by the string value of a property in a case-insensitive manner using a specified locale.
|
|
52
|
+
*
|
|
53
|
+
* <p>
|
|
54
|
+
* The property value will be extracted as a string using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
55
|
+
* and a <code>null</code> value will be treated as an empty string.
|
|
56
|
+
* </p>
|
|
57
|
+
*
|
|
58
|
+
* <p><strong>Why using proper Locale is important</strong></p>
|
|
59
|
+
* <p>
|
|
60
|
+
* The comparators returned from this method will rely on a <code>Collator</code> and they have different comparison
|
|
61
|
+
* rules for different locales. The returned comparator might give unexpected results if a locale is used that doesn't
|
|
62
|
+
* match actual property values.
|
|
63
|
+
*
|
|
64
|
+
* This is best illustrated by an example of how typical <em>swedish</em> values will be compared with different locales.
|
|
65
|
+
* Assume we have a List of nodes that should be compared by a certain property and these are the actual string values
|
|
66
|
+
* for the property of the nodes in the list:
|
|
67
|
+
* </p>
|
|
68
|
+
* <p>
|
|
69
|
+
* <code>"a", "A", "b", "B", "z", "Z", "å", "Å", "ä", "Ä", "ö", "Ö"</code>
|
|
70
|
+
* </p>
|
|
71
|
+
* <p>
|
|
72
|
+
* When using the
|
|
73
|
+
* {@link senselogic.sitevision.api.script.factory.CollectionsInstance#sort(java.util.List, java.util.Comparator)
|
|
74
|
+
* Collections.sort(List<Node>, Comparator<Node>)}
|
|
75
|
+
* method to sort the list, this is how they typically(*) will be sorted with different locales:
|
|
76
|
+
* </p>
|
|
77
|
+
* <table style="border:1px solid black" summary="">
|
|
78
|
+
* <caption style="text-align:left">Some examples</caption>
|
|
79
|
+
* <tr>
|
|
80
|
+
* <th style="text-align:left">Locale</th><th style="text-align:left">Result (*)</th>
|
|
81
|
+
* </tr>
|
|
82
|
+
* <tr>
|
|
83
|
+
* <td>Swedish</td><td><code>"a", "A", "b", "B", "z", "Z", "å", "Å", "ä", "Ä", "ö", "Ö"</code></td>
|
|
84
|
+
* </tr>
|
|
85
|
+
* <tr>
|
|
86
|
+
* <td>Norwegian</td><td><code>"a", "A", "b", "B", "z", "Z", "ä", "Ä", "ö", "Ö", "å", "Å"</code></td>
|
|
87
|
+
* </tr>
|
|
88
|
+
* <tr>
|
|
89
|
+
* <td>English</td><td><code>"a", "A", "å", "Å", "ä", "Ä", "b", "B", "ö", "Ö", "z", "Z"</code></td>
|
|
90
|
+
* </tr>
|
|
91
|
+
* <tr>
|
|
92
|
+
* <td>German</td><td><code>"a", "A", "å", "Å", "ä", "Ä", "b", "B", "ö", "Ö", "z", "Z"</code></td>
|
|
93
|
+
* </tr>
|
|
94
|
+
* </table>
|
|
95
|
+
* <p>
|
|
96
|
+
* <em>(* this comparator is case-insensitive so <code>["a", "A"]</code> can as well be ordered <code>["A", "a"]</code>
|
|
97
|
+
* depending on initial order)</em>
|
|
98
|
+
* </p>
|
|
99
|
+
*
|
|
100
|
+
* <p>
|
|
101
|
+
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
102
|
+
* </p>
|
|
103
|
+
* @param aPropertyName the name of the property. <em>Note! If aPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
104
|
+
* @param aLocale the locale that should be used when comparing two properties. If aLocale is <code>null</code>, the current locale (as of {@link senselogic.sitevision.api.context.PortletContextUtil#getCurrentLocale()} will be used).
|
|
105
|
+
* @return a comparator
|
|
106
|
+
*/
|
|
107
|
+
getPropertyComparator(aPropertyName: string, aLocale: unknown): unknown;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Returns a comparator that compares nodes by the value of a calendar property.
|
|
111
|
+
*
|
|
112
|
+
* <p>
|
|
113
|
+
* The property value will be extracted as a calendar using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
114
|
+
* and comparing a <code>null</code> value will result in <code>-1</code> (i.e. less than a non-null).
|
|
115
|
+
* </p>
|
|
116
|
+
*
|
|
117
|
+
* <p>
|
|
118
|
+
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
119
|
+
* </p>
|
|
120
|
+
* @param aCalendarPropertyName the name of the calendar property <em>Note! If aCalendarPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
121
|
+
* @return a comparator
|
|
122
|
+
* @since Sitevision 3.6.3
|
|
123
|
+
*/
|
|
124
|
+
getCalendarPropertyComparator(aCalendarPropertyName: string): unknown;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Returns a comparator that compares nodes by the value of a calendar property.
|
|
128
|
+
*
|
|
129
|
+
* <p>
|
|
130
|
+
* The property value will be extracted as an int using {@link senselogic.sitevision.api.property.PropertyUtil},
|
|
131
|
+
* and a <em>no value</em> value will be treated as <code>0</code>.
|
|
132
|
+
* </p>
|
|
133
|
+
*
|
|
134
|
+
* <p>
|
|
135
|
+
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
136
|
+
* </p>
|
|
137
|
+
* @param aIntPropertyName the name of the int property <em>Note! If aIntPropertyName is <code>null</code> or whitespace only, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
138
|
+
* @return a comparator
|
|
139
|
+
* @since Sitevision 3.6.3
|
|
140
|
+
*/
|
|
141
|
+
getIntPropertyComparator(aIntPropertyName: string): unknown;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns a comparator that reverses the result of another.
|
|
145
|
+
*
|
|
146
|
+
* <p>
|
|
147
|
+
* The compareTo method of this comparator multiplies the result of another comparator's compareTo method with -1.
|
|
148
|
+
* This will typically lead to a completely reversed order when sorted.
|
|
149
|
+
* </p>
|
|
150
|
+
*
|
|
151
|
+
* <p>
|
|
152
|
+
* <em>Note! This comparator imposes orderings that are inconsistent with equals.</em>
|
|
153
|
+
* </p>
|
|
154
|
+
* @param aNodeComparator a comparator <em>Note! If aNodeComparator is <code>null</code>, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.</em>
|
|
155
|
+
* @return a comparator
|
|
156
|
+
* @since Sitevision 3.6.3
|
|
157
|
+
*/
|
|
158
|
+
getReversedComparator(aNodeComparator: unknown): unknown;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Gets a builder for creating a compound comparator that allows comparison based on multiple node comparators.
|
|
162
|
+
* @return a CompoundComparatorBuilder
|
|
163
|
+
* @since Sitevision 3.6.3
|
|
164
|
+
*/
|
|
165
|
+
getCompoundComparatorBuilder(): CompoundComparatorBuilder;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Gets a comparator that compares nodes by the values extracted by a resolver.
|
|
169
|
+
*
|
|
170
|
+
* <p>
|
|
171
|
+
* <strong>Example</strong><br>
|
|
172
|
+
* This Comparator can be helpful when you want to sort <code>sv:collaborationGroup</code> nodes in "most active" order.
|
|
173
|
+
* An example of how this can be implemented this in server-side Javascript is demonstrated below:
|
|
174
|
+
* </p>
|
|
175
|
+
* <pre><code> var myIdentity = require('PortletContextUtil').getCurrentUserIdentity(),
|
|
176
|
+
* userIdentityWrapper = require('UserFactory').getUserIdentityWrapper(myIdentity),
|
|
177
|
+
* myGroups,
|
|
178
|
+
* group,
|
|
179
|
+
* count,
|
|
180
|
+
* i;
|
|
181
|
+
*
|
|
182
|
+
* if (userIdentityWrapper) {
|
|
183
|
+
* myGroups = userIdentityWrapper.getCollaborationGroups();
|
|
184
|
+
* myGroups = toSortedList(myGroups);
|
|
185
|
+
* count = myGroups.size();
|
|
186
|
+
*
|
|
187
|
+
* <em>// Render my groups</em>
|
|
188
|
+
* for (i = 0; i < count; i++) {
|
|
189
|
+
* group = myGroups.get(i);
|
|
190
|
+
* ...
|
|
191
|
+
* }
|
|
192
|
+
* }
|
|
193
|
+
*
|
|
194
|
+
* <em>// Helper function that uses a ResolverComparator to sort a collection of Collaboration groups</em>
|
|
195
|
+
* function toSortedList(groups) {
|
|
196
|
+
* var sortedGroups = require('InstanceCreatorUtil').getList(),
|
|
197
|
+
* collections,
|
|
198
|
+
* groupDateResolver,
|
|
199
|
+
* resolverComparator;
|
|
200
|
+
*
|
|
201
|
+
* sortedGroups.addAll(groups); <em>// Wrap in list to make it sortable</em>
|
|
202
|
+
*
|
|
203
|
+
* if (sortedGroups.size() > 1) {
|
|
204
|
+
* <em>// Create a resolver that can resolve appropriate Date from a collaboration group</em>
|
|
205
|
+
* groupDateResolver = require('NodeResolverUtil').getCollaborationDateResolver();
|
|
206
|
+
*
|
|
207
|
+
* <em>// Create a comparator that compares values extracted by the resolver</em>
|
|
208
|
+
* resolverComparator = require('NodeComparatorUtil').getResolverComparator(groupDateResolver);
|
|
209
|
+
*
|
|
210
|
+
* <em>// Get Collections and Sort!</em>
|
|
211
|
+
* collections = require('CollectionsInstance');
|
|
212
|
+
* collections.sort(sortedGroups, resolverComparator);
|
|
213
|
+
* collections.reverse(sortedGroups); <em>// ...and reverse result to get 'latest' first</em>
|
|
214
|
+
* }
|
|
215
|
+
* return sortedGroups;
|
|
216
|
+
* }
|
|
217
|
+
* </code></pre>
|
|
218
|
+
*
|
|
219
|
+
* <p>
|
|
220
|
+
* <em>Note!</em> Beware of resolved <code>null</code> values (null will always be "less" than a non-null)!
|
|
221
|
+
* </p>
|
|
222
|
+
* @param aResolver the node value resolver
|
|
223
|
+
* @param <V> The comparable value type
|
|
224
|
+
* @return a node comparator. Note! If aResolver is null, the returned comparator will be non-comparing, i.e. a NO-OP comparator that always will return 0 ("equal") for all nodes.
|
|
225
|
+
* @see NodeResolverUtil
|
|
226
|
+
* @since Sitevision 4.1
|
|
227
|
+
*/
|
|
228
|
+
getResolverComparator(aResolver: Resolver): unknown;
|
|
243
229
|
}
|
|
244
230
|
|
|
245
|
-
|
|
231
|
+
declare namespace NodeComparatorUtil {}
|
|
232
|
+
|
|
233
|
+
declare var nodeComparatorUtil: NodeComparatorUtil;
|
|
234
|
+
|
|
235
|
+
export = nodeComparatorUtil;
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import TemporaryNodeBuilder from "../TemporaryNodeBuilder";
|
|
2
2
|
import TemporaryFileNodeBuilder from "../TemporaryFileNodeBuilder";
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Gets a builder for creating temporary nodes (sv:temporary).
|
|
6
|
-
* @return a builder for creating temporary nodes
|
|
7
|
-
*/
|
|
8
|
-
export function getTemporaryNodeBuilder(): TemporaryNodeBuilder;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Gets a builder for creating temporary file nodes (sv:temporaryFile).
|
|
12
|
-
* @return a builder for creating temporary file nodes
|
|
13
|
-
* @since Sitevision 4.5.4
|
|
14
|
-
*/
|
|
15
|
-
export function getTemporaryFileNodeBuilder(): TemporaryFileNodeBuilder;
|
|
16
|
-
|
|
17
4
|
/**
|
|
18
5
|
* Node factory utility interface.
|
|
19
6
|
*
|
|
@@ -25,8 +12,23 @@ export function getTemporaryFileNodeBuilder(): TemporaryFileNodeBuilder;
|
|
|
25
12
|
* @author Magnus Lövgren
|
|
26
13
|
* @since Sitevision 4.1.2
|
|
27
14
|
*/
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
export interface NodeFactoryUtil {
|
|
16
|
+
/**
|
|
17
|
+
* Gets a builder for creating temporary nodes (sv:temporary).
|
|
18
|
+
* @return a builder for creating temporary nodes
|
|
19
|
+
*/
|
|
20
|
+
getTemporaryNodeBuilder(): TemporaryNodeBuilder;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Gets a builder for creating temporary file nodes (sv:temporaryFile).
|
|
24
|
+
* @return a builder for creating temporary file nodes
|
|
25
|
+
* @since Sitevision 4.5.4
|
|
26
|
+
*/
|
|
27
|
+
getTemporaryFileNodeBuilder(): TemporaryFileNodeBuilder;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
declare namespace NodeFactoryUtil {}
|
|
31
|
+
|
|
32
|
+
declare var nodeFactoryUtil: NodeFactoryUtil;
|
|
33
|
+
|
|
34
|
+
export = nodeFactoryUtil;
|