Package com.composum.sling.core.service
Class PathReferencesService.Options
- java.lang.Object
-
- com.composum.sling.core.service.PathReferencesService.Options
-
- Enclosing interface:
- PathReferencesService
public static class PathReferencesService.Options extends Object
an options set to specify the parameters of the query to search path references; build the options for the reference search like this:final Options options = new Options() .basePath('/content/mysite') .propertyName('text') .includeChildren(true) .useRelativePath(true) .findRichText(true);
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbasePathprotected booleanchildrenOnlyprotected StringcontentPathprotected booleanfindRichTextprotected booleanincludeChildrenprotected StringprimaryTypeprotected StringpropertyNameprotected StringresourceNameprotected StringresourceTypeprotected booleanuseAbsolutePathprotected booleanuseRelativePathprotected booleanuseTextSearch
-
Constructor Summary
Constructors Constructor Description Options()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathReferencesService.OptionsbasePath(@NotNull String path)the 'base path' is used to complete a relative path or to determine the relative variant of an absolute path; if in a referer search a relative path is searched this base path is prepended to build the absolute path; if an absolute path is searched the base path is used to build the relative variant of the absolute path if this absolutre path starts with the base pathPathReferencesService.OptionschildrenOnly(boolean flag)if 'true' a search for subpages of the specified path to search is executedPathReferencesService.OptionscontentPath(@NotNull String name)an optional relative content path; maybe 'null'PathReferencesService.OptionsfindRichText(boolean flag)if 'true' the path is searched also as part of rich text properties (contains a pattern like '="{path}"')@NotNull StringgetBasePath()@Nullable StringgetContentPath()@Nullable StringgetPrimaryType()StringgetPropertyName()StringgetResourceName()StringgetResourceType()PathReferencesService.OptionsincludeChildren(boolean flag)if 'true' all resources wich are referencing paths starting with the searched path are foundbooleanisChildrenOnly()booleanisFindRichText()booleanisIncludeChildren()booleanisUseAbsolutePath()booleanisUseRelativePath()booleanisUseTextSearch()PathReferencesService.OptionsprimaryType(@NotNull String name)the primary type of the searched referrers; maybe 'null'PathReferencesService.OptionspropertyName(@NotNull String name)the name of the property which is storing the reference; maybe 'null'PathReferencesService.OptionsresourceName(@NotNull String name)the node name of the searched referrers; maybe 'null'PathReferencesService.OptionsresourceType(@NotNull String name)the Sling resource type of the searched referrers; maybe 'null'PathReferencesService.OptionsuseAbsolutePath(boolean flag)if 'true' the absolute path variant of the searched path is checkedPathReferencesService.OptionsuseRelativePath(boolean flag)if 'true' the relative path variant of the searched path is checkedPathReferencesService.OptionsuseTextSearch(boolean flag)if 'true' the path is searched using the fulltext search (jcr:contains())
-
-
-
Field Detail
-
basePath
protected String basePath
-
primaryType
protected String primaryType
-
contentPath
protected String contentPath
-
resourceName
protected String resourceName
-
resourceType
protected String resourceType
-
propertyName
protected String propertyName
-
useTextSearch
protected boolean useTextSearch
-
useAbsolutePath
protected boolean useAbsolutePath
-
useRelativePath
protected boolean useRelativePath
-
includeChildren
protected boolean includeChildren
-
childrenOnly
protected boolean childrenOnly
-
findRichText
protected boolean findRichText
-
-
Method Detail
-
getBasePath
@NotNull public @NotNull String getBasePath()
-
getPrimaryType
@Nullable public @Nullable String getPrimaryType()
-
getContentPath
@Nullable public @Nullable String getContentPath()
-
getResourceName
public String getResourceName()
-
getResourceType
public String getResourceType()
-
getPropertyName
public String getPropertyName()
-
isUseTextSearch
public boolean isUseTextSearch()
-
isUseAbsolutePath
public boolean isUseAbsolutePath()
-
isUseRelativePath
public boolean isUseRelativePath()
-
isIncludeChildren
public boolean isIncludeChildren()
-
isChildrenOnly
public boolean isChildrenOnly()
-
isFindRichText
public boolean isFindRichText()
-
basePath
public PathReferencesService.Options basePath(@NotNull @NotNull String path)
the 'base path' is used to complete a relative path or to determine the relative variant of an absolute path; if in a referer search a relative path is searched this base path is prepended to build the absolute path; if an absolute path is searched the base path is used to build the relative variant of the absolute path if this absolutre path starts with the base path
-
primaryType
public PathReferencesService.Options primaryType(@NotNull @NotNull String name)
the primary type of the searched referrers; maybe 'null'
-
contentPath
public PathReferencesService.Options contentPath(@NotNull @NotNull String name)
an optional relative content path; maybe 'null'
-
resourceName
public PathReferencesService.Options resourceName(@NotNull @NotNull String name)
the node name of the searched referrers; maybe 'null'
-
resourceType
public PathReferencesService.Options resourceType(@NotNull @NotNull String name)
the Sling resource type of the searched referrers; maybe 'null'
-
propertyName
public PathReferencesService.Options propertyName(@NotNull @NotNull String name)
the name of the property which is storing the reference; maybe 'null'
-
useTextSearch
public PathReferencesService.Options useTextSearch(boolean flag)
if 'true' the path is searched using the fulltext search (jcr:contains())
-
useAbsolutePath
public PathReferencesService.Options useAbsolutePath(boolean flag)
if 'true' the absolute path variant of the searched path is checked
-
useRelativePath
public PathReferencesService.Options useRelativePath(boolean flag)
if 'true' the relative path variant of the searched path is checked
-
includeChildren
public PathReferencesService.Options includeChildren(boolean flag)
if 'true' all resources wich are referencing paths starting with the searched path are found
-
childrenOnly
public PathReferencesService.Options childrenOnly(boolean flag)
if 'true' a search for subpages of the specified path to search is executed
-
findRichText
public PathReferencesService.Options findRichText(boolean flag)
if 'true' the path is searched also as part of rich text properties (contains a pattern like '="{path}"')
-
-