Package org.apache.slide.common

Examples of org.apache.slide.common.NamespaceConfig


     * @throws SourceException If an exception occurs during this operation
     **/
    public void removeSourcePermission(SourcePermission sourcepermission)
      throws SourceException {

        NamespaceConfig config = this.nat.getNamespaceConfig();

        String subject = null;

        if (sourcepermission instanceof PrincipalSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((PrincipalSourcePermission) sourcepermission).getPrincipal();

            // Test if principal exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof SubjectNode)) {
                    throw new SourceException("Principal '"+
                                              ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for principal '"+
                                          ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                          "'", se);
            }

        } else if (sourcepermission instanceof GroupSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((GroupSourcePermission) sourcepermission).getGroup();

            // Test if group exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof GroupNode)) {
                    throw new SourceException("Group '"+
                                              ((GroupSourcePermission) sourcepermission).getGroup()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for group '"+
                                          ((GroupSourcePermission) sourcepermission).getGroup()+
                                          "'", se);
            }

            subject = "+"+subject; // Additional '+' to expand the group
        } else {
            throw new SourceException("Does't support category of permission");
        }

        boolean negative = sourcepermission.isNegative();
        boolean inheritable = sourcepermission.isInheritable();

        if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_ALL)) {
            removePermission(subject, "/", negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ)) {
            removePermission(subject, config.getReadObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject, config.getReadLocksAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getReadRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getReadRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_SOURCE)) {
            removePermission(subject, config.getReadObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_LOCKS)) {
            removePermission(subject, config.getReadLocksAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_PROPERTY)) {
            removePermission(subject,
                             config.getReadRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_CONTENT)) {
            removePermission(subject,
                             config.getReadRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE)) {
            removePermission(subject,
                             config.getCreateObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject, config.getLockObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getCreateRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getModifyRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getCreateRevisionContentAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getModifyRevisionContentAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_SOURCE)) {
            removePermission(subject,
                             config.getCreateObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_SOURCE)) {
            removePermission(subject,
                             config.getRemoveObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_LOCK_SOURCE)) {
            removePermission(subject, config.getLockObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_PROPERTY)) {
            removePermission(subject,
                             config.getCreateRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_PROPERTY)) {
            removePermission(subject,
                             config.getModifyRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_PROPERTY)) {
            removePermission(subject,
                             config.getRemoveRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_CONTENT)) {
            removePermission(subject,
                             config.getCreateRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_CONTENT)) {
            removePermission(subject,
                             config.getModifyRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_CONTENT)) {
            removePermission(subject,
                             config.getRemoveRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_ACL)) {
            removePermission(subject,
                             config.getReadPermissionsAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE_ACL)) {
            removePermission(subject,
                             config.getGrantPermissionAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRevokePermissionAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_GRANT_PERMISSION)) {
            removePermission(subject,
                             config.getGrantPermissionAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REVOKE_PERMISSION)) {
            removePermission(subject,
                             config.getRevokePermissionAction().getUri(),
                             negative, inheritable);
        }
    }
View Full Code Here


     * @throws SourceException If an exception occurs.
     **/
    public SourcePermission[] getSourcePermissions() throws SourceException {
        try {

            NamespaceConfig config = this.nat.getNamespaceConfig();

            ObjectNode current = structure.retrieve(this.slideToken,
                                                    this.config.getFilesPath()+
                                                    this.path);

            security.checkCredentials(this.slideToken, current,
                                      config.getReadPermissionsAction());

            String userspath = config.getUsersPath();

            // read
            String readObjectUri = config.getReadObjectAction().getUri();
            String readRevisionMetadataUri = config.getReadRevisionMetadataAction().getUri();
            String readRevisionContentUri = config.getReadRevisionContentAction().getUri();

            // write
            String createObjectUri = config.getCreateObjectAction().getUri();
            String removeObjectUri = config.getRemoveObjectAction().getUri();
            String lockObjectUri = config.getLockObjectAction().getUri();
            String readLocksUri = config.getReadLocksAction().getUri();
            String createRevisionMetadataUri = config.getCreateRevisionMetadataAction().getUri();
            String modifyRevisionMetadataUri = config.getModifyRevisionMetadataAction().getUri();
            String removeRevisionMetadataUri = config.getRemoveRevisionMetadataAction().getUri();
            String createRevisionContentUri = config.getCreateRevisionContentAction().getUri();
            String modifyRevisionContentUri = config.getModifyRevisionContentAction().getUri();
            String removeRevisionContentUri = config.getRemoveRevisionContentAction().getUri();

            // read-acl
            String readPermissionsUri = config.getReadPermissionsAction().getUri();

            // write-acl
            String grantPermissionUri = config.getGrantPermissionAction().getUri();
            String revokePermissionUri = config.getRevokePermissionAction().getUri();

            boolean inheritedPermissions = false;
            Vector permissions = new Vector();

            ArrayList sourcepermissions = new ArrayList();
View Full Code Here

     * @throws SourceException If an exception occurs during this operation
     **/
    public void addSourcePermission(SourcePermission sourcepermission)
      throws SourceException {

        NamespaceConfig config = this.nat.getNamespaceConfig();

        String subject = null;

        if (sourcepermission instanceof PrincipalSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((PrincipalSourcePermission) sourcepermission).getPrincipal();

            // Test if principal exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof SubjectNode)) {
                    throw new SourceException("Principal '"+
                                              ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for principal '"+
                                          ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                          "'", se);
            }

        } else if (sourcepermission instanceof GroupSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((GroupSourcePermission) sourcepermission).getGroup();

            // Test if group exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof GroupNode)) {
                    throw new SourceException("Group '"+
                                              ((GroupSourcePermission) sourcepermission).getGroup()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for group '"+
                                          ((GroupSourcePermission) sourcepermission).getGroup()+
                                          "'", se);
            }

            subject = "+"+subject; // Additional '+' to expand the group
        } else {
            throw new SourceException("Does't support category of permission");
        }

        boolean negative = sourcepermission.isNegative();
        boolean inheritable = sourcepermission.isInheritable();

        if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_ALL)) {
            addPermission(subject, "/", negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ)) {
            addPermission(subject, config.getReadObjectAction().getUri(),
                          negative, inheritable);
            addPermission(subject, config.getReadLocksAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getReadRevisionMetadataAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getReadRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_SOURCE)) {
            addPermission(subject, config.getReadObjectAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_LOCKS)) {
            addPermission(subject, config.getReadLocksAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_PROPERTY)) {
            addPermission(subject,
                          config.getReadRevisionMetadataAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_CONTENT)) {
            addPermission(subject,
                          config.getReadRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE)) {
            addPermission(subject, config.getCreateObjectAction().getUri(),
                          negative, inheritable);
            addPermission(subject, config.getRemoveObjectAction().getUri(),
                          negative, inheritable);
            addPermission(subject, config.getLockObjectAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getCreateRevisionMetadataAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getModifyRevisionMetadataAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getRemoveRevisionMetadataAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getCreateRevisionContentAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getModifyRevisionContentAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getRemoveRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_SOURCE)) {
            addPermission(subject, config.getCreateObjectAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_SOURCE)) {
            addPermission(subject, config.getRemoveObjectAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_LOCK_SOURCE)) {
            addPermission(subject, config.getLockObjectAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_PROPERTY)) {
            addPermission(subject,
                          config.getCreateRevisionMetadataAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_PROPERTY)) {
            addPermission(subject,
                          config.getModifyRevisionMetadataAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_PROPERTY)) {
            addPermission(subject,
                          config.getRemoveRevisionMetadataAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_CONTENT)) {
            addPermission(subject,
                          config.getCreateRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_CONTENT)) {
            addPermission(subject,
                          config.getModifyRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_CONTENT)) {
            addPermission(subject,
                          config.getRemoveRevisionContentAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_ACL)) {
            addPermission(subject,
                          config.getReadPermissionsAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE_ACL)) {
            addPermission(subject,
                          config.getGrantPermissionAction().getUri(),
                          negative, inheritable);
            addPermission(subject,
                          config.getRevokePermissionAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_GRANT_PERMISSION)) {
            addPermission(subject,
                          config.getGrantPermissionAction().getUri(),
                          negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REVOKE_PERMISSION)) {
            addPermission(subject,
                          config.getRevokePermissionAction().getUri(),
                          negative, inheritable);
        }
    }
View Full Code Here

     * @throws SourceException If an exception occurs during this operation
     **/
    public void removeSourcePermission(SourcePermission sourcepermission)
      throws SourceException {

        NamespaceConfig config = this.nat.getNamespaceConfig();

        String subject = null;

        if (sourcepermission instanceof PrincipalSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((PrincipalSourcePermission) sourcepermission).getPrincipal();

            // Test if principal exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof SubjectNode)) {
                    throw new SourceException("Principal '"+
                                              ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for principal '"+
                                          ((PrincipalSourcePermission) sourcepermission).getPrincipal()+
                                          "'", se);
            }

        } else if (sourcepermission instanceof GroupSourcePermission) {
            subject = config.getUsersPath()+"/"+
                      ((GroupSourcePermission) sourcepermission).getGroup();

            // Test if group exists
            try {
                ObjectNode objectnode = structure.retrieve(this.slideToken,
                                                           subject);

                if ( !(objectnode instanceof GroupNode)) {
                    throw new SourceException("Group '"+
                                              ((GroupSourcePermission) sourcepermission).getGroup()+
                                              "' doesn't exists");
                }
            } catch (SlideException se) {
                throw new SourceException("Could not retrieve object for group '"+
                                          ((GroupSourcePermission) sourcepermission).getGroup()+
                                          "'", se);
            }

            subject = "+"+subject; // Additional '+' to expand the group
        } else {
            throw new SourceException("Does't support category of permission");
        }

        boolean negative = sourcepermission.isNegative();
        boolean inheritable = sourcepermission.isInheritable();

        if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_ALL)) {
            removePermission(subject, "/", negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ)) {
            removePermission(subject, config.getReadObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject, config.getReadLocksAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getReadRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getReadRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_SOURCE)) {
            removePermission(subject, config.getReadObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_LOCKS)) {
            removePermission(subject, config.getReadLocksAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_PROPERTY)) {
            removePermission(subject,
                             config.getReadRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_CONTENT)) {
            removePermission(subject,
                             config.getReadRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE)) {
            removePermission(subject,
                             config.getCreateObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject, config.getLockObjectAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getCreateRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getModifyRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveRevisionMetadataAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getCreateRevisionContentAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getModifyRevisionContentAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRemoveRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_SOURCE)) {
            removePermission(subject,
                             config.getCreateObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_SOURCE)) {
            removePermission(subject,
                             config.getRemoveObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_LOCK_SOURCE)) {
            removePermission(subject, config.getLockObjectAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_PROPERTY)) {
            removePermission(subject,
                             config.getCreateRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_PROPERTY)) {
            removePermission(subject,
                             config.getModifyRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_PROPERTY)) {
            removePermission(subject,
                             config.getRemoveRevisionMetadataAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_CREATE_CONTENT)) {
            removePermission(subject,
                             config.getCreateRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_MODIFY_CONTENT)) {
            removePermission(subject,
                             config.getModifyRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REMOVE_CONTENT)) {
            removePermission(subject,
                             config.getRemoveRevisionContentAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_READ_ACL)) {
            removePermission(subject,
                             config.getReadPermissionsAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_WRITE_ACL)) {
            removePermission(subject,
                             config.getGrantPermissionAction().getUri(),
                             negative, inheritable);
            removePermission(subject,
                             config.getRevokePermissionAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_GRANT_PERMISSION)) {
            removePermission(subject,
                             config.getGrantPermissionAction().getUri(),
                             negative, inheritable);
        } else if (sourcepermission.getPrivilege().equals(SourcePermission.PRIVILEGE_REVOKE_PERMISSION)) {
            removePermission(subject,
                             config.getRevokePermissionAction().getUri(),
                             negative, inheritable);
        }
    }
View Full Code Here

     * @throws SourceException If an exception occurs.
     **/
    public SourcePermission[] getSourcePermissions() throws SourceException {
        try {

            NamespaceConfig config = this.nat.getNamespaceConfig();

            ObjectNode current = structure.retrieve(this.slideToken,
                                                    this.config.getFilesPath()+
                                                    this.path);

            security.checkCredentials(this.slideToken, current,
                                      config.getReadPermissionsAction());

            String userspath = config.getUsersPath();

            // read
            String readObjectUri = config.getReadObjectAction().getUri();
            String readRevisionMetadataUri = config.getReadRevisionMetadataAction().getUri();
            String readRevisionContentUri = config.getReadRevisionContentAction().getUri();

            // write
            String createObjectUri = config.getCreateObjectAction().getUri();
            String removeObjectUri = config.getRemoveObjectAction().getUri();
            String lockObjectUri = config.getLockObjectAction().getUri();
            String readLocksUri = config.getReadLocksAction().getUri();
            String createRevisionMetadataUri = config.getCreateRevisionMetadataAction().getUri();
            String modifyRevisionMetadataUri = config.getModifyRevisionMetadataAction().getUri();
            String removeRevisionMetadataUri = config.getRemoveRevisionMetadataAction().getUri();
            String createRevisionContentUri = config.getCreateRevisionContentAction().getUri();
            String modifyRevisionContentUri = config.getModifyRevisionContentAction().getUri();
            String removeRevisionContentUri = config.getRemoveRevisionContentAction().getUri();

            // read-acl
            String readPermissionsUri = config.getReadPermissionsAction().getUri();

            // write-acl
            String grantPermissionUri = config.getGrantPermissionAction().getUri();
            String revokePermissionUri = config.getRevokePermissionAction().getUri();

            boolean inheritedPermissions = false;
            Vector permissions = new Vector();

            ArrayList sourcepermissions = new ArrayList();
View Full Code Here

TOP

Related Classes of org.apache.slide.common.NamespaceConfig

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.