Class ContentPathUtils
- java.lang.Object
-
- org.onehippo.forge.content.exim.core.util.ContentPathUtils
-
public class ContentPathUtils extends Object
Content Node Path related utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
encodeNodePath(String nodePath)
Returns encoded node path where each node name in thenodePath
is encoded by using Hippo CMS Default URI Encoding strategy.static String
removeIndexNotationInNodePath(String nodePath)
Removes SNS (Same Name Sibling) index notation in the givennodePath
.static String[]
splitToFolderPathAndName(String contentLocation)
Splits the givencontentLocation
to an array which consists of a folder path and the node name.
-
-
-
Method Detail
-
removeIndexNotationInNodePath
public static String removeIndexNotationInNodePath(String nodePath)
Removes SNS (Same Name Sibling) index notation in the givennodePath
.- Parameters:
nodePath
- node path- Returns:
- a node path without SNS (Same Name Sibling) index notation
-
encodeNodePath
public static String encodeNodePath(String nodePath)
Returns encoded node path where each node name in thenodePath
is encoded by using Hippo CMS Default URI Encoding strategy.- Parameters:
nodePath
- node path- Returns:
- encoded node path where each node name in the
nodePath
is encoded by using Hippo CMS Default URI Encoding strategy
-
splitToFolderPathAndName
public static String[] splitToFolderPathAndName(String contentLocation)
Splits the givencontentLocation
to an array which consists of a folder path and the node name.- Parameters:
contentLocation
- content node path- Returns:
- an array which consists of a folder path and the node name
-
-