Modifier and Type | Method and Description |
---|---|
void |
addRoleToSession(Role r,
OrgUnit ou)
Adds a role to the current usersession.
|
void |
addRule(PermissionMapping pm)
Add a permission mapping to the permission system.
|
void |
changeDeferred(Persistent p,
Date d)
Change the Object later
|
void |
checkLoginAllowed(User u)
Check if the user is active, not too many unsuccessful logins and system not in admin mode.
|
List<String> |
checkPasswordPolicy(String password)
Check a password against the password policy.
|
void |
checkRight(Right r,
Persistent o)
Check whether the thread user has the right r on object o.
|
void |
clearCachedUserProperties(User u)
Clears the cache for the user properties of the passed user.
|
OrgClass |
createOrgClass()
Create a new OrgClass object.
|
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,
String formclass)
delete the object extension for the given object.
|
<T> T |
get(Class<? extends T> c,
long oid)
Get an object from the org-data database.
|
<T> T |
get(String classname,
long oid)
Get an object from the org-data database.
|
Application |
getApplication(long oid)
Deprecated.
since ep 9.0 and will be removed in ep 10.0.
Use
RemoteStore.get(Class, long) with Application .class as first parameter instead. |
<T> T |
getById(Class<? extends T> c,
String id)
Get an object from the org-data database.
|
<T> T |
getById(String classname,
String id)
Get an object from the org-data database.
|
List<OrgUnit> |
getDeptsInScope(OrgUnit ou,
int orgScope,
OrgTree tree)
Returns the list of of organizational units which are in the given scope relatively from the given organizational unit.
|
OrgUnit |
getHomeOrg(User u)
Return the Org.unit where the user has the home role.
|
<P extends Persistent> |
getLogAndVersion(P o,
Date d)
Returns the version of the object at a given date along with the corresponding LogEntry.
|
<P extends Persistent> |
getLogAndVersion(P o,
long vid)
Returns the version of the object at a given version id along with the corresponding LogEntry.
|
List<LogEntry> |
getLogEntries(String classname,
long oid,
Date from,
Date to)
Returns a list of log entries for the specified object (identified by passed oid and classname) which
were made at time t, where from < t < to.
|
Persistent |
getObjectExtension(Persistent obj,
String formclass,
boolean create)
Returns the extension object to a persistent.
|
OrgUnit |
getOrgUnit(long oid)
Deprecated.
since ep 9.0 and will be removed in ep 10.0.
Use
RemoteStore.get(Class, long) with OrgUnit .class as first parameter instead. |
String |
getPolicyInfoText(User u)
Checks if there are any hints for the user according to the password policy.
|
List<Exportable> |
getReferencedObjects(Exportable e)
Returns the objects referenced by the given object, including the object itself.
|
Right |
getRight(long oid)
Deprecated.
since ep 9.0 and will be removed in ep 10.0.
Use
RemoteStore.get(Class, long) with Right .class as first parameter instead. |
Role |
getRole(long oid)
Deprecated.
since ep 9.0 and will be removed in ep 10.0.
Use
RemoteStore.get(Class, long) with Role .class as first parameter instead. |
Map<? extends Role,Set<String>> |
getRoles(User u)
Returns a Map of the roles - and depts - of a user.
|
List<Role> |
getRoles(User u,
OrgUnit d)
Return the roles a user has in a OrgUnit.
|
List<Pair<Role,OrgUnit>> |
getSessionRoles()
Returns all the combinations of role and organizational units that have been assigned to the current usersession.
|
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)
Deprecated.
since ep 9.0 and will be removed in ep 10.0.
Use
RemoteStore.get(Class, long) with User .class as first parameter instead. |
Map<String,String> |
getUserProperties(User u)
Get the full list of properties for a user.
|
String |
getUserProperty(User u,
String key)
Use this method to get a user property.
|
<P extends Persistent> |
getVersion(P o,
Date d)
Returns the version of the object at a given date.
|
boolean |
hasRight(User u,
Right r,
Object o)
Checks whether the given user has the given right on the given object.
|
boolean |
hasRight(User u,
Right r,
Persistent o)
Checks whether the given user has the given right on the given object.
|
boolean |
hasRight(User u,
Right r,
Persistent o,
Application app) |
<T extends Persistent> |
hasRightForList(User u,
Right r,
List<? extends T> l,
Application app)
Returns a list containing all the elements of passed list l for which the user has the specified right.
|
<T extends Persistent> |
hasRightForList(User u,
Right r,
List<? extends T> l,
boolean ignoreOrgs,
boolean ignoreSubsts,
Application app)
Returns a list containing all the elements of passed list l for which the user has the specified right.
|
boolean |
hasRole(User u,
Role r,
OrgUnit d,
Application appl)
Has the user u the role r in the org.unit d?
|
boolean |
hasRoleInSession(Role r,
OrgUnit ou)
Checks if the given combination of role and organizational unit has been added to the current usersession.
|
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.
|
<T> List<T> |
list(Class<? extends T> c,
String cond,
String order)
Get a list of objects from the org-data database.
|
<T> List<T> |
list(Class<? extends T> c,
String cond,
String order,
Object... bindVars)
Get a list of objects from the org-data database.
|
List<Persistent> |
list(String classname,
String cond,
String order,
Object... bindVars)
Get a list of objects from the org-data database.
|
Map<User,List<OrgUnit>> |
listUsersWithRole(Role r,
OrgUnit ou,
Application appl)
List the users that have a role
|
<T extends Persistent> |
listWithRightCheck(User u,
Class<? extends T> clazz,
Right right,
Application app,
boolean ignoreDepts,
String condition,
String order,
Object... args)
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.
|
<T extends Persistent> |
listWithRightCheck(User u,
Class<? extends T> clazz,
String condition,
String order,
Object[] args,
Right right,
Application app,
boolean ignoreDepts)
Deprecated.
|
<T extends Persistent> |
listWithRightCheck(User u,
String classname,
Right right,
Application app,
boolean ignoreDepts,
String condition,
String order,
Object... bindVars)
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.
|
<T extends Persistent> |
listWithRightCheck(User u,
String classname,
String condition,
String order,
Object[] bindVars,
Right right,
Application app,
boolean ignoreDepts)
Deprecated.
|
LogEntry |
makeLogEntry(Persistent o,
int mode,
long versionid,
String desc)
Create an entry in the log table.
|
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.
|
void |
removeAllRolesFromSession()
Removes all roles from the current usersession.
|
void |
removeRoleFromSession(Role r,
OrgUnit ou)
Removes a role from the current usersession.
|
User |
setPassword(User u,
String password)
Set the password of a user.
|
void |
setPermissionList(HasPermissionList o,
PermissionList pl)
Set the Permissionlist pl for an object o
|
void |
setUserProperty(User u,
String key,
String value)
Set a user property.
|
void |
update(Persistent o)
Update the object including right check.
|
void addRule(PermissionMapping pm) throws RemoteException
pm
- the permission mappingRemoteException
<T> T get(Class<? extends T> c, long oid) throws RemoteException
c
- the classoid
- the unique oid of the objectRemoteException
<T> T get(String classname, long oid) throws RemoteException
classname
- the classnameoid
- the unique oid of the objectRemoteException
@Deprecated User getUser(long oid) throws RemoteException
RemoteStore.get(Class, long)
with User
.class as first parameter instead.oid
- the unique oid of the objectRemoteException
String getUserProperty(User u, String key) throws RemoteException
u
- The user of which you want to get a property.key
- The property key.String
or null
if
no such property exists.RemoteException
Map<String,String> getUserProperties(User u) throws RemoteException
u
- The user of which you want to get the list.RemoteException
void checkLoginAllowed(User u) throws RemoteException
RemoteException
void setUserProperty(User u, String key, String value) throws RemoteException
u
- The user of which you want to get a property.key
- The property key.value
- The property value. With value null
the property will be removed.RemoteException
@Deprecated Role getRole(long oid) throws RemoteException
RemoteStore.get(Class, long)
with Role
.class as first parameter instead.oid
- the unique oid of the objectRemoteException
@Deprecated Right getRight(long oid) throws RemoteException
RemoteStore.get(Class, long)
with Right
.class as first parameter instead.oid
- the unique oid of the objectRemoteException
@Deprecated OrgUnit getOrgUnit(long oid) throws RemoteException
RemoteStore.get(Class, long)
with OrgUnit
.class as first parameter instead.oid
- the unique oid of the objectRemoteException
@Deprecated Application getApplication(long oid) throws RemoteException
RemoteStore.get(Class, long)
with Application
.class as first parameter instead.oid
- the unique oid of the objectRemoteException
<T> T getById(Class<? extends T> c, String id) throws RemoteException
c
- the classid
- the id of the objectRemoteException
<T> T getById(String classname, String id) throws ClassNotFoundException, RemoteException
classname
- the classnameid
- the id of the objectClassNotFoundException
RemoteException
OrgUnit getHomeOrg(User u) throws RemoteException
u
- the UserRemoteException
<T> List<T> list(Class<? extends T> c, String cond, String order) throws RemoteException
c
- the classcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than oneRemoteException
<T> List<T> list(Class<? extends T> c, String cond, String order, Object... bindVars) throws RemoteException
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 valuesRemoteException
List<Persistent> list(String classname, String cond, String order, Object... bindVars) throws RemoteException
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 valuesRemoteException
Map<? extends Role,Set<String>> getRoles(User u) throws RemoteException
u
- the userRemoteException
List<Role> getRoles(User u, OrgUnit d) throws RemoteException
u
- the userd
- the OrgUnitRemoteException
boolean hasRole(User u, Role r, OrgUnit d, Application appl) throws RemoteException
u
- the userr
- the roled
- the OrgUnitRemoteException
boolean hasRight(User u, Right r, Object o) throws RemoteException
u
- the userr
- the righto
- the object may be null, must be a PersistentRemoteException
boolean hasRight(User u, Right r, Persistent o) throws RemoteException
u
- the userr
- the righto
- the object (may be null)RemoteException
boolean hasRight(User u, Right r, Persistent o, Application app) throws RemoteException
RemoteException
<T extends Persistent> List<T> hasRightForList(User u, Right r, List<? extends T> l, Application app) throws RemoteException
u
- the userr
- the rightl
- the list containing the unchecked elementsapp
- the application for referencing an org-treeRemoteException
<T extends Persistent> List<T> hasRightForList(User u, Right r, List<? extends T> l, boolean ignoreOrgs, boolean ignoreSubsts, Application app) throws RemoteException
u
- the userr
- the rightl
- the list containing the unchecked elementsignoreOrgs
- ignore permissions defined for org-unit scopesignoreSubsts
- ignore permissions defined for persons u substitutesapp
- the application for referencing an org-treeRemoteException
@Deprecated <T extends Persistent> List<T> listWithRightCheck(User u, Class<? extends T> clazz, String condition, String order, Object[] args, Right right, Application app, boolean ignoreDepts) throws RemoteException
listWithRightCheck(User,Class,Right,Application,boolean,String,String,Object...)
insteadu
- 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 department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopeRemoteException
<T extends Persistent> List<T> listWithRightCheck(User u, Class<? extends T> clazz, Right right, Application app, boolean ignoreDepts, String condition, String order, Object... args) throws RemoteException
u
- the userclazz
- class which instances are wantedright
- the rightapp
- the application which department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopecondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.args
- values for binding variables in conditionRemoteException
@Deprecated <T extends Persistent> List<T> listWithRightCheck(User u, String classname, String condition, String order, Object[] bindVars, Right right, Application app, boolean ignoreDepts) throws RemoteException
listWithRightCheck(User,String,Right,Application,boolean,String,String,Object...)
insteadu
- 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 department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopeRemoteException
<T extends Persistent> List<T> listWithRightCheck(User u, String classname, Right right, Application app, boolean ignoreDepts, String condition, String order, Object... bindVars) throws RemoteException
u
- the userclassname
- the fully qualified name of the class of the objectright
- the rightapp
- the application which department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopecondition
- a SQL conditionorder
- a comma separated list of attribute names of the given class.bindVars
- values for binding variables in conditionRemoteException
void checkRight(Right r, Persistent o) throws RemoteException
r
- a righto
- an object (optional)RemoteException
boolean mayInsert(User u, Persistent o) throws RemoteException
u
- the user requesting the accesso
- the objectRemoteException
boolean mayUpdate(User u, Persistent o) throws RemoteException
u
- the user requesting the accesso
- the objectRemoteException
boolean mayView(User u, Persistent o) throws RemoteException
u
- the user requesting the accesso
- the objectRemoteException
boolean mayExecute(User u, Persistent o) throws RemoteException
u
- the user requesting the accesso
- the objectRemoteException
boolean mayDelete(User u, Persistent o) throws RemoteException
u
- the user requesting the accesso
- the objectRemoteException
void insert(Persistent o) throws RemoteException
o
- the objectRemoteException
void update(Persistent o) throws RemoteException
o
- the objectRemoteException
void delete(Persistent o) throws RemoteException
o
- the objectRemoteException
<P extends Persistent> P getVersion(P o, Date d) throws RemoteException
o
- the objectd
- the dateRemoteException
<P extends Persistent> Pair<LogEntry,P> getLogAndVersion(P o, Date d) throws RemoteException
o
- the objectd
- the dateRemoteException
<P extends Persistent> Pair<LogEntry,P> getLogAndVersion(P o, long vid) throws RemoteException
o
- the objectvid
- the version idRemoteException
LogEntry makeLogEntry(Persistent o, int mode, long versionid, String desc) throws RemoteException
o
- the logged objectmode
- the change mode, choose one of LogEntry constantsversionid
- a number identifying the versiondesc
- a description testRemoteException
List<LogEntry> getLogEntries(String classname, long oid, Date from, Date to) throws RemoteException
classname
- the fully qualified name of the class of the objectoid
- the oid of the objectfrom
- the date for the start of the range (may be null)to
- the date for the end of the range (may be null)RemoteException
Map<User,List<OrgUnit>> listUsersWithRole(Role r, OrgUnit ou, Application appl) throws RemoteException
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.RemoteException
List<String> checkPasswordPolicy(String password) throws RemoteException
password
- - the password string to check against the policyRemoteException
String getPolicyInfoText(User u) throws RemoteException
u
- - the userRemoteException
User setPassword(User u, String password) throws RemoteException
u
- the user, whose password should be changedpassword
- - the new password (plain string)RemoteException
User createUser() throws RemoteException
RemoteException
Role createRole() throws RemoteException
RemoteException
OrgUnit createOrgUnit() throws RemoteException
RemoteException
OrgClass createOrgClass() throws RemoteException
RemoteException
UserRole createUserRole() throws RemoteException
RemoteException
Right createRight() throws RemoteException
RemoteException
Permission createPermission() throws RemoteException
RemoteException
PermissionList createPermissionList() throws RemoteException
RemoteException
void setPermissionList(HasPermissionList o, PermissionList pl) throws RemoteException
o
- pl
- RemoteException
void deleteCascade(OrgUnit ou) throws RemoteException
ou
- the organizational unit to deleteRemoteException
List<OrgUnit> getSubOrgs(OrgUnit ou, OrgTree tree) throws RemoteException
RemoteException
OrgUnit getSuperOrg(OrgUnit ou, OrgTree tree) throws RemoteException
RemoteException
OrgTree createOrgTree() throws RemoteException
RemoteException
void placeOrgInTree(OrgUnit parent, OrgUnit child, OrgTree tree) throws RemoteException
parent,
- may be null.child
- tree
- the treeRemoteException
boolean isInTree(OrgUnit ou, OrgTree tree) throws RemoteException
ou
- tree
- RemoteException
List<OrgUnit> getDeptsInScope(OrgUnit ou, int orgScope, OrgTree tree) throws RemoteException
ou
- the organizational unit to start withorgScope
- the scope c.f. Permission
tree
- the treeRemoteException
Persistent getObjectExtension(Persistent obj, String formclass, boolean create) throws RemoteException
obj
- an object having extensionsformclass
- the name of a form-classcreate
- if true extensions are createdRemoteException
void deleteObjectExtension(Persistent obj, String formclass) throws RemoteException
RemoteException
void changeDeferred(Persistent p, Date d) throws RemoteException
p
- the Objectd
- the time of changeRemoteException
void clearCachedUserProperties(User u) throws RemoteException
u
- the UserRemoteException
void addRoleToSession(Role r, OrgUnit ou) throws RemoteException
r
- the role to add. Must not be null.ou
- the organizational unit. If the role is a global one, this must be null, else an organizational unit must be provided.RemoteException
void removeRoleFromSession(Role r, OrgUnit ou) throws RemoteException
r
- the role to remove. Must not be null.ou
- the organizational unit; if null, then the role will be removed regardless of the organizational unit.RemoteException
void removeAllRolesFromSession() throws RemoteException
RemoteException
boolean hasRoleInSession(Role r, OrgUnit ou) throws RemoteException
r
- the role, if null then a specific role is not taken into accountou
- the organizational unit; if null then a specific organizational unit is not taken into account.RemoteException
List<Pair<Role,OrgUnit>> getSessionRoles() throws RemoteException
RemoteException
List<Exportable> getReferencedObjects(Exportable e) throws Exception
e
- an Exportable (User, Role, ProcessDefinition)Exception
@enterprise 10.0.38798 Copyright © 2001-2024 Groiss Informatics GmbH. All Rights Reserved.