Class PentahoCompiledPermissionsImpl

  • All Implemented Interfaces:
    org.apache.jackrabbit.core.security.authorization.AccessControlListener, org.apache.jackrabbit.core.security.authorization.CompiledPermissions

    public class PentahoCompiledPermissionsImpl
    extends org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
    implements org.apache.jackrabbit.core.security.authorization.AccessControlListener
    A copy-paste of CompiledPermissionsImpl modified with more lenient locking on cache to prevent deadlocks between clearCache() and canRead(org.apache.jackrabbit.spi.Path, org.apache.jackrabbit.core.id.ItemId) as detailed in BISERVER-8382
    This shouldn't differ from CompiledPermissionsImpl except for the extra lock and the synchronized changes within canRead(Path, ItemId)
    See Also:
    CompiledPermissionsImpl
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions

        org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result
    • Field Summary

      • Fields inherited from interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions

        NO_PERMISSION
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void acModified​(org.apache.jackrabbit.core.security.authorization.AccessControlModifications modifications)  
      protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildRepositoryResult()  
      protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildResult​(org.apache.jackrabbit.spi.Path absPath)  
      boolean canRead​(org.apache.jackrabbit.spi.Path path, org.apache.jackrabbit.core.id.ItemId itemId)
      Changed so that access to entryCollector is done outside of a monitor synchronized block.
      Should be functionally equivalent to CompiledPermissions#canRead(Path, ItemId)
      protected void clearCache()  
      void close()  
      protected org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl getPrivilegeManagerImpl()  
      org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result getResult​(org.apache.jackrabbit.spi.Path absPath)
      We override this method as the superclass implementation caches permissions in an LRU cache.
      • Methods inherited from class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions

        canReadAll, getPrivileges, getPrivilegeSet, grants, hasPrivileges
    • Method Detail

      • buildResult

        protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildResult​(org.apache.jackrabbit.spi.Path absPath)
                                                                                                            throws javax.jcr.RepositoryException
        Specified by:
        buildResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        Throws:
        javax.jcr.RepositoryException
        See Also:
        AbstractCompiledPermissions.buildResult(org.apache.jackrabbit.spi.Path)
      • buildRepositoryResult

        protected org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result buildRepositoryResult()
                                                                                                                      throws javax.jcr.RepositoryException
        Specified by:
        buildRepositoryResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        Throws:
        javax.jcr.RepositoryException
      • getPrivilegeManagerImpl

        protected org.apache.jackrabbit.core.security.authorization.PrivilegeManagerImpl getPrivilegeManagerImpl()
                                                                                                          throws javax.jcr.RepositoryException
        Specified by:
        getPrivilegeManagerImpl in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        Throws:
        javax.jcr.RepositoryException
        See Also:
        AbstractCompiledPermissions.getPrivilegeManagerImpl()
      • clearCache

        protected void clearCache()
        Overrides:
        clearCache in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        See Also:
        AbstractCompiledPermissions.clearCache()
      • close

        public void close()
        Specified by:
        close in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
        Overrides:
        close in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        See Also:
        CompiledPermissions.close()
      • canRead

        public boolean canRead​(org.apache.jackrabbit.spi.Path path,
                               org.apache.jackrabbit.core.id.ItemId itemId)
                        throws javax.jcr.RepositoryException
        Changed so that access to entryCollector is done outside of a monitor synchronized block.
        Should be functionally equivalent to CompiledPermissions#canRead(Path, ItemId)
        Specified by:
        canRead in interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions
        Throws:
        javax.jcr.RepositoryException
        See Also:
        CompiledPermissions.canRead(Path, ItemId)
      • acModified

        public void acModified​(org.apache.jackrabbit.core.security.authorization.AccessControlModifications modifications)
        Specified by:
        acModified in interface org.apache.jackrabbit.core.security.authorization.AccessControlListener
      • getResult

        public org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions.Result getResult​(org.apache.jackrabbit.spi.Path absPath)
                                                                                                       throws javax.jcr.RepositoryException
        We override this method as the superclass implementation caches permissions in an LRU cache. Other than not caching the result the functionality is identical to AbstractCompiledPermissions.getResult(org.apache.jackrabbit.spi.Path)
        Overrides:
        getResult in class org.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
        Parameters:
        absPath -
        Returns:
        CompiledPermissions
        Throws:
        javax.jcr.RepositoryException