Package org.modeshape.web.shared

Examples of org.modeshape.web.shared.Policy


        if (acl == null) {
            acl = new Acl();
            node.setAcl(acl);
        }
       
        Policy policy = new Policy();
        policy.setPrincipal(name);
        policy.add(JcrPermission.ALL);
       
        acl.addPolicy(policy);
        accessList.show(node);
        saveButton.enable();
    }
View Full Code Here


        Acl acl = new Acl();

        AccessControlEntry[] entries = accessList.getAccessControlEntries();
        for (AccessControlEntry entry : entries) {
            Policy policy = new Policy();
            policy.setPrincipal(entry.getPrincipal().getName());
            Privilege[] privileges = entry.getPrivileges();
            for (Privilege privilege : privileges) {
                policy.add(JcrPermission.forName(privilege.getName()));
            }
            acl.addPolicy(policy);
        }
        return acl;
    }
View Full Code Here

TOP

Related Classes of org.modeshape.web.shared.Policy

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.