|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OrgData
This interface allows access to the organizational data stored in @enterprise.
Method Summary | ||
---|---|---|
java.util.List<java.lang.String> |
checkPasswordPolicy(java.lang.String password)
Check a password against the password policy. |
|
OrgTree |
createOrgTree()
Return a new organizational tree. |
|
OrgUnit |
createOrgUnit()
Create a new OrgUnit object. |
|
Permission |
createPermission()
Create a new Permission |
|
PermissionList |
createPermissionList()
Create a new PermissionList |
|
Right |
createRight()
Create a new Right. |
|
Role |
createRole()
Create a new Role object. |
|
User |
createUser()
Create a new User object. |
|
UserRole |
createUserRole()
Create a new user-role relation |
|
void |
delete(Persistent o)
Delete the object including right check. |
|
void |
deleteCascade(OrgUnit ou)
Delete the passed organizational unit and also objects which are of no use without it. |
|
void |
deleteObjectExtension(Persistent obj,
java.lang.String formclass)
delete the object extension for the given object. |
|
|
get(java.lang.Class<? extends T> c,
long oid)
Get an object from the org-data database. |
|
|
get(java.lang.String classname,
long oid)
Get an object from the org-data database. |
|
Application |
getApplication(long oid)
Get an application from the org-data database. |
|
|
getById(java.lang.Class<? extends T> c,
java.lang.String id)
Get an object from the org-data database. |
|
|
getById(java.lang.String classname,
java.lang.String id)
Get an object from the org-data database. |
|
OrgUnit |
getHomeOrg(User u)
Return the Org.unit where the user has the home role. |
|
java.util.List<LogEntry> |
getLogEntries(java.lang.String classname,
long oid,
java.util.Date from,
java.util.Date to)
Returns a list of log entries for the specified object (identified by passed oid and classname) which were made withing the specified time range |
|
Persistent |
getObjectExtension(Persistent obj,
java.lang.String formclass,
boolean create)
Returns the extension object to a persistent. |
|
OrgUnit |
getOrgUnit(long oid)
Get an OrgUnit from the org-data database. |
|
java.lang.String |
getPolicyInfoText(User u)
Checks if there are any hints for the user according to the password policy. |
|
Right |
getRight(long oid)
Get an Right from the org-data database. |
|
Role |
getRole(long oid)
Get an Role from the org-data database. |
|
java.util.Map<? extends Role,java.util.Set<java.lang.String>> |
getRoles(User u)
Returns a Map of the roles - and depts - of a user. |
|
java.util.List<Role> |
getRoles(User u,
OrgUnit d)
Return the roles a user has in a OrgUnit. |
|
java.util.List<OrgUnit> |
getSubOrgs(OrgUnit ou,
OrgTree tree)
Return the list of the organizational units that are below the given oe in the given tree. |
|
OrgUnit |
getSuperOrg(OrgUnit ou,
OrgTree tree)
Return the organizational unit that is above the given oe in the given tree. |
|
User |
getUser(long oid)
Get an user from the org-data database. |
|
java.lang.String |
getUserProperty(User u,
java.lang.String key)
Use this method to get a user property. |
|
|
getVersion(T o,
java.util.Date d)
Returns the version of the object at a given date. |
|
boolean |
hasRight(User u,
Right r,
java.lang.Object o)
Checks whether the given user has the given right on the given object. |
|
boolean |
hasRole(User u,
Role r,
OrgUnit d,
Application appl)
Has the user u the role r in the org.unit d? |
|
void |
insert(Persistent o)
Insert the object including right check. |
|
boolean |
isInTree(OrgUnit ou,
OrgTree tree)
Is the given org-unit in the specified org-tree. |
|
|
list(java.lang.Class<? extends T> c,
java.lang.String cond,
java.lang.String order)
Deprecated. since ep 8.0, use list(Class, String, String, Object[]) |
|
|
list(java.lang.Class<? extends T> c,
java.lang.String cond,
java.lang.String order,
java.lang.Object[] bindVars)
Get a list of objects from the org-data database. |
|
java.util.List<Persistent> |
list(java.lang.String classname,
java.lang.String cond,
java.lang.String order,
java.lang.Object[] bindVars)
Get a list of objects from the org-data database. |
|
java.util.Map<User,java.lang.Object> |
listUsersWithRole(Role r,
OrgUnit ou,
Application appl)
List the users that have a role |
|
|
listWithRightCheck(User u,
java.lang.Class<? extends T> clazz,
java.lang.String condition,
java.lang.String order,
java.lang.Object[] args,
Right right,
Application app,
boolean ignoreDepts)
Returns a list of all objects of the specified object class for which the specified user has the specified right and for which the condition matches. |
|
|
listWithRightCheck(User u,
java.lang.String classname,
java.lang.String condition,
java.lang.String order,
java.lang.Object[] bindVars,
Right right,
Application app,
boolean ignoreDepts)
Returns a list of all objects of the specified object class for which the specified user has the specified right and for which the condition matches. |
|
boolean |
mayDelete(User u,
Persistent o)
Check whether the user may delete the object. |
|
boolean |
mayExecute(User u,
Persistent o)
Check whether the user may execute the object (function). |
|
boolean |
mayInsert(User u,
Persistent o)
Check whether the user may create the object (insert it into the database). |
|
boolean |
mayUpdate(User u,
Persistent o)
Check whether the user may edit the object. |
|
boolean |
mayView(User u,
Persistent o)
Check whether the user may view the object. |
|
void |
placeOrgInTree(OrgUnit parent,
OrgUnit child,
OrgTree tree)
Change the organizational hierarchy. |
|
User |
setPassword(User u,
java.lang.String password)
Set the password of a user. |
|
void |
setUserProperty(User u,
java.lang.String key,
java.lang.String value)
Set a user property. |
|
void |
update(Persistent o)
Update the object including right check. |
Method Detail |
---|
<T> T get(java.lang.Class<? extends T> c, long oid)
get
in interface RemoteOrgData
c
- the classoid
- the unique oid of the object
<T> T get(java.lang.String classname, long oid)
get
in interface RemoteOrgData
classname
- the classnameoid
- the unique oid of the object
User getUser(long oid)
getUser
in interface RemoteOrgData
oid
- the unique oid of the object
java.lang.String getUserProperty(User u, java.lang.String key)
getUserProperty
in interface RemoteOrgData
u
- The user of which you want to get a property.key
- The property key.
String
or null
if
no such property exists.void setUserProperty(User u, java.lang.String key, java.lang.String value)
setUserProperty
in interface RemoteOrgData
u
- The user of which you want to get a property.key
- The property key.value
- the property valueRole getRole(long oid)
getRole
in interface RemoteOrgData
oid
- the unique oid of the object
Right getRight(long oid)
getRight
in interface RemoteOrgData
oid
- the unique oid of the object
OrgUnit getOrgUnit(long oid)
getOrgUnit
in interface RemoteOrgData
oid
- the unique oid of the object
Application getApplication(long oid)
getApplication
in interface RemoteOrgData
oid
- the unique oid of the object
<T> T getById(java.lang.Class<? extends T> c, java.lang.String id)
getById
in interface RemoteOrgData
c
- the classid
- the id of the object
<T> T getById(java.lang.String classname, java.lang.String id)
getById
in interface RemoteOrgData
classname
- the classnameid
- the id of the object
OrgUnit getHomeOrg(User u)
getHomeOrg
in interface RemoteOrgData
u
- the User
@Deprecated <T> java.util.List<T> list(java.lang.Class<? extends T> c, java.lang.String cond, java.lang.String order)
list(Class, String, String, Object[])
list
in interface RemoteOrgData
c
- the classcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than one
<T> java.util.List<T> list(java.lang.Class<? extends T> c, java.lang.String cond, java.lang.String order, java.lang.Object[] bindVars)
list
in interface RemoteOrgData
c
- the classcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than onebindVars
- if the condition contains place holders for binding variables this array should
contain the values
java.util.List<Persistent> list(java.lang.String classname, java.lang.String cond, java.lang.String order, java.lang.Object[] bindVars)
list
in interface RemoteOrgData
classname
- the fully qualified name of the class of the objectcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than onebindVars
- if the condition contains place holders for binding variables this array should
contain the values
java.util.Map<? extends Role,java.util.Set<java.lang.String>> getRoles(User u)
getRoles
in interface RemoteOrgData
u
- the user
java.util.List<Role> getRoles(User u, OrgUnit d)
getRoles
in interface RemoteOrgData
u
- the userd
- the OrgUnit
boolean hasRole(User u, Role r, OrgUnit d, Application appl)
hasRole
in interface RemoteOrgData
u
- the userr
- the roled
- the OrgUnit
boolean hasRight(User u, Right r, java.lang.Object o)
hasRight
in interface RemoteOrgData
u
- the userr
- the righto
- the object (may be null)
<T> java.util.List<T> listWithRightCheck(User u, java.lang.Class<? extends T> clazz, java.lang.String condition, java.lang.String order, java.lang.Object[] args, Right right, Application app, boolean ignoreDepts)
listWithRightCheck
in interface RemoteOrgData
u
- the userclazz
- class which instances are wantedcondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.args
- if the condition contains place holders for binding variables this array should
contain the valuesright
- the rightapp
- the application which departement tree should be used for checkingignoreDepts
- ignore the right a user has via dept scope
<T extends Persistent> java.util.List<T> listWithRightCheck(User u, java.lang.String classname, java.lang.String condition, java.lang.String order, java.lang.Object[] bindVars, Right right, Application app, boolean ignoreDepts)
listWithRightCheck
in interface RemoteOrgData
u
- the userclassname
- the fully qualified name of the class of the objectcondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.bindVars
- if the condition contains place holders for binding variables this array should
contain the valuesright
- the rightapp
- the application which departement tree should be used for checkingignoreDepts
- ignore the right a user has via dept scope
boolean mayInsert(User u, Persistent o)
mayInsert
in interface RemoteOrgData
u
- the user requesting the accesso
- the object
boolean mayUpdate(User u, Persistent o)
mayUpdate
in interface RemoteOrgData
u
- the user requesting the accesso
- the object
boolean mayView(User u, Persistent o)
mayView
in interface RemoteOrgData
u
- the user requesting the accesso
- the object
boolean mayExecute(User u, Persistent o)
mayExecute
in interface RemoteOrgData
u
- the user requesting the accesso
- the object
boolean mayDelete(User u, Persistent o)
mayDelete
in interface RemoteOrgData
u
- the user requesting the accesso
- the object
void insert(Persistent o)
insert
in interface RemoteOrgData
o
- the objectvoid update(Persistent o)
update
in interface RemoteOrgData
o
- the objectvoid delete(Persistent o)
delete
in interface RemoteOrgData
o
- the object<T extends Persistent> T getVersion(T o, java.util.Date d)
getVersion
in interface RemoteOrgData
o
- the object
java.util.List<LogEntry> getLogEntries(java.lang.String classname, long oid, java.util.Date from, java.util.Date to)
getLogEntries
in interface RemoteOrgData
classname
- the fully qualified name of the class of the objectoid
- the oid of the objectfrom
- the date for the start of the rangeto
- the date for the end of the range
java.util.Map<User,java.lang.Object> listUsersWithRole(Role r, OrgUnit ou, Application appl)
listUsersWithRole
in interface RemoteOrgData
r
- the roleou
- optional: the orgunit where the role is assignedappl
- optional application, necessary when checking hierarchic roles to
use the correct department tree. if the argument is null the default tree is used.
java.util.List<java.lang.String> checkPasswordPolicy(java.lang.String password)
checkPasswordPolicy
in interface RemoteOrgData
password
- - the password string to check against the policy
java.lang.String getPolicyInfoText(User u)
getPolicyInfoText
in interface RemoteOrgData
u
- - the user
User setPassword(User u, java.lang.String password)
setPassword
in interface RemoteOrgData
u
- the user, whose password should be changedpassword
- - the new password (plain string)
User createUser()
createUser
in interface RemoteOrgData
Role createRole()
createRole
in interface RemoteOrgData
Right createRight()
createRight
in interface RemoteOrgData
OrgUnit createOrgUnit()
createOrgUnit
in interface RemoteOrgData
UserRole createUserRole()
createUserRole
in interface RemoteOrgData
Permission createPermission()
createPermission
in interface RemoteOrgData
PermissionList createPermissionList()
createPermissionList
in interface RemoteOrgData
void deleteCascade(OrgUnit ou)
deleteCascade
in interface RemoteOrgData
ou
- the organizational unit to deletejava.util.List<OrgUnit> getSubOrgs(OrgUnit ou, OrgTree tree)
getSubOrgs
in interface RemoteOrgData
OrgUnit getSuperOrg(OrgUnit ou, OrgTree tree)
getSuperOrg
in interface RemoteOrgData
OrgTree createOrgTree()
createOrgTree
in interface RemoteOrgData
void placeOrgInTree(OrgUnit parent, OrgUnit child, OrgTree tree)
placeOrgInTree
in interface RemoteOrgData
tree
- the treeboolean isInTree(OrgUnit ou, OrgTree tree)
isInTree
in interface RemoteOrgData
Persistent getObjectExtension(Persistent obj, java.lang.String formclass, boolean create)
getObjectExtension
in interface RemoteOrgData
obj
- an object having extensionsformclass
- the name of a form-classcreate
- if true extensions are created
void deleteObjectExtension(Persistent obj, java.lang.String formclass)
deleteObjectExtension
in interface RemoteOrgData
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |