Package org.exist.security

Examples of org.exist.security.SimpleACLPermission


        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //add the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
                    aclPermission.addACE(access_type, target, name, mode);
                } else {
                    throw new PermissionDeniedException("ACL like permissions have not been enabled");
                }
            }
        });
View Full Code Here


        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //insert the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
                    aclPermission.insertACE(index, access_type, target, name, mode);
                } else {
                    throw new PermissionDeniedException("ACL like permissions have not been enabled");
                }
            }
        });
View Full Code Here

        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //insert the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
                    aclPermission.modifyACE(index, access_type, mode);
                } else {
                    throw new PermissionDeniedException("ACL like permissions have not been enabled");
                }
            }
        });
View Full Code Here

        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //remove the ace
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
                    aclPermission.removeACE(index);
                } else {
                    throw new PermissionDeniedException("ACL like permissions have not been enabled");
                }
            }
        });
View Full Code Here

        PermissionFactory.updatePermissions(context.getBroker(), pathUri, new PermissionModifier(){
            @Override
            public void modify(final Permission permission) throws PermissionDeniedException {
                if(permission instanceof SimpleACLPermission) {
                    //clear the acl
                    final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
                    aclPermission.clear();
                } else {
                    throw new PermissionDeniedException("ACL like permissions have not been enabled");
                }
            }
        });
View Full Code Here

        builder.addAttribute(new QName("owner"), permission.getOwner().getName());
        builder.addAttribute(new QName("group"), permission.getGroup().getName());
        builder.addAttribute(new QName("mode"), permission.toString());

        if(permission instanceof SimpleACLPermission) {
            final SimpleACLPermission aclPermission = (SimpleACLPermission)permission;
            builder.startElement(new QName("acl", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
            builder.addAttribute(new QName("entries"), String.valueOf(aclPermission.getACECount()));

            for(int i = 0; i < aclPermission.getACECount(); i++) {
                builder.startElement(new QName("ace", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX), null);
                builder.addAttribute(new QName("index"), String.valueOf(i));
                builder.addAttribute(new QName("target"), aclPermission.getACETarget(i).name());
                builder.addAttribute(new QName("who"), aclPermission.getACEWho(i));
                builder.addAttribute(new QName("access_type"), aclPermission.getACEAccessType(i).name());
                builder.addAttribute(new QName("mode"), aclPermission.getACEModeString(i));
                builder.endElement();
            }

            builder.endElement();
        }
View Full Code Here

TOP

Related Classes of org.exist.security.SimpleACLPermission

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.