Package com.groiss.org
Interface Permission
- All Superinterfaces:
KeyValuePair<String,
,String> Persistent
,Serializable
This interface describes a single permission, the base of the @enterprise permission system.
A permission describes WHO (agent) has which RIGHT on which OBJECT (target).
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The scope is: all objectstatic final int
The tree of the independent dept and the dependent sub-deptsstatic final int
Scope is the given department or the department of the objectstatic final int
Entry has global scope (department independent)static final int
Scope is the deparment and all sub-departmentsstatic final int
The dependent sub-departmentsstatic final int
The upwards-next independent departmentstatic final int
Entry has local scope.static final int
Scope is the a specific objectstatic final int
The scope is: an object classstatic final int
Scope is the department of the objectstatic final int
The parent departmentFields inherited from interface com.groiss.store.Persistent
emptyKeys
-
Method Summary
Modifier and TypeMethodDescriptiongetAgent()
Return the agent the permission is granted to.Get the start date of the permission.int
Returns the object-scope.int
Returns the org-scope.Get the org unit of the permission.getRight()
Returns the right the permission grantsReturns the target object.boolean
Returns true if the permission does ignore substitutions.boolean
Returns true if the permission is positive.void
Set the agent of the permission.void
setFromDate
(Date startDate) void
setIgnoreSubst
(boolean ignore) Set to true if you want that the permission is not valid for substitutions.void
setObjScope
(int scope) Set the object-scope to one of the following values: ALL_OBJECTS, OBJECT_CLASS, OBJECT, ROLE_DEPT, DEPTvoid
setOrgScope
(int scope) Set the org-scope to one of the following values: GLOBAL, LOCAL, HIERARCHIC, HIERARCHIC_DEP, INDEPENDENT_SUPER, DEPENDENT_TREE, SUPER.void
setOrgUnit
(OrgUnit ou) Set the org-unit of the permission.void
setPositive
(boolean pos) Set the permission positive (right is given) or negative (right is revoked)void
Set the right of the permission.void
setTarget
(Persistent target) Set the target object.void
Methods inherited from interface com.groiss.store.Persistent
afterDelete, afterInsert, afterRead, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, dbFields, getKey, getKeys, getLocalClassName, getLocalObjectName, getOid, getStore, getTableName, getValue, isFilled, isValid, setFilled, setOid, setOid, toListString
-
Field Details
-
GLOBAL
static final int GLOBALEntry has global scope (department independent)- See Also:
-
LOCAL
static final int LOCALEntry has local scope.- See Also:
-
HIERARCHIC
static final int HIERARCHICScope is the deparment and all sub-departments- See Also:
-
HIERARCHIC_DEP
static final int HIERARCHIC_DEPThe dependent sub-departments- See Also:
-
INDEPENDENT_SUPER
static final int INDEPENDENT_SUPERThe upwards-next independent department- See Also:
-
DEPENDENT_TREE
static final int DEPENDENT_TREEThe tree of the independent dept and the dependent sub-depts- See Also:
-
SUPER
static final int SUPERThe parent department- See Also:
-
ALL_OBJECTS
static final int ALL_OBJECTSThe scope is: all object- See Also:
-
OBJECT_CLASS
static final int OBJECT_CLASSThe scope is: an object class- See Also:
-
OBJECT
static final int OBJECTScope is the a specific object- See Also:
-
ROLE_DEPT
static final int ROLE_DEPTScope is the department of the object- See Also:
-
DEPT
static final int DEPTScope is the given department or the department of the object- See Also:
-
-
Method Details
-
getAgent
Agent getAgent()Return the agent the permission is granted to.- Returns:
- the agent (user or role)
-
setAgent
Set the agent of the permission. -
getOrgUnit
OrgUnit getOrgUnit()Get the org unit of the permission. -
setOrgUnit
Set the org-unit of the permission. -
getRight
Right getRight()Returns the right the permission grants- Returns:
- the name, a string object
-
setRight
Set the right of the permission. -
getTarget
Persistent getTarget()Returns the target object.- Returns:
- a persistent
-
setTarget
Set the target object.- Parameters:
target
- a persistent
-
isPositive
boolean isPositive()Returns true if the permission is positive. -
setPositive
void setPositive(boolean pos) Set the permission positive (right is given) or negative (right is revoked) -
setOrgScope
void setOrgScope(int scope) Set the org-scope to one of the following values: GLOBAL, LOCAL, HIERARCHIC, HIERARCHIC_DEP, INDEPENDENT_SUPER, DEPENDENT_TREE, SUPER. -
setObjScope
void setObjScope(int scope) Set the object-scope to one of the following values: ALL_OBJECTS, OBJECT_CLASS, OBJECT, ROLE_DEPT, DEPT -
getOrgScope
int getOrgScope()Returns the org-scope. -
getObjScope
int getObjScope()Returns the object-scope. -
getFromDate
Date getFromDate()Get the start date of the permission.- Returns:
- the start date
-
setFromDate
-
getToDate
Date getToDate() -
setToDate
-
ignoreSubst
boolean ignoreSubst()Returns true if the permission does ignore substitutions. -
setIgnoreSubst
void setIgnoreSubst(boolean ignore) Set to true if you want that the permission is not valid for substitutions.
-