@sitevision/api 2023.2.1 → 2023.2.2-beta.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/common/router/index.js +1 -0
- package/package.json +5 -5
- package/server/AliasUtil/index.d.ts +6 -5
- package/server/ArchiveUtil/index.d.ts +24 -23
- package/server/ArraysInstance/index.d.ts +302 -246
- package/server/ArticleUtil/index.d.ts +181 -179
- package/server/AuthenticationUtil/index.d.ts +22 -11
- package/server/BookmarkUtil/index.d.ts +18 -16
- package/server/BuddyIconRenderer/index.d.ts +86 -85
- package/server/BuddyIconRenderer.BuddyIconSize/index.d.ts +15 -15
- package/server/BuddyIconRenderer.BuddyIconSize/index.js +16 -16
- package/server/ClientUtil/index.d.ts +10 -8
- package/server/CollaborationFactory/index.d.ts +6 -6
- package/server/CollaborationGroupFolderUtil/index.d.ts +12 -11
- package/server/CollaborationGroupState/index.d.ts +15 -15
- package/server/CollaborationGroupState/index.js +2 -2
- package/server/CollaborationGroupTemplateUtil/index.d.ts +26 -24
- package/server/CollaborationGroupType/index.d.ts +15 -15
- package/server/CollaborationGroupType/index.js +3 -3
- package/server/CollaborationGroupUtil/index.d.ts +52 -52
- package/server/CollectionsInstance/index.d.ts +145 -105
- package/server/ColorUtil/index.d.ts +12 -8
- package/server/CompoundAndFilterBuilder/index.d.ts +21 -21
- package/server/CompoundComparatorBuilder/index.d.ts +22 -21
- package/server/CompoundOrFilterBuilder/index.d.ts +20 -20
- package/server/ContentNodeUtil/index.d.ts +30 -30
- package/server/CurrencyFactory/index.d.ts +55 -53
- package/server/DateUtil/index.d.ts +55 -47
- package/server/DecorationUtil/index.d.ts +6 -5
- package/server/DeviceUtil/index.d.ts +8 -8
- package/server/DimensionMode/index.d.ts +4 -4
- package/server/DimensionMode/index.js +3 -3
- package/server/DirectoryUtil/index.d.ts +40 -37
- package/server/DocType/index.d.ts +15 -15
- package/server/DocType/index.js +5 -5
- package/server/DocTypeUtil/index.d.ts +4 -4
- package/server/EndecUtil/index.d.ts +222 -214
- package/server/ExtendedDismaxParserBuilder/index.d.ts +127 -125
- package/server/FileIconRenderer/index.d.ts +167 -163
- package/server/FileUtil/index.d.ts +157 -150
- package/server/FilterBuilder/index.d.ts +67 -66
- package/server/FolderUtil/index.d.ts +51 -50
- package/server/FontUtil/index.d.ts +9 -8
- package/server/FormatterBuilderFactory/index.d.ts +35 -34
- package/server/HighlightBuilder/index.d.ts +93 -91
- package/server/IconUtil/index.d.ts +8 -7
- package/server/ImageLinkRenderer/index.d.ts +79 -78
- package/server/ImageRenderer/index.d.ts +327 -218
- package/server/ImageRenderer/index.js +6 -0
- package/server/ImageUtil/index.d.ts +155 -148
- package/server/IndexUtil/index.d.ts +24 -23
- package/server/IndexUtil.IndexType/index.d.ts +15 -15
- package/server/IndexUtil.IndexType/index.js +4 -4
- package/server/IndexingUtil/index.d.ts +38 -38
- package/server/InstanceCreatorUtil/index.d.ts +192 -183
- package/server/InstanceTypeUtil/index.d.ts +7 -5
- package/server/JwtUtil/index.d.ts +79 -78
- package/server/LandingPageUtil/index.d.ts +5 -5
- package/server/LinkPageUtil/index.d.ts +211 -206
- package/server/LinkRenderer/index.d.ts +428 -419
- package/server/LinkTargetBuilder/index.d.ts +61 -60
- package/server/LinkValueBuilder/index.d.ts +59 -58
- package/server/ListWrapper/index.d.ts +73 -67
- package/server/LocaleUtil/index.d.ts +328 -324
- package/server/LogUtil/index.d.ts +30 -26
- package/server/MailBuilder/index.d.ts +112 -109
- package/server/MailUtil/index.d.ts +23 -22
- package/server/MathInstance/index.d.ts +28 -28
- package/server/MessageDigesterFactory/index.d.ts +11 -11
- package/server/MetadataDefinitionUtil/index.d.ts +53 -51
- package/server/MetadataUtil/index.d.ts +197 -181
- package/server/MimeTypeUtil/index.d.ts +117 -112
- package/server/MonitorBuilder/index.d.ts +21 -21
- package/server/NodeComparatorUtil/index.d.ts +172 -164
- package/server/NodeFactoryUtil/index.d.ts +5 -5
- package/server/NodeFilterUtil/index.d.ts +290 -256
- package/server/NodeIteratorUtil/index.d.ts +113 -110
- package/server/NodeResolverUtil/index.d.ts +324 -324
- package/server/NodeTreeUtil/index.d.ts +132 -130
- package/server/NodeTypeUtil/index.d.ts +71 -70
- package/server/OfflineVersionPropertyUtil/index.d.ts +16 -18
- package/server/OnlineVersionPropertyUtil/index.d.ts +16 -18
- package/server/OutputUtil/index.d.ts +240 -231
- package/server/PageUtil/index.d.ts +145 -143
- package/server/PermissionUtil/index.d.ts +200 -200
- package/server/PermissionUtil.Permission/index.d.ts +15 -15
- package/server/PermissionUtil.Permission/index.js +29 -29
- package/server/PortletContextUtil/index.d.ts +35 -33
- package/server/PortletUtil/index.d.ts +9 -9
- package/server/PrincipalUtil/index.d.ts +15 -11
- package/server/Properties/index.d.ts +113 -104
- package/server/PropertyUtil/index.d.ts +1018 -995
- package/server/PublishingUtil/index.d.ts +140 -142
- package/server/QueryStringUtil/index.d.ts +333 -319
- package/server/RedirectUtil/index.d.ts +32 -28
- package/server/RelatedValueBuilder/index.d.ts +40 -40
- package/server/Requester/index.d.ts +303 -302
- package/server/ResourceLocatorUtil/index.d.ts +101 -99
- package/server/RestApi/index.d.ts +82 -81
- package/server/RestAppInvokerFactory/index.d.ts +34 -33
- package/server/RoleAssignmentBuilder/index.d.ts +12 -12
- package/server/RoleMatcherBuilder/index.d.ts +12 -12
- package/server/RoleUtil/index.d.ts +6 -6
- package/server/ScriptUtil/index.d.ts +226 -208
- package/server/SearchFactory/index.d.ts +11 -6
- package/server/SearchUtil/index.d.ts +84 -81
- package/server/SearcherBuilder/index.d.ts +111 -111
- package/server/Session/index.d.ts +123 -120
- package/server/SimpleUserUtil/index.d.ts +22 -17
- package/server/SiteCookieUtil/index.d.ts +24 -22
- package/server/SortBuilder/index.d.ts +70 -69
- package/server/SourceSetMode/index.js +3 -3
- package/server/SpellCheckBuilder/index.d.ts +31 -28
- package/server/StandardParserBuilder/index.d.ts +65 -64
- package/server/StructureUtil/index.d.ts +149 -67
- package/server/SubscriberUtil/index.d.ts +54 -43
- package/server/SubscriptionUtil/index.d.ts +64 -62
- package/server/SystemUserUtil/index.d.ts +75 -75
- package/server/TagUtil/index.d.ts +66 -63
- package/server/TemplateUtil/index.d.ts +89 -85
- package/server/TemporaryFileNodeBuilder/index.d.ts +25 -23
- package/server/TemporaryNodeBuilder/index.d.ts +74 -54
- package/server/TextModuleRendererBuilder/index.d.ts +37 -37
- package/server/TimestampUtil/index.d.ts +32 -21
- package/server/TranslationUtil/index.d.ts +63 -60
- package/server/TrashcanUtil/index.d.ts +76 -75
- package/server/UserDataUtil/index.d.ts +76 -70
- package/server/UserFactory/index.d.ts +5 -5
- package/server/UserFieldRenderer/index.d.ts +116 -114
- package/server/UserIdentityUtil/index.d.ts +26 -26
- package/server/UserUtil/index.d.ts +36 -36
- package/server/Utils/index.d.ts +83 -83
- package/server/VelocityRenderer/index.d.ts +141 -138
- package/server/VersionUtil/index.d.ts +5 -5
- package/server/WebContentUtil/index.d.ts +320 -317
- package/server/WebResourceFactory/index.d.ts +5 -5
- package/server/XSLTUtil/index.d.ts +35 -32
- package/server/XmlParserUtil/index.d.ts +61 -60
- package/server/appResource/index.d.ts +1 -1
- package/types/java/io/Closeable/index.d.ts +23 -0
- package/types/{senselogic/sitevision/api/base/Requireable/ScriptEngine → java/io/Closeable}/index.js +1 -2
- package/types/java/io/File/index.d.ts +903 -0
- package/types/java/io/File/index.js +50 -0
- package/types/java/io/FileFilter/index.d.ts +19 -0
- package/types/java/io/FileFilter/index.js +10 -0
- package/types/java/io/FilenameFilter/index.d.ts +25 -0
- package/types/java/io/FilenameFilter/index.js +10 -0
- package/types/java/io/FilterOutputStream/index.d.ts +93 -0
- package/types/java/io/FilterOutputStream/index.js +12 -0
- package/types/java/io/Flushable/index.d.ts +14 -0
- package/types/java/io/Flushable/index.js +10 -0
- package/types/java/io/InputStream/index.d.ts +255 -0
- package/types/java/io/InputStream/index.js +16 -0
- package/types/java/io/OutputStream/index.d.ts +106 -0
- package/types/java/io/OutputStream/index.js +12 -0
- package/types/java/io/PrintStream/index.d.ts +408 -0
- package/types/java/io/PrintStream/index.js +20 -0
- package/types/java/io/PrintWriter/index.d.ts +401 -0
- package/types/java/io/PrintWriter/index.js +20 -0
- package/types/java/io/Reader/index.d.ts +125 -0
- package/types/java/io/Reader/index.js +16 -0
- package/types/java/io/Serializable/index.d.ts +141 -0
- package/types/java/io/Serializable/index.js +8 -0
- package/types/java/io/Writer/index.d.ts +154 -0
- package/types/java/io/Writer/index.js +13 -0
- package/types/java/lang/Appendable/index.d.ts +63 -0
- package/types/java/lang/Appendable/index.js +10 -0
- package/types/java/lang/AutoCloseable/index.d.ts +59 -0
- package/types/java/lang/AutoCloseable/index.js +10 -0
- package/types/java/lang/Boolean/index.d.ts +85 -0
- package/types/java/lang/Boolean/index.js +14 -0
- package/types/java/lang/CharSequence/index.d.ts +97 -0
- package/types/java/lang/CharSequence/index.js +15 -0
- package/types/java/lang/Class/index.d.ts +1229 -0
- package/types/java/lang/Class/index.js +71 -0
- package/types/java/lang/ClassLoader/index.d.ts +619 -0
- package/types/java/lang/ClassLoader/index.js +31 -0
- package/types/java/lang/Cloneable/index.d.ts +25 -0
- package/types/java/lang/Cloneable/index.js +8 -0
- package/types/java/lang/Comparable/index.d.ts +103 -0
- package/types/java/lang/Comparable/index.js +10 -0
- package/types/java/lang/Double/index.d.ts +273 -0
- package/types/java/lang/Double/index.js +21 -0
- package/types/java/lang/Enum/index.d.ts +118 -0
- package/types/java/lang/Enum/index.js +18 -0
- package/types/java/lang/Exception/index.d.ts +19 -0
- package/types/java/lang/Exception/index.js +8 -0
- package/types/java/lang/Float/index.d.ts +258 -0
- package/types/java/lang/Float/index.js +21 -0
- package/types/java/lang/Integer/index.d.ts +142 -0
- package/types/java/lang/Integer/index.js +19 -0
- package/types/java/lang/Iterable/index.d.ts +46 -0
- package/types/java/lang/Iterable/index.js +12 -0
- package/types/java/lang/Long/index.d.ts +148 -0
- package/types/java/lang/Long/index.js +19 -0
- package/types/java/lang/Number/index.d.ts +81 -0
- package/types/java/lang/Number/index.js +15 -0
- package/types/java/lang/Object/index.d.ts +467 -0
- package/types/java/lang/Object/index.js +18 -0
- package/types/java/lang/Package/index.d.ts +188 -0
- package/types/java/lang/Package/index.js +27 -0
- package/types/java/lang/Readable/index.d.ts +20 -0
- package/types/java/lang/Readable/index.js +10 -0
- package/types/java/lang/Runnable/index.d.ts +39 -0
- package/types/java/lang/Runnable/index.js +10 -0
- package/types/java/lang/RuntimeException/index.d.ts +17 -0
- package/types/java/lang/RuntimeException/index.js +8 -0
- package/types/java/lang/StackTraceElement/index.d.ts +116 -0
- package/types/java/lang/StackTraceElement/index.js +17 -0
- package/types/java/lang/String/index.d.ts +1234 -0
- package/types/java/lang/String/index.js +44 -0
- package/types/java/lang/StringBuffer/index.d.ts +232 -0
- package/types/java/lang/StringBuffer/index.js +33 -0
- package/types/java/lang/Throwable/index.d.ts +462 -0
- package/types/java/lang/Throwable/index.js +20 -0
- package/types/java/lang/annotation/Annotation/index.d.ts +109 -0
- package/types/java/lang/annotation/Annotation/index.js +13 -0
- package/types/java/lang/reflect/AccessibleObject/index.d.ts +81 -0
- package/types/java/lang/reflect/AccessibleObject/index.js +18 -0
- package/types/java/lang/reflect/AnnotatedElement/index.d.ts +322 -0
- package/types/java/lang/reflect/AnnotatedElement/index.js +16 -0
- package/types/java/lang/reflect/AnnotatedType/index.d.ts +17 -0
- package/types/java/lang/reflect/AnnotatedType/index.js +10 -0
- package/types/java/lang/reflect/Constructor/index.d.ts +236 -0
- package/types/java/lang/reflect/Constructor/index.js +30 -0
- package/types/java/lang/reflect/Executable/index.d.ts +255 -0
- package/types/java/lang/reflect/Executable/index.js +30 -0
- package/types/java/lang/reflect/Field/index.d.ts +506 -0
- package/types/java/lang/reflect/Field/index.js +42 -0
- package/types/java/lang/reflect/GenericDeclaration/index.d.ts +19 -0
- package/types/java/lang/reflect/GenericDeclaration/index.js +10 -0
- package/types/java/lang/reflect/Member/index.d.ts +60 -0
- package/types/java/lang/reflect/Member/index.js +13 -0
- package/types/java/lang/reflect/Method/index.d.ts +308 -0
- package/types/java/lang/reflect/Method/index.js +34 -0
- package/types/java/lang/reflect/Parameter/index.d.ts +155 -0
- package/types/java/lang/reflect/Parameter/index.js +28 -0
- package/types/java/lang/reflect/Type/index.d.ts +18 -0
- package/types/java/lang/reflect/Type/index.js +10 -0
- package/types/java/lang/reflect/TypeVariable/index.d.ts +70 -0
- package/types/java/lang/reflect/TypeVariable/index.js +13 -0
- package/types/java/math/BigDecimal/index.d.ts +1278 -0
- package/types/java/math/BigDecimal/index.js +49 -0
- package/types/java/math/BigInteger/index.d.ts +567 -0
- package/types/java/math/BigInteger/index.js +54 -0
- package/types/java/math/MathContext/index.d.ts +136 -0
- package/types/java/math/MathContext/index.js +14 -0
- package/types/java/math/RoundingMode/index.d.ts +71 -0
- package/types/java/math/RoundingMode/index.js +17 -0
- package/types/java/net/InetAddress/index.d.ts +356 -0
- package/types/java/net/InetAddress/index.js +27 -0
- package/types/java/net/NetworkInterface/index.d.ts +172 -0
- package/types/java/net/NetworkInterface/index.js +26 -0
- package/types/java/net/Proxy/index.d.ts +68 -0
- package/types/java/net/Proxy/index.js +14 -0
- package/types/java/net/Proxy.Type/index.d.ts +9 -0
- package/types/java/net/Proxy.Type/index.js +12 -0
- package/types/java/net/SocketAddress/index.d.ts +15 -0
- package/types/java/net/SocketAddress/index.js +8 -0
- package/types/java/net/URI/index.d.ts +934 -0
- package/types/java/net/URI/index.js +36 -0
- package/types/java/net/URL/index.d.ts +355 -0
- package/types/java/net/URL/index.js +28 -0
- package/types/java/net/URLConnection/index.d.ts +648 -0
- package/types/java/net/URLConnection/index.js +49 -0
- package/types/java/nio/MappedByteBuffer/index.d.ts +80 -0
- package/types/java/nio/MappedByteBuffer/index.js +12 -0
- package/types/java/nio/channels/AsynchronousChannel/index.d.ts +82 -0
- package/types/java/nio/channels/AsynchronousChannel/index.js +10 -0
- package/types/java/nio/channels/AsynchronousFileChannel/index.d.ts +410 -0
- package/types/java/nio/channels/AsynchronousFileChannel/index.js +16 -0
- package/types/java/nio/channels/ByteChannel/index.d.ts +12 -0
- package/types/java/nio/channels/ByteChannel/index.js +8 -0
- package/types/java/nio/channels/Channel/index.d.ts +48 -0
- package/types/java/nio/channels/Channel/index.js +11 -0
- package/types/java/nio/channels/CompletionHandler/index.d.ts +31 -0
- package/types/java/nio/channels/CompletionHandler/index.js +11 -0
- package/types/java/nio/channels/FileChannel/index.d.ts +628 -0
- package/types/java/nio/channels/FileChannel/index.js +20 -0
- package/types/java/nio/channels/FileChannel.MapMode/index.d.ts +33 -0
- package/types/java/nio/channels/FileChannel.MapMode/index.js +10 -0
- package/types/java/nio/channels/FileLock/index.d.ts +180 -0
- package/types/java/nio/channels/FileLock/index.js +19 -0
- package/types/java/nio/channels/GatheringByteChannel/index.d.ts +83 -0
- package/types/java/nio/channels/GatheringByteChannel/index.js +10 -0
- package/types/java/nio/channels/InterruptibleChannel/index.d.ts +43 -0
- package/types/java/nio/channels/InterruptibleChannel/index.js +10 -0
- package/types/java/nio/channels/ReadableByteChannel/index.d.ts +56 -0
- package/types/java/nio/channels/ReadableByteChannel/index.js +10 -0
- package/types/java/nio/channels/ScatteringByteChannel/index.d.ts +78 -0
- package/types/java/nio/channels/ScatteringByteChannel/index.js +10 -0
- package/types/java/nio/channels/SeekableByteChannel/index.d.ts +110 -0
- package/types/java/nio/channels/SeekableByteChannel/index.js +14 -0
- package/types/java/nio/channels/WritableByteChannel/index.d.ts +52 -0
- package/types/java/nio/channels/WritableByteChannel/index.js +10 -0
- package/types/java/nio/channels/spi/AbstractInterruptibleChannel/index.d.ts +104 -0
- package/types/java/nio/channels/spi/AbstractInterruptibleChannel/index.js +14 -0
- package/types/java/nio/charset/Charset/index.d.ts +415 -0
- package/types/java/nio/charset/Charset/index.js +23 -0
- package/types/java/nio/file/AccessMode/index.d.ts +9 -0
- package/types/java/nio/file/AccessMode/index.js +12 -0
- package/types/java/nio/file/CopyOption/index.d.ts +15 -0
- package/types/java/nio/file/CopyOption/index.js +8 -0
- package/types/java/nio/file/DirectoryStream/index.d.ts +97 -0
- package/types/java/nio/file/DirectoryStream/index.js +10 -0
- package/types/java/nio/file/DirectoryStream.Filter/index.d.ts +18 -0
- package/types/java/nio/file/DirectoryStream.Filter/index.js +10 -0
- package/types/java/nio/file/FileStore/index.d.ts +154 -0
- package/types/java/nio/file/FileStore/index.js +18 -0
- package/types/java/nio/file/FileSystem/index.d.ts +402 -0
- package/types/java/nio/file/FileSystem/index.js +21 -0
- package/types/java/nio/file/LinkOption/index.d.ts +7 -0
- package/types/java/nio/file/LinkOption/index.js +10 -0
- package/types/java/nio/file/OpenOption/index.d.ts +15 -0
- package/types/java/nio/file/OpenOption/index.js +8 -0
- package/types/java/nio/file/Path/index.d.ts +617 -0
- package/types/java/nio/file/Path/index.js +33 -0
- package/types/java/nio/file/PathMatcher/index.d.ts +17 -0
- package/types/java/nio/file/PathMatcher/index.js +10 -0
- package/types/java/nio/file/WatchEvent.Kind/index.d.ts +21 -0
- package/types/java/nio/file/WatchEvent.Kind/index.js +11 -0
- package/types/java/nio/file/WatchEvent.Modifier/index.d.ts +17 -0
- package/types/java/nio/file/WatchEvent.Modifier/index.js +10 -0
- package/types/java/nio/file/WatchKey/index.d.ts +117 -0
- package/types/java/nio/file/WatchKey/index.js +14 -0
- package/types/java/nio/file/WatchService/index.d.ts +121 -0
- package/types/java/nio/file/WatchService/index.js +12 -0
- package/types/java/nio/file/Watchable/index.d.ts +71 -0
- package/types/java/nio/file/Watchable/index.js +10 -0
- package/types/java/nio/file/attribute/FileAttribute/index.d.ts +24 -0
- package/types/java/nio/file/attribute/FileAttribute/index.js +11 -0
- package/types/java/nio/file/attribute/GroupPrincipal/index.d.ts +14 -0
- package/types/java/nio/file/attribute/GroupPrincipal/index.js +8 -0
- package/types/java/nio/file/attribute/UserPrincipal/index.d.ts +25 -0
- package/types/java/nio/file/attribute/UserPrincipal/index.js +8 -0
- package/types/java/nio/file/attribute/UserPrincipalLookupService/index.d.ts +52 -0
- package/types/java/nio/file/attribute/UserPrincipalLookupService/index.js +11 -0
- package/types/java/nio/file/spi/FileSystemProvider/index.d.ts +571 -0
- package/types/java/nio/file/spi/FileSystemProvider/index.js +34 -0
- package/types/java/security/CodeSigner/index.d.ts +52 -0
- package/types/java/security/CodeSigner/index.js +14 -0
- package/types/java/security/CodeSource/index.d.ts +143 -0
- package/types/java/security/CodeSource/index.js +16 -0
- package/types/java/security/Guard/index.d.ts +24 -0
- package/types/java/security/Guard/index.js +10 -0
- package/types/java/security/Key/index.d.ts +120 -0
- package/types/java/security/Key/index.js +12 -0
- package/types/java/security/Permission/index.d.ts +153 -0
- package/types/java/security/Permission/index.js +17 -0
- package/types/java/security/PermissionCollection/index.d.ts +132 -0
- package/types/java/security/PermissionCollection/index.js +15 -0
- package/types/java/security/Principal/index.d.ts +54 -0
- package/types/java/security/Principal/index.js +14 -0
- package/types/java/security/PrivilegedExceptionAction/index.d.ts +24 -0
- package/types/java/security/PrivilegedExceptionAction/index.js +10 -0
- package/types/java/security/ProtectionDomain/index.d.ts +88 -0
- package/types/java/security/ProtectionDomain/index.js +15 -0
- package/types/java/security/Provider/index.d.ts +383 -0
- package/types/java/security/Provider/index.js +38 -0
- package/types/java/security/Provider.Service/index.d.ts +116 -0
- package/types/java/security/Provider.Service/index.js +17 -0
- package/types/java/security/PublicKey/index.d.ts +25 -0
- package/types/java/security/PublicKey/index.js +8 -0
- package/types/java/security/Timestamp/index.d.ts +53 -0
- package/types/java/security/Timestamp/index.js +14 -0
- package/types/java/security/cert/CertPath/index.d.ts +181 -0
- package/types/java/security/cert/CertPath/index.js +17 -0
- package/types/java/security/cert/Certificate/index.d.ts +133 -0
- package/types/java/security/cert/Certificate/index.js +17 -0
- package/types/java/text/AttributedCharacterIterator/index.d.ts +127 -0
- package/types/java/text/AttributedCharacterIterator/index.js +14 -0
- package/types/java/text/AttributedCharacterIterator.Attribute/index.d.ts +76 -0
- package/types/java/text/AttributedCharacterIterator.Attribute/index.js +14 -0
- package/types/java/text/CharacterIterator/index.d.ts +144 -0
- package/types/java/text/CharacterIterator/index.js +19 -0
- package/types/java/text/DateFormat/index.d.ts +470 -0
- package/types/java/text/DateFormat/index.js +23 -0
- package/types/java/text/DateFormatSymbols/index.d.ts +245 -0
- package/types/java/text/DateFormatSymbols/index.js +28 -0
- package/types/java/text/FieldPosition/index.d.ts +98 -0
- package/types/java/text/FieldPosition/index.js +18 -0
- package/types/java/text/Format/index.d.ts +190 -0
- package/types/java/text/Format/index.js +13 -0
- package/types/java/text/Format.Field/index.d.ts +10 -0
- package/types/java/text/Format.Field/index.js +8 -0
- package/types/java/text/NumberFormat/index.d.ts +463 -0
- package/types/java/text/NumberFormat/index.js +31 -0
- package/types/java/text/ParsePosition/index.d.ts +67 -0
- package/types/java/text/ParsePosition/index.js +16 -0
- package/types/java/text/SimpleDateFormat/index.d.ts +521 -0
- package/types/java/text/SimpleDateFormat/index.js +23 -0
- package/types/java/time/Clock/index.d.ts +111 -0
- package/types/java/time/Clock/index.js +15 -0
- package/types/java/time/DayOfWeek/index.d.ts +34 -0
- package/types/java/time/DayOfWeek/index.js +16 -0
- package/types/java/time/Duration/index.d.ts +539 -0
- package/types/java/time/Duration/index.js +46 -0
- package/types/java/time/Instant/index.d.ts +776 -0
- package/types/java/time/Instant/index.js +37 -0
- package/types/java/time/LocalDate/index.d.ts +1176 -0
- package/types/java/time/LocalDate/index.js +53 -0
- package/types/java/time/LocalDateTime/index.d.ts +1116 -0
- package/types/java/time/LocalDateTime/index.js +66 -0
- package/types/java/time/LocalTime/index.d.ts +822 -0
- package/types/java/time/LocalTime/index.js +47 -0
- package/types/java/time/Month/index.d.ts +35 -0
- package/types/java/time/Month/index.js +21 -0
- package/types/java/time/OffsetDateTime/index.d.ts +1214 -0
- package/types/java/time/OffsetDateTime/index.js +74 -0
- package/types/java/time/OffsetTime/index.d.ts +822 -0
- package/types/java/time/OffsetTime/index.js +49 -0
- package/types/java/time/Period/index.d.ts +468 -0
- package/types/java/time/Period/index.js +37 -0
- package/types/java/time/ZoneId/index.d.ts +223 -0
- package/types/java/time/ZoneId/index.js +16 -0
- package/types/java/time/ZoneOffset/index.d.ts +281 -0
- package/types/java/time/ZoneOffset/index.js +22 -0
- package/types/java/time/ZonedDateTime/index.d.ts +1302 -0
- package/types/java/time/ZonedDateTime/index.js +68 -0
- package/types/java/time/chrono/AbstractChronology/index.d.ts +153 -0
- package/types/java/time/chrono/AbstractChronology/index.js +14 -0
- package/types/java/time/chrono/ChronoLocalDate/index.d.ts +593 -0
- package/types/java/time/chrono/ChronoLocalDate/index.js +33 -0
- package/types/java/time/chrono/ChronoLocalDateTime/index.d.ts +409 -0
- package/types/java/time/chrono/ChronoLocalDateTime/index.js +31 -0
- package/types/java/time/chrono/ChronoPeriod/index.d.ts +246 -0
- package/types/java/time/chrono/ChronoPeriod/index.js +25 -0
- package/types/java/time/chrono/ChronoZonedDateTime/index.d.ts +439 -0
- package/types/java/time/chrono/ChronoZonedDateTime/index.js +39 -0
- package/types/java/time/chrono/Chronology/index.d.ts +556 -0
- package/types/java/time/chrono/Chronology/index.js +33 -0
- package/types/java/time/chrono/Era/index.d.ts +202 -0
- package/types/java/time/chrono/Era/index.js +17 -0
- package/types/java/time/chrono/IsoChronology/index.d.ts +345 -0
- package/types/java/time/chrono/IsoChronology/index.js +24 -0
- package/types/java/time/chrono/IsoEra/index.d.ts +40 -0
- package/types/java/time/chrono/IsoEra/index.js +11 -0
- package/types/java/time/format/DateTimeFormatter/index.d.ts +1265 -0
- package/types/java/time/format/DateTimeFormatter/index.js +28 -0
- package/types/java/time/format/DecimalStyle/index.d.ts +116 -0
- package/types/java/time/format/DecimalStyle/index.js +20 -0
- package/types/java/time/format/ResolverStyle/index.d.ts +15 -0
- package/types/java/time/format/ResolverStyle/index.js +12 -0
- package/types/java/time/format/TextStyle/index.d.ts +26 -0
- package/types/java/time/format/TextStyle/index.js +15 -0
- package/types/java/time/temporal/ChronoField/index.d.ts +45 -0
- package/types/java/time/temporal/ChronoField/index.js +39 -0
- package/types/java/time/temporal/Temporal/index.d.ts +259 -0
- package/types/java/time/temporal/Temporal/index.js +14 -0
- package/types/java/time/temporal/TemporalAccessor/index.d.ts +126 -0
- package/types/java/time/temporal/TemporalAccessor/index.js +14 -0
- package/types/java/time/temporal/TemporalAdjuster/index.d.ts +64 -0
- package/types/java/time/temporal/TemporalAdjuster/index.js +10 -0
- package/types/java/time/temporal/TemporalAmount/index.d.ts +105 -0
- package/types/java/time/temporal/TemporalAmount/index.js +13 -0
- package/types/java/time/temporal/TemporalField/index.d.ts +257 -0
- package/types/java/time/temporal/TemporalField/index.js +21 -0
- package/types/java/time/temporal/TemporalQuery/index.d.ts +60 -0
- package/types/java/time/temporal/TemporalQuery/index.js +10 -0
- package/types/java/time/temporal/TemporalUnit/index.d.ts +182 -0
- package/types/java/time/temporal/TemporalUnit/index.js +17 -0
- package/types/java/time/temporal/ValueRange/index.d.ts +155 -0
- package/types/java/time/temporal/ValueRange/index.js +22 -0
- package/types/java/time/zone/ZoneOffsetTransition/index.d.ts +161 -0
- package/types/java/time/zone/ZoneOffsetTransition/index.js +23 -0
- package/types/java/time/zone/ZoneRules/index.d.ts +295 -0
- package/types/java/time/zone/ZoneRules/index.js +24 -0
- package/types/java/util/AbstractCollection/index.d.ts +250 -0
- package/types/java/util/AbstractCollection/index.js +22 -0
- package/types/java/util/AbstractList/index.d.ts +313 -0
- package/types/java/util/AbstractList/index.js +23 -0
- package/types/java/util/ArrayList/index.d.ts +403 -0
- package/types/java/util/ArrayList/index.js +35 -0
- package/types/java/util/Calendar/index.d.ts +1430 -0
- package/types/java/util/Calendar/index.js +52 -0
- package/types/java/util/Collection/index.d.ts +436 -0
- package/types/java/util/Collection/index.js +27 -0
- package/types/java/util/Comparator/index.d.ts +369 -0
- package/types/java/util/Comparator/index.js +24 -0
- package/types/java/util/Currency/index.d.ts +135 -0
- package/types/java/util/Currency/index.js +15 -0
- package/types/java/util/Date/index.d.ts +449 -0
- package/types/java/util/Date/index.js +35 -0
- package/types/java/util/Deque/index.d.ts +467 -0
- package/types/java/util/Deque/index.js +35 -0
- package/types/java/util/Dictionary/index.d.ts +107 -0
- package/types/java/util/Dictionary/index.js +16 -0
- package/types/java/util/DoubleSummaryStatistics/index.d.ts +121 -0
- package/types/java/util/DoubleSummaryStatistics/index.js +17 -0
- package/types/java/util/Enumeration/index.d.ts +46 -0
- package/types/java/util/Enumeration/index.js +11 -0
- package/types/java/util/Hashtable/index.d.ts +356 -0
- package/types/java/util/Hashtable/index.js +38 -0
- package/types/java/util/IntSummaryStatistics/index.d.ts +82 -0
- package/types/java/util/IntSummaryStatistics/index.js +17 -0
- package/types/java/util/Iterator/index.d.ts +65 -0
- package/types/java/util/Iterator/index.js +13 -0
- package/types/java/util/List/index.d.ts +503 -0
- package/types/java/util/List/index.js +32 -0
- package/types/java/util/ListIterator/index.d.ts +134 -0
- package/types/java/util/ListIterator/index.js +18 -0
- package/types/java/util/Locale/index.d.ts +1016 -0
- package/types/java/util/Locale/index.js +32 -0
- package/types/java/util/LongSummaryStatistics/index.d.ts +91 -0
- package/types/java/util/LongSummaryStatistics/index.js +17 -0
- package/types/java/util/Map/index.d.ts +515 -0
- package/types/java/util/Map/index.js +32 -0
- package/types/java/util/Map.Entry/index.d.ts +137 -0
- package/types/java/util/Map.Entry/index.js +16 -0
- package/types/java/util/NavigableMap/index.d.ts +314 -0
- package/types/java/util/NavigableMap/index.js +27 -0
- package/types/java/util/NavigableSet/index.d.ts +228 -0
- package/types/java/util/NavigableSet/index.js +21 -0
- package/types/java/util/Optional/index.d.ts +143 -0
- package/types/java/util/Optional/index.js +21 -0
- package/types/java/util/OptionalDouble/index.d.ts +108 -0
- package/types/java/util/OptionalDouble/index.js +18 -0
- package/types/java/util/OptionalInt/index.d.ts +107 -0
- package/types/java/util/OptionalInt/index.js +18 -0
- package/types/java/util/OptionalLong/index.d.ts +108 -0
- package/types/java/util/OptionalLong/index.js +18 -0
- package/types/java/util/PrimitiveIterator/index.d.ts +38 -0
- package/types/java/util/PrimitiveIterator/index.js +10 -0
- package/types/java/util/PrimitiveIterator.OfDouble/index.d.ts +41 -0
- package/types/java/util/PrimitiveIterator.OfDouble/index.js +12 -0
- package/types/java/util/PrimitiveIterator.OfInt/index.d.ts +41 -0
- package/types/java/util/PrimitiveIterator.OfInt/index.js +12 -0
- package/types/java/util/PrimitiveIterator.OfLong/index.d.ts +41 -0
- package/types/java/util/PrimitiveIterator.OfLong/index.js +12 -0
- package/types/java/util/Properties/index.d.ts +513 -0
- package/types/java/util/Properties/index.js +19 -0
- package/types/java/util/Queue/index.d.ts +168 -0
- package/types/java/util/Queue/index.js +15 -0
- package/types/java/util/Random/index.d.ts +605 -0
- package/types/java/util/Random/index.js +21 -0
- package/types/java/util/RandomAccess/index.d.ts +39 -0
- package/types/java/util/RandomAccess/index.js +8 -0
- package/types/java/util/Set/index.d.ts +303 -0
- package/types/java/util/Set/index.js +24 -0
- package/types/java/util/SortedMap/index.d.ts +218 -0
- package/types/java/util/SortedMap/index.js +18 -0
- package/types/java/util/SortedSet/index.d.ts +179 -0
- package/types/java/util/SortedSet/index.js +16 -0
- package/types/java/util/Spliterator/index.d.ts +317 -0
- package/types/java/util/Spliterator/index.js +17 -0
- package/types/java/util/Spliterator.OfDouble/index.d.ts +28 -0
- package/types/java/util/Spliterator.OfDouble/index.js +12 -0
- package/types/java/util/Spliterator.OfInt/index.d.ts +28 -0
- package/types/java/util/Spliterator.OfInt/index.js +12 -0
- package/types/java/util/Spliterator.OfLong/index.d.ts +28 -0
- package/types/java/util/Spliterator.OfLong/index.js +12 -0
- package/types/java/util/Spliterator.OfPrimitive/index.d.ts +39 -0
- package/types/java/util/Spliterator.OfPrimitive/index.js +12 -0
- package/types/java/util/TimeZone/index.d.ts +370 -0
- package/types/java/util/TimeZone/index.js +22 -0
- package/types/java/util/concurrent/Callable/index.d.ts +26 -0
- package/types/java/util/concurrent/Callable/index.js +10 -0
- package/types/java/util/concurrent/Executor/index.d.ts +102 -0
- package/types/java/util/concurrent/Executor/index.js +10 -0
- package/types/java/util/concurrent/ExecutorService/index.d.ts +296 -0
- package/types/java/util/concurrent/ExecutorService/index.js +17 -0
- package/types/java/util/concurrent/Future/index.d.ts +118 -0
- package/types/java/util/concurrent/Future/index.js +13 -0
- package/types/java/util/concurrent/TimeUnit/index.d.ts +41 -0
- package/types/java/util/concurrent/TimeUnit/index.js +16 -0
- package/types/java/util/function/BiConsumer/index.d.ts +33 -0
- package/types/java/util/function/BiConsumer/index.js +11 -0
- package/types/java/util/function/BiFunction/index.d.ts +35 -0
- package/types/java/util/function/BiFunction/index.js +11 -0
- package/types/java/util/function/BinaryOperator/index.d.ts +37 -0
- package/types/java/util/function/BinaryOperator/index.js +11 -0
- package/types/java/util/function/Consumer/index.d.ts +29 -0
- package/types/java/util/function/Consumer/index.js +11 -0
- package/types/java/util/function/DoubleBinaryOperator/index.d.ts +20 -0
- package/types/java/util/function/DoubleBinaryOperator/index.js +10 -0
- package/types/java/util/function/DoubleConsumer/index.d.ts +30 -0
- package/types/java/util/function/DoubleConsumer/index.js +11 -0
- package/types/java/util/function/DoubleFunction/index.d.ts +19 -0
- package/types/java/util/function/DoubleFunction/index.js +10 -0
- package/types/java/util/function/DoublePredicate/index.d.ts +55 -0
- package/types/java/util/function/DoublePredicate/index.js +13 -0
- package/types/java/util/function/DoubleSupplier/index.d.ts +19 -0
- package/types/java/util/function/DoubleSupplier/index.js +10 -0
- package/types/java/util/function/DoubleToIntFunction/index.d.ts +18 -0
- package/types/java/util/function/DoubleToIntFunction/index.js +10 -0
- package/types/java/util/function/DoubleToLongFunction/index.d.ts +18 -0
- package/types/java/util/function/DoubleToLongFunction/index.js +10 -0
- package/types/java/util/function/DoubleUnaryOperator/index.d.ts +48 -0
- package/types/java/util/function/DoubleUnaryOperator/index.js +13 -0
- package/types/java/util/function/Function/index.d.ts +50 -0
- package/types/java/util/function/Function/index.js +13 -0
- package/types/java/util/function/IntBinaryOperator/index.d.ts +20 -0
- package/types/java/util/function/IntBinaryOperator/index.js +10 -0
- package/types/java/util/function/IntConsumer/index.d.ts +30 -0
- package/types/java/util/function/IntConsumer/index.js +11 -0
- package/types/java/util/function/IntFunction/index.d.ts +19 -0
- package/types/java/util/function/IntFunction/index.js +10 -0
- package/types/java/util/function/IntPredicate/index.d.ts +55 -0
- package/types/java/util/function/IntPredicate/index.js +13 -0
- package/types/java/util/function/IntSupplier/index.d.ts +19 -0
- package/types/java/util/function/IntSupplier/index.js +10 -0
- package/types/java/util/function/IntToDoubleFunction/index.d.ts +18 -0
- package/types/java/util/function/IntToDoubleFunction/index.js +10 -0
- package/types/java/util/function/IntToLongFunction/index.d.ts +18 -0
- package/types/java/util/function/IntToLongFunction/index.js +10 -0
- package/types/java/util/function/IntUnaryOperator/index.d.ts +48 -0
- package/types/java/util/function/IntUnaryOperator/index.js +13 -0
- package/types/java/util/function/LongBinaryOperator/index.d.ts +20 -0
- package/types/java/util/function/LongBinaryOperator/index.js +10 -0
- package/types/java/util/function/LongConsumer/index.d.ts +30 -0
- package/types/java/util/function/LongConsumer/index.js +11 -0
- package/types/java/util/function/LongFunction/index.d.ts +19 -0
- package/types/java/util/function/LongFunction/index.js +10 -0
- package/types/java/util/function/LongPredicate/index.d.ts +55 -0
- package/types/java/util/function/LongPredicate/index.js +13 -0
- package/types/java/util/function/LongSupplier/index.d.ts +19 -0
- package/types/java/util/function/LongSupplier/index.js +10 -0
- package/types/java/util/function/LongToDoubleFunction/index.d.ts +18 -0
- package/types/java/util/function/LongToDoubleFunction/index.js +10 -0
- package/types/java/util/function/LongToIntFunction/index.d.ts +18 -0
- package/types/java/util/function/LongToIntFunction/index.js +10 -0
- package/types/java/util/function/LongUnaryOperator/index.d.ts +48 -0
- package/types/java/util/function/LongUnaryOperator/index.js +13 -0
- package/types/java/util/function/ObjDoubleConsumer/index.d.ts +21 -0
- package/types/java/util/function/ObjDoubleConsumer/index.js +10 -0
- package/types/java/util/function/ObjIntConsumer/index.d.ts +21 -0
- package/types/java/util/function/ObjIntConsumer/index.js +10 -0
- package/types/java/util/function/ObjLongConsumer/index.d.ts +21 -0
- package/types/java/util/function/ObjLongConsumer/index.js +10 -0
- package/types/java/util/function/Predicate/index.d.ts +64 -0
- package/types/java/util/function/Predicate/index.js +14 -0
- package/types/java/util/function/Supplier/index.d.ts +18 -0
- package/types/java/util/function/Supplier/index.js +10 -0
- package/types/java/util/function/ToDoubleFunction/index.d.ts +18 -0
- package/types/java/util/function/ToDoubleFunction/index.js +10 -0
- package/types/java/util/function/ToIntFunction/index.d.ts +18 -0
- package/types/java/util/function/ToIntFunction/index.js +10 -0
- package/types/java/util/function/ToLongFunction/index.d.ts +18 -0
- package/types/java/util/function/ToLongFunction/index.js +10 -0
- package/types/java/util/function/UnaryOperator/index.d.ts +21 -0
- package/types/java/util/function/UnaryOperator/index.js +10 -0
- package/types/java/util/stream/BaseStream/index.d.ts +120 -0
- package/types/java/util/stream/BaseStream/index.js +17 -0
- package/types/java/util/stream/Collector/index.d.ts +213 -0
- package/types/java/util/stream/Collector/index.js +15 -0
- package/types/java/util/stream/Collector.Characteristics/index.d.ts +10 -0
- package/types/java/util/stream/Collector.Characteristics/index.js +12 -0
- package/types/java/util/stream/DoubleStream/index.d.ts +603 -0
- package/types/java/util/stream/DoubleStream/index.js +47 -0
- package/types/java/util/stream/DoubleStream.Builder/index.d.ts +41 -0
- package/types/java/util/stream/DoubleStream.Builder/index.js +12 -0
- package/types/java/util/stream/IntStream/index.d.ts +597 -0
- package/types/java/util/stream/IntStream/index.js +51 -0
- package/types/java/util/stream/IntStream.Builder/index.d.ts +41 -0
- package/types/java/util/stream/IntStream.Builder/index.js +12 -0
- package/types/java/util/stream/LongStream/index.d.ts +587 -0
- package/types/java/util/stream/LongStream/index.js +50 -0
- package/types/java/util/stream/LongStream.Builder/index.d.ts +41 -0
- package/types/java/util/stream/LongStream.Builder/index.js +12 -0
- package/types/java/util/stream/Stream/index.d.ts +753 -0
- package/types/java/util/stream/Stream/index.js +42 -0
- package/types/java/util/stream/Stream.Builder/index.d.ts +44 -0
- package/types/java/util/stream/Stream.Builder/index.js +12 -0
- package/types/javax/jcr/AccessDeniedException/index.d.ts +7 -0
- package/types/javax/jcr/AccessDeniedException/index.js +8 -0
- package/types/javax/jcr/Binary/index.d.ts +20 -18
- package/types/javax/jcr/Credentials/index.d.ts +7 -7
- package/types/javax/jcr/GuestCredentials/index.d.ts +14 -0
- package/types/javax/jcr/GuestCredentials/index.js +8 -0
- package/types/javax/jcr/ImportUUIDBehavior/index.d.ts +4 -22
- package/types/javax/jcr/InvalidItemStateException/index.d.ts +12 -0
- package/types/javax/jcr/InvalidItemStateException/index.js +8 -0
- package/types/javax/jcr/InvalidLifecycleTransitionException/index.d.ts +7 -0
- package/types/javax/jcr/InvalidLifecycleTransitionException/index.js +8 -0
- package/types/javax/jcr/InvalidSerializedDataException/index.d.ts +8 -0
- package/types/javax/jcr/InvalidSerializedDataException/index.js +8 -0
- package/types/javax/jcr/Item/index.d.ts +65 -63
- package/types/javax/jcr/ItemExistsException/index.d.ts +8 -0
- package/types/javax/jcr/ItemExistsException/index.js +8 -0
- package/types/javax/jcr/ItemNotFoundException/index.d.ts +8 -0
- package/types/javax/jcr/ItemNotFoundException/index.js +8 -0
- package/types/javax/jcr/ItemVisitor/index.d.ts +14 -14
- package/types/javax/jcr/LoginException/index.d.ts +9 -0
- package/types/javax/jcr/LoginException/index.js +8 -0
- package/types/javax/jcr/MergeException/index.d.ts +7 -0
- package/types/javax/jcr/MergeException/index.js +8 -0
- package/types/javax/jcr/NamespaceException/index.d.ts +9 -0
- package/types/javax/jcr/NamespaceException/index.js +8 -0
- package/types/javax/jcr/NamespaceRegistry/index.d.ts +16 -14
- package/types/javax/jcr/NoSuchWorkspaceException/index.d.ts +8 -0
- package/types/javax/jcr/NoSuchWorkspaceException/index.js +8 -0
- package/types/javax/jcr/Node/index.d.ts +170 -160
- package/types/javax/jcr/NodeIterator/index.d.ts +3 -3
- package/types/javax/jcr/PathNotFoundException/index.d.ts +9 -0
- package/types/javax/jcr/PathNotFoundException/index.js +8 -0
- package/types/javax/jcr/Property/index.d.ts +216 -211
- package/types/javax/jcr/PropertyIterator/index.d.ts +2 -2
- package/types/javax/jcr/PropertyType/index.d.ts +195 -0
- package/types/javax/jcr/PropertyType/index.js +8 -0
- package/types/javax/jcr/RangeIterator/index.d.ts +6 -4
- package/types/javax/jcr/ReferentialIntegrityException/index.d.ts +7 -0
- package/types/javax/jcr/ReferentialIntegrityException/index.js +8 -0
- package/types/javax/jcr/Repository/index.d.ts +129 -131
- package/types/javax/jcr/RepositoryException/index.d.ts +8 -0
- package/types/javax/jcr/RepositoryException/index.js +8 -0
- package/types/javax/jcr/RepositoryFactory/index.d.ts +64 -63
- package/types/javax/jcr/SimpleCredentials/index.d.ts +57 -0
- package/types/javax/jcr/SimpleCredentials/index.js +15 -0
- package/types/javax/jcr/UnsupportedRepositoryOperationException/index.d.ts +7 -0
- package/types/javax/jcr/UnsupportedRepositoryOperationException/index.js +8 -0
- package/types/javax/jcr/Value/index.d.ts +81 -76
- package/types/javax/jcr/ValueFactory/index.d.ts +20 -15
- package/types/javax/jcr/ValueFormatException/index.d.ts +10 -0
- package/types/javax/jcr/ValueFormatException/index.js +8 -0
- package/types/javax/jcr/Workspace/index.d.ts +35 -32
- package/types/javax/jcr/lock/Lock/index.d.ts +41 -39
- package/types/javax/jcr/lock/LockException/index.d.ts +16 -0
- package/types/javax/jcr/lock/LockException/index.js +10 -0
- package/types/javax/jcr/lock/LockManager/index.d.ts +89 -87
- package/types/javax/jcr/nodetype/ConstraintViolationException/index.d.ts +9 -0
- package/types/javax/jcr/nodetype/ConstraintViolationException/index.js +8 -0
- package/types/javax/jcr/nodetype/InvalidNodeTypeDefinitionException/index.d.ts +8 -0
- package/types/javax/jcr/nodetype/InvalidNodeTypeDefinitionException/index.js +8 -0
- package/types/javax/jcr/nodetype/ItemDefinition/index.d.ts +15 -14
- package/types/javax/jcr/nodetype/NoSuchNodeTypeException/index.d.ts +7 -0
- package/types/javax/jcr/nodetype/NoSuchNodeTypeException/index.js +8 -0
- package/types/javax/jcr/nodetype/NodeDefinition/index.d.ts +59 -58
- package/types/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +21 -19
- package/types/javax/jcr/nodetype/NodeType/index.d.ts +119 -118
- package/types/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +32 -30
- package/types/javax/jcr/nodetype/NodeTypeExistsException/index.d.ts +8 -0
- package/types/javax/jcr/nodetype/NodeTypeExistsException/index.js +8 -0
- package/types/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +1 -1
- package/types/javax/jcr/nodetype/NodeTypeManager/index.d.ts +7 -6
- package/types/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +36 -33
- package/types/javax/jcr/nodetype/PropertyDefinition/index.d.ts +12 -11
- package/types/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +22 -20
- package/types/javax/jcr/observation/Event/index.d.ts +63 -60
- package/types/javax/jcr/observation/EventIterator/index.d.ts +5 -5
- package/types/javax/jcr/observation/EventJournal/index.d.ts +6 -6
- package/types/javax/jcr/observation/EventListener/index.d.ts +8 -8
- package/types/javax/jcr/observation/EventListenerIterator/index.d.ts +5 -5
- package/types/javax/jcr/observation/ObservationManager/index.d.ts +87 -85
- package/types/javax/jcr/query/InvalidQueryException/index.d.ts +7 -0
- package/types/javax/jcr/query/InvalidQueryException/index.js +8 -0
- package/types/javax/jcr/query/Query/index.d.ts +71 -70
- package/types/javax/jcr/query/QueryManager/index.d.ts +21 -20
- package/types/javax/jcr/query/QueryResult/index.d.ts +11 -10
- package/types/javax/jcr/query/Row/index.d.ts +54 -54
- package/types/javax/jcr/query/RowIterator/index.d.ts +5 -5
- package/types/javax/jcr/query/qom/And/index.d.ts +4 -4
- package/types/javax/jcr/query/qom/BindVariableValue/index.d.ts +2 -1
- package/types/javax/jcr/query/qom/ChildNode/index.d.ts +8 -7
- package/types/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +8 -7
- package/types/javax/jcr/query/qom/Column/index.d.ts +16 -14
- package/types/javax/jcr/query/qom/Comparison/index.d.ts +55 -55
- package/types/javax/jcr/query/qom/Constraint/index.d.ts +6 -8
- package/types/javax/jcr/query/qom/DescendantNode/index.d.ts +12 -11
- package/types/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +10 -9
- package/types/javax/jcr/query/qom/DynamicOperand/index.d.ts +2 -4
- package/types/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +10 -9
- package/types/javax/jcr/query/qom/FullTextSearch/index.d.ts +63 -62
- package/types/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +11 -10
- package/types/javax/jcr/query/qom/Join/index.d.ts +3 -3
- package/types/javax/jcr/query/qom/JoinCondition/index.d.ts +2 -4
- package/types/javax/jcr/query/qom/Length/index.d.ts +8 -8
- package/types/javax/jcr/query/qom/Literal/index.d.ts +1 -1
- package/types/javax/jcr/query/qom/LowerCase/index.d.ts +10 -10
- package/types/javax/jcr/query/qom/NodeLocalName/index.d.ts +3 -2
- package/types/javax/jcr/query/qom/NodeName/index.d.ts +3 -2
- package/types/javax/jcr/query/qom/Not/index.d.ts +4 -4
- package/types/javax/jcr/query/qom/Operand/index.d.ts +2 -4
- package/types/javax/jcr/query/qom/Or/index.d.ts +8 -8
- package/types/javax/jcr/query/qom/Ordering/index.d.ts +33 -32
- package/types/javax/jcr/query/qom/PropertyExistence/index.d.ts +5 -4
- package/types/javax/jcr/query/qom/PropertyValue/index.d.ts +6 -5
- package/types/javax/jcr/query/qom/QueryObjectModel/index.d.ts +27 -27
- package/types/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +3 -3
- package/types/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +220 -211
- package/types/javax/jcr/query/qom/SameNode/index.d.ts +8 -7
- package/types/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +11 -10
- package/types/javax/jcr/query/qom/Selector/index.d.ts +13 -12
- package/types/javax/jcr/query/qom/Source/index.d.ts +2 -4
- package/types/javax/jcr/query/qom/StaticOperand/index.d.ts +3 -5
- package/types/javax/jcr/query/qom/UpperCase/index.d.ts +10 -10
- package/types/javax/jcr/retention/Hold/index.d.ts +10 -8
- package/types/javax/jcr/retention/RetentionManager/index.d.ts +91 -83
- package/types/javax/jcr/retention/RetentionPolicy/index.d.ts +4 -2
- package/types/javax/jcr/security/AccessControlEntry/index.d.ts +4 -3
- package/types/javax/jcr/security/AccessControlException/index.d.ts +9 -0
- package/types/javax/jcr/security/AccessControlException/index.js +8 -0
- package/types/javax/jcr/security/AccessControlList/index.d.ts +35 -35
- package/types/javax/jcr/security/AccessControlManager/index.d.ts +130 -129
- package/types/javax/jcr/security/AccessControlPolicy/index.d.ts +4 -6
- package/types/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +4 -4
- package/types/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +6 -5
- package/types/javax/jcr/security/Privilege/index.d.ts +73 -71
- package/types/javax/jcr/util/TraversingItemVisitor/index.d.ts +87 -0
- package/types/javax/jcr/util/TraversingItemVisitor/index.js +12 -0
- package/types/javax/jcr/util/TraversingItemVisitor.Default/index.d.ts +19 -0
- package/types/javax/jcr/util/TraversingItemVisitor.Default/index.js +11 -0
- package/types/javax/jcr/version/ActivityViolationException/index.d.ts +14 -0
- package/types/javax/jcr/version/ActivityViolationException/index.js +8 -0
- package/types/javax/jcr/version/LabelExistsVersionException/index.d.ts +9 -0
- package/types/javax/jcr/version/LabelExistsVersionException/index.js +8 -0
- package/types/javax/jcr/version/OnParentVersionAction/index.d.ts +54 -0
- package/types/javax/jcr/version/OnParentVersionAction/index.js +8 -0
- package/types/javax/jcr/version/Version/index.d.ts +36 -36
- package/types/javax/jcr/version/VersionException/index.d.ts +8 -0
- package/types/javax/jcr/version/VersionException/index.js +8 -0
- package/types/javax/jcr/version/VersionHistory/index.d.ts +116 -111
- package/types/javax/jcr/version/VersionIterator/index.d.ts +5 -5
- package/types/javax/jcr/version/VersionManager/index.d.ts +498 -489
- package/types/senselogic/sitevision/api/base/Builder/index.d.ts +83 -83
- package/types/senselogic/sitevision/api/base/Filter/index.d.ts +8 -8
- package/types/senselogic/sitevision/api/base/FilterSplit/index.d.ts +18 -17
- package/types/senselogic/sitevision/api/base/Loadable/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/base/Requireable.ScriptEngine/index.js +11 -0
- package/types/senselogic/sitevision/api/base/Resolver/index.d.ts +13 -13
- package/types/senselogic/sitevision/api/base/Wrapper/index.d.ts +9 -9
- package/types/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +124 -122
- package/types/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +22 -17
- package/types/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +22 -22
- package/types/senselogic/sitevision/api/i18n/Currency/index.d.ts +47 -44
- package/types/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +12 -10
- package/types/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +26 -24
- package/types/senselogic/sitevision/api/mail/Mail/index.d.ts +7 -7
- package/types/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +3 -1
- package/types/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +13 -15
- package/types/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +13 -15
- package/types/senselogic/sitevision/api/portlet/GenericConfigPortlet/index.d.ts +228 -0
- package/types/senselogic/sitevision/api/portlet/GenericConfigPortlet/index.js +14 -0
- package/types/senselogic/sitevision/api/portlet/GenericSiteVisionPortlet/index.d.ts +69 -0
- package/types/senselogic/sitevision/api/portlet/GenericSiteVisionPortlet/index.js +12 -0
- package/types/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +288 -262
- package/types/senselogic/sitevision/api/render/BuddyIconRenderer.BuddyIconInfo/index.d.ts +21 -19
- package/types/senselogic/sitevision/api/render/ImageScaler/index.d.ts +14 -14
- package/types/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +162 -160
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +1 -3
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ArticleUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.ExceptionSuppressingProxyConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.IndexingUtilConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.LinkPageUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MathInstanceConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.MimeTypeUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.NodeTypeUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.OutputUtilConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PageUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletContextUtilConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.PortletUtilConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.QueryStringUtilConstants/index.d.ts +6 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchHitConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.SearchResultConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityAccess.VersionUtilConstants/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +12 -9
- package/types/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +40 -38
- package/types/senselogic/sitevision/api/render/velocity/VelocityException/index.d.ts +9 -0
- package/types/senselogic/sitevision/api/render/velocity/VelocityException/index.js +8 -0
- package/types/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +46 -46
- package/types/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +183 -155
- package/types/senselogic/sitevision/api/script/app/RestAppInvoker/index.js +2 -1
- package/types/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +25 -22
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +77 -74
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +55 -53
- package/types/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +58 -56
- package/types/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +30 -22
- package/types/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +18 -17
- package/types/senselogic/sitevision/api/search/SearchHit/index.d.ts +471 -444
- package/types/senselogic/sitevision/api/search/SearchResult/index.d.ts +279 -272
- package/types/senselogic/sitevision/api/search/SearchSortField/index.d.ts +58 -0
- package/types/senselogic/sitevision/api/search/SearchSortField/index.js +12 -0
- package/types/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +4 -1
- package/types/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +12 -10
- package/types/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +172 -170
- package/types/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +16 -18
- package/types/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +19 -21
- package/types/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +16 -18
- package/types/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +26 -28
- package/types/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +16 -18
- package/types/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +19 -21
- package/types/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +17 -15
- package/types/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +2 -0
- package/types/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +41 -27
- package/types/senselogic/sitevision/api/security/JwtException/index.d.ts +9 -0
- package/types/senselogic/sitevision/api/security/JwtException/index.js +8 -0
- package/types/senselogic/sitevision/api/security/MessageDigester/index.d.ts +14 -12
- package/types/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +16 -16
- package/types/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +4 -4
- package/types/senselogic/sitevision/api/security/Secret/index.d.ts +37 -0
- package/types/senselogic/sitevision/api/security/Secret/index.js +13 -0
- package/types/senselogic/sitevision/api/security/SecretStore/index.d.ts +13 -13
- package/types/senselogic/sitevision/api/security/UserUtil/index.d.ts +5 -5
- package/types/senselogic/sitevision/api/security/jaas/callback/NodePrincipalCallback/index.d.ts +109 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/NodePrincipalCallback/index.js +14 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/RedirectCallback/index.d.ts +22 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/RedirectCallback/index.js +10 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/ServletCallback/index.d.ts +39 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/ServletCallback/index.js +13 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/SharedStateCallback/index.d.ts +35 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/SharedStateCallback/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/UserAttributeCallback/index.d.ts +48 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/UserAttributeCallback/index.js +14 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/UserPrincipalCallback/index.d.ts +36 -0
- package/types/senselogic/sitevision/api/security/jaas/callback/UserPrincipalCallback/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/AuthTypeCredential/index.d.ts +35 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/AuthTypeCredential/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/InetAddressCredential/index.d.ts +35 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/InetAddressCredential/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/PasswordCredential/index.d.ts +34 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/PasswordCredential/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/VirtualGroupCredential/index.d.ts +34 -0
- package/types/senselogic/sitevision/api/security/jaas/credential/VirtualGroupCredential/index.js +12 -0
- package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +12 -9
- package/types/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +10 -8
- package/types/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +178 -177
- package/types/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +10 -12
- package/types/senselogic/sitevision/api/xml/XmlElement/index.d.ts +9 -5
- package/types/senselogic/sitevision/api/xml/XmlParserException/index.d.ts +9 -0
- package/types/senselogic/sitevision/api/xml/XmlParserException/index.js +8 -0
- /package/types/senselogic/sitevision/api/base/{Requireable/ScriptEngine → Requireable.ScriptEngine}/index.d.ts +0 -0
|
@@ -1,130 +1,133 @@
|
|
|
1
1
|
import type { Node } from "../../types/javax/jcr/Node";
|
|
2
|
+
import type { String } from "../../types/java/lang/String";
|
|
2
3
|
|
|
3
4
|
import type { Binary } from "../../types/javax/jcr/Binary";
|
|
5
|
+
import type { Calendar } from "../../types/java/util/Calendar";
|
|
6
|
+
import type { List } from "../../types/java/util/List";
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
9
|
* Utility interface for getting Node property values.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
11
|
+
* <p>
|
|
12
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
13
|
+
* {@link senselogic.sitevision.api.Utils#getPropertyUtil()}.
|
|
14
|
+
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the <code>Utils</code> interface.
|
|
15
|
+
* </p>
|
|
13
16
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
17
|
+
* <p>
|
|
18
|
+
* The advantage of using these methods instead of explicitly use the "get property" methods as defined in JCR is that none of the
|
|
19
|
+
* methods defined here throw Exceptions. (Exception handling can of course be handled properly if you implements your own JSR 286
|
|
20
|
+
* portlet in Java, but when rendering in Velocity you can't catch Exceptions.)
|
|
21
|
+
* </p>
|
|
22
|
+
* --------------------------------------------------------- <br>
|
|
23
|
+
* <strong>Example 1:</strong> You use Velocity and strongly suspect that a <code>Node</code> have a
|
|
24
|
+
* <code>boolean</code> property called "isInUse"<br>
|
|
25
|
+
* ---------------------------------------------------------
|
|
26
|
+
* <p>
|
|
27
|
+
* <strong>1. The JCR way:</strong>
|
|
28
|
+
* </p>
|
|
29
|
+
* <p>
|
|
30
|
+
* a) This can return <code>true</code>, <code>false</code> or throw an <code>Exception</code>:
|
|
31
|
+
* </p>
|
|
32
|
+
* <pre><code>
|
|
33
|
+
* #if ($aNode.getProperty('isInUse').boolean)
|
|
34
|
+
* ...
|
|
35
|
+
* #end</code></pre>
|
|
36
|
+
* <p>
|
|
37
|
+
* b) Even if you ensure there actually are a property called "isInUse" it can still throw an <code>Exception</code> if the property isn't a
|
|
38
|
+
* <code>boolean</code>:
|
|
39
|
+
* </p>
|
|
40
|
+
* <pre><code>
|
|
41
|
+
* #if ($aNode.hasProperty('isInUse') && $aNode.getProperty('isInUse').boolean)
|
|
42
|
+
* ...
|
|
43
|
+
* #end</code></pre>
|
|
44
|
+
* <p>
|
|
45
|
+
* c) Your best possible effort to avoid Exceptions is to ensure that there are a property and that it actually is of <code>boolean</code>
|
|
46
|
+
* type before you check its value:<br>
|
|
47
|
+
* (Note! Property types are defined in <code>javax.jcr.PropertyType</code> and the <code>BOOLEAN</code> type is represented by the
|
|
48
|
+
* <code>int</code> value 6):
|
|
49
|
+
* </p>
|
|
50
|
+
* <pre><code>
|
|
51
|
+
* #if ($aNode.hasProperty('isInUse') && $aNode.getProperty('isInUse').type == 6 && $aNode.getProperty('isInUse').boolean)
|
|
52
|
+
* ...
|
|
53
|
+
* #end</code></pre>
|
|
54
|
+
* <p>
|
|
55
|
+
* <em>The drawback with this alternative is that you miss boolean properties that isn't registered as the
|
|
56
|
+
* <code>BOOLEAN</code> type (e.g. a <code>String</code> property with the value "true" or "false")</em>
|
|
57
|
+
* </p>
|
|
55
58
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
59
|
+
* <p>
|
|
60
|
+
* <strong>2. The PropertyUtil way:</strong>
|
|
61
|
+
* </p>
|
|
62
|
+
* <p>
|
|
63
|
+
* This always returns <code>true</code> or <code>false</code>:
|
|
64
|
+
* </p>
|
|
65
|
+
* <pre><code>
|
|
66
|
+
* #set ($propertyUtil = $sitevisionUtils.propertyUtil)
|
|
67
|
+
* ...
|
|
68
|
+
* #if ($propertyUtil.getBoolean($aNode, 'isInUse')
|
|
69
|
+
* ...
|
|
70
|
+
* #end</code></pre>
|
|
68
71
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
72
|
+
* --------------------------------------------------------- <br>
|
|
73
|
+
* <strong>Example 2:</strong> You use Velocity and want to do an integer addition of a fixed <code>int</code> value and a <code>int</code>
|
|
74
|
+
* property "myNumber".<br>
|
|
75
|
+
* (Note! An addition in Velocity must be executed in a <code>#set</code> statement)<br>
|
|
76
|
+
* ---------------------------------------------------------
|
|
77
|
+
* <p>
|
|
78
|
+
* <strong>1. The JCR way:</strong>
|
|
79
|
+
* </p>
|
|
80
|
+
* <p>
|
|
81
|
+
* This can't be achieved in Velocity! You can only fetch the value as a long (<code>$aNode.getProperty('myNumber').long</code>)
|
|
82
|
+
* but Velocity needs an <code>int</code> or an <code>Integer</code> to perform addition.
|
|
83
|
+
* </p>
|
|
84
|
+
* <p>
|
|
85
|
+
* <strong>2. The PropertyUtil way:</strong>
|
|
86
|
+
* </p>
|
|
87
|
+
* <p>
|
|
88
|
+
* This will work in Velocity (i.e. use <code>PropertyUtil</code> to get the <code>int</code>):
|
|
89
|
+
* </p>
|
|
90
|
+
* <pre><code>
|
|
91
|
+
* #set ($propertyUtil = $sitevisionUtils.propertyUtil)
|
|
92
|
+
* ...
|
|
93
|
+
* #set ($result = $propertyUtil.getInt($aNode, 'myNumber') + 45)</code></pre>
|
|
94
|
+
* --------------------------------------------------------- <br>
|
|
95
|
+
* <strong>Example 3:</strong> You use Velocity and want to get two int property values from a node and one of the property names contains
|
|
96
|
+
* illegal characters.<br>
|
|
97
|
+
* (Note! Illegal characters in node names and property names must always be escaped)<br>
|
|
98
|
+
* ---------------------------------------------------------
|
|
99
|
+
* <p>
|
|
100
|
+
* Since the property name "<code>anIllegal[./]name</code>" contains illegal characters it must be escaped.
|
|
101
|
+
* To do this you typically use the {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String) escapeJcrName(String)}
|
|
102
|
+
* method in {@link senselogic.sitevision.api.text.EndecUtil}.
|
|
103
|
+
* Note that the property name "<code>aLegalName</code>" is <em>not</em> escaped since it doesn't contain any illegal characters.
|
|
104
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
105
|
+
* </p>
|
|
106
|
+
* <pre><code>
|
|
107
|
+
* #set ($propertyUtil = $sitevisionUtils.propertyUtil)
|
|
108
|
+
* #set ($endecUtil = $sitevisionUtils.endecUtil)
|
|
109
|
+
* ...
|
|
110
|
+
* #set ($escapedName = $endecUtil.escapeJcrName('anIllegal[./]name'))
|
|
111
|
+
* #set ($firstValue = $propertyUtil.getInt($aNode, $escapedName)
|
|
109
112
|
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
113
|
+
* #set ($secondValue = $propertyUtil.getInt($aNode, 'aLegalName')
|
|
114
|
+
* </code></pre>
|
|
112
115
|
* @author Magnus Lövgren
|
|
113
116
|
*/
|
|
114
117
|
export interface PropertyUtil {
|
|
115
118
|
/**
|
|
116
119
|
* Gets a String property from a "nested" Node's property.
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
120
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code> has a
|
|
121
|
+
* <code>String</code> property).
|
|
122
|
+
*
|
|
123
|
+
* <p>
|
|
124
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
125
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
126
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
127
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
128
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
129
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
130
|
+
* </p>
|
|
128
131
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
129
132
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
130
133
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -133,47 +136,47 @@ export interface PropertyUtil {
|
|
|
133
136
|
*/
|
|
134
137
|
getNestedString(
|
|
135
138
|
aNode: Node,
|
|
136
|
-
aNodePropertyName: string,
|
|
137
|
-
aPropertyName: string
|
|
139
|
+
aNodePropertyName: String | string,
|
|
140
|
+
aPropertyName: String | string
|
|
138
141
|
): string;
|
|
139
142
|
|
|
140
143
|
/**
|
|
141
144
|
* Gets a String property from a "nested" Node's property and returns it XML escaped.
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
145
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code> has a
|
|
146
|
+
* <code>String</code> property).
|
|
147
|
+
*
|
|
148
|
+
* <p>
|
|
149
|
+
* This is a convenience method for getting a "nested" String property that also should be XML escaped. A String that should be included
|
|
150
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
151
|
+
* </p>
|
|
152
|
+
* <p>
|
|
153
|
+
* This Velocity code:
|
|
154
|
+
* </p>
|
|
155
|
+
* <pre><code>
|
|
156
|
+
* #set ($endecUtil = ...)
|
|
157
|
+
* #set ($propertyUtil = ...)
|
|
158
|
+
* ...
|
|
159
|
+
* <p>
|
|
160
|
+
* $endecUtil.escapeXML($propertyUtil.getNestedString($myNode, 'aNodeProperty', 'aProperty'))
|
|
161
|
+
* </p>
|
|
162
|
+
* </code></pre>
|
|
163
|
+
* would typically be replaced with this:
|
|
164
|
+
* <pre><code>
|
|
165
|
+
* #set ($propertyUtil = ...)
|
|
166
|
+
* ...
|
|
167
|
+
* <p>
|
|
168
|
+
* $!propertyUtil.getNestedStringEscaped($myNode, 'aNodeProperty', 'aProperty')
|
|
169
|
+
* </p>
|
|
170
|
+
* </code></pre>
|
|
171
|
+
*
|
|
172
|
+
* <p>
|
|
173
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
174
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
175
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
176
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
177
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
178
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
179
|
+
* </p>
|
|
177
180
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
178
181
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
179
182
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -184,23 +187,23 @@ export interface PropertyUtil {
|
|
|
184
187
|
*/
|
|
185
188
|
getNestedStringEscaped(
|
|
186
189
|
aNode: Node,
|
|
187
|
-
aNodePropertyName: string,
|
|
188
|
-
aPropertyName: string
|
|
190
|
+
aNodePropertyName: String | string,
|
|
191
|
+
aPropertyName: String | string
|
|
189
192
|
): string;
|
|
190
193
|
|
|
191
194
|
/**
|
|
192
195
|
* Gets a String property from a "nested" Node's property with a fallback value if the property doesn't exist.
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
196
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code> has a
|
|
197
|
+
* <code>String</code> property).
|
|
198
|
+
*
|
|
199
|
+
* <p>
|
|
200
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
201
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
202
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
203
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
204
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
205
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
206
|
+
* </p>
|
|
204
207
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
205
208
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
206
209
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -210,48 +213,48 @@ export interface PropertyUtil {
|
|
|
210
213
|
*/
|
|
211
214
|
getNestedString(
|
|
212
215
|
aNode: Node,
|
|
213
|
-
aNodePropertyName: string,
|
|
214
|
-
aPropertyName: string,
|
|
215
|
-
aDefaultValue: string
|
|
216
|
+
aNodePropertyName: String | string,
|
|
217
|
+
aPropertyName: String | string,
|
|
218
|
+
aDefaultValue: String | string
|
|
216
219
|
): string;
|
|
217
220
|
|
|
218
221
|
/**
|
|
219
222
|
* Gets a String property from a "nested" Node's property with a fallback value if the property doesn't exist, and returns it XML escaped.
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
223
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
224
|
+
* has a <code>String</code> property).
|
|
225
|
+
*
|
|
226
|
+
* <p>
|
|
227
|
+
* This is a convenience method for getting a "nested" String property that also should be XML escaped. A String that should be included
|
|
228
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
229
|
+
* </p>
|
|
230
|
+
* <p>
|
|
231
|
+
* This Velocity code:
|
|
232
|
+
* </p>
|
|
233
|
+
* <pre><code>
|
|
234
|
+
* #set ($endecUtil = ...)
|
|
235
|
+
* #set ($propertyUtil = ...)
|
|
236
|
+
* ...
|
|
237
|
+
* <p>
|
|
238
|
+
* $endecUtil.escapeXML($propertyUtil.getNestedString($myNode, 'aNodeProperty', 'aProperty', 'a default value'))
|
|
239
|
+
* </p>
|
|
240
|
+
* </code></pre>
|
|
241
|
+
* would typically be replaced with this:
|
|
242
|
+
* <pre><code>
|
|
243
|
+
* #set ($propertyUtil = ...)
|
|
244
|
+
* ...
|
|
245
|
+
* <p>
|
|
246
|
+
* $propertyUtil.getNestedStringEscaped($myNode, 'aNodeProperty', 'aProperty', 'a default value')
|
|
247
|
+
* </p>
|
|
248
|
+
* </code></pre>
|
|
249
|
+
*
|
|
250
|
+
* <p>
|
|
251
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
252
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
253
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
254
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
255
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
256
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
257
|
+
* </p>
|
|
255
258
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
256
259
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
257
260
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -263,24 +266,24 @@ export interface PropertyUtil {
|
|
|
263
266
|
*/
|
|
264
267
|
getNestedStringEscaped(
|
|
265
268
|
aNode: Node,
|
|
266
|
-
aNodePropertyName: string,
|
|
267
|
-
aPropertyName: string,
|
|
268
|
-
aDefaultValue: string
|
|
269
|
+
aNodePropertyName: String | string,
|
|
270
|
+
aPropertyName: String | string,
|
|
271
|
+
aDefaultValue: String | string
|
|
269
272
|
): string;
|
|
270
273
|
|
|
271
274
|
/**
|
|
272
275
|
* Gets an int property from a "nested" Node's property.
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
276
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
277
|
+
* has an <code>int/Integer</code> property).
|
|
278
|
+
*
|
|
279
|
+
* <p>
|
|
280
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
281
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
282
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
283
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
284
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
285
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
286
|
+
* </p>
|
|
284
287
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
285
288
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
286
289
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -288,153 +291,153 @@ export interface PropertyUtil {
|
|
|
288
291
|
*/
|
|
289
292
|
getNestedInt(
|
|
290
293
|
aNode: Node,
|
|
291
|
-
aNodePropertyName: string,
|
|
292
|
-
aPropertyName: string
|
|
294
|
+
aNodePropertyName: String | string,
|
|
295
|
+
aPropertyName: String | string
|
|
293
296
|
): number;
|
|
294
297
|
|
|
295
298
|
/**
|
|
296
299
|
* Gets an int property from a "nested" Node's property with a fallback value if the property doesn't exist or is incompatible with the int type.
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
300
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
301
|
+
* has an <code>int/Integer</code> property).
|
|
302
|
+
*
|
|
303
|
+
* <p>
|
|
304
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
305
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
306
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
307
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
308
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
309
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
310
|
+
* </p>
|
|
308
311
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
309
312
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
310
313
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
311
314
|
* @param aDefaultValue fallback value if no value exists
|
|
312
|
-
* @return the value for aPropertyName as <code>int</code>. If no property exists or it isn't compatible with an <code>int</code
|
|
315
|
+
* @return the value for aPropertyName as <code>int</code>. If no property exists or it isn't compatible with an <code>int</code>,
 aDefaultValue is returned.
|
|
313
316
|
*/
|
|
314
317
|
getNestedInt(
|
|
315
318
|
aNode: Node,
|
|
316
|
-
aNodePropertyName: string,
|
|
317
|
-
aPropertyName: string,
|
|
319
|
+
aNodePropertyName: String | string,
|
|
320
|
+
aPropertyName: String | string,
|
|
318
321
|
aDefaultValue: number
|
|
319
322
|
): number;
|
|
320
323
|
|
|
321
324
|
/**
|
|
322
325
|
* Gets a double property from a "nested" Node's property.
|
|
323
|
-
*
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
*
|
|
326
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
327
|
+
* has a <code>double/Double</code> property).
|
|
328
|
+
*
|
|
329
|
+
* <p>
|
|
330
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
331
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
332
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
333
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
334
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
335
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
336
|
+
* </p>
|
|
334
337
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
335
338
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
336
339
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
337
|
-
* @return the value for aPropertyName as <code>double</code>. If no property exists or it isn't compatible with a <code>double</code
|
|
340
|
+
* @return the value for aPropertyName as <code>double</code>. If no property exists or it isn't compatible with a <code>double</code>,
 0.0 is returned.
|
|
338
341
|
* @since Sitevision 2.6.1_09
|
|
339
342
|
*/
|
|
340
343
|
getNestedDouble(
|
|
341
344
|
aNode: Node,
|
|
342
|
-
aNodePropertyName: string,
|
|
343
|
-
aPropertyName: string
|
|
345
|
+
aNodePropertyName: String | string,
|
|
346
|
+
aPropertyName: String | string
|
|
344
347
|
): number;
|
|
345
348
|
|
|
346
349
|
/**
|
|
347
350
|
* Gets a double property from a "nested" Node's property with a fallback value if the property doesn't exist or is incompatible
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
356
|
-
*
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
*
|
|
351
|
+
* with the double type.
|
|
352
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
353
|
+
* has a <code>double/Double</code> property).
|
|
354
|
+
*
|
|
355
|
+
* <p>
|
|
356
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
357
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
358
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
359
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
360
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
361
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
362
|
+
* </p>
|
|
360
363
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
361
364
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
362
365
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
363
366
|
* @param aDefaultValue fallback value if no value exists
|
|
364
|
-
* @return the value for aPropertyName as <code>double</code>. If no property exists or it isn't compatible with a <code>double</code
|
|
367
|
+
* @return the value for aPropertyName as <code>double</code>. If no property exists or it isn't compatible with a <code>double</code>,
 aDefaultValue is returned.
|
|
365
368
|
* @since Sitevision 2.6.1_09
|
|
366
369
|
*/
|
|
367
370
|
getNestedDouble(
|
|
368
371
|
aNode: Node,
|
|
369
|
-
aNodePropertyName: string,
|
|
370
|
-
aPropertyName: string,
|
|
372
|
+
aNodePropertyName: String | string,
|
|
373
|
+
aPropertyName: String | string,
|
|
371
374
|
aDefaultValue: number
|
|
372
375
|
): number;
|
|
373
376
|
|
|
374
377
|
/**
|
|
375
378
|
* Gets a boolean property from a "nested" Node's property.
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
379
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
380
|
+
* has a <code>Boolean</code> property).
|
|
381
|
+
*
|
|
382
|
+
* <p>
|
|
383
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
384
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
385
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
386
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
387
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
388
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
389
|
+
* </p>
|
|
387
390
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
388
391
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
389
392
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
390
|
-
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code
|
|
393
|
+
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code>,
 <code>false</code> is returned.
|
|
391
394
|
*/
|
|
392
395
|
getNestedBoolean(
|
|
393
396
|
aNode: Node,
|
|
394
|
-
aNodePropertyName: string,
|
|
395
|
-
aPropertyName: string
|
|
397
|
+
aNodePropertyName: String | string,
|
|
398
|
+
aPropertyName: String | string
|
|
396
399
|
): boolean;
|
|
397
400
|
|
|
398
401
|
/**
|
|
399
402
|
* Gets a boolean property from a "nested" Node's property with a fallback value if the property doesn't exist or is incompatible
|
|
400
|
-
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
403
|
+
* with the boolean type.
|
|
404
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
405
|
+
* has a <code>Boolean</code> property).
|
|
406
|
+
*
|
|
407
|
+
* <p>
|
|
408
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
409
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
410
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
411
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
412
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
413
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
414
|
+
* </p>
|
|
412
415
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
413
416
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
414
417
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
415
418
|
* @param aDefaultValue fallback value if no value exists
|
|
416
|
-
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code
|
|
419
|
+
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code>,
 aDefaultValue is returned.
|
|
417
420
|
*/
|
|
418
421
|
getNestedBoolean(
|
|
419
422
|
aNode: Node,
|
|
420
|
-
aNodePropertyName: string,
|
|
421
|
-
aPropertyName: string,
|
|
423
|
+
aNodePropertyName: String | string,
|
|
424
|
+
aPropertyName: String | string,
|
|
422
425
|
aDefaultValue: boolean
|
|
423
426
|
): boolean;
|
|
424
427
|
|
|
425
428
|
/**
|
|
426
429
|
* Gets a Node property from a "nested" Node's property.
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
437
|
-
*
|
|
430
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
431
|
+
* has a <code>Node</code> property).
|
|
432
|
+
*
|
|
433
|
+
* <p>
|
|
434
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
435
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
436
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
437
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
438
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
439
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
440
|
+
* </p>
|
|
438
441
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
439
442
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
440
443
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -442,23 +445,23 @@ export interface PropertyUtil {
|
|
|
442
445
|
*/
|
|
443
446
|
getNestedNode(
|
|
444
447
|
aNode: Node,
|
|
445
|
-
aNodePropertyName: string,
|
|
446
|
-
aPropertyName: string
|
|
448
|
+
aNodePropertyName: String | string,
|
|
449
|
+
aPropertyName: String | string
|
|
447
450
|
): Node;
|
|
448
451
|
|
|
449
452
|
/**
|
|
450
453
|
* Gets a Node property from a "nested" Node's property with a fallback value if the property doesn't exist.
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
*
|
|
458
|
-
*
|
|
459
|
-
*
|
|
460
|
-
*
|
|
461
|
-
*
|
|
454
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
455
|
+
* has a <code>Node</code> property).
|
|
456
|
+
*
|
|
457
|
+
* <p>
|
|
458
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
459
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
460
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
461
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
462
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
463
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
464
|
+
* </p>
|
|
462
465
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
463
466
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
464
467
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -467,122 +470,126 @@ export interface PropertyUtil {
|
|
|
467
470
|
*/
|
|
468
471
|
getNestedNode(
|
|
469
472
|
aNode: Node,
|
|
470
|
-
aNodePropertyName: string,
|
|
471
|
-
aPropertyName: string,
|
|
473
|
+
aNodePropertyName: String | string,
|
|
474
|
+
aPropertyName: String | string,
|
|
472
475
|
aDefaultValue: Node
|
|
473
476
|
): Node;
|
|
474
477
|
|
|
475
478
|
/**
|
|
476
479
|
* Gets a Binary property from a Node.
|
|
477
480
|
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
480
|
-
*
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
*
|
|
484
|
-
*
|
|
485
|
-
*
|
|
486
|
-
*
|
|
487
|
-
*
|
|
488
|
-
*
|
|
489
|
-
*
|
|
490
|
-
*
|
|
491
|
-
*
|
|
492
|
-
*
|
|
493
|
-
*
|
|
494
|
-
*
|
|
481
|
+
* <p>
|
|
482
|
+
* Ensure to always handle resources appropriately when working with Binary! If you get a stream via {@link javax.jcr.Binary#getStream()},
|
|
483
|
+
* you must also <code>close</code> the stream when you are done.
|
|
484
|
+
* </p>
|
|
485
|
+
*
|
|
486
|
+
* <p>
|
|
487
|
+
* <strong>Note!</strong> The <code>Binary</code> support is limited, see {@link javax.jcr.Property#getBinary()} for more information!
|
|
488
|
+
* </p>
|
|
489
|
+
*
|
|
490
|
+
* <p>
|
|
491
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
492
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
493
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
494
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
495
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
496
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
497
|
+
* </p>
|
|
495
498
|
* @param aNode the <code>Node</code> that has a property
|
|
496
499
|
* @param aPropertyName the name of the property
|
|
497
500
|
* @return the value for aPropertyName as <code>Binary</code>. If no property exists, <code>null</code> is returned.
|
|
498
501
|
* @since Sitevision 3.5
|
|
499
502
|
*/
|
|
500
|
-
getBinary(aNode: Node, aPropertyName: string): Binary;
|
|
503
|
+
getBinary(aNode: Node, aPropertyName: String | string): Binary;
|
|
501
504
|
|
|
502
505
|
/**
|
|
503
506
|
* Gets a Binary property from a node with a fallback value if the property doesn't exist.
|
|
504
507
|
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
514
|
-
*
|
|
515
|
-
*
|
|
516
|
-
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
521
|
-
*
|
|
508
|
+
* <p>
|
|
509
|
+
* Ensure to always handle resources appropriately when working with Binary! If you get a stream via {@link javax.jcr.Binary#getStream()},
|
|
510
|
+
* you must also <code>close</code> the stream when you are done.
|
|
511
|
+
* </p>
|
|
512
|
+
*
|
|
513
|
+
* <p>
|
|
514
|
+
* <strong>Note!</strong> The <code>Binary</code> support is limited, see {@link javax.jcr.Property#getBinary()} for more information!
|
|
515
|
+
* </p>
|
|
516
|
+
*
|
|
517
|
+
* <p>
|
|
518
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
519
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
520
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
521
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
522
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
523
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
524
|
+
* </p>
|
|
522
525
|
* @param aNode the <code>Node</code> that has a property
|
|
523
526
|
* @param aPropertyName the name of the property
|
|
524
527
|
* @param aDefaultValue fallback value if no value exists
|
|
525
528
|
* @return the value for aPropertyName as <code>Binary</code>. If no property exists, aDefaultValue is returned.
|
|
526
529
|
* @since Sitevision 3.5
|
|
527
530
|
*/
|
|
528
|
-
getBinary(
|
|
531
|
+
getBinary(
|
|
532
|
+
aNode: Node,
|
|
533
|
+
aPropertyName: String | string,
|
|
534
|
+
aDefaultValue: Binary
|
|
535
|
+
): Binary;
|
|
529
536
|
|
|
530
537
|
/**
|
|
531
538
|
* Gets a Binary property from a "nested" Node's property.
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
540
|
-
*
|
|
541
|
-
*
|
|
542
|
-
*
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
550
|
-
*
|
|
551
|
-
*
|
|
539
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
540
|
+
* has a <code>Binary</code> property).
|
|
541
|
+
*
|
|
542
|
+
* <p>
|
|
543
|
+
* Ensure to always handle resources appropriately when working with Binary! If you get a stream via {@link javax.jcr.Binary#getStream()},
|
|
544
|
+
* you must also <code>close</code> the stream when you are done.
|
|
545
|
+
* </p>
|
|
546
|
+
*
|
|
547
|
+
* <p>
|
|
548
|
+
* <strong>Note!</strong> The <code>Binary</code> support is limited, see {@link javax.jcr.Property#getBinary()} for more information!
|
|
549
|
+
* </p>
|
|
550
|
+
*
|
|
551
|
+
* <p>
|
|
552
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
553
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
554
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
555
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
556
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
557
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
558
|
+
* </p>
|
|
552
559
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
553
560
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on <code>aNode</code>
|
|
554
561
|
* @param aPropertyName the name of the Binary property for the "inner/nested" <code>Node</code>
|
|
555
|
-
* @return the value for aPropertyName as <code>Binary</code>. If no property exists or it isn't a <code>Binary</code
|
|
562
|
+
* @return the value for aPropertyName as <code>Binary</code>. If no property exists or it isn't a <code>Binary</code>,
 <code>null</code> is returned.
|
|
556
563
|
* @since Sitevision 3.5
|
|
557
564
|
*/
|
|
558
565
|
getNestedBinary(
|
|
559
566
|
aNode: Node,
|
|
560
|
-
aNodePropertyName: string,
|
|
561
|
-
aPropertyName: string
|
|
567
|
+
aNodePropertyName: String | string,
|
|
568
|
+
aPropertyName: String | string
|
|
562
569
|
): Binary;
|
|
563
570
|
|
|
564
571
|
/**
|
|
565
572
|
* Gets a Binary property from a "nested" Node's property with a fallback value if the property doesn't exist.
|
|
566
|
-
*
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
*
|
|
575
|
-
*
|
|
576
|
-
*
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
580
|
-
*
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
585
|
-
*
|
|
573
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
574
|
+
* has a <code>Binary</code> property).
|
|
575
|
+
*
|
|
576
|
+
* <p>
|
|
577
|
+
* Ensure to always handle resources appropriately when working with Binary! If you get a stream via {@link javax.jcr.Binary#getStream()},
|
|
578
|
+
* you must also <code>close</code> the stream when you are done.
|
|
579
|
+
* </p>
|
|
580
|
+
*
|
|
581
|
+
* <p>
|
|
582
|
+
* <strong>Note!</strong> The <code>Binary</code> support is limited, see {@link javax.jcr.Property#getBinary()} for more information!
|
|
583
|
+
* </p>
|
|
584
|
+
*
|
|
585
|
+
* <p>
|
|
586
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
587
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
588
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
589
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
590
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
591
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
592
|
+
* </p>
|
|
586
593
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
587
594
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on <code>aNode</code>
|
|
588
595
|
* @param aPropertyName the name of the Binary property for the "inner/nested" <code>Node</code>
|
|
@@ -592,64 +599,64 @@ export interface PropertyUtil {
|
|
|
592
599
|
*/
|
|
593
600
|
getNestedBinary(
|
|
594
601
|
aNode: Node,
|
|
595
|
-
aNodePropertyName: string,
|
|
596
|
-
aPropertyName: string,
|
|
602
|
+
aNodePropertyName: String | string,
|
|
603
|
+
aPropertyName: String | string,
|
|
597
604
|
aDefaultValue: Binary
|
|
598
605
|
): Binary;
|
|
599
606
|
|
|
600
607
|
/**
|
|
601
608
|
* Gets a String property from a Node.
|
|
602
609
|
*
|
|
603
|
-
*
|
|
604
|
-
*
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
609
|
-
*
|
|
610
|
-
*
|
|
610
|
+
* <p>
|
|
611
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
612
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
613
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
614
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
615
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
616
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
617
|
+
* </p>
|
|
611
618
|
* @param aNode the <code>Node</code> that has a property
|
|
612
619
|
* @param aPropertyName the name of the property
|
|
613
620
|
* @return the value for aPropertyName as <code>String</code>. If no property exists, <code>null</code> is returned.
|
|
614
621
|
* @see #getStringEscaped(javax.jcr.Node, String)
|
|
615
622
|
*/
|
|
616
|
-
getString(aNode: Node, aPropertyName: string): string;
|
|
623
|
+
getString(aNode: Node, aPropertyName: String | string): string;
|
|
617
624
|
|
|
618
625
|
/**
|
|
619
626
|
* Gets a String property from a Node and returns it XML escaped.
|
|
620
627
|
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
628
|
+
* <p>
|
|
629
|
+
* This is a convenience method for getting a String property that also should be XML escaped. A String that should be included
|
|
630
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
631
|
+
* </p>
|
|
632
|
+
* <p>
|
|
633
|
+
* This Velocity code:
|
|
634
|
+
* </p>
|
|
635
|
+
* <pre><code>
|
|
636
|
+
* #set ($endecUtil = ...)
|
|
637
|
+
* #set ($propertyUtil = ...)
|
|
638
|
+
* ...
|
|
639
|
+
* <p>
|
|
640
|
+
* $endecUtil.escapeXML($propertyUtil.getString($myNode, 'aProperty'))
|
|
641
|
+
* </p>
|
|
642
|
+
* </code></pre>
|
|
643
|
+
* would typically be replaced with this:
|
|
644
|
+
* <pre><code>
|
|
645
|
+
* #set ($propertyUtil = ...)
|
|
646
|
+
* ...
|
|
647
|
+
* <p>
|
|
648
|
+
* $!propertyUtil.getStringEscaped($myNode, 'aProperty')
|
|
649
|
+
* </p>
|
|
650
|
+
* </code></pre>
|
|
651
|
+
*
|
|
652
|
+
* <p>
|
|
653
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
654
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
655
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
656
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
657
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
658
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
659
|
+
* </p>
|
|
653
660
|
* @param aNode the <code>Node</code> that has a property
|
|
654
661
|
* @param aPropertyName the name of the property
|
|
655
662
|
* @return the value for aPropertyName as an XML escaped <code>String</code>. If no property exists, <code>null</code> is returned.
|
|
@@ -657,62 +664,66 @@ export interface PropertyUtil {
|
|
|
657
664
|
* @see senselogic.sitevision.api.text.EndecUtil#escapeXML(String)
|
|
658
665
|
* @since Sitevision 3.5
|
|
659
666
|
*/
|
|
660
|
-
getStringEscaped(aNode: Node, aPropertyName: string): string;
|
|
667
|
+
getStringEscaped(aNode: Node, aPropertyName: String | string): string;
|
|
661
668
|
|
|
662
669
|
/**
|
|
663
670
|
* Gets a String property from a node with a fallback value if the property doesn't exist.
|
|
664
671
|
*
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
*
|
|
668
|
-
*
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
672
|
+
* <p>
|
|
673
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
674
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
675
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
676
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
677
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
678
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
679
|
+
* </p>
|
|
673
680
|
* @param aNode the <code>Node</code> that has a property
|
|
674
681
|
* @param aPropertyName the name of the property
|
|
675
682
|
* @param aDefaultValue fallback value if no value exists
|
|
676
683
|
* @return the value for aPropertyName as <code>String</code>. If no property exists, aDefaultValue is returned.
|
|
677
684
|
* @see #getStringEscaped(javax.jcr.Node, String, String)
|
|
678
685
|
*/
|
|
679
|
-
getString(
|
|
686
|
+
getString(
|
|
687
|
+
aNode: Node,
|
|
688
|
+
aPropertyName: String | string,
|
|
689
|
+
aDefaultValue: String | string
|
|
690
|
+
): string;
|
|
680
691
|
|
|
681
692
|
/**
|
|
682
693
|
* Gets a String property from a Node, with a fallback value, and returns it XML escaped.
|
|
683
694
|
*
|
|
684
|
-
*
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
692
|
-
*
|
|
693
|
-
*
|
|
694
|
-
*
|
|
695
|
-
*
|
|
696
|
-
*
|
|
697
|
-
*
|
|
698
|
-
*
|
|
699
|
-
*
|
|
700
|
-
*
|
|
701
|
-
*
|
|
702
|
-
*
|
|
703
|
-
*
|
|
704
|
-
*
|
|
705
|
-
*
|
|
706
|
-
*
|
|
707
|
-
*
|
|
708
|
-
*
|
|
709
|
-
*
|
|
710
|
-
*
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
695
|
+
* <p>
|
|
696
|
+
* This is a convenience method for getting a String property that also should be XML escaped. A String that should be included
|
|
697
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
698
|
+
* </p>
|
|
699
|
+
* <p>
|
|
700
|
+
* This Velocity code:
|
|
701
|
+
* </p>
|
|
702
|
+
* <pre><code>
|
|
703
|
+
* #set ($endecUtil = ...)
|
|
704
|
+
* #set ($propertyUtil = ...)
|
|
705
|
+
* ...
|
|
706
|
+
* <p>
|
|
707
|
+
* $endecUtil.escapeXML($propertyUtil.getString($myNode, 'aProperty', 'a default value'))
|
|
708
|
+
* </p>
|
|
709
|
+
* </code></pre>
|
|
710
|
+
* would typically be replaced with this:
|
|
711
|
+
* <pre><code>
|
|
712
|
+
* #set ($propertyUtil = ...)
|
|
713
|
+
* ...
|
|
714
|
+
* <p>
|
|
715
|
+
* $propertyUtil.getStringEscaped($myNode, 'aProperty', 'a default value')
|
|
716
|
+
* </p>
|
|
717
|
+
* </code></pre>
|
|
718
|
+
*
|
|
719
|
+
* <p>
|
|
720
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
721
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
722
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
723
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
724
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
725
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
726
|
+
* </p>
|
|
716
727
|
* @param aNode the <code>Node</code> that has a property
|
|
717
728
|
* @param aPropertyName the name of the property
|
|
718
729
|
* @param aDefaultValue a (non XML escaped) fallback value if no value exists
|
|
@@ -723,557 +734,569 @@ export interface PropertyUtil {
|
|
|
723
734
|
*/
|
|
724
735
|
getStringEscaped(
|
|
725
736
|
aNode: Node,
|
|
726
|
-
aPropertyName: string,
|
|
727
|
-
aDefaultValue: string
|
|
737
|
+
aPropertyName: String | string,
|
|
738
|
+
aDefaultValue: String | string
|
|
728
739
|
): string;
|
|
729
740
|
|
|
730
741
|
/**
|
|
731
742
|
* Gets an int property from a Node.
|
|
732
743
|
*
|
|
733
|
-
*
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
744
|
+
* <p>
|
|
745
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
746
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
747
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
748
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
749
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
750
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
751
|
+
* </p>
|
|
741
752
|
* @param aNode the <code>Node</code> that has a property
|
|
742
753
|
* @param aPropertyName the name of the property
|
|
743
754
|
* @return the <code>int</code> value for aPropertyName. If no property exists or it isn't compatible with an <code>int</code>, 0 is returned.
|
|
744
755
|
*/
|
|
745
|
-
getInt(aNode: Node, aPropertyName: string): number;
|
|
756
|
+
getInt(aNode: Node, aPropertyName: String | string): number;
|
|
746
757
|
|
|
747
758
|
/**
|
|
748
759
|
* Gets an int property from a node with a fallback value if the property doesn't exist or is incompatible with the int type.
|
|
749
760
|
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
761
|
+
* <p>
|
|
762
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
763
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
764
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
765
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
766
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
767
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
768
|
+
* </p>
|
|
758
769
|
* @param aNode the <code>Node</code> that has a property
|
|
759
770
|
* @param aPropertyName the name of the property
|
|
760
771
|
* @param aDefaultValue fallback value if no value exists
|
|
761
|
-
* @return the <code>int</code> value for aPropertyName. If no property exists or it isn't compatible with an <code>int</code
|
|
772
|
+
* @return the <code>int</code> value for aPropertyName. If no property exists or it isn't compatible with an <code>int</code>,
 aDefaultValue is returned.
|
|
762
773
|
*/
|
|
763
|
-
getInt(
|
|
774
|
+
getInt(
|
|
775
|
+
aNode: Node,
|
|
776
|
+
aPropertyName: String | string,
|
|
777
|
+
aDefaultValue: number
|
|
778
|
+
): number;
|
|
764
779
|
|
|
765
780
|
/**
|
|
766
781
|
* Gets a double property from a Node.
|
|
767
782
|
*
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
*
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
*
|
|
775
|
-
*
|
|
783
|
+
* <p>
|
|
784
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
785
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
786
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
787
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
788
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
789
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
790
|
+
* </p>
|
|
776
791
|
* @param aNode the <code>Node</code> that has a property
|
|
777
792
|
* @param aPropertyName the name of the property
|
|
778
|
-
* @return the <code>double</code> value for aPropertyName. If no property exists or it isn't compatible with a <code>double</code
|
|
793
|
+
* @return the <code>double</code> value for aPropertyName. If no property exists or it isn't compatible with a <code>double</code>,
 0.0 is returned.
|
|
779
794
|
* @since Sitevision 2.6.1_09
|
|
780
795
|
*/
|
|
781
|
-
getDouble(aNode: Node, aPropertyName: string): number;
|
|
796
|
+
getDouble(aNode: Node, aPropertyName: String | string): number;
|
|
782
797
|
|
|
783
798
|
/**
|
|
784
799
|
* Gets a double property from a node with a fallback value if the property doesn't exist or is incompatible with the double type.
|
|
785
800
|
*
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
*
|
|
789
|
-
*
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
*
|
|
801
|
+
* <p>
|
|
802
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
803
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
804
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
805
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
806
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
807
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
808
|
+
* </p>
|
|
794
809
|
* @param aNode the <code>Node</code> that has a property
|
|
795
810
|
* @param aPropertyName the name of the property
|
|
796
811
|
* @param aDefaultValue fallback value if no value exists
|
|
797
|
-
* @return the <code>double</code> value for aPropertyName. If no property exists or it isn't compatible with a <code>double</code
|
|
812
|
+
* @return the <code>double</code> value for aPropertyName. If no property exists or it isn't compatible with a <code>double</code>,
 aDefaultValue is returned.
|
|
798
813
|
* @since Sitevision 2.6.1_09
|
|
799
814
|
*/
|
|
800
|
-
getDouble(
|
|
815
|
+
getDouble(
|
|
816
|
+
aNode: Node,
|
|
817
|
+
aPropertyName: String | string,
|
|
818
|
+
aDefaultValue: number
|
|
819
|
+
): number;
|
|
801
820
|
|
|
802
821
|
/**
|
|
803
822
|
* Gets a boolean property from a Node.
|
|
804
823
|
*
|
|
805
|
-
*
|
|
806
|
-
*
|
|
807
|
-
*
|
|
808
|
-
*
|
|
809
|
-
*
|
|
810
|
-
*
|
|
811
|
-
*
|
|
812
|
-
*
|
|
824
|
+
* <p>
|
|
825
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
826
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
827
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
828
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
829
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
830
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
831
|
+
* </p>
|
|
813
832
|
* @param aNode the <code>Node</code> that has a property
|
|
814
833
|
* @param aPropertyName the name of the property
|
|
815
|
-
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code
|
|
834
|
+
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code>,
 <code>false</code> is returned.
|
|
816
835
|
*/
|
|
817
|
-
getBoolean(aNode: Node, aPropertyName: string): boolean;
|
|
836
|
+
getBoolean(aNode: Node, aPropertyName: String | string): boolean;
|
|
818
837
|
|
|
819
838
|
/**
|
|
820
839
|
* Gets a boolean property from a Node with a fallback value if the property doesn't exist or is incompatible with the boolean type.
|
|
821
840
|
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
841
|
+
* <p>
|
|
842
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
843
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
844
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
845
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
846
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
847
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
848
|
+
* </p>
|
|
830
849
|
* @param aNode the <code>Node</code> that has a property
|
|
831
850
|
* @param aPropertyName the name of the property
|
|
832
851
|
* @param aDefaultValue fallback value if no value exists
|
|
833
|
-
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code
|
|
852
|
+
* @return the value for aPropertyName as <code>boolean</code>. If no property exists or it isn't compatible with a <code>boolean</code>,
 aDefaultValue is returned.
|
|
834
853
|
*/
|
|
835
854
|
getBoolean(
|
|
836
855
|
aNode: Node,
|
|
837
|
-
aPropertyName: string,
|
|
856
|
+
aPropertyName: String | string,
|
|
838
857
|
aDefaultValue: boolean
|
|
839
858
|
): boolean;
|
|
840
859
|
|
|
841
860
|
/**
|
|
842
861
|
* Gets a Node property from a Node.
|
|
843
862
|
*
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
*
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
*
|
|
851
|
-
*
|
|
863
|
+
* <p>
|
|
864
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
865
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
866
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
867
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
868
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
869
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
870
|
+
* </p>
|
|
852
871
|
* @param aNode the <code>Node</code> that has a property
|
|
853
872
|
* @param aPropertyName the name of the property
|
|
854
873
|
* @return the value for aPropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code>, <code>null</code> is returned.
|
|
855
874
|
*/
|
|
856
|
-
getNode(aNode: Node, aPropertyName: string): Node;
|
|
875
|
+
getNode(aNode: Node, aPropertyName: String | string): Node;
|
|
857
876
|
|
|
858
877
|
/**
|
|
859
878
|
* Gets a Node property from a Node if an enabling property allows it.
|
|
860
879
|
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
864
|
-
*
|
|
865
|
-
*
|
|
866
|
-
*
|
|
867
|
-
*
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
*
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
*
|
|
888
|
-
*
|
|
889
|
-
*
|
|
890
|
-
*
|
|
880
|
+
* <p>
|
|
881
|
+
* In some Sitevision portlet configs there are a "boolean" property that enables a "Node" property and the "Node" might be <code>null</code>.
|
|
882
|
+
* This is a convenience method for such cases. In Velocity, code like this:
|
|
883
|
+
* </p>
|
|
884
|
+
* <pre><code>
|
|
885
|
+
* #set ($startPage = ...) <em>## Ensure start page value...</em>
|
|
886
|
+
* #if ($propertyUtil.getBoolean($portlet, 'useCustomStartPage'))
|
|
887
|
+
* #set ($customStartPage = $scriptUtil.getNonNull(${propertyUtil.getNode($portlet, 'customStartPage')}))
|
|
888
|
+
* #if ($customStartPage)
|
|
889
|
+
* #set ($startPage = $customStartPage)
|
|
890
|
+
* #end
|
|
891
|
+
* #end
|
|
892
|
+
* </code></pre>
|
|
893
|
+
* would typically be replaced with this:
|
|
894
|
+
* <pre><code>
|
|
895
|
+
* #set ($startPage = $scriptUtil.getNonNull(${propertyUtil.getEnabledNode($portlet, 'useCustomStartPage', 'customStartPage')}))
|
|
896
|
+
* #if (!$startPage)
|
|
897
|
+
* #set ($startPage = ...) <em>## Set default start page value if no custom start page was set...</em>
|
|
898
|
+
* #end
|
|
899
|
+
* </code></pre>
|
|
900
|
+
*
|
|
901
|
+
* <p>
|
|
902
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
903
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aNodePropertyName</code>).
|
|
904
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
905
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
906
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
907
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
908
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
909
|
+
* </p>
|
|
891
910
|
* @param aNode the <code>Node</code> that has the properties
|
|
892
911
|
* @param aEnablingPropertyName the name of the boolean property that enables the Node denoted by <code>aPropertyName</code>
|
|
893
912
|
* @param aNodePropertyName the name of the property
|
|
894
|
-
* @return the value for aNodePropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code
|
|
913
|
+
* @return the value for aNodePropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code>,
 <code>null</code> is returned.
 A <code>Node</code> will never be returned if <code>aEnablingPropertyName</code> doesn't exist, isn't compatible with a
 <code>boolean</code> or isn't <code>true</code>.
|
|
895
914
|
* @see #getEnabledNode(javax.jcr.Node, String, String, javax.jcr.Node)
|
|
896
915
|
* @since Sitevision 3.0
|
|
897
916
|
*/
|
|
898
917
|
getEnabledNode(
|
|
899
918
|
aNode: Node,
|
|
900
|
-
aEnablingPropertyName: string,
|
|
901
|
-
aNodePropertyName: string
|
|
919
|
+
aEnablingPropertyName: String | string,
|
|
920
|
+
aNodePropertyName: String | string
|
|
902
921
|
): Node;
|
|
903
922
|
|
|
904
923
|
/**
|
|
905
924
|
* Gets a Node property from a Node if an enabling property allows it, with a fallback Node value.
|
|
906
925
|
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
926
|
+
* <p>
|
|
927
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
928
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aNodePropertyName</code>).
|
|
929
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
930
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
931
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
932
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
933
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
934
|
+
* </p>
|
|
916
935
|
* @param aNode the <code>Node</code> that has the properties
|
|
917
936
|
* @param aEnablingPropertyName the name of the boolean property that enables the Node denoted by <code>aPropertyName</code>
|
|
918
937
|
* @param aNodePropertyName the name of the property
|
|
919
938
|
* @param aDefaultValue fallback value if no value exists
|
|
920
|
-
* @return the value for aNodePropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code
|
|
939
|
+
* @return the value for aNodePropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code>,
 <code>aDefaultValue</code> is returned.
 If <code>aEnablingPropertyName</code> doesn't exist, isn't compatible with a <code>boolean</code> or isn't <code>true</code>,
 <code>aDefaultValue</code> is returned.
|
|
921
940
|
* @see #getEnabledNode(javax.jcr.Node, String, String)
|
|
922
941
|
* @since Sitevision 3.0
|
|
923
942
|
*/
|
|
924
943
|
getEnabledNode(
|
|
925
944
|
aNode: Node,
|
|
926
|
-
aEnablingPropertyName: string,
|
|
927
|
-
aNodePropertyName: string,
|
|
945
|
+
aEnablingPropertyName: String | string,
|
|
946
|
+
aNodePropertyName: String | string,
|
|
928
947
|
aDefaultValue: Node
|
|
929
948
|
): Node;
|
|
930
949
|
|
|
931
950
|
/**
|
|
932
951
|
* Gets a String property from a Node if an enabling boolean property allows it.
|
|
933
952
|
*
|
|
934
|
-
*
|
|
935
|
-
*
|
|
936
|
-
*
|
|
937
|
-
*
|
|
938
|
-
*
|
|
939
|
-
*
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
*
|
|
946
|
-
*
|
|
947
|
-
*
|
|
948
|
-
*
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
*
|
|
953
|
-
*
|
|
954
|
-
*
|
|
955
|
-
*
|
|
956
|
-
*
|
|
957
|
-
*
|
|
958
|
-
*
|
|
959
|
-
*
|
|
960
|
-
*
|
|
961
|
-
*
|
|
962
|
-
*
|
|
963
|
-
*
|
|
953
|
+
* <p>
|
|
954
|
+
* In some Sitevision portlet configs there are a "boolean" property that enables a "String" property and the "String" might
|
|
955
|
+
* be <code>null</code>. This is a convenience method for such cases. In Velocity, code like this:
|
|
956
|
+
* </p>
|
|
957
|
+
* <pre><code>
|
|
958
|
+
* #set ($name = ...) <em>## Set default name...</em>
|
|
959
|
+
* #if ($propertyUtil.getBoolean($portlet, 'useCustomName'))
|
|
960
|
+
* #set ($customName = $scriptUtil.getNonNull(${propertyUtil.getNode($portlet, 'customName')}))
|
|
961
|
+
* #if ($customName)
|
|
962
|
+
* #set ($name = $customName)
|
|
963
|
+
* #end
|
|
964
|
+
* #end
|
|
965
|
+
* </code></pre>
|
|
966
|
+
* would typically be replaced with this:
|
|
967
|
+
* <pre><code>
|
|
968
|
+
* #set ($name = $scriptUtil.getNonNull(${propertyUtil.getEnabledString($portlet, 'useCustomName', 'customName')}))
|
|
969
|
+
* #if (!$name)
|
|
970
|
+
* #set ($name = ...) <em>## Set default name if no custom name was set...</em>
|
|
971
|
+
* #end
|
|
972
|
+
* </code></pre>
|
|
973
|
+
*
|
|
974
|
+
* <p>
|
|
975
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
976
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aStringPropertyName</code>).
|
|
977
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
978
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
979
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
980
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
981
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
982
|
+
* </p>
|
|
964
983
|
* @param aNode the <code>Node</code> that has the properties
|
|
965
984
|
* @param aEnablingPropertyName the name of the boolean property that enables the String denoted by <code>aStringPropertyName</code>
|
|
966
985
|
* @param aStringPropertyName the name of the String property
|
|
967
|
-
* @return the value for aStringPropertyName as <code>String</code>. If no property exists, <code>null</code> is returned
|
|
986
|
+
* @return the value for aStringPropertyName as <code>String</code>. If no property exists, <code>null</code> is returned.
 Null will always be returned if <code>aEnablingPropertyName</code> doesn't exist, isn't compatible with a <code>boolean</code>
 or isn't <code>true</code>.
|
|
968
987
|
* @see #getEnabledString(javax.jcr.Node, String, String, String)
|
|
969
988
|
* @since Sitevision 4.0
|
|
970
989
|
*/
|
|
971
990
|
getEnabledString(
|
|
972
991
|
aNode: Node,
|
|
973
|
-
aEnablingPropertyName: string,
|
|
974
|
-
aStringPropertyName: string
|
|
992
|
+
aEnablingPropertyName: String | string,
|
|
993
|
+
aStringPropertyName: String | string
|
|
975
994
|
): string;
|
|
976
995
|
|
|
977
996
|
/**
|
|
978
997
|
* Gets a String property from a Node if an enabling boolean property allows it, with a fallback value.
|
|
979
998
|
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
*
|
|
987
|
-
*
|
|
988
|
-
*
|
|
999
|
+
* <p>
|
|
1000
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
1001
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aStringPropertyName</code>).
|
|
1002
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1003
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1004
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1005
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1006
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1007
|
+
* </p>
|
|
989
1008
|
* @param aNode the <code>Node</code> that has the properties
|
|
990
1009
|
* @param aEnablingPropertyName the name of the boolean property that enables the String denoted by <code>aStringPropertyName</code>
|
|
991
1010
|
* @param aStringPropertyName the name of the String property
|
|
992
1011
|
* @param aDefaultValue fallback value to return if no value exist
|
|
993
|
-
* @return the value for aStringPropertyName as <code>String</code>. If no property exists, <code>aDefaultValue</code> is returned
|
|
1012
|
+
* @return the value for aStringPropertyName as <code>String</code>. If no property exists, <code>aDefaultValue</code> is returned.
 <code>aDefaultValue</code> will always be returned if <code>aEnablingPropertyName</code> doesn't exist, isn't compatible with a
 <code>boolean</code> or isn't <code>true</code>.
|
|
994
1013
|
* @see #getEnabledString(javax.jcr.Node, String, String)
|
|
995
1014
|
* @since Sitevision 4.0
|
|
996
1015
|
*/
|
|
997
1016
|
getEnabledString(
|
|
998
1017
|
aNode: Node,
|
|
999
|
-
aEnablingPropertyName: string,
|
|
1000
|
-
aStringPropertyName: string,
|
|
1001
|
-
aDefaultValue: string
|
|
1018
|
+
aEnablingPropertyName: String | string,
|
|
1019
|
+
aStringPropertyName: String | string,
|
|
1020
|
+
aDefaultValue: String | string
|
|
1002
1021
|
): string;
|
|
1003
1022
|
|
|
1004
1023
|
/**
|
|
1005
1024
|
* Gets a String property from a Node if an enabling boolean property allows it, and returns it XML escaped.
|
|
1006
1025
|
*
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1021
|
-
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1024
|
-
*
|
|
1025
|
-
*
|
|
1026
|
-
*
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1026
|
+
* <p>
|
|
1027
|
+
* In some Sitevision portlet configs there are a "boolean" property that enables a "String" property and the "String"
|
|
1028
|
+
* might be <code>null</code>. This is a convenience method for such cases where you want the value XML escaped. In Velocity, code like this:
|
|
1029
|
+
* </p>
|
|
1030
|
+
* <pre><code>
|
|
1031
|
+
* #set ($endecUtil = ...)
|
|
1032
|
+
* #set ($escapedName = ...) <em>## Set default escaped name...</em>
|
|
1033
|
+
* #if ($propertyUtil.getBoolean($portlet, 'useCustomName'))
|
|
1034
|
+
* #set ($customName = $scriptUtil.getNonNull(${propertyUtil.getNode($portlet, 'customName')}))
|
|
1035
|
+
* #if ($customName)
|
|
1036
|
+
* #set ($escapedName = $endecUtil.escapeXML($customName))
|
|
1037
|
+
* #end
|
|
1038
|
+
* #end
|
|
1039
|
+
* </code></pre>
|
|
1040
|
+
* would typically be replaced with this:
|
|
1041
|
+
* <pre><code>
|
|
1042
|
+
* #set ($escapedName = $scriptUtil.getNonNull(${propertyUtil.getEnabledStringEscaped($portlet, 'useCustomName', 'customName')}))
|
|
1043
|
+
* #if (!$escapedName)
|
|
1044
|
+
* #set ($escapedName = ...) <em>## Set default escaped name if no custom name was set...</em>
|
|
1045
|
+
* #end
|
|
1046
|
+
* </code></pre>
|
|
1047
|
+
*
|
|
1048
|
+
* <p>
|
|
1049
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
1050
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aStringPropertyName</code>).
|
|
1051
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1052
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1053
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1054
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1055
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1056
|
+
* </p>
|
|
1038
1057
|
* @param aNode the <code>Node</code> that has the properties
|
|
1039
1058
|
* @param aEnablingPropertyName the name of the boolean property that enables the String denoted by <code>aStringPropertyName</code>
|
|
1040
1059
|
* @param aStringPropertyName the name of the String property
|
|
1041
|
-
* @return the value for aStringPropertyName as a XML escaped <code>String</code>. If no property exists, <code>null</code> is returned
|
|
1060
|
+
* @return the value for aStringPropertyName as a XML escaped <code>String</code>. If no property exists, <code>null</code> is returned.
 Null will always be returned if <code>aEnablingPropertyName</code> doesn't exist, isn't compatible with a <code>boolean</code>
 or isn't <code>true</code>.
|
|
1042
1061
|
* @see #getEnabledStringEscaped(javax.jcr.Node, String, String, String)
|
|
1043
1062
|
* @since Sitevision 4.0
|
|
1044
1063
|
*/
|
|
1045
1064
|
getEnabledStringEscaped(
|
|
1046
1065
|
aNode: Node,
|
|
1047
|
-
aEnablingPropertyName: string,
|
|
1048
|
-
aStringPropertyName: string
|
|
1066
|
+
aEnablingPropertyName: String | string,
|
|
1067
|
+
aStringPropertyName: String | string
|
|
1049
1068
|
): string;
|
|
1050
1069
|
|
|
1051
1070
|
/**
|
|
1052
1071
|
* Gets a String property from a Node if an enabling boolean property allows it, and returns it XML escaped with a fallback value.
|
|
1053
1072
|
*
|
|
1054
|
-
*
|
|
1055
|
-
*
|
|
1056
|
-
*
|
|
1057
|
-
*
|
|
1058
|
-
*
|
|
1059
|
-
*
|
|
1060
|
-
*
|
|
1061
|
-
*
|
|
1062
|
-
*
|
|
1073
|
+
* <p>
|
|
1074
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names
|
|
1075
|
+
* (i.e. <code>aEnablingPropertyName</code> and <code>aStringPropertyName</code>).
|
|
1076
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1077
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1078
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1079
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1080
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1081
|
+
* </p>
|
|
1063
1082
|
* @param aNode the <code>Node</code> that has the properties
|
|
1064
1083
|
* @param aEnablingPropertyName the name of the boolean property that enables the String denoted by <code>aStringPropertyName</code>
|
|
1065
1084
|
* @param aStringPropertyName the name of the String property
|
|
1066
1085
|
* @param aDefaultValue the (non XML escaped) fallback value to return if no value exist
|
|
1067
|
-
* @return the value for aStringPropertyName as a XML escaped <code>String</code>. If no property exists, <code>aDefaultValue</code> is XML escaped and returned
|
|
1086
|
+
* @return the value for aStringPropertyName as a XML escaped <code>String</code>. If no property exists, <code>aDefaultValue</code> is
 XML escaped and returned.
 <code>aDefaultValue</code> will always be XML escaped and returned if <code>aEnablingPropertyName</code> doesn't exist,
 isn't compatible with a <code>boolean</code> or isn't <code>true</code>.
|
|
1068
1087
|
* @see #getEnabledStringEscaped(javax.jcr.Node, String, String)
|
|
1069
1088
|
* @since Sitevision 4.0
|
|
1070
1089
|
*/
|
|
1071
1090
|
getEnabledStringEscaped(
|
|
1072
1091
|
aNode: Node,
|
|
1073
|
-
aEnablingPropertyName: string,
|
|
1074
|
-
aStringPropertyName: string,
|
|
1075
|
-
aDefaultValue: string
|
|
1092
|
+
aEnablingPropertyName: String | string,
|
|
1093
|
+
aStringPropertyName: String | string,
|
|
1094
|
+
aDefaultValue: String | string
|
|
1076
1095
|
): string;
|
|
1077
1096
|
|
|
1078
1097
|
/**
|
|
1079
1098
|
* Gets a Calendar property from a Node.
|
|
1080
1099
|
*
|
|
1081
|
-
*
|
|
1082
|
-
*
|
|
1083
|
-
*
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
1100
|
+
* <p>
|
|
1101
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1102
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1103
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1104
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1105
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1106
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1107
|
+
* </p>
|
|
1089
1108
|
* @param aNode the <code>Node</code> that has a property
|
|
1090
1109
|
* @param aPropertyName the name of the property
|
|
1091
|
-
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code
|
|
1110
|
+
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code>,
 <code>null</code> is returned.
|
|
1092
1111
|
* @since Sitevision 2.6.1_02
|
|
1093
1112
|
*/
|
|
1094
|
-
getCalendar(aNode: Node, aPropertyName: string):
|
|
1113
|
+
getCalendar(aNode: Node, aPropertyName: String | string): Calendar;
|
|
1095
1114
|
|
|
1096
1115
|
/**
|
|
1097
1116
|
* Gets a Calendar property from a Node with a fallback value if the property doesn't exist or is incompatible with the Calendar type.
|
|
1098
1117
|
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1103
|
-
*
|
|
1104
|
-
*
|
|
1105
|
-
*
|
|
1106
|
-
*
|
|
1118
|
+
* <p>
|
|
1119
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1120
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1121
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1122
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1123
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1124
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1125
|
+
* </p>
|
|
1107
1126
|
* @param aNode the <code>Node</code> that has a property
|
|
1108
1127
|
* @param aPropertyName the name of the property
|
|
1109
1128
|
* @param aDefaultValue fallback value if no value exists
|
|
1110
|
-
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't compatible with a <code>Calendar</code
|
|
1129
|
+
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't compatible with a <code>Calendar</code>,
 aDefaultValue is returned.
|
|
1111
1130
|
* @since Sitevision 2.6.1_02
|
|
1112
1131
|
*/
|
|
1113
1132
|
getCalendar(
|
|
1114
1133
|
aNode: Node,
|
|
1115
|
-
aPropertyName: string,
|
|
1116
|
-
aDefaultValue:
|
|
1117
|
-
):
|
|
1134
|
+
aPropertyName: String | string,
|
|
1135
|
+
aDefaultValue: Calendar
|
|
1136
|
+
): Calendar;
|
|
1118
1137
|
|
|
1119
1138
|
/**
|
|
1120
1139
|
* Gets a Calendar property from a "nested" Node's property.
|
|
1121
|
-
*
|
|
1122
|
-
*
|
|
1123
|
-
*
|
|
1124
|
-
*
|
|
1125
|
-
*
|
|
1126
|
-
*
|
|
1127
|
-
*
|
|
1128
|
-
*
|
|
1129
|
-
*
|
|
1130
|
-
*
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1140
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1141
|
+
* has a <code>Calendar/Date</code> property).
|
|
1142
|
+
* <p>
|
|
1143
|
+
* Note! The name of this method might seem awkward since a <code>Calendar</code> is returned, but this is to resemble the pattern of a
|
|
1144
|
+
* <code>javax.jcr.Node</code> that has the method <code>getDate()</code> that returns a <code>Calendar</code>.
|
|
1145
|
+
* </p>
|
|
1146
|
+
*
|
|
1147
|
+
* <p>
|
|
1148
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1149
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1150
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1151
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1152
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1153
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1154
|
+
* </p>
|
|
1136
1155
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1137
1156
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on <code>aNode</code>
|
|
1138
1157
|
* @param aPropertyName the name of the Calendar property for the "inner/nested" <code>Node</code>
|
|
1139
|
-
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code
|
|
1158
|
+
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code>,
 <code>null</code> is returned.
|
|
1140
1159
|
* @since Sitevision 2.6.1_02
|
|
1141
1160
|
*/
|
|
1142
1161
|
getNestedCalendar(
|
|
1143
1162
|
aNode: Node,
|
|
1144
|
-
aNodePropertyName: string,
|
|
1145
|
-
aPropertyName: string
|
|
1146
|
-
):
|
|
1163
|
+
aNodePropertyName: String | string,
|
|
1164
|
+
aPropertyName: String | string
|
|
1165
|
+
): Calendar;
|
|
1147
1166
|
|
|
1148
1167
|
/**
|
|
1149
1168
|
* Gets a Calendar property from a "nested" Node's property with a fallback value if the property doesn't exist.
|
|
1150
|
-
*
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
*
|
|
1154
|
-
*
|
|
1155
|
-
*
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1158
|
-
*
|
|
1159
|
-
*
|
|
1160
|
-
*
|
|
1169
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1170
|
+
* has a <code>Calendar/Date</code> property).
|
|
1171
|
+
*
|
|
1172
|
+
* <p>
|
|
1173
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1174
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1175
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1176
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1177
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1178
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1179
|
+
* </p>
|
|
1161
1180
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1162
1181
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on <code>aNode</code>
|
|
1163
1182
|
* @param aPropertyName the name of the Calendar property for the "inner/nested" <code>Node</code>
|
|
1164
1183
|
* @param aDefaultValue fallback value if no value exists
|
|
1165
|
-
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code
|
|
1184
|
+
* @return the value for aPropertyName as <code>Calendar</code>. If no property exists or it isn't a <code>Calendar</code>,
 aDefaultValue is returned.
|
|
1166
1185
|
* @since Sitevision 2.6.1_02
|
|
1167
1186
|
*/
|
|
1168
1187
|
getNestedCalendar(
|
|
1169
1188
|
aNode: Node,
|
|
1170
|
-
aNodePropertyName: string,
|
|
1171
|
-
aPropertyName: string,
|
|
1172
|
-
aDefaultValue:
|
|
1173
|
-
):
|
|
1189
|
+
aNodePropertyName: String | string,
|
|
1190
|
+
aPropertyName: String | string,
|
|
1191
|
+
aDefaultValue: Calendar
|
|
1192
|
+
): Calendar;
|
|
1174
1193
|
|
|
1175
1194
|
/**
|
|
1176
1195
|
* Gets a Node property from a Node with a fallback value if the property doesn't exist.
|
|
1177
1196
|
*
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
*
|
|
1184
|
-
*
|
|
1185
|
-
*
|
|
1197
|
+
* <p>
|
|
1198
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1199
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1200
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1201
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1202
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1203
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1204
|
+
* </p>
|
|
1186
1205
|
* @param aNode the <code>Node</code> that has a property
|
|
1187
1206
|
* @param aPropertyName the name of the property
|
|
1188
1207
|
* @param aDefaultValue fallback value if no value exists
|
|
1189
1208
|
* @return the value for aPropertyName as <code>Node</code>. If no property exists or it isn't a <code>Node</code>, aDefaultValue is returned.
|
|
1190
1209
|
*/
|
|
1191
|
-
getNode(
|
|
1210
|
+
getNode(
|
|
1211
|
+
aNode: Node,
|
|
1212
|
+
aPropertyName: String | string,
|
|
1213
|
+
aDefaultValue: Node
|
|
1214
|
+
): Node;
|
|
1192
1215
|
|
|
1193
1216
|
/**
|
|
1194
1217
|
* Gets a <code>List</code> of property values from a Node.
|
|
1195
1218
|
*
|
|
1196
|
-
*
|
|
1197
|
-
*
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1219
|
+
* <p>
|
|
1220
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1221
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1222
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1223
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1224
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1225
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1226
|
+
* </p>
|
|
1204
1227
|
* @param aNode the <code>Node</code> that has a property
|
|
1205
1228
|
* @param aPropertyName the name of the property
|
|
1206
1229
|
* @return the string value(s) for aPropertyName as a <code>List</code>. If no property exists, <code>null</code> is returned.
|
|
1207
1230
|
* @see #getStringsEscaped(javax.jcr.Node, String)
|
|
1208
1231
|
* @since Sitevision 2.6_06
|
|
1209
1232
|
*/
|
|
1210
|
-
getStrings(aNode: Node, aPropertyName: string):
|
|
1233
|
+
getStrings(aNode: Node, aPropertyName: String | string): List;
|
|
1211
1234
|
|
|
1212
1235
|
/**
|
|
1213
1236
|
* Gets a <code>List</code> of XML escaped property values from a Node.
|
|
1214
1237
|
*
|
|
1215
|
-
*
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1218
|
-
*
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
1221
|
-
*
|
|
1222
|
-
*
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
*
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
*
|
|
1235
|
-
*
|
|
1236
|
-
*
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1239
|
-
*
|
|
1240
|
-
*
|
|
1241
|
-
*
|
|
1242
|
-
*
|
|
1243
|
-
*
|
|
1244
|
-
*
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
1247
|
-
*
|
|
1248
|
-
*
|
|
1249
|
-
*
|
|
1250
|
-
*
|
|
1251
|
-
*
|
|
1252
|
-
*
|
|
1253
|
-
*
|
|
1254
|
-
*
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1238
|
+
* <p>
|
|
1239
|
+
* This is a convenience method for getting a list of property values that also should be XML escaped. Strings that should be included
|
|
1240
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
1241
|
+
* </p>
|
|
1242
|
+
* <p>
|
|
1243
|
+
* This Velocity code:
|
|
1244
|
+
* </p>
|
|
1245
|
+
* <pre><code>
|
|
1246
|
+
* #set ($endecUtil = ...)
|
|
1247
|
+
* #set ($propertyUtil = ...)
|
|
1248
|
+
* ...
|
|
1249
|
+
* #set ($valueList = $propertyUtil.getStrings($myNode, 'aProperty'))
|
|
1250
|
+
* <ul>
|
|
1251
|
+
* #foreach ($value in $valueList)
|
|
1252
|
+
* <li>
|
|
1253
|
+
* $endecUtil.escapeXML($value)
|
|
1254
|
+
* </li>
|
|
1255
|
+
* #end
|
|
1256
|
+
* </ul>
|
|
1257
|
+
* </code></pre>
|
|
1258
|
+
* would typically be replaced with this:
|
|
1259
|
+
* <pre><code>
|
|
1260
|
+
* #set ($propertyUtil = ...)
|
|
1261
|
+
* ...
|
|
1262
|
+
* #set ($escapedValueList = $propertyUtil.getStringsEscaped($myNode, 'aProperty'))
|
|
1263
|
+
* <ul>
|
|
1264
|
+
* #foreach ($escapedValue in $escapedValueList)
|
|
1265
|
+
* <li>
|
|
1266
|
+
* $escapedValue
|
|
1267
|
+
* </li>
|
|
1268
|
+
* #end
|
|
1269
|
+
* </ul>
|
|
1270
|
+
* </code></pre>
|
|
1271
|
+
*
|
|
1272
|
+
* <p>
|
|
1273
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1274
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1275
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1276
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1277
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1278
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1279
|
+
* </p>
|
|
1257
1280
|
* @param aNode the <code>Node</code> that has a property
|
|
1258
1281
|
* @param aPropertyName the name of the property
|
|
1259
|
-
* @return the string value(s) for aPropertyName, XML escaped and embedded in a <code>List</code
|
|
1282
|
+
* @return the string value(s) for aPropertyName, XML escaped and embedded in a <code>List</code>.
 If no property exists, <code>null</code> is returned.
|
|
1260
1283
|
* @see #getString(javax.jcr.Node, String)
|
|
1261
1284
|
* @see senselogic.sitevision.api.text.EndecUtil#escapeXML(String)
|
|
1262
1285
|
* @since Sitevision 3.5
|
|
1263
1286
|
*/
|
|
1264
|
-
getStringsEscaped(aNode: Node, aPropertyName: string):
|
|
1287
|
+
getStringsEscaped(aNode: Node, aPropertyName: String | string): List;
|
|
1265
1288
|
|
|
1266
1289
|
/**
|
|
1267
1290
|
* Gets a <code>List</code> of property values from a Node with a fallback value if the property doesn't exist.
|
|
1268
1291
|
*
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
-
*
|
|
1274
|
-
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1292
|
+
* <p>
|
|
1293
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1294
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1295
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1296
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1297
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1298
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1299
|
+
* </p>
|
|
1277
1300
|
* @param aNode the <code>Node</code> that has a property
|
|
1278
1301
|
* @param aPropertyName the name of the property
|
|
1279
1302
|
* @return the string value(s) for aPropertyName as a <code>List</code>. If no property exists, <code>aDefaultValue</code> is returned.
|
|
@@ -1283,84 +1306,84 @@ export interface PropertyUtil {
|
|
|
1283
1306
|
*/
|
|
1284
1307
|
getStrings(
|
|
1285
1308
|
aNode: Node,
|
|
1286
|
-
aPropertyName: string,
|
|
1287
|
-
aDefaultValue: unknown
|
|
1288
|
-
):
|
|
1309
|
+
aPropertyName: String | string,
|
|
1310
|
+
aDefaultValue: List | unknown[]
|
|
1311
|
+
): List;
|
|
1289
1312
|
|
|
1290
1313
|
/**
|
|
1291
1314
|
* Gets a <code>List</code> of XML escaped property values from a Node with a fallback value if the property doesn't exist.
|
|
1292
1315
|
*
|
|
1293
|
-
*
|
|
1294
|
-
*
|
|
1295
|
-
*
|
|
1296
|
-
*
|
|
1297
|
-
*
|
|
1298
|
-
*
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1304
|
-
*
|
|
1305
|
-
*
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
1308
|
-
*
|
|
1309
|
-
*
|
|
1310
|
-
*
|
|
1311
|
-
*
|
|
1312
|
-
*
|
|
1313
|
-
*
|
|
1314
|
-
*
|
|
1315
|
-
*
|
|
1316
|
-
*
|
|
1317
|
-
*
|
|
1318
|
-
*
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1321
|
-
*
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
*
|
|
1325
|
-
*
|
|
1326
|
-
*
|
|
1327
|
-
*
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1330
|
-
*
|
|
1331
|
-
*
|
|
1332
|
-
*
|
|
1333
|
-
*
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1336
|
-
*
|
|
1316
|
+
* <p>
|
|
1317
|
+
* This is a convenience method for getting a list of property values that also should be XML escaped. Strings that should be included
|
|
1318
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
1319
|
+
* </p>
|
|
1320
|
+
* <p>
|
|
1321
|
+
* This Velocity code:
|
|
1322
|
+
* </p>
|
|
1323
|
+
* <pre><code>
|
|
1324
|
+
* #set ($endecUtil = ...)
|
|
1325
|
+
* #set ($propertyUtil = ...)
|
|
1326
|
+
* #set ($myDefaultList = ...)
|
|
1327
|
+
* ...
|
|
1328
|
+
* #set ($valueList = $propertyUtil.getStrings($myNode, 'aProperty', $myDefaultList))
|
|
1329
|
+
* <ul>
|
|
1330
|
+
* #foreach ($value in $valueList)
|
|
1331
|
+
* <li>
|
|
1332
|
+
* $endecUtil.escapeXML($value)
|
|
1333
|
+
* </li>
|
|
1334
|
+
* #end
|
|
1335
|
+
* </ul>
|
|
1336
|
+
* </code></pre>
|
|
1337
|
+
* would typically be replaced with this:
|
|
1338
|
+
* <pre><code>
|
|
1339
|
+
* #set ($propertyUtil = ...)
|
|
1340
|
+
* #set ($myDefaultList = ...)
|
|
1341
|
+
* ...
|
|
1342
|
+
* #set ($escapedValueList = $propertyUtil.getStringsEscaped($myNode, 'aProperty', $myDefaultList))
|
|
1343
|
+
* <ul>
|
|
1344
|
+
* #foreach ($escapedValue in $escapedValueList)
|
|
1345
|
+
* <li>
|
|
1346
|
+
* $escapedValue
|
|
1347
|
+
* </li>
|
|
1348
|
+
* #end
|
|
1349
|
+
* </ul>
|
|
1350
|
+
* </code></pre>
|
|
1351
|
+
*
|
|
1352
|
+
* <p>
|
|
1353
|
+
* <strong>Note!</strong> This method does <em>not</em> escape the property name (i.e. <code>aPropertyName</code>).
|
|
1354
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1355
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1356
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1357
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1358
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1359
|
+
* </p>
|
|
1337
1360
|
* @param aNode the <code>Node</code> that has a property
|
|
1338
1361
|
* @param aPropertyName the name of the property
|
|
1339
|
-
* @return the string value(s) for aPropertyName, XML escaped and embedded in a <code>List</code
|
|
1340
|
-
* @param aDefaultValue fallback list if no value exists. <strong>Note!</strong> The actual fallback list is <em>never</em> returned but it's values might be used. If the fallback list are about to be returned, a copy of it will be created and all values from the fallback list will be XML escaped and added to the new list before it is returned.
|
|
1362
|
+
* @return the string value(s) for aPropertyName, XML escaped and embedded in a <code>List</code>.
 If no property exists, <code>aDefaultValue</code> is returned.
|
|
1363
|
+
* @param aDefaultValue fallback list if no value exists. <strong>Note!</strong> The actual fallback list is <em>never</em> returned
 but it's values might be used. If the fallback list are about to be returned, a copy of it will be created and
 all values from the fallback list will be XML escaped and added to the new list before it is returned.
|
|
1341
1364
|
* @see #getString(javax.jcr.Node, String, String)
|
|
1342
1365
|
* @see senselogic.sitevision.api.text.EndecUtil#escapeXML(String)
|
|
1343
1366
|
* @since Sitevision 3.5
|
|
1344
1367
|
*/
|
|
1345
1368
|
getStringsEscaped(
|
|
1346
1369
|
aNode: Node,
|
|
1347
|
-
aPropertyName: string,
|
|
1348
|
-
aDefaultValue: unknown
|
|
1349
|
-
):
|
|
1370
|
+
aPropertyName: String | string,
|
|
1371
|
+
aDefaultValue: List | unknown[]
|
|
1372
|
+
): List;
|
|
1350
1373
|
|
|
1351
1374
|
/**
|
|
1352
1375
|
* Gets a <code>List</code> of property values from a "nested" Node's property.
|
|
1353
|
-
*
|
|
1354
|
-
*
|
|
1355
|
-
*
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
*
|
|
1359
|
-
*
|
|
1360
|
-
*
|
|
1361
|
-
*
|
|
1362
|
-
*
|
|
1363
|
-
*
|
|
1376
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1377
|
+
* has a <code>String</code> property).
|
|
1378
|
+
*
|
|
1379
|
+
* <p>
|
|
1380
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1381
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1382
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1383
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1384
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1385
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1386
|
+
* </p>
|
|
1364
1387
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1365
1388
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
1366
1389
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -1369,57 +1392,57 @@ export interface PropertyUtil {
|
|
|
1369
1392
|
*/
|
|
1370
1393
|
getNestedStrings(
|
|
1371
1394
|
aNode: Node,
|
|
1372
|
-
aNodePropertyName: string,
|
|
1373
|
-
aPropertyName: string
|
|
1374
|
-
):
|
|
1395
|
+
aNodePropertyName: String | string,
|
|
1396
|
+
aPropertyName: String | string
|
|
1397
|
+
): List;
|
|
1375
1398
|
|
|
1376
1399
|
/**
|
|
1377
1400
|
* Gets a <code>List</code> of XML escaped property values from a "nested" Node's property.
|
|
1378
|
-
*
|
|
1379
|
-
*
|
|
1380
|
-
*
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1383
|
-
*
|
|
1384
|
-
*
|
|
1385
|
-
*
|
|
1386
|
-
*
|
|
1387
|
-
*
|
|
1388
|
-
*
|
|
1389
|
-
*
|
|
1390
|
-
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
*
|
|
1394
|
-
*
|
|
1395
|
-
*
|
|
1396
|
-
*
|
|
1397
|
-
*
|
|
1398
|
-
*
|
|
1399
|
-
*
|
|
1400
|
-
*
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1403
|
-
*
|
|
1404
|
-
*
|
|
1405
|
-
*
|
|
1406
|
-
*
|
|
1407
|
-
*
|
|
1408
|
-
*
|
|
1409
|
-
*
|
|
1410
|
-
*
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1413
|
-
*
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1419
|
-
*
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1401
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1402
|
+
* has a <code>String</code> property).
|
|
1403
|
+
*
|
|
1404
|
+
* <p>
|
|
1405
|
+
* This is a convenience method for getting a list of property values that also should be XML escaped. Strings that should be included
|
|
1406
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
1407
|
+
* </p>
|
|
1408
|
+
* <p>
|
|
1409
|
+
* This Velocity code:
|
|
1410
|
+
* </p>
|
|
1411
|
+
* <pre><code>
|
|
1412
|
+
* #set ($endecUtil = ...)
|
|
1413
|
+
* #set ($propertyUtil = ...)
|
|
1414
|
+
* ...
|
|
1415
|
+
* #set ($valueList = $propertyUtil.getNestedStrings($myNode, 'aNodeProperty', 'aProperty'))
|
|
1416
|
+
* <ul>
|
|
1417
|
+
* #foreach ($value in $valueList)
|
|
1418
|
+
* <li>
|
|
1419
|
+
* $endecUtil.escapeXML($value)
|
|
1420
|
+
* </li>
|
|
1421
|
+
* #end
|
|
1422
|
+
* </ul>
|
|
1423
|
+
* </code></pre>
|
|
1424
|
+
* would typically be replaced with this:
|
|
1425
|
+
* <pre><code>
|
|
1426
|
+
* #set ($propertyUtil = ...)
|
|
1427
|
+
* ...
|
|
1428
|
+
* #set ($escapedValueList = $propertyUtil.getNestedStringsEscaped($myNode, 'aNodeProperty', 'aProperty'))
|
|
1429
|
+
* <ul>
|
|
1430
|
+
* #foreach ($escapedValue in $escapedValueList)
|
|
1431
|
+
* <li>
|
|
1432
|
+
* $escapedValue
|
|
1433
|
+
* </li>
|
|
1434
|
+
* #end
|
|
1435
|
+
* </ul>
|
|
1436
|
+
* </code></pre>
|
|
1437
|
+
*
|
|
1438
|
+
* <p>
|
|
1439
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1440
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1441
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1442
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1443
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1444
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1445
|
+
* </p>
|
|
1423
1446
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1424
1447
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
1425
1448
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -1430,23 +1453,23 @@ export interface PropertyUtil {
|
|
|
1430
1453
|
*/
|
|
1431
1454
|
getNestedStringsEscaped(
|
|
1432
1455
|
aNode: Node,
|
|
1433
|
-
aNodePropertyName: string,
|
|
1434
|
-
aPropertyName: string
|
|
1435
|
-
):
|
|
1456
|
+
aNodePropertyName: String | string,
|
|
1457
|
+
aPropertyName: String | string
|
|
1458
|
+
): List;
|
|
1436
1459
|
|
|
1437
1460
|
/**
|
|
1438
1461
|
* Gets a <code>List</code> of property values from a "nested" Node's property with a fallback value if the property doesn't exist.
|
|
1439
|
-
*
|
|
1440
|
-
*
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1445
|
-
*
|
|
1446
|
-
*
|
|
1447
|
-
*
|
|
1448
|
-
*
|
|
1449
|
-
*
|
|
1462
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1463
|
+
* has a <code>String</code> property).
|
|
1464
|
+
*
|
|
1465
|
+
* <p>
|
|
1466
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1467
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1468
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1469
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1470
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1471
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1472
|
+
* </p>
|
|
1450
1473
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1451
1474
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
1452
1475
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
@@ -1456,76 +1479,76 @@ export interface PropertyUtil {
|
|
|
1456
1479
|
*/
|
|
1457
1480
|
getNestedStrings(
|
|
1458
1481
|
aNode: Node,
|
|
1459
|
-
aNodePropertyName: string,
|
|
1460
|
-
aPropertyName: string,
|
|
1461
|
-
aDefaultValue: unknown
|
|
1462
|
-
):
|
|
1482
|
+
aNodePropertyName: String | string,
|
|
1483
|
+
aPropertyName: String | string,
|
|
1484
|
+
aDefaultValue: List | unknown[]
|
|
1485
|
+
): List;
|
|
1463
1486
|
|
|
1464
1487
|
/**
|
|
1465
1488
|
* Gets a <code>List</code> of property values from a "nested" Node's property with a fallback value if the property doesn't exist,
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1468
|
-
*
|
|
1469
|
-
*
|
|
1470
|
-
*
|
|
1471
|
-
*
|
|
1472
|
-
*
|
|
1473
|
-
*
|
|
1474
|
-
*
|
|
1475
|
-
*
|
|
1476
|
-
*
|
|
1477
|
-
*
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1480
|
-
*
|
|
1481
|
-
*
|
|
1482
|
-
*
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
1485
|
-
*
|
|
1486
|
-
*
|
|
1487
|
-
*
|
|
1488
|
-
*
|
|
1489
|
-
*
|
|
1490
|
-
*
|
|
1491
|
-
*
|
|
1492
|
-
*
|
|
1493
|
-
*
|
|
1494
|
-
*
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
*
|
|
1498
|
-
*
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
*
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1505
|
-
*
|
|
1506
|
-
*
|
|
1507
|
-
*
|
|
1508
|
-
*
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1512
|
-
*
|
|
1513
|
-
*
|
|
1489
|
+
* and returns it XML escaped.
|
|
1490
|
+
* (i.e. the base <code>Node</code> has a property that is a <code>Node</code>, and that "inner/nested" <code>Node</code>
|
|
1491
|
+
* has a <code>String</code> property).
|
|
1492
|
+
*
|
|
1493
|
+
* <p>
|
|
1494
|
+
* This is a convenience method for getting a list of property values that also should be XML escaped. Strings that should be included
|
|
1495
|
+
* in the html output should typically always be XML escaped to be valid XHTML and avoid XSS problems.
|
|
1496
|
+
* </p>
|
|
1497
|
+
* <p>
|
|
1498
|
+
* This Velocity code:
|
|
1499
|
+
* </p>
|
|
1500
|
+
* <pre><code>
|
|
1501
|
+
* #set ($endecUtil = ...)
|
|
1502
|
+
* #set ($propertyUtil = ...)
|
|
1503
|
+
* #set ($myDefaultList = ...)
|
|
1504
|
+
* ...
|
|
1505
|
+
* #set ($valueList = $propertyUtil.getNestedStrings($myNode, 'aNodeProperty', 'aProperty', $myDefaultList))
|
|
1506
|
+
* <ul>
|
|
1507
|
+
* #foreach ($value in $valueList)
|
|
1508
|
+
* <li>
|
|
1509
|
+
* $endecUtil.escapeXML($value)
|
|
1510
|
+
* </li>
|
|
1511
|
+
* #end
|
|
1512
|
+
* </ul>
|
|
1513
|
+
* </code></pre>
|
|
1514
|
+
* would typically be replaced with this:
|
|
1515
|
+
* <pre><code>
|
|
1516
|
+
* #set ($propertyUtil = ...)
|
|
1517
|
+
* #set ($myDefaultList = ...)
|
|
1518
|
+
* ...
|
|
1519
|
+
* #set ($escapedValueList = $propertyUtil.getNestedStringsEscaped($myNode, 'aNodeProperty', 'aProperty', $myDefaultList))
|
|
1520
|
+
* <ul>
|
|
1521
|
+
* #foreach ($escapedValue in $escapedValueList)
|
|
1522
|
+
* <li>
|
|
1523
|
+
* $escapedValue
|
|
1524
|
+
* </li>
|
|
1525
|
+
* #end
|
|
1526
|
+
* </ul>
|
|
1527
|
+
* </code></pre>
|
|
1528
|
+
*
|
|
1529
|
+
* <p>
|
|
1530
|
+
* <strong>Note!</strong> This method does <em>not</em> escape names (i.e. <code>aNodePropertyName</code> and <code>aPropertyName</code>).
|
|
1531
|
+
* Illegal characters in node names and property names must always be escaped, typically via
|
|
1532
|
+
* {@link senselogic.sitevision.api.text.EndecUtil#escapeJcrName(String)}.
|
|
1533
|
+
* For best performance - never escape a name if you are certain that it doesn't contain any illegal characters.
|
|
1534
|
+
* Sitevision model properties never contain illegal characters. Though, depending on configuration "dynamic" ones
|
|
1535
|
+
* (e.g. metadata properties) might contain illegal characters.
|
|
1536
|
+
* </p>
|
|
1514
1537
|
* @param aNode the base <code>Node</code> that has a property that is a <code>Node</code>
|
|
1515
1538
|
* @param aNodePropertyName the name of the "inner/nested" <code>Node</code> that is a property on aNode
|
|
1516
1539
|
* @param aPropertyName the name of the property for the "inner/nested" <code>Node</code>
|
|
1517
|
-
* @param aDefaultValue fallback list if no value exists. <strong>Note!</strong> The actual fallback list is <em>never</em> returned
|
|
1518
|
-
* @return the string value(s) for aPropertyName as a <code>List</code>. If no property exists, <code>aDefaultValue</code
|
|
1540
|
+
* @param aDefaultValue fallback list if no value exists. <strong>Note!</strong> The actual fallback list is <em>never</em> returned,
 but it's values might be used.
 If the fallback list are about to be returned, a copy of it will be created and all values from the fallback list will
 be XML escaped and added to the new list before it is returned.
|
|
1541
|
+
* @return the string value(s) for aPropertyName as a <code>List</code>. If no property exists, <code>aDefaultValue</code>
 is XML escaped and returned.
|
|
1519
1542
|
* @see #getNestedStrings(javax.jcr.Node, String, String, java.util.List)
|
|
1520
1543
|
* @see senselogic.sitevision.api.text.EndecUtil#escapeXML(String)
|
|
1521
1544
|
* @since Sitevision 3.5
|
|
1522
1545
|
*/
|
|
1523
1546
|
getNestedStringsEscaped(
|
|
1524
1547
|
aNode: Node,
|
|
1525
|
-
aNodePropertyName: string,
|
|
1526
|
-
aPropertyName: string,
|
|
1527
|
-
aDefaultValue: unknown
|
|
1528
|
-
):
|
|
1548
|
+
aNodePropertyName: String | string,
|
|
1549
|
+
aPropertyName: String | string,
|
|
1550
|
+
aDefaultValue: List | unknown[]
|
|
1551
|
+
): List;
|
|
1529
1552
|
}
|
|
1530
1553
|
|
|
1531
1554
|
declare namespace PropertyUtil {}
|