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 String
basePath
protected boolean
childrenOnly
protected String
contentPath
protected boolean
findRichText
protected boolean
includeChildren
protected String
primaryType
protected String
propertyName
protected String
resourceName
protected String
resourceType
protected boolean
useAbsolutePath
protected boolean
useRelativePath
protected boolean
useTextSearch
-
Constructor Summary
Constructors Constructor Description Options()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PathReferencesService.Options
basePath(@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.Options
childrenOnly(boolean flag)
if 'true' a search for subpages of the specified path to search is executedPathReferencesService.Options
contentPath(@NotNull String name)
an optional relative content path; maybe 'null'PathReferencesService.Options
findRichText(boolean flag)
if 'true' the path is searched also as part of rich text properties (contains a pattern like '="{path}"')@NotNull String
getBasePath()
@Nullable String
getContentPath()
@Nullable String
getPrimaryType()
String
getPropertyName()
String
getResourceName()
String
getResourceType()
PathReferencesService.Options
includeChildren(boolean flag)
if 'true' all resources wich are referencing paths starting with the searched path are foundboolean
isChildrenOnly()
boolean
isFindRichText()
boolean
isIncludeChildren()
boolean
isUseAbsolutePath()
boolean
isUseRelativePath()
boolean
isUseTextSearch()
PathReferencesService.Options
primaryType(@NotNull String name)
the primary type of the searched referrers; maybe 'null'PathReferencesService.Options
propertyName(@NotNull String name)
the name of the property which is storing the reference; maybe 'null'PathReferencesService.Options
resourceName(@NotNull String name)
the node name of the searched referrers; maybe 'null'PathReferencesService.Options
resourceType(@NotNull String name)
the Sling resource type of the searched referrers; maybe 'null'PathReferencesService.Options
useAbsolutePath(boolean flag)
if 'true' the absolute path variant of the searched path is checkedPathReferencesService.Options
useRelativePath(boolean flag)
if 'true' the relative path variant of the searched path is checkedPathReferencesService.Options
useTextSearch(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}"')
-
-