Class RepoPath
java.lang.Object
org.apache.sling.feature.cpconverter.shared.RepoPath
- All Implemented Interfaces:
Comparable<RepoPath>
A Repo Path represents a path in the repository, for example when used in
a repoinit section.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
@Nullable RepoPath
Get the parent path of the current path.int
hashCode()
boolean
boolean
startsWith
(@Nullable RepoPath otherPath) Check is this path starts with the other path.toString()
-
Constructor Details
-
RepoPath
Construct a Repo Path from a string. The string should separate the path segments with forward slashes, e.g./my/repo/path
.- Parameters:
path
- The string representation of the path. If the initial leading forward slash is missing it will be assumed to be there.
-
RepoPath
Construct a Repo Path from a List.- Parameters:
list
- The list to create the repo path from. The list should not have any separators.
-
-
Method Details
-
getParent
Get the parent path of the current path.- Returns:
- The parent path, or
null
if we are at the root and there is no further parent.
-
getSegments
-
isRepositoryPath
public boolean isRepositoryPath() -
hashCode
public int hashCode() -
equals
-
toString