|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcreme.enumerations.Enumeration
org.jcreme.permissioning.Subject
Field Summary | |
protected Domain |
domain
The Domain to which the Subject belongs. |
protected static java.util.Hashtable |
fromName
|
protected Task |
task
The leaf task that is solved by the Subject. |
Fields inherited from class org.jcreme.enumerations.Enumeration |
|
Constructor Summary | |
protected |
Subject(java.lang.String name)
|
Method Summary | |
boolean |
canInvoke(User u,
Task t,
java.lang.Object[] parameters,
AccessType[] accessTypes)
|
boolean |
checkAccess(ObjectType type,
AccessType access)
This method is used to determine if the Subject can access a particular type. |
protected void |
checkParameters(User u,
Task t,
java.lang.Object[] parameters,
AccessType[] accessTypes)
|
boolean |
checkPurpose(User user,
Task t,
ObjectPolicy policy,
AccessType access)
Checks if the calling task (business) purpose matches the subject task's purpose. |
boolean |
checkRoles(User u,
Task t)
Checks if the user's roles are compatible with the invocation Task and the subject domain. |
boolean |
checkTask(Task t)
This method checks whether the invocation task is compatible with the subject's task. |
java.lang.Object[] |
filterObjects(User u,
Task t,
java.lang.Object[] parameters,
AccessType[] accessTypes)
This method filters the provided parameters against the requested access and returns only the objects that can be rightfully accessed. |
Domain |
getDomain()
|
protected java.util.Hashtable |
getFromName()
This method is for internal use only. |
static Subject[] |
getSubjects()
|
static Enumeration[] |
getValues()
This method enables to retrieve all the possible values of an Enumeration class. |
void |
setDomain(Domain d)
|
void |
setTask(Task t)
|
Methods inherited from class org.jcreme.enumerations.Enumeration |
compareTo, getName, readResolve, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.util.Hashtable fromName
protected Task task
protected Domain domain
Constructor Detail |
protected Subject(java.lang.String name)
Method Detail |
protected java.util.Hashtable getFromName()
Enumeration
getFromName
in class Enumeration
public void setDomain(Domain d)
public Domain getDomain()
public void setTask(Task t) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static Subject[] getSubjects()
public static Enumeration[] getValues()
Enumeration
protected void checkParameters(User u, Task t, java.lang.Object[] parameters, AccessType[] accessTypes) throws NoPermissionException, java.lang.IllegalArgumentException
u
- t
- is set by the invocation path. It is otherwise impossible to
determine a Task that will give a single meaningful business
Purpose.parameters
- accessTypes
-
NoPermissionException
java.lang.IllegalArgumentException
public java.lang.Object[] filterObjects(User u, Task t, java.lang.Object[] parameters, AccessType[] accessTypes) throws java.lang.IllegalArgumentException
u
- t
- parameters
- accessTypes
-
java.lang.IllegalArgumentException
public boolean canInvoke(User u, Task t, java.lang.Object[] parameters, AccessType[] accessTypes) throws NoPermissionException
u
- t
- parameters
- accessTypes
-
NoPermissionException
public boolean checkRoles(User u, Task t)
u
- t
-
public boolean checkTask(Task t)
t
- is set by the invocation path. It is otherwise impossible to
determine a Task that will give a single meaningful business
Purpose.
public boolean checkAccess(ObjectType type, AccessType access)
type
- access
- public boolean checkPurpose(User user, Task t, ObjectPolicy policy, AccessType access)
user
- t
- policy
- access
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |