Examples of SubjectNode


Examples of org.apache.slide.structure.SubjectNode

                    else if (level > 0) {
                        int nextLevel = level - 1;
                        boolean match = false;
                        Iterator i = memberNodes.iterator();
                        while (!match && i.hasNext()) {
                            SubjectNode nextMatchNode = (SubjectNode)i.next();
                            if (namespaceConfig.isRole(nextMatchNode.getUri())
                                || namespaceConfig.isGroup(nextMatchNode.getUri())) {
                               
                                match = matchPrincipal(token, checkSubject, nextMatchNode, nextLevel);
                            }
                        }
                        return match;
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

     *
     * @throws   SlideException
     * @throws   IOException
     */
    public void execute(String resourcePath, Element multistatusElm, int depth) throws SlideException, IOException {
        SubjectNode currentUserNode = (SubjectNode)security.getPrincipal(slideToken);
        Element queryElm = getQueryElement(resourcePath, currentUserNode);
        new XMLOutputter("  ", true).output(queryElm, System.out);
       
        String absUri = WebdavUtils.getAbsolutePath (resourcePath, contextPath, servletPath, config);
       
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

       
        // Prevent dirty reads
        slideToken.setForceStoreEnlistment(true);
       
       
        SubjectNode toLockSubject = null;
        boolean isCollection = isCollection(lockInfo_lockSubject);
        boolean inheritance = false;
        Date lockDate = null;
       
        switch (lockType) {
           
            case LOCK_CREATION:
               
                try {
                   
                    NamespaceConfig namespaceConfig = token.getNamespaceConfig();
                   
                    try {
                        toLockSubject = (SubjectNode) structure
                            .retrieve(slideToken, lockInfo_lockSubject);
                    } catch (ObjectNotFoundException ex) {
                       
                        // Creating a lock null resource
                        toLockSubject = new SubjectNode();
                       
                        // Creating new subject
                        structure.create(slideToken, toLockSubject,
                                         lockInfo_lockSubject);
                       
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

            } catch (LinkedObjectNotFoundException e) {
                int statusCode = getErrorCode( e );
                sendError( statusCode, e );
                throw new WebdavException( statusCode );
            } catch (ObjectNotFoundException e) {
                SubjectNode subject = new SubjectNode();
                // Creating an object
                structure.create(slideToken, subject, resourcePath);
               
                NodeRevisionDescriptor revisionDescriptor =
                    new NodeRevisionDescriptor(req.getContentLength());
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

        NodeRevisionDescriptors nrds = content.retrieve(slideToken, resourcePath);
        NodeRevisionDescriptor nrd = content.retrieve(slideToken, nrds);
        Enumeration permissions = security.enumeratePermissions(slideToken, resourcePath, true);
        while (permissions != null && permissions.hasMoreElements()) {
            NodePermission p = (NodePermission)permissions.nextElement();
            SubjectNode principalNode = SubjectNode.getSubjectNode(p.getSubjectUri());
            String principalPath = getPrincipalPath(principalNode, nrd);
            if (principalPath != null) {
                multistatusElm.addContent(getResponseElement(slideToken, principalPath, new NodeRevisionNumber(), requestedProperties));
            }
        }
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

                    if (object instanceof LinkNode) {
                        String linkedUri =
                            objectDefinition.getAttribute("linkedUri");
                        accessToken.getStructureHelper().createLink
                            (token, (LinkNode) object, uri,
                             new SubjectNode(linkedUri));
                    } else {
                        accessToken.getStructureHelper().create
                            (token, object, uri);
                    }
                } catch (ObjectAlreadyExistsException e) {
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

        }
       
        // Create VHR/VR
        UriHandler vhrUh = UriHandler.createNextHistoryUri( sToken, nsaToken, rUh );
        String vhrUri = String.valueOf( vhrUh );
        SubjectNode vhrNode = new SubjectNode();
        structure.create( sToken, vhrNode, String.valueOf(vhrUh) );
        content.create( sToken, vhrUri, true ); //isVersioned=true
        content.create( sToken, vhrUri, vrNrd, rNrc );
        NodeRevisionDescriptors vhrNrds =
            content.retrieve( sToken, vhrUri );
        content.create(
            sToken, vhrUri, null, vhrNrd, null ); //branch=null, revisionContent=null
       
        // Create VR node
        NodeRevisionNumber vrVersion = vrNrd.getRevisionNumber();
        SubjectNode vrNode = new SubjectNode();
        UriHandler vrUh =
            UriHandler.createVersionUri( vhrUh, String.valueOf(vrVersion) );
        String vrUri = String.valueOf( vrUh );
        structure.create( sToken, vrNode, String.valueOf(vrUh) );
       
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

                                             pHelp.createHrefValue(evUri)) );
        // set workspace
        setWorkspaceProperty( vcrUri, vcrNrd );
       
        // store
        SubjectNode vcrNode = new SubjectNode();
        structure.create( sToken, vcrNode, vcrUri );
        NodeRevisionContent evContent =
            content.retrieve( sToken, evNrds, evNrd );
        content.create( sToken, vcrUri, vcrNrd, evContent );
       
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

        }
        wsNrd.setCreationDate( new Date() ); // P_CREATIONDATE
        setCreationUser(wsNrd);
       
        // Create the ws resource
        SubjectNode wsNode = new SubjectNode();
        structure.create( sToken, wsNode, wsUri );
        content.create( sToken, wsUri, wsNrd, null ); // revisionContent = null
       
        // Set status created
        resp.setStatus( WebdavStatus.SC_CREATED );
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

            NodeRevisionDescriptors vhrNrds = content.retrieve(sToken, vhUri);
           
            // create the workingresource
            UriHandler wrUh = UriHandler.createNextWorkingresourceUri( sToken, nsaToken, rUh );
            String wrUri = String.valueOf( wrUh );
            SubjectNode wrNode = new SubjectNode();
            structure.create( sToken, wrNode, String.valueOf(wrUh) );
           
            // set WR props
            NodeRevisionDescriptor wrNrd = new NodeRevisionDescriptor();
            i = pHelp.createInitialProperties(WorkingImpl.getInstance()).iterator();
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.