Examples of UriPath


Examples of org.apache.slide.common.UriPath

        if (actionUri == ActionNode.ALL_URI) {
            Element allElm = new Element(E_ALL, DNSP);
            privilegeElm.addContent(allElm);
        }
        else {
            Element actionElm = new Element(new UriPath(actionUri).lastSegment(), DNSP);
            privilegeElm.addContent(actionElm);
        }
        return privilegeElm;
    }
View Full Code Here

Examples of org.apache.slide.common.UriPath

                                         WebdavStatus.SC_BAD_REQUEST,
                                         "This report is only defined for depth=0."),
                resourcePath
            );
        }
        UriPath resourcepath = new UriPath(resourcePath);
        NamespaceConfig namespaceConfig = token.getNamespaceConfig();
        UriPath userspath = namespaceConfig.getUsersPath() != null
            ? new UriPath(namespaceConfig.getUsersPath())
            : null;
        UriPath groupspath = namespaceConfig.getGroupsPath() != null
            ? new UriPath(namespaceConfig.getGroupsPath())
            : null;
        UriPath rolespath = namespaceConfig.getRolesPath() != null
            ? new UriPath(namespaceConfig.getRolesPath())
            : null;
        if (!resourcepath.equals(userspath) &&
            !resourcepath.equals(groupspath) &&
            !resourcepath.equals(rolespath)) {
            throw new PreconditionViolationException(
View Full Code Here

Examples of org.apache.slide.common.UriPath

                // NodeRevisionDescriptor object
                isCollection = true;
                revisionDescriptor = new NodeRevisionDescriptor(0);
               
                if (!Configuration.useBinding(token.getUri(lightSToken, object.getUri()).getStore())) {
                    revisionDescriptor.setName(new UriPath(object.getUri()).lastSegment());
                }
               
                hrefElement.setText(
                    WebdavUtils.getAbsolutePath(object.getUri(), req,
                                                getConfig()));
View Full Code Here

Examples of org.apache.slide.common.UriPath

            token = new SlideTokenWrapper(token, false);
        }
       
        if (pathOnly) {
            String[] uriTokens = object.getPath().tokens();
            UriPath path = new UriPath("/");
            Uri currentUri = namespace.getUri(token, path.toString());
            Uri objectUri = namespace.getUri(token, object.getUri());
            if (!storeOnly || currentUri.getStore() == objectUri.getStore()) {
                result.add( retrieve(token, path.toString()) );
            }
           
            for (int i = 0; i < uriTokens.length; i++) {
                path = path.child( uriTokens[i] );
                currentUri = namespace.getUri(token, path.toString());
                if (i == uriTokens.length - 1 && !includeSelf) {
                    break;
                }
                if (!storeOnly || currentUri.getStore() == objectUri.getStore()) {
                    result.add( retrieve(token, path.toString()) );
                }
            }
}
        else {
            // TODO
View Full Code Here

Examples of org.apache.slide.common.UriPath

            setCreationUser(token, revisionDescriptor);
        }
        // set the display name (in case of copy)
        if (!Configuration.useBinding(namespace.getUri(token, strUri).getStore())) {
            if (revisionDescriptor.getName() == null || revisionDescriptor.getName().length() == 0) {
                revisionDescriptor.setName(new UriPath(strUri).lastSegment());
            }
        }
       
        Uri objectUri = namespace.getUri(token, strUri);
       
View Full Code Here

Examples of org.apache.slide.common.UriPath

            revisionDescriptor.setDefaultProperties(defaultProperties);
        }
        if (namespaceConfig.isPrincipal(associatedObject.getUri())) {
            // principals must have DAV:displayname
            if (revisionDescriptor.getName() == null || revisionDescriptor.getName().length() == 0) {
                UriPath uripath = new UriPath(associatedObject.getUri());
                revisionDescriptor.setName(uripath.lastSegment());
            }
            // principals must have DAV:principal in resourcetype
            String rt = revisionDescriptor.getResourceType();
            if (rt.indexOf("principal") < 0) {
                revisionDescriptor.setResourceType(rt+"<principal/>");
View Full Code Here

Examples of org.apache.slide.common.UriPath

        if (namespaceConfig.getCreateObjectAction() == ActionNode.DEFAULT) {
            // do not check during start-up
            return;
        }
       
        String parentUri = String.valueOf(new UriPath(strUri).parent());
        try {
            NodeRevisionDescriptor parentNrd =
                retrieve(token, retrieve(token, parentUri));
            if (isLockNull(parentNrd)) {
                throw new ObjectNotFoundException(parentUri);
View Full Code Here

Examples of org.apache.slide.common.UriPath

            catch (org.apache.slide.content.RevisionDescriptorNotFoundException e) {
                // The object doesn't have any revision, we create a dummy
                // NodeRevisionDescriptor object
                // isCollection = true;
                revisionDescriptor = new NodeRevisionDescriptor(0);
                revisionDescriptor.setName(new UriPath(objectNode.getUri()).lastSegment());
            }
        }
        catch (AccessDeniedException e) {
            e.fillInStackTrace();
            throw e;
View Full Code Here

Examples of org.apache.slide.common.UriPath

                // NodeRevisionDescriptor object
                isCollection = true;
                revisionDescriptor = new NodeRevisionDescriptor(0);
               
                if (!Configuration.useBinding(nsaToken.getUri(sToken, uri).getStore())) {
                    revisionDescriptor.setName(new UriPath(uri).lastSegment());
                }
            }
           
        } catch (AccessDeniedException e) {
            if (revisionDescriptor == null) {
View Full Code Here

Examples of org.apache.slide.common.UriPath

     *
     * @return   an UriPath
     */
    public UriPath getPath() {
        if (path == null) {
            path = new UriPath(getUri());
        }
        return path;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.