@ProviderType
public interface ModelPathMapper
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
map(java.lang.String resourcePath)
Converts a resource path to a path in the API space.
|
java.lang.String |
unmap(java.lang.String apiPath)
Converts an API path to a path in the content space.
|
@Nonnull java.lang.String map(java.lang.String resourcePath)
String path = resourcePath;
if (path != null && path.matches(".*?/jcr:content/(associated|model|variations).*")) {
path = path.replaceFirst("jcr:content/((associated|model|variations)", "$1");
return path;
}
resourcePath - the resource path to map@Nonnull java.lang.String unmap(java.lang.String apiPath)
String path = apiPath;
if (path != null && path.matches(".*?/(associated|model|variations).*")) {
return path.replaceFirst("(associated|model|variations)", "jcr:content/$1");
}
return path;
apiPath - the api path to unmapCopyright © 2010 - 2023 Adobe. All Rights Reserved