Package mondrian.olap

Class DelegatingRole

  • All Implemented Interfaces:
    Role

    public class DelegatingRole
    extends Object
    implements Role
    DelegatingRole implements Role by delegating all methods to an underlying Role.

    This is a convenient base class if you want to override just a few of Role's methods.

    Since:
    Mar 29 2007
    Author:
    Richard M. Emberson
    • Field Detail

      • role

        protected final Role role
    • Constructor Detail

      • DelegatingRole

        public DelegatingRole​(Role role)
        Creates a DelegatingRole.
        Parameters:
        role - Underlying role.
    • Method Detail

      • getAccess

        public Access getAccess​(Schema schema)
        Description copied from interface: Role
        Returns the access this role has to a given schema.
        Specified by:
        getAccess in interface Role
      • getAccess

        public Access getAccess​(Cube cube)
        Description copied from interface: Role
        Returns the access this role has to a given cube.
        Specified by:
        getAccess in interface Role
      • getAccess

        public Access getAccess​(Dimension dimension)
        Description copied from interface: Role
        Returns the access this role has to a given dimension.
        Specified by:
        getAccess in interface Role
      • getAccess

        public Access getAccess​(Hierarchy hierarchy)
        Description copied from interface: Role
        Returns the access this role has to a given hierarchy.
        Specified by:
        getAccess in interface Role
      • getAccessDetails

        public Role.HierarchyAccess getAccessDetails​(Hierarchy hierarchy)
        Returns the details of this hierarchy's access, or null if the hierarchy has not been given explicit access.

        This implementation returns the same access as the underlying role. Derived class may choose to refine access by creating a subclass of RoleImpl.DelegatingHierarchyAccess.

        Specified by:
        getAccessDetails in interface Role
      • getAccess

        public Access getAccess​(Level level)
        Description copied from interface: Role
        Returns the access this role has to a given level.
        Specified by:
        getAccess in interface Role
      • getAccess

        public Access getAccess​(Member member)
        Description copied from interface: Role
        Returns the access this role has to a given member.
        Specified by:
        getAccess in interface Role
      • getAccess

        public Access getAccess​(NamedSet set)
        Description copied from interface: Role
        Returns the access this role has to a given named set.
        Specified by:
        getAccess in interface Role
      • canAccess

        public boolean canAccess​(OlapElement olapElement)
        Description copied from interface: Role
        Returns whether this role is allowed to see a given element.
        Specified by:
        canAccess in interface Role