@ProviderType public interface ModelPathMapper
Modifier and Type | Method and Description |
---|---|
String |
map(String resourcePath)
Converts a resource path to a path in the API space.
|
String |
unmap(String apiPath)
Converts an API path to a path in the content space.
|
@Nonnull String map(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 String unmap(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 - 2020 Adobe. All Rights Reserved