Class PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue
- java.lang.Object
-
- com.composum.sling.core.service.impl.PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue
-
- All Implemented Interfaces:
PathReferencesService.Hit.Property.Value
- Enclosing class:
- PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty
protected class PathReferencesServiceImpl.HitIteratorImpl.IteratorHit.HitProperty.HitValue extends Object implements PathReferencesService.Hit.Property.Value
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
apply(@NotNull String newPath)
replaces the old path of the value with the given new oneprotected @NotNull String
applyText(@NotNull String newPath)
protected @NotNull String
applyVal(@NotNull String newPath)
int
getIndex()
@NotNull List<String>
getPaths()
@NotNull String
getText()
boolean
isAbsolute()
boolean
isChildPath()
boolean
isRelative()
boolean
isRichText()
String
toString()
-
-
-
Field Detail
-
text
@NotNull protected final @NotNull String text
-
index
protected final int index
-
-
Constructor Detail
-
HitValue
public HitValue(@NotNull @NotNull String text, int index)
-
-
Method Detail
-
getIndex
public int getIndex()
- Specified by:
getIndex
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- the index of the value in a multi value set
-
apply
@NotNull public @NotNull String apply(@NotNull @NotNull String newPath)
Description copied from interface:PathReferencesService.Hit.Property.Value
replaces the old path of the value with the given new one- Specified by:
apply
in interfacePathReferencesService.Hit.Property.Value
- Parameters:
newPath
- the new path- Returns:
- the modified value
-
getText
@NotNull public @NotNull String getText()
- Specified by:
getText
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- the whole property value text
-
getPaths
@NotNull public @NotNull List<String> getPaths()
- Specified by:
getPaths
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- the set of occurences of the searched path in the text
-
isAbsolute
public boolean isAbsolute()
- Specified by:
isAbsolute
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- 'true', if at least one ocurrence of the path is absolute
-
isRelative
public boolean isRelative()
- Specified by:
isRelative
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- 'true', if at least one ocurrence of the path is relative
-
isChildPath
public boolean isChildPath()
- Specified by:
isChildPath
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- 'true', if at least one ocurrence of the path is referencing a child resource
-
isRichText
public boolean isRichText()
- Specified by:
isRichText
in interfacePathReferencesService.Hit.Property.Value
- Returns:
- 'true', if the text seems to be a rich text
-
-