Class ACLCache

java.lang.Object
de.hybris.platform.persistence.security.ACLCache
All Implemented Interfaces:
Serializable, Cloneable

public final class ACLCache extends Object implements Serializable, Cloneable
See Also:
  • Method Details

    • create

      public static ACLCache create(PK itemPK, long version)
    • load

      public static ACLCache load(PK itemPK, long version, Collection<ACLEntryCache> allACLs)
    • translatePermissionToBoolean

      public static boolean translatePermissionToBoolean(int result)
      Maps the 4-state results of calculatePermission(...) to boolean values. Uses DEFAULT_PERMISSION as return value for ACLRemote.EVEN and ACLRemote.NOT_FOUND.
    • needsUpdate

      public boolean needsUpdate()
    • getUpdateableACLs

      public Collection<ACLEntryCache> getUpdateableACLs()
    • wroteChanges

      public void wroteChanges()
    • getItemPK

      public PK getItemPK()
    • getVersion

      public long getVersion()
    • setVersion

      public void setVersion(long newVersion)
    • clone

      protected Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • getRestrictedPrincipals

      public Collection<PK> getRestrictedPrincipals()
      Returns:
      Collection of principal PK strings.
    • getPermissionMap

      public Map<PK,List<Boolean>> getPermissionMap(List<PK> rightPKs)
       rights =                 [ r1  , r2    ,r3   ]
       map = { pcpl1 -> [ T            ,F              ,null   ],
                        pcpl2 -> [ null ,F,     ,null ]
              }
       
    • setPermissionMap

      public void setPermissionMap(List<PK> rightPKs, Map<PK,List<Boolean>> principalToBooleanMap) throws EJBSecurityException
       rights =                 [ r1  , r2    ,r3   ]
       map = { pcpl1 -> [ T            ,F              ,null   ],
                        pcpl2 -> [ null ,F,     ,null ]
              }
       
      Parameters:
      rightPKs -
      principalToBooleanMap -
      Throws:
      EJBSecurityException
    • getPermissions

      public Collection<PK> getPermissions(PK principalPK, boolean negative)
      Returns:
      collection of UserRight PK strings.
    • findPermission

      public int findPermission(PK principalPK, PK permissionPK)
    • isPermissionRemoved

      public boolean isPermissionRemoved(PK principalPK, PK permissionPK)
    • setPermission

      public boolean setPermission(PK principalPK, PK permissionPK, boolean negative) throws EJBSecurityException
      Throws:
      EJBSecurityException
    • removePermission

      public boolean removePermission(PK principalPK, PK permissionPK) throws EJBSecurityException
      Throws:
      EJBSecurityException
    • deletePermission

      public void deletePermission()