|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.org.DefaultRightCheck
public class DefaultRightCheck
This class provides the default implementation for right checks in @enterprise. In opposite to the
corresponding methods in OrgData
the methods of this class do always use the standard permission
system and do not call the specialized methods if the passed object implements interface
RightCheck
. Therefore the main reason for this class is to enable implementors of RightCheck
to call the standard permission system in those cases where no specialized behaviour is needed.
For all other cases of checking whether a user has a specific right for a specific object use the methods
of OrgData
.
Constructor Summary | |
---|---|
DefaultRightCheck()
|
Method Summary | ||
---|---|---|
static boolean |
hasRight(User user,
Right r,
Persistent p)
Checks if the passed user has the passed right for the passed object |
|
static
|
listWithRightCheck(User user,
Right right,
java.lang.Class<? extends P> c,
java.lang.String condition,
java.lang.String order,
java.lang.Object[] args,
Application app,
boolean ignoreDepts)
Returns a list of all objects of the passed class for which the passed user has the passed right and for which the condition matches. |
|
static
|
listWithRightCheck(User user,
Right right,
java.lang.Class<P> c,
java.lang.String condition,
java.lang.String order,
java.lang.Object[] args)
Returns a list of all objects of the passed class for which the passed user has the passed right and for which the condition matches. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultRightCheck()
Method Detail |
---|
public static boolean hasRight(User user, Right r, Persistent p)
user
- the userr
- the rightp
- the object
public static <P> java.util.List<P> listWithRightCheck(User user, Right right, java.lang.Class<P> c, java.lang.String condition, java.lang.String order, java.lang.Object[] args)
P
- the class which instances are wanteduser
- the userright
- the rightc
- the class objectcondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.
public static <P> java.util.List<P> listWithRightCheck(User user, Right right, java.lang.Class<? extends P> c, java.lang.String condition, java.lang.String order, java.lang.Object[] args, Application app, boolean ignoreDepts)
P
- the class which instances are wanteduser
- the userright
- the rightc
- the class objectcondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.app
- the application which departement tree should be used for checkingignoreDepts
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |