Merge tag 'v2.3.21' into testing
[gpl/argeo-jcr.git] / org.argeo.cms.jcr / src / org / argeo / cms / jcr / acr / JcrContentProvider.java
index 5fc7d7c241d2496b040a13d2f2a0b68fa1fc7ed8..3850b0c0c4f33e4310f86d3f44218e420edd5361 100644 (file)
@@ -25,7 +25,7 @@ import org.argeo.api.acr.spi.ContentProvider;
 import org.argeo.api.acr.spi.ProvidedContent;
 import org.argeo.api.acr.spi.ProvidedSession;
 import org.argeo.api.cms.CmsConstants;
-import org.argeo.cms.acr.ContentUtils;
+import org.argeo.cms.acr.CmsContent;
 import org.argeo.cms.jcr.CmsJcrUtils;
 import org.argeo.jcr.JcrException;
 import org.argeo.jcr.JcrUtils;
@@ -48,7 +48,7 @@ public class JcrContentProvider implements ContentProvider, NamespaceContext {
                if ("/".equals(mountPath))
                        throw new IllegalArgumentException("JCR content provider cannot be root /");
                Objects.requireNonNull(mountPath);
-               jcrWorkspace = ContentUtils.getParentPath(mountPath)[1];
+               jcrWorkspace = CmsContent.getParentPath(mountPath)[1];
                adminSession = CmsJcrUtils.openDataAdminSession(jcrRepository, jcrWorkspace);
        }
 
@@ -77,7 +77,7 @@ public class JcrContentProvider implements ContentProvider, NamespaceContext {
 
        @Override
        public boolean exists(ProvidedSession contentSession, String relativePath) {
-               String jcrPath = ContentUtils.SLASH + relativePath;
+               String jcrPath = '/' + relativePath;
                return new JcrContent(contentSession, this, jcrWorkspace, jcrPath).exists();
        }
 
@@ -261,7 +261,7 @@ public class JcrContentProvider implements ContentProvider, NamespaceContext {
         * workspace of this provider.
         */
        private String toJcrPath(String relativePath) {
-               return ContentUtils.SLASH + relativePath;
+               return '/' + relativePath;
        }
 
        /*