Package mondrian.olap
Class RoleImpl
java.lang.Object
mondrian.olap.RoleImpl
- All Implemented Interfaces:
Role
Default implementation of the
Role
interface.- Since:
- Oct 5, 2002
- Author:
- jhyde, lucboudreau
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Implementation ofRole.HierarchyAccess
that delegates all methods to an underlying hierarchy access.Nested classes/interfaces inherited from interface mondrian.olap.Role
Role.AllHierarchyAccess, Role.HierarchyAccess, Role.RollupPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canAccess
(OlapElement olapElement) Returns whether this role is allowed to see a given element.protected RoleImpl
clone()
static Role.HierarchyAccess
createAllAccess
(Hierarchy hierarchy) Creates an element which represents all access to a hierarchy.boolean
Returns the access this role has to a given cube.Returns the access this role has to a given dimension.Returns the access this role has to a given hierarchy.Returns the access this role has to a given level.Returns the access this role has to a given member.Returns the access this role has to a given named set.Returns the access this role has to a given schema.getAccessDetails
(Hierarchy hierarchy) Returns the details of this hierarchy's access, or null if the hierarchy has not been given explicit access.void
Defines access to a cube.void
Defines access to a dimension.void
grant
(Hierarchy hierarchy, Access access, Level topLevel, Level bottomLevel, Role.RollupPolicy rollupPolicy) Defines access to a hierarchy.void
Defines access to a member in a hierarchy.void
Defines access to all cubes and dimensions in a schema.int
hashCode()
boolean
Returns whether modifications are possible.void
Prevents any further modifications.Returns a copy of thisRole
which can be modified.static Role
Returns a role that is the union of the given roles.
-
Constructor Details
-
RoleImpl
public RoleImpl()Creates a role with no permissions.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
clone
-
makeMutableClone
Returns a copy of thisRole
which can be modified. -
makeImmutable
public void makeImmutable()Prevents any further modifications. -
isMutable
public boolean isMutable()Returns whether modifications are possible. -
grant
Defines access to all cubes and dimensions in a schema.- Parameters:
schema
- Schema whose access to grant/deny.access
- Anaccess code
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given schema. -
grant
Defines access to a cube.- Parameters:
cube
- Cube whose access to grant/deny.access
- Anaccess code
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given cube. -
grant
Defines access to a dimension.- Parameters:
dimension
- Dimension whose access to grant/deny.access
- An Access instance
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given dimension. -
grant
public void grant(Hierarchy hierarchy, Access access, Level topLevel, Level bottomLevel, Role.RollupPolicy rollupPolicy) Defines access to a hierarchy.- Parameters:
hierarchy
- Hierarchy whose access to grant/deny.access
- Anaccess code
topLevel
- Top-most level which can be accessed, or null if the highest level. May only be specified ifaccess
isAccess.CUSTOM
.bottomLevel
- Bottom-most level which can be accessed, or null if the lowest level. May only be specified ifaccess
isAccess.CUSTOM
.rollupPolicy
- Rollup policy
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given hierarchy. -
getAccessDetails
Description copied from interface:Role
Returns the details of this hierarchy's access, or null if the hierarchy has not been given explicit access.- Specified by:
getAccessDetails
in interfaceRole
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given level. -
grant
Defines access to a member in a hierarchy.Notes:
- The order of grants matters. If you grant/deny access to a member, previous grants/denials to its descendants are ignored.
- Member grants do not supersde top/bottom levels set using
grant(Hierarchy, Access, Level, Level, mondrian.olap.Role.RollupPolicy)
. - If you have access to a member, then you can see its ancestors even those explicitly denied, up to the top level.
-
getAccess
Description copied from interface:Role
Returns the access this role has to a given member. -
getAccess
Description copied from interface:Role
Returns the access this role has to a given named set. -
canAccess
Description copied from interface:Role
Returns whether this role is allowed to see a given element. -
createAllAccess
Creates an element which represents all access to a hierarchy.- Parameters:
hierarchy
- Hierarchy- Returns:
- element representing all access to a given hierarchy
-
union
Returns a role that is the union of the given roles.- Parameters:
roleList
- List of roles- Returns:
- Union role
-