|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmondrian.olap.RoleImpl
public class RoleImpl
RoleImpl is Mondrian's default implementation for the
Role interface.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface mondrian.olap.Role |
|---|
Role.HierarchyAccess, Role.RollupPolicy |
| Constructor Summary | |
|---|---|
RoleImpl()
Creates a role with no permissions. |
|
| Method Summary | |
|---|---|
boolean |
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. |
Access |
getAccess(Cube cube)
Returns the access this role has to a given cube. |
Access |
getAccess(Dimension dimension)
Returns the access this role has to a given dimension. |
Access |
getAccess(Hierarchy hierarchy)
Returns the access this role has to a given hierarchy. |
Access |
getAccess(Level level)
Returns the access this role has to a given level. |
Access |
getAccess(Member member)
Returns the access this role has to a given member. |
Access |
getAccess(NamedSet set)
Returns the access this role has to a given named set. |
Access |
getAccess(Schema schema)
Returns the access this role has to a given schema. |
Role.HierarchyAccess |
getAccessDetails(Hierarchy hierarchy)
Returns the details of this hierarchy's access, or null if the hierarchy has not been given explicit access. |
void |
grant(Cube cube,
Access access)
Defines access to a cube. |
void |
grant(Dimension dimension,
Access access)
Defines access to a dimension. |
void |
grant(Hierarchy hierarchy,
Access access,
Level topLevel,
Level bottomLevel,
Role.RollupPolicy rollupPolicy)
Defines access to a hierarchy. |
void |
grant(Member member,
Access access)
Defines access to a member in a hierarchy. |
void |
grant(Schema schema,
Access access)
Defines access to all cubes and dimensions in a schema. |
boolean |
isMutable()
Returns whether modifications are possible. |
void |
makeImmutable()
Prevents any further modifications. |
RoleImpl |
makeMutableClone()
Returns a copy of this Role which can be modified. |
void |
removeTopLevels()
Removes the upper level restriction of each hierarchy in this role. |
static Role |
union(List<Role> roleList)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RoleImpl()
| Method Detail |
|---|
protected RoleImpl clone()
clone in class Objectpublic RoleImpl makeMutableClone()
Role which can be modified.
public void makeImmutable()
public boolean isMutable()
public void grant(Schema schema,
Access access)
schema - Schema whose access to grant/deny.access - An access codepublic Access getAccess(Schema schema)
Role
getAccess in interface Role
public void grant(Cube cube,
Access access)
cube - Cube whose access to grant/deny.access - An access codepublic Access getAccess(Cube cube)
Role
getAccess in interface Rolepublic void removeTopLevels()
For example, it should be possible to resolve [Store].[USA].[CA].[San Francisco] even if the role cannot see the nation level.
public void grant(Dimension dimension,
Access access)
dimension - Hierarchy whose access to grant/deny.access - An access codepublic Access getAccess(Dimension dimension)
Role
getAccess in interface Role
public void grant(Hierarchy hierarchy,
Access access,
Level topLevel,
Level bottomLevel,
Role.RollupPolicy rollupPolicy)
hierarchy - Hierarchy whose access to grant/deny.access - An access codetopLevel - Top-most level which can be accessed, or null if the
highest level. May only be specified if access is
Access.CUSTOM.bottomLevel - Bottom-most level which can be accessed, or null if
the lowest level. May only be specified if access is
Access.CUSTOM.rollupPolicy - public Access getAccess(Hierarchy hierarchy)
Role
getAccess in interface Rolepublic Role.HierarchyAccess getAccessDetails(Hierarchy hierarchy)
Role
getAccessDetails in interface Rolepublic Access getAccess(Level level)
Role
getAccess in interface Role
public void grant(Member member,
Access access)
Notes:
grant(Hierarchy, Access, Level, Level, mondrian.olap.Role.RollupPolicy).
public Access getAccess(Member member)
Role
getAccess in interface Rolepublic Access getAccess(NamedSet set)
Role
getAccess in interface Rolepublic boolean canAccess(OlapElement olapElement)
Role
canAccess in interface Rolepublic static Role.HierarchyAccess createAllAccess(Hierarchy hierarchy)
hierarchy - Hierarchy
public static Role union(List<Role> roleList)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||