Examples of SubjectNode


Examples of org.apache.slide.structure.SubjectNode

     * @throws SourceException if an exception occurs.
     */
    public void createCollection(String collectionname)
      throws SourceException {

        SubjectNode collection = new SubjectNode();
        NodeRevisionDescriptor revisionDescriptor = new NodeRevisionDescriptor(0);

        // Resource type
        revisionDescriptor.setResourceType("<collection/>");

View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

                }

            } catch (ObjectNotFoundException e) {

                // Todo : Check to see if parent exists
                SubjectNode subject = new SubjectNode();

                try {
                    // Creating an object
                    structure.create(slideToken, subject,
                                     config.getFilesPath()+path);
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

            // 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

Examples of org.apache.slide.structure.SubjectNode

                : 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

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

Examples of org.apache.slide.structure.SubjectNode

        // 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

Examples of org.apache.slide.structure.SubjectNode

     */
    public boolean checkLockToken(SlideToken slideToken, NodeLock token) {
        if (!slideToken.isEnforceLockTokens())
            return true;
       
        SubjectNode principalNode = null;
        SubjectNode ownerNode = SubjectNode.getSubjectNode(token.getSubjectUri());
        try {
            principalNode = (SubjectNode)securityHelper.getPrincipal(slideToken);
        }
        catch (SlideException e) {}
        if (Configuration.usePrincipalIdentifiedLocks() &&
            ownerNode != null &&
            ownerNode != SubjectNode.UNAUTHENTICATED &&
            ownerNode.equals(principalNode)) {
            return true;
        }
        else {
        return (slideToken.checkLockToken(token.getLockId()));
    }
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

     * @throws   ObjectNotFoundException
     * @throws   ServiceAccessException
     */
    public boolean checkLockOwner(SlideToken slideToken, NodeLock token) throws ObjectNotFoundException, ServiceAccessException {
        boolean canUnlock = true;
        SubjectNode principal = (SubjectNode)securityHelper.getPrincipal(slideToken);
        SubjectNode lockOwner = SubjectNode.getSubjectNode(token.getSubjectUri());
        if (!securityHelper.matchPrincipal(slideToken, principal, lockOwner)) {
            // it is not the lock owner ... now check the kill-lock privilege
            try {
                securityHelper.checkCredentials(slideToken,
                                                SubjectNode.getSubjectNode(token.getObjectUri()),
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

       
        // lock-types-are-equal
        boolean condition1 = matchToken.getTypeUri().equals(checkToken.getTypeUri());
       
        // user-of-tokens-are-equal OR user-of-matchToken-is-parent
        SubjectNode checkSubject = SubjectNode.getSubjectNode(checkToken.getSubjectUri());
        SubjectNode matchSubject = SubjectNode.getSubjectNode(matchToken.getSubjectUri());
        boolean condition2 =
            securityHelper.matchPrincipal(slideToken, checkSubject, matchSubject);
       
        // lock-types-are-equal OR lock-type-of-matchToken-is-parent
        ActionNode checkAction = ActionNode.getActionNode(checkToken.getTypeUri());
View Full Code Here

Examples of org.apache.slide.structure.SubjectNode

            SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(""));
            slideToken.setForceStoreEnlistment(true);

            // First, we create the root node
            Uri rootUri = getUri(slideToken, "/");
            SubjectNode rootNode = new SubjectNode("/");
            try {
                rootUri.getStore().createObject(rootUri, rootNode);
            } catch (ObjectAlreadyExistsException e) {
                // abort the failed transaction
                getTransactionManager().rollback();
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.