throw new IllegalArgumentException(path + " is not an absolute path");
ContentProvider contentProvider = contentRepository.getMountManager().findContentProvider(path);
String mountPath = contentProvider.getMountPath();
- String relativePath = ContentUtils.relativize(mountPath, path);
+ String relativePath = CmsContent.relativize(mountPath, path);
ProvidedContent content = contentProvider.get(CmsContentSession.this, relativePath);
return content;
}
throw new IllegalArgumentException(path + " is not an absolute path");
ContentProvider contentProvider = contentRepository.getMountManager().findContentProvider(path);
String mountPath = contentProvider.getMountPath();
- String relativePath = ContentUtils.relativize(mountPath, path);
+ String relativePath = CmsContent.relativize(mountPath, path);
return contentProvider.exists(this, relativePath);
}
*/
@Override
public Content getMountPoint(String path) {
- String[] parent = ContentUtils.getParentPath(path);
+ String[] parent = CmsContent.getParentPath(path);
ProvidedContent mountParent = (ProvidedContent) get(parent[0]);
// Content mountPoint = mountParent.getProvider().get(CmsContentSession.this, null, path);
return mountParent.getMountPoint(parent[1]);
: "scopePath=" + scopePath + ", contentProvider path=" + contentProvider.getKey();
// TODO deal with depth
String relPath;
-// if (scopePath.startsWith(contentProvider.getKey())) {
- relPath = scopePath.substring(contentProvider.getKey().length() + 1, scopePath.length());
-// }
-// else {
-// relPath = null;
-// }
+ if (!scopePath.equals(contentProvider.getKey())) {
+ relPath = scopePath.substring(contentProvider.getKey().length() + 1, scopePath.length());
+ } else {
+ relPath = null;
+ }
SearchPartition searchPartition = new SearchPartition(s, relPath, contentProvider.getValue());
searchPartitions.put(contentProvider.getKey(), searchPartition);
}