Class JcrRepositoryFileAclUtils


  • public class JcrRepositoryFileAclUtils
    extends Object
    ACL utilities.

    These utility methods are static because they are used from within Jackrabbit.

    Author:
    mlowery
    • Method Detail

      • getAclMetadata

        public static IAclMetadataStrategy.AclMetadata getAclMetadata​(javax.jcr.Session session,
                                                                      String path,
                                                                      javax.jcr.security.AccessControlList acList)
                                                               throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • setAclMetadata

        public static void setAclMetadata​(javax.jcr.Session session,
                                          String path,
                                          javax.jcr.security.AccessControlList acList,
                                          IAclMetadataStrategy.AclMetadata aclMetadata)
                                   throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • removeAclMetadata

        public static List<javax.jcr.security.AccessControlEntry> removeAclMetadata​(List<javax.jcr.security.AccessControlEntry> acEntries)
                                                                             throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • expandPrivileges

        public static javax.jcr.security.Privilege[] expandPrivileges​(javax.jcr.security.Privilege[] privileges,
                                                                      boolean expandNonStandardOnly)
        Expands all aggregate privileges.
        Parameters:
        privileges - input privileges
        expandNonStandardOnly - if true expand only privileges outside of jcr: namespace
        Returns:
        expanded privileges
      • createAcl

        public static org.pentaho.platform.api.repository2.unified.RepositoryFileAcl createAcl​(javax.jcr.Session session,
                                                                                               PentahoJcrConstants pentahoJcrConstants,
                                                                                               Serializable fileId,
                                                                                               org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl)
                                                                                        throws javax.jcr.ItemNotFoundException,
                                                                                               javax.jcr.RepositoryException
        Throws:
        javax.jcr.ItemNotFoundException
        javax.jcr.RepositoryException
      • addPermission

        public static void addPermission​(javax.jcr.Session session,
                                         PentahoJcrConstants pentahoJcrConstants,
                                         Serializable fileId,
                                         org.pentaho.platform.api.repository2.unified.RepositoryFileSid recipient,
                                         EnumSet<org.pentaho.platform.api.repository2.unified.RepositoryFilePermission> permissions)
                                  throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • setOwner

        public static void setOwner​(javax.jcr.Session session,
                                    PentahoJcrConstants pentahoJcrConstants,
                                    org.pentaho.platform.api.repository2.unified.RepositoryFile file,
                                    org.pentaho.platform.api.repository2.unified.RepositoryFileSid owner)
                             throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • setFullControl

        public static void setFullControl​(javax.jcr.Session session,
                                          PentahoJcrConstants pentahoJcrConstants,
                                          Serializable fileId,
                                          org.pentaho.platform.api.repository2.unified.RepositoryFileSid sid)
                                   throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • addAce

        public static void addAce​(javax.jcr.Session session,
                                  PentahoJcrConstants pentahoJcrConstants,
                                  Serializable id,
                                  org.pentaho.platform.api.repository2.unified.RepositoryFileSid recipient,
                                  EnumSet<org.pentaho.platform.api.repository2.unified.RepositoryFilePermission> permission)
                           throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • updateAcl

        public static void updateAcl​(javax.jcr.Session session,
                                     org.pentaho.platform.api.repository2.unified.RepositoryFileAcl acl)
                              throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException
      • getAcl

        public static org.pentaho.platform.api.repository2.unified.RepositoryFileAcl getAcl​(javax.jcr.Session session,
                                                                                            PentahoJcrConstants pentahoJcrConstants,
                                                                                            Serializable id)
                                                                                     throws javax.jcr.RepositoryException
        Throws:
        javax.jcr.RepositoryException