@sitevision/api 1.0.19 → 1.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/router/index.d.ts +1 -1
- package/hidden/javax/jcr/Binary/index.d.ts +86 -0
- package/hidden/javax/jcr/Credentials/index.d.ts +11 -0
- package/hidden/javax/jcr/ImportUUIDBehavior/index.d.ts +11 -0
- package/hidden/javax/jcr/Item/index.d.ts +353 -0
- package/hidden/javax/jcr/ItemVisitor/index.d.ts +41 -0
- package/hidden/javax/jcr/NamespaceRegistry/index.d.ts +100 -0
- package/hidden/javax/jcr/Node/index.d.ts +2808 -0
- package/hidden/javax/jcr/NodeIterator/index.d.ts +18 -0
- package/hidden/javax/jcr/Property/index.d.ts +801 -0
- package/hidden/javax/jcr/PropertyIterator/index.d.ts +17 -0
- package/hidden/javax/jcr/RangeIterator/index.d.ts +75 -0
- package/hidden/javax/jcr/Repository/index.d.ts +318 -0
- package/hidden/javax/jcr/RepositoryFactory/index.d.ts +90 -0
- package/hidden/javax/jcr/Value/index.d.ts +190 -0
- package/hidden/javax/jcr/ValueFactory/index.d.ts +179 -0
- package/hidden/javax/jcr/Workspace/index.d.ts +1061 -0
- package/hidden/javax/jcr/lock/Lock/index.d.ts +142 -0
- package/hidden/javax/jcr/lock/LockManager/index.d.ts +217 -0
- package/hidden/javax/jcr/nodetype/ItemDefinition/index.d.ts +219 -0
- package/hidden/javax/jcr/nodetype/NodeDefinition/index.d.ts +158 -0
- package/hidden/javax/jcr/nodetype/NodeDefinitionTemplate/index.d.ts +74 -0
- package/hidden/javax/jcr/nodetype/NodeType/index.d.ts +349 -0
- package/hidden/javax/jcr/nodetype/NodeTypeDefinition/index.d.ts +248 -0
- package/hidden/javax/jcr/nodetype/NodeTypeIterator/index.d.ts +16 -0
- package/hidden/javax/jcr/nodetype/NodeTypeManager/index.d.ts +218 -0
- package/hidden/javax/jcr/nodetype/NodeTypeTemplate/index.d.ts +98 -0
- package/hidden/javax/jcr/nodetype/PropertyDefinition/index.d.ts +536 -0
- package/hidden/javax/jcr/nodetype/PropertyDefinitionTemplate/index.d.ts +97 -0
- package/hidden/javax/jcr/observation/Event/index.d.ts +133 -0
- package/hidden/javax/jcr/observation/EventIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/observation/EventJournal/index.d.ts +22 -0
- package/hidden/javax/jcr/observation/EventListener/index.d.ts +23 -0
- package/hidden/javax/jcr/observation/EventListenerIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/observation/ObservationManager/index.d.ts +227 -0
- package/hidden/javax/jcr/query/Query/index.d.ts +201 -0
- package/hidden/javax/jcr/query/QueryManager/index.d.ts +73 -0
- package/hidden/javax/jcr/query/QueryResult/index.d.ts +51 -0
- package/hidden/javax/jcr/query/Row/index.d.ts +159 -0
- package/hidden/javax/jcr/query/RowIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/query/qom/And/index.d.ts +26 -0
- package/hidden/javax/jcr/query/qom/BindVariableValue/index.d.ts +15 -0
- package/hidden/javax/jcr/query/qom/ChildNode/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/ChildNodeJoinCondition/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/Column/index.d.ts +39 -0
- package/hidden/javax/jcr/query/qom/Comparison/index.d.ts +82 -0
- package/hidden/javax/jcr/query/qom/Constraint/index.d.ts +13 -0
- package/hidden/javax/jcr/query/qom/DescendantNode/index.d.ts +31 -0
- package/hidden/javax/jcr/query/qom/DescendantNodeJoinCondition/index.d.ts +29 -0
- package/hidden/javax/jcr/query/qom/DynamicOperand/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/EquiJoinCondition/index.d.ts +41 -0
- package/hidden/javax/jcr/query/qom/FullTextSearch/index.d.ts +89 -0
- package/hidden/javax/jcr/query/qom/FullTextSearchScore/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/Join/index.d.ts +36 -0
- package/hidden/javax/jcr/query/qom/JoinCondition/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/Length/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/Literal/index.d.ts +18 -0
- package/hidden/javax/jcr/query/qom/LowerCase/index.d.ts +26 -0
- package/hidden/javax/jcr/query/qom/NodeLocalName/index.d.ts +16 -0
- package/hidden/javax/jcr/query/qom/NodeName/index.d.ts +16 -0
- package/hidden/javax/jcr/query/qom/Not/index.d.ts +20 -0
- package/hidden/javax/jcr/query/qom/Operand/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/Or/index.d.ts +30 -0
- package/hidden/javax/jcr/query/qom/Ordering/index.d.ts +53 -0
- package/hidden/javax/jcr/query/qom/PropertyExistence/index.d.ts +24 -0
- package/hidden/javax/jcr/query/qom/PropertyValue/index.d.ts +25 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModel/index.d.ts +64 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModelConstants/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/QueryObjectModelFactory/index.d.ts +638 -0
- package/hidden/javax/jcr/query/qom/SameNode/index.d.ts +27 -0
- package/hidden/javax/jcr/query/qom/SameNodeJoinCondition/index.d.ts +36 -0
- package/hidden/javax/jcr/query/qom/Selector/index.d.ts +35 -0
- package/hidden/javax/jcr/query/qom/Source/index.d.ts +9 -0
- package/hidden/javax/jcr/query/qom/StaticOperand/index.d.ts +10 -0
- package/hidden/javax/jcr/query/qom/UpperCase/index.d.ts +26 -0
- package/hidden/javax/jcr/retention/Hold/index.d.ts +34 -0
- package/hidden/javax/jcr/retention/RetentionManager/index.d.ts +189 -0
- package/hidden/javax/jcr/retention/RetentionPolicy/index.d.ts +21 -0
- package/hidden/javax/jcr/security/AccessControlEntry/index.d.ts +24 -0
- package/hidden/javax/jcr/security/AccessControlList/index.d.ts +91 -0
- package/hidden/javax/jcr/security/AccessControlManager/index.d.ts +297 -0
- package/hidden/javax/jcr/security/AccessControlPolicy/index.d.ts +11 -0
- package/hidden/javax/jcr/security/AccessControlPolicyIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/security/NamedAccessControlPolicy/index.d.ts +22 -0
- package/hidden/javax/jcr/security/Privilege/index.d.ts +117 -0
- package/hidden/javax/jcr/version/Version/index.d.ts +121 -0
- package/hidden/javax/jcr/version/VersionHistory/index.d.ts +307 -0
- package/hidden/javax/jcr/version/VersionIterator/index.d.ts +20 -0
- package/hidden/javax/jcr/version/VersionManager/index.d.ts +1082 -0
- package/hidden/senselogic/sitevision/api/base/Builder/index.d.ts +102 -0
- package/hidden/senselogic/sitevision/api/base/Filter/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/base/FilterSplit/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/base/Loadable/index.d.ts +15 -0
- package/hidden/senselogic/sitevision/api/base/Resolver/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/base/Wrapper/index.d.ts +24 -0
- package/hidden/senselogic/sitevision/api/collaboration/CollaborationGroupWrapper/index.d.ts +417 -0
- package/hidden/senselogic/sitevision/api/format/NumericFormatter/index.d.ts +80 -0
- package/hidden/senselogic/sitevision/api/format/NumericFormatterBuilder/index.d.ts +100 -0
- package/hidden/senselogic/sitevision/api/i18n/Currency/index.d.ts +120 -0
- package/hidden/senselogic/sitevision/api/link/CustomLinkProcessor/index.d.ts +45 -0
- package/hidden/senselogic/sitevision/api/link/CustomLinkRenderData/index.d.ts +65 -0
- package/hidden/senselogic/sitevision/api/mail/Mail/index.d.ts +32 -0
- package/hidden/senselogic/sitevision/api/message/MessageTextLinker/index.d.ts +15 -0
- package/hidden/senselogic/sitevision/api/metadata/value/LinkValue/index.d.ts +23 -0
- package/hidden/senselogic/sitevision/api/metadata/value/RelatedValue/index.d.ts +23 -0
- package/hidden/senselogic/sitevision/api/property/VersionedPropertyUtil/index.d.ts +642 -0
- package/hidden/senselogic/sitevision/api/render/BuddyIconRenderer/BuddyIconInfo/index.d.ts +51 -0
- package/hidden/senselogic/sitevision/api/render/ImageScaler/index.d.ts +58 -0
- package/hidden/senselogic/sitevision/api/render/TextModuleRenderer/index.d.ts +301 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ArticleUtilConstants/index.d.ts +85 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/ExceptionSuppressingProxyConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/IndexingUtilConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/LinkPageUtilConstants/index.d.ts +67 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MathInstanceConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/MimeTypeUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/NodeTypeUtilConstants/index.d.ts +1243 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/OutputUtilConstants/index.d.ts +31 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PageUtilConstants/index.d.ts +91 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletContextUtilConstants/index.d.ts +27 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/PortletUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/QueryStringUtilConstants/index.d.ts +19 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchHitConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/SearchResultConstants/index.d.ts +37 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/VersionUtilConstants/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityAccess/index.d.ts +8 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityContext/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/render/velocity/VelocityEvaluator/index.d.ts +89 -0
- package/hidden/senselogic/sitevision/api/script/RequesterChainable/index.d.ts +119 -0
- package/hidden/senselogic/sitevision/api/script/app/RestAppInvoker/index.d.ts +272 -0
- package/hidden/senselogic/sitevision/api/script/factory/TypedArgument/index.d.ts +43 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingCollection/index.d.ts +94 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingIterator/index.d.ts +117 -0
- package/hidden/senselogic/sitevision/api/script/proxy/ExceptionSuppressingProxy/index.d.ts +90 -0
- package/hidden/senselogic/sitevision/api/search/SearchFieldUtil/index.d.ts +89 -0
- package/hidden/senselogic/sitevision/api/search/SearchHighlighter/index.d.ts +45 -0
- package/hidden/senselogic/sitevision/api/search/SearchHit/index.d.ts +1176 -0
- package/hidden/senselogic/sitevision/api/search/SearchResult/index.d.ts +414 -0
- package/hidden/senselogic/sitevision/api/search/facet/SearchFacetField/index.d.ts +27 -0
- package/hidden/senselogic/sitevision/api/search/facet/SearchFacetValue/index.d.ts +61 -0
- package/hidden/senselogic/sitevision/api/search/searcher/Searcher/index.d.ts +277 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Filter/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Highlight/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Monitor/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Parser/index.d.ts +35 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/Sort/index.d.ts +25 -0
- package/hidden/senselogic/sitevision/api/search/searcher/component/SpellCheck/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/search/sort/CustomSort/index.d.ts +82 -0
- package/hidden/senselogic/sitevision/api/search/suggestion/SearchSuggestion/index.d.ts +21 -0
- package/hidden/senselogic/sitevision/api/security/DirectoryAttributes/index.d.ts +70 -0
- package/hidden/senselogic/sitevision/api/security/MessageDigester/index.d.ts +50 -0
- package/hidden/senselogic/sitevision/api/security/RoleAssignment/index.d.ts +72 -0
- package/hidden/senselogic/sitevision/api/security/RoleMatcher/index.d.ts +29 -0
- package/hidden/senselogic/sitevision/api/security/SecretStore/index.d.ts +55 -0
- package/hidden/senselogic/sitevision/api/security/UserUtil/index.d.ts +80 -0
- package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilter/index.d.ts +36 -0
- package/hidden/senselogic/sitevision/api/security/jaas/filter/AuthenticationFilterChain/index.d.ts +32 -0
- package/hidden/senselogic/sitevision/api/user/UserIdentityWrapper/index.d.ts +599 -0
- package/hidden/senselogic/sitevision/api/webresource/LinkTarget/index.d.ts +20 -0
- package/hidden/senselogic/sitevision/api/xml/XmlElement/index.d.ts +55 -0
- package/hidden/senselogic/sitevision/api/xml/XmlElementHandler/index.d.ts +17 -0
- package/package.json +2 -4
- package/server/AliasUtil/index.d.ts +25 -0
- package/server/AliasUtil/index.js +10 -0
- package/server/ArchiveUtil/index.d.ts +65 -11
- package/server/ArraysInstance/index.d.ts +1846 -0
- package/server/ArticleUtil/index.d.ts +381 -69
- package/server/AuthenticationUtil/index.d.ts +106 -0
- package/server/BookmarkUtil/index.d.ts +36 -28
- package/server/BuddyIconRenderer/index.d.ts +240 -0
- package/server/ClientUtil/index.d.ts +18 -4
- package/server/CollaborationFactory/index.d.ts +42 -25
- package/server/CollaborationGroupFolderUtil/index.d.ts +40 -29
- package/server/CollaborationGroupTemplateUtil/index.d.ts +71 -39
- package/server/CollaborationGroupUtil/index.d.ts +128 -55
- package/server/CollectionsInstance/index.d.ts +738 -0
- package/server/ColorUtil/index.d.ts +22 -17
- package/server/CompoundAndFilterBuilder/index.d.ts +60 -0
- package/server/CompoundComparatorBuilder/index.d.ts +63 -0
- package/server/CompoundOrFilterBuilder/index.d.ts +59 -0
- package/server/ContentNodeUtil/index.d.ts +76 -0
- package/server/CurrencyFactory/index.d.ts +135 -0
- package/server/DateUtil/index.d.ts +154 -77
- package/server/DecorationUtil/index.d.ts +23 -0
- package/server/DeviceUtil/index.d.ts +36 -0
- package/server/DirectoryUtil/index.d.ts +107 -47
- package/server/DocTypeUtil/index.d.ts +149 -0
- package/server/EndecUtil/index.d.ts +537 -91
- package/server/ExtendedDismaxParserBuilder/index.d.ts +311 -0
- package/server/FileIconRenderer/index.d.ts +346 -0
- package/server/FileUtil/index.d.ts +462 -0
- package/server/FilterBuilder/index.d.ts +120 -0
- package/server/FolderUtil/index.d.ts +161 -0
- package/server/FontUtil/index.d.ts +49 -0
- package/server/FormatterBuilderFactory/index.d.ts +129 -0
- package/server/HighlightBuilder/index.d.ts +194 -0
- package/server/IconUtil/index.d.ts +37 -0
- package/server/ImageLinkRenderer/index.d.ts +134 -0
- package/server/ImageRenderer/index.d.ts +613 -231
- package/server/ImageUtil/index.d.ts +430 -0
- package/server/IndexUtil/index.d.ts +71 -0
- package/server/IndexingUtil/index.d.ts +92 -0
- package/server/InstanceCreatorUtil/index.d.ts +661 -0
- package/server/InstanceTypeUtil/index.d.ts +202 -0
- package/server/JwtUtil/index.d.ts +217 -0
- package/server/LandingPageUtil/index.d.ts +67 -50
- package/server/LinkPageUtil/index.d.ts +468 -0
- package/server/LinkRenderer/index.d.ts +1157 -0
- package/server/LinkTargetBuilder/index.d.ts +146 -0
- package/server/LinkValueBuilder/index.d.ts +129 -52
- package/server/ListWrapper/index.d.ts +172 -0
- package/server/LocaleUtil/index.d.ts +695 -61
- package/server/LogUtil/index.d.ts +118 -77
- package/server/MailBuilder/index.d.ts +238 -0
- package/server/MailUtil/index.d.ts +98 -0
- package/server/MathInstance/index.d.ts +681 -0
- package/server/MessageDigesterFactory/index.d.ts +49 -0
- package/server/MetadataDefinitionUtil/index.d.ts +118 -0
- package/server/MetadataUtil/index.d.ts +524 -79
- package/server/MimeTypeUtil/index.d.ts +316 -0
- package/server/MonitorBuilder/index.d.ts +51 -0
- package/server/NodeComparatorUtil/index.d.ts +397 -0
- package/server/NodeFactoryUtil/index.d.ts +32 -0
- package/server/NodeFilterUtil/index.d.ts +924 -0
- package/server/NodeIteratorUtil/index.d.ts +322 -72
- package/server/NodeResolverUtil/index.d.ts +767 -0
- package/server/NodeTreeUtil/index.d.ts +339 -63
- package/server/NodeTypeUtil/index.d.ts +391 -197
- package/server/OfflineVersionPropertyUtil/index.d.ts +30 -0
- package/server/OnlineVersionPropertyUtil/index.d.ts +30 -0
- package/server/OutputUtil/index.d.ts +641 -0
- package/server/PageUtil/index.d.ts +330 -0
- package/server/PermissionUtil/index.d.ts +650 -0
- package/server/PortletContextUtil/index.d.ts +118 -37
- package/server/PortletContextUtil/index.js +1 -0
- package/server/PortletUtil/index.d.ts +40 -0
- package/server/PrincipalUtil/index.d.ts +51 -0
- package/server/Properties/index.d.ts +185 -38
- package/server/PropertyUtil/index.d.ts +2330 -406
- package/server/PublishingUtil/index.d.ts +385 -49
- package/server/QueryStringUtil/index.d.ts +737 -0
- package/server/RedirectUtil/index.d.ts +98 -0
- package/server/RelatedValueBuilder/index.d.ts +81 -39
- package/server/Requester/index.d.ts +441 -65
- package/server/ResourceLocatorUtil/index.d.ts +483 -227
- package/server/RestApi/index.d.ts +208 -23
- package/server/RestAppInvokerFactory/index.d.ts +73 -0
- package/server/RoleAssignmentBuilder/index.d.ts +60 -0
- package/server/RoleMatcherBuilder/index.d.ts +59 -0
- package/server/RoleUtil/index.d.ts +57 -0
- package/server/ScriptUtil/index.d.ts +625 -143
- package/server/SearchFactory/index.d.ts +133 -0
- package/server/SearchUtil/index.d.ts +164 -0
- package/server/SearcherBuilder/index.d.ts +260 -0
- package/server/Session/index.d.ts +1758 -0
- package/server/SimpleUserUtil/index.d.ts +39 -30
- package/server/SiteCookieUtil/index.d.ts +78 -53
- package/server/SortBuilder/index.d.ts +111 -0
- package/server/SpellCheckBuilder/index.d.ts +68 -0
- package/server/StandardParserBuilder/index.d.ts +112 -0
- package/server/StructureUtil/index.d.ts +167 -0
- package/server/SubscriberUtil/index.d.ts +122 -0
- package/server/SubscriptionUtil/index.d.ts +197 -0
- package/server/SystemUserUtil/index.d.ts +201 -98
- package/server/TagUtil/index.d.ts +193 -0
- package/server/TemplateUtil/index.d.ts +217 -0
- package/server/TemporaryFileNodeBuilder/index.d.ts +63 -0
- package/server/TemporaryNodeBuilder/index.d.ts +241 -0
- package/server/TextModuleRendererBuilder/index.d.ts +68 -0
- package/server/TimestampUtil/index.d.ts +98 -82
- package/server/TranslationUtil/index.d.ts +175 -0
- package/server/TrashcanUtil/index.d.ts +193 -24
- package/server/UserDataUtil/index.d.ts +167 -85
- package/server/UserFactory/index.d.ts +45 -30
- package/server/UserFieldRenderer/index.d.ts +258 -0
- package/server/UserIdentityUtil/index.d.ts +61 -29
- package/server/UserUtil/index.d.ts +69 -28
- package/server/Utils/index.d.ts +870 -12
- package/server/VelocityRenderer/index.d.ts +248 -0
- package/server/VersionUtil/index.d.ts +15 -12
- package/server/WebContentUtil/index.d.ts +644 -0
- package/server/WebResourceFactory/index.d.ts +66 -0
- package/server/XSLTUtil/index.d.ts +49 -10
- package/server/XmlParserUtil/index.d.ts +82 -81
- package/builtins/Binary/index.d.ts +0 -3
- package/builtins/Calendar/index.d.ts +0 -3
- package/builtins/Collection/index.d.ts +0 -3
- package/builtins/Date/index.d.ts +0 -3
- package/builtins/InputStream/index.d.ts +0 -3
- package/builtins/Instant/index.d.ts +0 -3
- package/builtins/List/index.d.ts +0 -3
- package/builtins/LocalDateTime/index.d.ts +0 -3
- package/builtins/Locale/index.d.ts +0 -3
- package/builtins/Node/index.d.ts +0 -3
- package/builtins/NodeIterator/index.d.ts +0 -27
- package/builtins/Property/index.d.ts +0 -3
- package/builtins/Serializable/index.d.ts +0 -3
- package/builtins/Set/index.d.ts +0 -3
- package/builtins/Throwable/index.d.ts +0 -3
- package/builtins/byte/index.d.ts +0 -3
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import Parser from "../../hidden/senselogic/sitevision/api/search/searcher/component/Parser";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Adds a query field.
|
|
5
|
+
*
|
|
6
|
+
* <p>
|
|
7
|
+
* <em>Solr note: this is the 'qf' param.</em>
|
|
8
|
+
* </p>
|
|
9
|
+
* @param aQueryField the name of the query field, a <code>null</code> or whitespace-only value will be ignored
|
|
10
|
+
* @return this builder
|
|
11
|
+
*/
|
|
12
|
+
export function addQueryField(aQueryField: string): ExtendedDismaxParserBuilder;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Adds a query field with a specific boost.
|
|
16
|
+
*
|
|
17
|
+
* <p>
|
|
18
|
+
* <em>Solr note: this is the 'qf' param.</em>
|
|
19
|
+
* </p>
|
|
20
|
+
* @param aQueryField the name of the query field, a <code>null</code> or whitespace-only value will be ignored
|
|
21
|
+
* @param aBoostValue the boost value, a negative value will be ignored
|
|
22
|
+
* @return this builder
|
|
23
|
+
*/
|
|
24
|
+
export function addQueryField(
|
|
25
|
+
aQueryField: string,
|
|
26
|
+
aBoostValue: number
|
|
27
|
+
): ExtendedDismaxParserBuilder;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Removes all currently specified query fields.
|
|
31
|
+
* @return this builder
|
|
32
|
+
*/
|
|
33
|
+
export function clearQueryFields(): ExtendedDismaxParserBuilder;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Sets the tiebreaker.
|
|
37
|
+
*
|
|
38
|
+
* <p>
|
|
39
|
+
* <em>Solr note: this is the 'tie' param. The value should typically be something much less than 1.</em>
|
|
40
|
+
* </p>
|
|
41
|
+
* @param aTieBreaker the tiebreaker
|
|
42
|
+
* @return this builder
|
|
43
|
+
* @since Sitevision 4.0.2
|
|
44
|
+
*/
|
|
45
|
+
export function setTieBreaker(aTieBreaker: number): ExtendedDismaxParserBuilder;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Sets the user fields.
|
|
49
|
+
*
|
|
50
|
+
* <p>
|
|
51
|
+
* <em>Solr note: this is the 'uf' param.</em>
|
|
52
|
+
* </p>
|
|
53
|
+
* @param aUserFields the user fields
|
|
54
|
+
* @return this builder
|
|
55
|
+
* @since Sitevision 4.0.2
|
|
56
|
+
*/
|
|
57
|
+
export function setUserFields(aUserFields: string): ExtendedDismaxParserBuilder;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Sets the minimum should match.
|
|
61
|
+
*
|
|
62
|
+
* <p>
|
|
63
|
+
* <em>Solr note: this is the 'mm' param. A value of 100% corresponds to the AND operator and a value of 0% corresponds to th OR operator.</em>
|
|
64
|
+
* </p>
|
|
65
|
+
* @param aMinimumShouldMatch the minimum should match
|
|
66
|
+
* @return this builder
|
|
67
|
+
* @since Sitevision 4.0.2
|
|
68
|
+
*/
|
|
69
|
+
export function setMinimumShouldMatch(
|
|
70
|
+
aMinimumShouldMatch: string
|
|
71
|
+
): ExtendedDismaxParserBuilder;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Adds a phrase field.
|
|
75
|
+
*
|
|
76
|
+
* <p>
|
|
77
|
+
* <em>Solr note: this is the 'pf' param.</em>
|
|
78
|
+
* </p>
|
|
79
|
+
* @param aPhraseField a phrase field, a <code>null</code> or whitespace-only value will be ignored
|
|
80
|
+
* @return this builder
|
|
81
|
+
* @since Sitevision 4.0.2
|
|
82
|
+
*/
|
|
83
|
+
export function addPhraseField(
|
|
84
|
+
aPhraseField: string
|
|
85
|
+
): ExtendedDismaxParserBuilder;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Removes all currently specified phrase fields.
|
|
89
|
+
* @return this builder
|
|
90
|
+
* @since Sitevision 4.0.2
|
|
91
|
+
*/
|
|
92
|
+
export function clearPhraseFields(): ExtendedDismaxParserBuilder;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Sets a boost query.
|
|
96
|
+
*
|
|
97
|
+
* <p>
|
|
98
|
+
* <em>Solr note: this is the 'bq' param.</em>
|
|
99
|
+
* </p>
|
|
100
|
+
* @param aBoostQuery the boost query
|
|
101
|
+
* @return this builder
|
|
102
|
+
* @since Sitevision 4.0.2
|
|
103
|
+
*/
|
|
104
|
+
export function setBoostQuery(aBoostQuery: string): ExtendedDismaxParserBuilder;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Adds an additive boost function.
|
|
108
|
+
*
|
|
109
|
+
* <p>
|
|
110
|
+
* <em>Solr note: this is the 'bf' param.</em>
|
|
111
|
+
* </p>
|
|
112
|
+
* @param aAdditiveBoostFunction an additive boost function, a <code>null</code> or whitespace-only value will be ignored
|
|
113
|
+
* @return this builder
|
|
114
|
+
* @since Sitevision 4.0.2
|
|
115
|
+
*/
|
|
116
|
+
export function addAdditiveBoostFunction(
|
|
117
|
+
aAdditiveBoostFunction: string
|
|
118
|
+
): ExtendedDismaxParserBuilder;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Removes all currently specified additive boost functions.
|
|
122
|
+
* @return this builder
|
|
123
|
+
* @since Sitevision 4.0.2
|
|
124
|
+
*/
|
|
125
|
+
export function clearAdditiveBoostFunctions(): ExtendedDismaxParserBuilder;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Adds a a multiplicative boost function.
|
|
129
|
+
*
|
|
130
|
+
* <p>
|
|
131
|
+
* <em>Solr note: this is the 'boost' param.</em>
|
|
132
|
+
* </p>
|
|
133
|
+
* @param aMultiplicativeBoostFunction a multiplicative boost function, a <code>null</code> or whitespace-only value will be ignored
|
|
134
|
+
* @return this builder
|
|
135
|
+
* @since Sitevision 4.0.2
|
|
136
|
+
*/
|
|
137
|
+
export function addMultiplicativeBoostFunction(
|
|
138
|
+
aMultiplicativeBoostFunction: string
|
|
139
|
+
): ExtendedDismaxParserBuilder;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Removes all currently specified multiplicative boost functions.
|
|
143
|
+
* @return this builder
|
|
144
|
+
* @since Sitevision 4.0.2
|
|
145
|
+
*/
|
|
146
|
+
export function clearMultiplicativeBoostFunctions(): ExtendedDismaxParserBuilder;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Creates a Parser component instance using currently specified state/behaviour.
|
|
150
|
+
* @return a parser component
|
|
151
|
+
*/
|
|
152
|
+
export function build(): Parser;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* <p>
|
|
156
|
+
* Builder for creating a multi-field {@link senselogic.sitevision.api.search.searcher.component.Parser} component with specific behaviour.
|
|
157
|
+
* </p>
|
|
158
|
+
*
|
|
159
|
+
* <p>
|
|
160
|
+
* ExtendedDismaxParserBuilder has several <strong>optional attributes</strong>:
|
|
161
|
+
* </p>
|
|
162
|
+
* <ul>
|
|
163
|
+
* <li>
|
|
164
|
+
* <em>query fields (qf)</em>
|
|
165
|
+
* - The fields to query. Default is the fields specified by the index configuration.
|
|
166
|
+
* <em>
|
|
167
|
+
* (Default query fields for the default Node index is:
|
|
168
|
+
* <code>name.analyzed</code>, <code>title.analyzed</code> and <code>content.analyzed</code>)
|
|
169
|
+
* </em>
|
|
170
|
+
* </li>
|
|
171
|
+
* <li>
|
|
172
|
+
* <em>user fields (uf)</em>
|
|
173
|
+
* - The fields a user can specifically address in a query. Default is the value specified by the index configuration.
|
|
174
|
+
* </li>
|
|
175
|
+
* <li>
|
|
176
|
+
* <em>phrase fields (pf)</em>
|
|
177
|
+
* - The phrase fields that can be used for term proximity. Default is the value specified by the index configuration.
|
|
178
|
+
* </li>
|
|
179
|
+
* <li>
|
|
180
|
+
* <em>minimum should match (mm)</em>
|
|
181
|
+
* - How terms matching should be handled. Default is the value specified by the index configuration.
|
|
182
|
+
* </li>
|
|
183
|
+
* <li>
|
|
184
|
+
* <em>tiebreaker (tie)</em>
|
|
185
|
+
* - How terms matching multiple query fields should be handled. Default is the value specified by the index configuration.
|
|
186
|
+
* </li>
|
|
187
|
+
* <li>
|
|
188
|
+
* <em>additive boost function (bf)</em>
|
|
189
|
+
* - Function that can be used to influence the score (additive). Default is the value specified by the index configuration.
|
|
190
|
+
* </li>
|
|
191
|
+
* <li>
|
|
192
|
+
* <em>multiplicative boost function (boost)</em>
|
|
193
|
+
* - Function that can be used to influence the score (multiplicative). Default is the value specified by the index configuration.
|
|
194
|
+
* </li>
|
|
195
|
+
* <li>
|
|
196
|
+
* <em>boost query (bq)</em>
|
|
197
|
+
* - The query to include in the user's query to influence the score. Default is the value specified by the index configuration.
|
|
198
|
+
* </li>
|
|
199
|
+
* </ul>
|
|
200
|
+
*
|
|
201
|
+
* <p>
|
|
202
|
+
* Using the ExtendedDismaxParserBuilder is pretty straightforward, if you remember that it is <strong>stateful</strong>.
|
|
203
|
+
* Conceptually you would typically use it like this:
|
|
204
|
+
* </p>
|
|
205
|
+
* <ol>
|
|
206
|
+
* <li>Get the ExtendedDismaxParserBuilder</li>
|
|
207
|
+
* <li>Possibly add a query field</li>
|
|
208
|
+
* <li>Possibly add another query field</li>
|
|
209
|
+
* <li>...</li>
|
|
210
|
+
* <li>Do build</li>
|
|
211
|
+
* </ol>
|
|
212
|
+
* <p>
|
|
213
|
+
* When you have built a <code>Parser</code> instance, you can re-use the ExtendedDismaxParserBuilder to build more instances. Typically like:
|
|
214
|
+
* </p>
|
|
215
|
+
* <ol>
|
|
216
|
+
* <li>Clear the query fields</li>
|
|
217
|
+
* <li>Possibly add a query field</li>
|
|
218
|
+
* <li>Possibly add another query field</li>
|
|
219
|
+
* <li>...</li>
|
|
220
|
+
* <li>Do build</li>
|
|
221
|
+
* </ol>
|
|
222
|
+
* <p>
|
|
223
|
+
* <strong>Example of how this strategy could be implemented in Velocity:</strong>
|
|
224
|
+
* </p>
|
|
225
|
+
* <pre><code>
|
|
226
|
+
* <em>## Get the builder</em>
|
|
227
|
+
* #set ($searchFactory = $sitevisionUtils.searchFactory)
|
|
228
|
+
* #set ($edismaxBuilder = $searchFactory.extendedDismaxParserBuilder)
|
|
229
|
+
*
|
|
230
|
+
* <em>## Create a Parser</em>
|
|
231
|
+
* #set ($nameFieldParser = $edismaxBuilder.addQueryField('name.analyzed').build())
|
|
232
|
+
*
|
|
233
|
+
* <em>## Re-use the builder to create another Parser</em>
|
|
234
|
+
* #set ($nameAndTitleFieldParser = $edismaxBuilder.addQueryField('title.analyzed').build())
|
|
235
|
+
*
|
|
236
|
+
* <em>## Re-use the builder to create yet another Parser</em>
|
|
237
|
+
* #set ($titleAndContentFieldParser = $edismaxBuilder.clearQueryFields().addQueryField('title.analyzed').addQueryField('content.analyzed').build())
|
|
238
|
+
* </code></pre>
|
|
239
|
+
*
|
|
240
|
+
* <p>
|
|
241
|
+
* <strong>Tip!</strong> The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains
|
|
242
|
+
* more information about Builders and how to work with them!
|
|
243
|
+
* </p>
|
|
244
|
+
*
|
|
245
|
+
* <p>
|
|
246
|
+
* <em>Solr note: the defType param for this parser is 'edismax'</em>
|
|
247
|
+
* </p>
|
|
248
|
+
*
|
|
249
|
+
* <p>
|
|
250
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
251
|
+
* {@link senselogic.sitevision.api.search.SearchFactory#getExtendedDismaxParserBuilder()}.
|
|
252
|
+
* See {@link senselogic.sitevision.api.search.SearchFactory} for how to obtain an instance of the <code>SearchFactory</code> interface.
|
|
253
|
+
* </p>Adds a query field.
|
|
254
|
+
*
|
|
255
|
+
* <p>
|
|
256
|
+
* <em>Solr note: this is the 'qf' param.</em>
|
|
257
|
+
* </p>Adds a query field with a specific boost.
|
|
258
|
+
*
|
|
259
|
+
* <p>
|
|
260
|
+
* <em>Solr note: this is the 'qf' param.</em>
|
|
261
|
+
* </p>Removes all currently specified query fields.Sets the tiebreaker.
|
|
262
|
+
*
|
|
263
|
+
* <p>
|
|
264
|
+
* <em>Solr note: this is the 'tie' param. The value should typically be something much less than 1.</em>
|
|
265
|
+
* </p>Sets the user fields.
|
|
266
|
+
*
|
|
267
|
+
* <p>
|
|
268
|
+
* <em>Solr note: this is the 'uf' param.</em>
|
|
269
|
+
* </p>Sets the minimum should match.
|
|
270
|
+
*
|
|
271
|
+
* <p>
|
|
272
|
+
* <em>Solr note: this is the 'mm' param. A value of 100% corresponds to the AND operator and a value of 0% corresponds to th OR operator.</em>
|
|
273
|
+
* </p>Adds a phrase field.
|
|
274
|
+
*
|
|
275
|
+
* <p>
|
|
276
|
+
* <em>Solr note: this is the 'pf' param.</em>
|
|
277
|
+
* </p>Removes all currently specified phrase fields.Sets a boost query.
|
|
278
|
+
*
|
|
279
|
+
* <p>
|
|
280
|
+
* <em>Solr note: this is the 'bq' param.</em>
|
|
281
|
+
* </p>Adds an additive boost function.
|
|
282
|
+
*
|
|
283
|
+
* <p>
|
|
284
|
+
* <em>Solr note: this is the 'bf' param.</em>
|
|
285
|
+
* </p>Removes all currently specified additive boost functions.Adds a a multiplicative boost function.
|
|
286
|
+
*
|
|
287
|
+
* <p>
|
|
288
|
+
* <em>Solr note: this is the 'boost' param.</em>
|
|
289
|
+
* </p>Removes all currently specified multiplicative boost functions.Creates a Parser component instance using currently specified state/behaviour.
|
|
290
|
+
* @author Magnus Lövgren
|
|
291
|
+
* @since Sitevision 3.6
|
|
292
|
+
*/
|
|
293
|
+
declare namespace ExtendedDismaxParserBuilder {
|
|
294
|
+
export {
|
|
295
|
+
addQueryField,
|
|
296
|
+
clearQueryFields,
|
|
297
|
+
setTieBreaker,
|
|
298
|
+
setUserFields,
|
|
299
|
+
setMinimumShouldMatch,
|
|
300
|
+
addPhraseField,
|
|
301
|
+
clearPhraseFields,
|
|
302
|
+
setBoostQuery,
|
|
303
|
+
addAdditiveBoostFunction,
|
|
304
|
+
clearAdditiveBoostFunctions,
|
|
305
|
+
addMultiplicativeBoostFunction,
|
|
306
|
+
clearMultiplicativeBoostFunctions,
|
|
307
|
+
build,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export default ExtendedDismaxParserBuilder;
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The locale to use when extracting the decription of file icons.
|
|
3
|
+
* <p>Default is the locale of the currently executing portlet.</p>
|
|
4
|
+
* <p>
|
|
5
|
+
* <strong>Note!</strong> Icons (icon and default icon) that has been loaded with a different locale will be removed whenever an invocation
|
|
6
|
+
* of this method changes the locale.
|
|
7
|
+
* </p>
|
|
8
|
+
* @param aLocale the locale to use when extracting the icon description
|
|
9
|
+
*/
|
|
10
|
+
export function setLocale(aLocale: unknown): void;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Which type if file icons (small or large) that should be rendered.
|
|
14
|
+
* <p>Default is <code>true</code>.</p>
|
|
15
|
+
* <p>
|
|
16
|
+
* <strong>Note!</strong> Icons (icon and default icon) that has been loaded with a different useSmallIcons state will be removed whenever
|
|
17
|
+
* an invocation of this method changes the useSmallIcons state.
|
|
18
|
+
* </p>
|
|
19
|
+
* @param aUseSmallIcons whether or not to use small icons (<code>true</code> == "use small icons", <code>false</code> == "use large icons")
|
|
20
|
+
*/
|
|
21
|
+
export function setUseSmallIcons(aUseSmallIcons: boolean): void;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Utility method for executing <code>setUseSmallIcons(false)</code>, i.e. "use large icons when rendering".
|
|
25
|
+
* @see #setUseSmallIcons(boolean)
|
|
26
|
+
*/
|
|
27
|
+
export function clearUseSmallIcons(): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Utility method for executing <code>setUseSmallIcons(true)</code>, i.e. "use small icons when rendering".
|
|
31
|
+
* @see #setUseSmallIcons(boolean)
|
|
32
|
+
*/
|
|
33
|
+
export function forceUseSmallIcons(): void;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* If file icon descriptions should be used or not.
|
|
37
|
+
* <p>Default is <code>true</code>.</p>
|
|
38
|
+
* <p>Note that file icon descriptions may be locale-dependent, see {@link #setLocale(java.util.Locale)}.</p>
|
|
39
|
+
* @param aUseDescription whether or not a file icon description should be used when rendering
|
|
40
|
+
*/
|
|
41
|
+
export function setUseDescription(aUseDescription: boolean): void;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Utility method for executing <code>setUseDescription(false)</code>, i.e. "don't use description when rendering".
|
|
45
|
+
* @see #setUseDescription(boolean)
|
|
46
|
+
*/
|
|
47
|
+
export function clearUseDescription(): void;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Utility method for executing <code>setUseDescription(true)</code>, i.e. "use description when rendering".
|
|
51
|
+
* @see #setUseDescription(boolean)
|
|
52
|
+
*/
|
|
53
|
+
export function forceUseDescription(): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Uses a content type to load the fallback icon that should be used when rendering if no icon is loaded.
|
|
57
|
+
* @param aContentType the content type (mime type) that decides what file icon to load
|
|
58
|
+
* @return true if a default file icon was loaded, false if not
|
|
59
|
+
*/
|
|
60
|
+
export function loadDefaultIconByContentType(aContentType: string): boolean;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Uses a URI to load the fallback icon that should be used when rendering if no icon is loaded.
|
|
64
|
+
* <p>
|
|
65
|
+
* This method tries to extract a file extension from the URI and use that extension to load the default file icon.
|
|
66
|
+
* If the URI doesn't end with a file extension, default icon loading will fail.
|
|
67
|
+
* </p>
|
|
68
|
+
* @param aURI the uri that decides what file icon to load
|
|
69
|
+
* @return <code>true</code> if a default file icon was loaded, <code>false</code> if not
|
|
70
|
+
*/
|
|
71
|
+
export function loadDefaultIconByURI(aURI: string): boolean;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Uses a file extension to load the fallback icon that should be used when rendering if no icon is loaded.
|
|
75
|
+
* @param aFileExtension the file extension that decides what file icon to load
|
|
76
|
+
* @return <code>true</code> if a default file icon was loaded, <code>false</code> if not
|
|
77
|
+
*/
|
|
78
|
+
export function loadDefaultIconByFileExtension(aFileExtension: string): boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Whether or not a default icon is loaded.
|
|
82
|
+
* @return <code>true</code> if a default icon is loaded, <code>false</code> if not.
|
|
83
|
+
*/
|
|
84
|
+
export function isDefaultIconLoaded(): boolean;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Removes loaded default icon (does nothing if no default icon is loaded)
|
|
88
|
+
|
|
89
|
+
*/
|
|
90
|
+
export function clearDefaultIcon(): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Uses a content type to load the icon that should be rendered.
|
|
94
|
+
* @param aContentType the content type (mime type) that decides what file icon to load
|
|
95
|
+
* @return <code>true</code> if a file icon was loaded, <code>false</code> if not
|
|
96
|
+
*/
|
|
97
|
+
export function loadIconByContentType(aContentType: string): boolean;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Uses a URI to load the icon that should be rendered.
|
|
101
|
+
* <p>
|
|
102
|
+
* This method tries to extract a file extension from the URI and use that extension to load the icon.
|
|
103
|
+
* If the URI doesn't end with a file extension, icon loading will fail.
|
|
104
|
+
* </p>
|
|
105
|
+
* @param aURI the URI that decides what file icon to load
|
|
106
|
+
* @return <code>true</code> if a file icon was loaded, <code>false</code> if not
|
|
107
|
+
*/
|
|
108
|
+
export function loadIconByURI(aURI: string): boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Uses a URI to load the icon that should be rendered.
|
|
112
|
+
* @param aFileExtension the file extension that decides what file icon to load
|
|
113
|
+
* @return <code>true</code> if a file icon was loaded, <code>false</code> if not
|
|
114
|
+
*/
|
|
115
|
+
export function loadIconByFileExtension(aFileExtension: string): boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Whether or not an icon is loaded.
|
|
119
|
+
* @return <code>true</code> if an icon is loaded, <code>false</code> if not.
|
|
120
|
+
*/
|
|
121
|
+
export function isIconLoaded(): boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Removes loaded icon (does nothing if no icon is loaded)
|
|
125
|
+
|
|
126
|
+
*/
|
|
127
|
+
export function clearIcon(): void;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Sets the CSS class name(-s) to use when rendering.
|
|
131
|
+
* @param aFontClass the CSS class name(-s) expression. An empty string is equivalent to <code>null</code> - no class attribute will be rendered
|
|
132
|
+
* @since Sitevision 3.0
|
|
133
|
+
*/
|
|
134
|
+
export function setFontClass(aFontClass: string): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Removes the CSS class name(-s).
|
|
138
|
+
* No class attribute will be rendered until a fontClass is set again.
|
|
139
|
+
* @since Sitevision 3.0
|
|
140
|
+
*/
|
|
141
|
+
export function clearFontClass(): void;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Builds a html img element based on current state.
|
|
145
|
+
* @return a html img element based on current state, or empty string if no icon and no default icon was loaded
|
|
146
|
+
*/
|
|
147
|
+
export function render(): string;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* FileIconRenderer is a stateful utility interface that can be used to render valid xhtml img elements based on the file icons of the website.
|
|
151
|
+
*
|
|
152
|
+
* <p>
|
|
153
|
+
* An instance of the Sitevision class implementing this interface can be obtained via {@link senselogic.sitevision.api.Utils#getFileIconRenderer()}.
|
|
154
|
+
* See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the <code>Utils</code> interface.
|
|
155
|
+
* </p>
|
|
156
|
+
*
|
|
157
|
+
* <p>
|
|
158
|
+
* FileIconRenderer is very suitable when rendering more than one file icon (for instance when rendering a search result where different icons should
|
|
159
|
+
* be displayed for different types of hits) or if you don't want to bother about how to get file icons from the icon repository of the site.
|
|
160
|
+
* </p>
|
|
161
|
+
*
|
|
162
|
+
* <p>
|
|
163
|
+
* FileIconRenderer has few attributes:
|
|
164
|
+
* </p>
|
|
165
|
+
* <ul>
|
|
166
|
+
* <li>
|
|
167
|
+
* <em>icon</em> - The file icon that should be rendered. Default is <code>null</code>. If you try to load a new file icon and it fails,
|
|
168
|
+
* the previously loaded icon will be cleared (i.e. the renderer will not contain any icon to render).
|
|
169
|
+
* </li>
|
|
170
|
+
* <li>
|
|
171
|
+
* <em>defaultIcon</em> - The fallback file icon that should be rendered if no icon is loaded. Default is <code>null</code>. If you try to
|
|
172
|
+
* load a new default file icon and it fails, the previously loaded default icon will be cleared (i.e. the renderer will not contain any
|
|
173
|
+
* default icon to render).
|
|
174
|
+
* </li>
|
|
175
|
+
* <li>
|
|
176
|
+
* <em>useSmallIcons</em> - Whether to use small icons or not <em>(i.e. true == use small icons, false == use large icons)</em>.
|
|
177
|
+
* Default is <code>true</code>.</li>
|
|
178
|
+
* <li>
|
|
179
|
+
* <em>useDescriptions</em> - Whether to render the file icon description or not (i.e. put text in alt attribute of the rendered img
|
|
180
|
+
* element or not). Default is <code>true</code>.
|
|
181
|
+
* </li>
|
|
182
|
+
* <li>
|
|
183
|
+
* <em>locale</em> - What locale to use when deciding which file icon description to use. Default is the locale of the currently executing
|
|
184
|
+
* portlet.
|
|
185
|
+
* </li>
|
|
186
|
+
* <li>
|
|
187
|
+
* <em>fontClass</em> - The CSS class to use when rendering (the class attribute of the img element). Default is <code>sv-noborder</code>
|
|
188
|
+
* (i.e. <code>border-style:none</code>).
|
|
189
|
+
* </li>
|
|
190
|
+
* </ul>
|
|
191
|
+
*
|
|
192
|
+
* <p>
|
|
193
|
+
* ----------------------------------------------------------------------------------------------------
|
|
194
|
+
* </p>
|
|
195
|
+
*
|
|
196
|
+
* <p>
|
|
197
|
+
* Using the FileIconRenderer is pretty straightforward, if you remember that it is <strong>stateful</strong> and that previously loaded icons
|
|
198
|
+
* will be cleared whenever you try to load new ones.
|
|
199
|
+
* Conceptually you would typically use it like this:
|
|
200
|
+
* </p>
|
|
201
|
+
* <ol>
|
|
202
|
+
* <li>Get the FileIconRenderer</li>
|
|
203
|
+
* <li>Possibly init the renderer with rendering settings (locale, useSmallIcons, description)</li>
|
|
204
|
+
* <li>Possibly load the renderer with a default icon</li>
|
|
205
|
+
* <li>Load a file icon</li>
|
|
206
|
+
* <li>Do render</li>
|
|
207
|
+
* </ol>
|
|
208
|
+
* <p>
|
|
209
|
+
* When you have rendered once, you can re-use the FileIconRenderer until you are done. Something like:
|
|
210
|
+
* </p>
|
|
211
|
+
* <ol>
|
|
212
|
+
* <li>Load a new icon.</li>
|
|
213
|
+
* <li>Do render.</li>
|
|
214
|
+
* </ol>
|
|
215
|
+
*
|
|
216
|
+
* <p>
|
|
217
|
+
* Loading of an icon can be done using:
|
|
218
|
+
* </p>
|
|
219
|
+
* <ul>
|
|
220
|
+
* <li>
|
|
221
|
+
* The file <em>extension</em>.
|
|
222
|
+
* </li>
|
|
223
|
+
* <li>
|
|
224
|
+
* The file <em>uri</em>.
|
|
225
|
+
* </li>
|
|
226
|
+
* <li>
|
|
227
|
+
* The file <em>content type</em>. Note! The term <em>content type</em> is also known as <em>mime type</em>, but since "content type" is
|
|
228
|
+
* the term typically used by web programmers it is used as terminology in this interface.
|
|
229
|
+
* <p>
|
|
230
|
+
* Some information about content type mappings:<br>
|
|
231
|
+
* A precise file extension (pdf, doc, png etc.) is always needed to extract a file icon from a web site. To enable file icon extraction
|
|
232
|
+
* via content types, a "content-type-to-extension" mapping will be used. Please be aware that not all content types will be mapped due to
|
|
233
|
+
* the sheer amount of existing types. Some content types can't be mapped since they doesn't have a single well-defined extension
|
|
234
|
+
* (a typical example is "application/octet-stream" that is used for a variety of file types, i.e. file extensions).
|
|
235
|
+
* </p>
|
|
236
|
+
* </li>
|
|
237
|
+
* </ul>
|
|
238
|
+
* <p>
|
|
239
|
+
* Whenever you try to load the renderer with an icon, the (possibly) previously loaded icon will be cleared.
|
|
240
|
+
* If loading fails, no result will be rendered by default (i.e. an empty string will be the output when calling the render method).
|
|
241
|
+
* If a default icon has been loaded successfully, it will be the output if the renderer contains no icon.
|
|
242
|
+
* <em>(Note that the result of every icon loading is cached for best performance, hence no need for you to do the same in your code.)</em>
|
|
243
|
+
* </p>
|
|
244
|
+
* <p>
|
|
245
|
+
* Please note that all <code>load</code> methods return a boolean! To prevent the boolean to be part of the page output you might in
|
|
246
|
+
* some cases need to do a workaround. <em>The set statement for <code>$ignore</code> in below example demonstrates a simple workaround.</em>
|
|
247
|
+
* </p>
|
|
248
|
+
*
|
|
249
|
+
* <p>
|
|
250
|
+
* <strong>Example of how this strategy could be implemented in Velocity:</strong><br>
|
|
251
|
+
* (You want to do a simple listing of all nodes in a collection/iterator "$items" and use FileIconRenderer to render the file icons of all items
|
|
252
|
+
* that has a configured file icon
|
|
253
|
+
* </p>
|
|
254
|
+
* <pre><code>
|
|
255
|
+
* <em>## Get PropertyUtil to ease Node property fetching</em>
|
|
256
|
+
* #set ($propertyUtil = $sitevisionUtils.propertyUtil)
|
|
257
|
+
*
|
|
258
|
+
* <em>## Get FileIconRenderer</em>
|
|
259
|
+
* #set ($iconRenderer = $sitevisionUtils.fileIconRenderer)
|
|
260
|
+
*
|
|
261
|
+
* <em>## Iterate through items and render the names and file icons (if they exist)</em>
|
|
262
|
+
* <ul style="list-style:none">
|
|
263
|
+
* #foreach ($item in $items)
|
|
264
|
+
* <em>## Try to load the renderer by the item's uri (e.g. "/aPath/aFile.pdf")</em>
|
|
265
|
+
* #if (!$iconRenderer.loadIconByURI(${propertyUtil.getString($item, 'URI')}))
|
|
266
|
+
* <em>## If loading failed, try to load the renderer by the item's content type instead (e.g. "application/pdf")</em>
|
|
267
|
+
* #set ($ignore = $iconRenderer.loadIconByContentType(${propertyUtil.getString($item, 'mimeType')}))
|
|
268
|
+
* #end
|
|
269
|
+
*
|
|
270
|
+
* <li>
|
|
271
|
+
* <em>## Render the name of the node</em>
|
|
272
|
+
* $propertyUtil.getString($item, 'displayName', '')
|
|
273
|
+
* <em>## Render the file icon of the node (if no icon was loaded, an empty string will be rendered)</em>
|
|
274
|
+
* $iconRenderer.render()
|
|
275
|
+
* </li>
|
|
276
|
+
* #end
|
|
277
|
+
* </ul>
|
|
278
|
+
* </code></pre>
|
|
279
|
+
*
|
|
280
|
+
* <div style="border:1px dotted gray; padding:10px">
|
|
281
|
+
* <strong>Tip!</strong> If you use Velocity and call a <code>load</code> method, you must suppress the boolean result so
|
|
282
|
+
* it doesn't get a part of the rendered output. The above example contains an assignment workaround to suppress the <code>load</code> result:<br>
|
|
283
|
+
* <pre><code> #set ($ignore = $iconRenderer.loadIconByContentType(${propertyUtil.getString($item, 'mimeType')}))</code></pre>
|
|
284
|
+
* This type of workaround can also be achieved via the <code>swallow</code> method of {@link senselogic.sitevision.api.script.ScriptUtil} as:<br>
|
|
285
|
+
* <pre><code> $scriptUtil.swallow($iconRenderer.loadIconByContentType(${propertyUtil.getString($item, 'mimeType')}))</code></pre>
|
|
286
|
+
* </div>
|
|
287
|
+
*
|
|
288
|
+
* <p>
|
|
289
|
+
* Since FileIconRenderer is stateful and likely will be used in Velocity frequently, there are some "shortcuts" that might be useful.
|
|
290
|
+
* Due to the lack of proper boolean support in Velocity, the boolean attributes has corresponding force/clear methods to set the boolean
|
|
291
|
+
* to true/false. For example:
|
|
292
|
+
* </p>
|
|
293
|
+
* <ul>
|
|
294
|
+
* <li>Executing <code>forceUseSmallIcons()</code> results in an execution of <code>setUseSmallIcons(true)</code></li>
|
|
295
|
+
* <li>Executing <code>clearUseSmallIcons()</code> results in an execution of <code>setUseSmallIcons(false)</code></li>
|
|
296
|
+
* </ul>The locale to use when extracting the decription of file icons.
|
|
297
|
+
* <p>Default is the locale of the currently executing portlet.</p>
|
|
298
|
+
* <p>
|
|
299
|
+
* <strong>Note!</strong> Icons (icon and default icon) that has been loaded with a different locale will be removed whenever an invocation
|
|
300
|
+
* of this method changes the locale.
|
|
301
|
+
* </p>Which type if file icons (small or large) that should be rendered.
|
|
302
|
+
* <p>Default is <code>true</code>.</p>
|
|
303
|
+
* <p>
|
|
304
|
+
* <strong>Note!</strong> Icons (icon and default icon) that has been loaded with a different useSmallIcons state will be removed whenever
|
|
305
|
+
* an invocation of this method changes the useSmallIcons state.
|
|
306
|
+
* </p>Utility method for executing <code>setUseSmallIcons(false)</code>, i.e. "use large icons when rendering".Utility method for executing <code>setUseSmallIcons(true)</code>, i.e. "use small icons when rendering".If file icon descriptions should be used or not.
|
|
307
|
+
* <p>Default is <code>true</code>.</p>
|
|
308
|
+
* <p>Note that file icon descriptions may be locale-dependent, see {@link #setLocale(java.util.Locale)}.</p>Utility method for executing <code>setUseDescription(false)</code>, i.e. "don't use description when rendering".Utility method for executing <code>setUseDescription(true)</code>, i.e. "use description when rendering".Uses a content type to load the fallback icon that should be used when rendering if no icon is loaded.Uses a URI to load the fallback icon that should be used when rendering if no icon is loaded.
|
|
309
|
+
* <p>
|
|
310
|
+
* This method tries to extract a file extension from the URI and use that extension to load the default file icon.
|
|
311
|
+
* If the URI doesn't end with a file extension, default icon loading will fail.
|
|
312
|
+
* </p>Uses a file extension to load the fallback icon that should be used when rendering if no icon is loaded.Whether or not a default icon is loaded.Removes loaded default icon (does nothing if no default icon is loaded)Uses a content type to load the icon that should be rendered.Uses a URI to load the icon that should be rendered.
|
|
313
|
+
* <p>
|
|
314
|
+
* This method tries to extract a file extension from the URI and use that extension to load the icon.
|
|
315
|
+
* If the URI doesn't end with a file extension, icon loading will fail.
|
|
316
|
+
* </p>Uses a URI to load the icon that should be rendered.Whether or not an icon is loaded.Removes loaded icon (does nothing if no icon is loaded)Sets the CSS class name(-s) to use when rendering.Removes the CSS class name(-s).
|
|
317
|
+
* No class attribute will be rendered until a fontClass is set again.Builds a html img element based on current state.
|
|
318
|
+
* @author Magnus Lövgren
|
|
319
|
+
* @since Sitevision 2.6.1_08
|
|
320
|
+
*/
|
|
321
|
+
declare namespace FileIconRenderer {
|
|
322
|
+
export {
|
|
323
|
+
setLocale,
|
|
324
|
+
setUseSmallIcons,
|
|
325
|
+
clearUseSmallIcons,
|
|
326
|
+
forceUseSmallIcons,
|
|
327
|
+
setUseDescription,
|
|
328
|
+
clearUseDescription,
|
|
329
|
+
forceUseDescription,
|
|
330
|
+
loadDefaultIconByContentType,
|
|
331
|
+
loadDefaultIconByURI,
|
|
332
|
+
loadDefaultIconByFileExtension,
|
|
333
|
+
isDefaultIconLoaded,
|
|
334
|
+
clearDefaultIcon,
|
|
335
|
+
loadIconByContentType,
|
|
336
|
+
loadIconByURI,
|
|
337
|
+
loadIconByFileExtension,
|
|
338
|
+
isIconLoaded,
|
|
339
|
+
clearIcon,
|
|
340
|
+
setFontClass,
|
|
341
|
+
clearFontClass,
|
|
342
|
+
render,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export default FileIconRenderer;
|