Package org.apache.slide.structure

Examples of org.apache.slide.structure.SubjectNode


        System.out.println("now execute: " + theExecutableCommand);
       
        //
        // fake one result
        //
        ObjectNode node = new SubjectNode("/"); // this will return the root folder
        RequestedResource resource = null;
        IBasicQuery query = factory.getQuery();
       
        try {
            resource = new ComparableResourceImpl
View Full Code Here


            // As proposed on February 08, 2003 by Lisa Dusseault in w3c-dist-auth-request@w3.org
            // >>>>>>>>>> start principal-URL >>>>>>>>>>>>
            if( lockdiscoveryIncludesPrincipalURL ) {
                Element principalUrl = new Element( E_PRINCIPAL_URL, DNSP);
                activelock.addContent(principalUrl);
                SubjectNode snode =
                    SubjectNode.getSubjectNode(objectLockToken.getSubjectUri());
                String subjectUri = objectLockToken.getSubjectUri();
                if (snode.equals(SubjectNode.UNAUTHENTICATED)) {
                    String userspath = nsaToken.getNamespaceConfig().getUsersPath();
                    subjectUri = userspath+"/"+snode.toString();
                }
                Element puhref = new Element(E_HREF, DNSP);
                principalUrl.addContent(puhref);
               
                puhref.setText(
View Full Code Here

                : new XMLValue((String)v);
        }
        else {
            XMLValue xmlValue = new XMLValue();
            Uri principalUri = nsaToken.getUri(sToken, revisionDescriptors.getUri());
            SubjectNode principalNode = (SubjectNode)principalUri.getStore().retrieveObject(principalUri);
            Enumeration roles = ((ACLSecurityImpl)nsaToken.getSecurityHelper()).getGroupMembership(sToken, principalNode);
            while (roles.hasMoreElements()) {
                String rolePath = (String)roles.nextElement();
                String roleHref = slideContextPath+rolePath;
                xmlValue.addHref(roleHref);
View Full Code Here

     *
     * @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(org.jdom.output.Format.getPrettyFormat()).output(queryElm, System.out);
       
        String absUri = WebdavUtils.getAbsolutePath (resourcePath, slideContextPath, config);
       
View Full Code Here

        System.out.println("now execute: " + theExecutableCommand);

        //
        // fake one result
        //
        ObjectNode node = new SubjectNode("/"); // this will return the root folder
        RequestedResource resource = null;
        IBasicQuery query = factory.getQuery();

        try {
            resource = new ComparableResourceImpl
View Full Code Here

     *
     * @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

        // If everything is ok : 201 - Created / OK
        resp.setStatus(WebdavStatus.SC_CREATED);
       
        try {
            if (!isLockNull) {
                SubjectNode collection = new SubjectNode();
                structure.create(slideToken, collection, colName);
                content.create(slideToken, colName, revisionDescriptor, null);
            }
            else {
                content.store(slideToken, colName, revisionDescriptor, null);
View Full Code Here

        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

            // As proposed on February 08, 2003 by Lisa Dusseault in w3c-dist-auth-request@w3.org
            // >>>>>>>>>> start principal-URL >>>>>>>>>>>>
            if( lockdiscoveryIncludesPrincipalURL ) {
                Element principalUrl = new Element( E_PRINCIPAL_URL, DNSP);
                activelock.addContent(principalUrl);
                SubjectNode snode =
                    SubjectNode.getSubjectNode(objectLockToken.getSubjectUri());
                String subjectUri = objectLockToken.getSubjectUri();
                if (snode == SubjectNode.UNAUTHENTICATED) {
                    String userspath = nsaToken.getNamespaceConfig().getUsersPath();
                    subjectUri = userspath+"/"+snode.toString();
                }
                Element puhref = new Element(E_HREF, DNSP);
                principalUrl.addContent(puhref);
               
                puhref.setText(
View Full Code Here

                : new XMLValue((String)v);
        }
        else {
            XMLValue xmlValue = new XMLValue();
            Uri principalUri = nsaToken.getUri(sToken, revisionDescriptors.getUri());
            SubjectNode principalNode = (SubjectNode)principalUri.getStore().retrieveObject(principalUri);
            Enumeration roles = ((ACLSecurityImpl)nsaToken.getSecurityHelper()).getGroupMembership(sToken, principalNode);     
            while (roles.hasMoreElements()) {
                String rolePath = (String)roles.nextElement();
    // FIXME wihtout servletPath??
                String roleHref = contextPath+rolePath;
View Full Code Here

TOP

Related Classes of org.apache.slide.structure.SubjectNode

Copyright © 2018 www.massapicom. 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.