public interface RemoteOrgData
extends java.rmi.Remote
Modifier and Type | Method and Description |
---|---|
void |
addRoleToSession(Role r,
OrgUnit ou)
Adds a role to the current usersession.
|
void |
changeDeferred(Persistent p,
java.util.Date d)
Change the Object later
|
java.util.List<java.lang.String> |
checkPasswordPolicy(java.lang.String password)
Check a password against the password policy.
|
void |
checkRight(Right r,
java.lang.Object 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.
|
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.
|
<T> T |
get(java.lang.Class<? extends T> c,
long oid)
Get an object from the org-data database.
|
<T> T |
get(java.lang.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(java.lang.Class<? extends T> c,
java.lang.String id)
Get an object from the org-data database.
|
<T> T |
getById(java.lang.String classname,
java.lang.String id)
Get an object from the org-data database.
|
java.util.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,
java.util.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.
|
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)
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. |
java.lang.String |
getPolicyInfoText(User u)
Checks if there are any hints for the user according to the password policy.
|
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. |
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<Pair<Role,OrgUnit>> |
getSessionRoles()
Returns all the combinations of role and organizational units that have been assigned to the current usersession.
|
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)
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. |
java.lang.String |
getUserProperty(User u,
java.lang.String key)
Use this method to get a user property.
|
<P extends Persistent> |
getVersion(P 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 |
hasRight(User u,
Right r,
java.lang.Object o,
Application app) |
<T extends Persistent> |
hasRightForList(User u,
Right r,
java.util.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,
java.util.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> java.util.List<T> |
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[]) |
<T> java.util.List<T> |
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.util.List<OrgUnit>> |
listUsersWithRole(Role r,
OrgUnit ou,
Application appl)
List the users that have a role
|
<T extends Persistent> |
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.
|
<T extends Persistent> |
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.
|
LogEntry |
makeLogEntry(Persistent o,
int mode,
long versionid,
java.lang.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,
java.lang.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,
java.lang.String key,
java.lang.String value)
Set a user property.
|
void |
update(Persistent o)
Update the object including right check.
|
<T> T get(java.lang.Class<? extends T> c, long oid) throws java.rmi.RemoteException
c
- the classoid
- the unique oid of the objectjava.rmi.RemoteException
<T> T get(java.lang.String classname, long oid) throws java.rmi.RemoteException
classname
- the classnameoid
- the unique oid of the objectjava.rmi.RemoteException
@Deprecated User getUser(long oid) throws java.rmi.RemoteException
RemoteStore.get(Class, long)
with User
.class as first parameter instead.oid
- the unique oid of the objectjava.rmi.RemoteException
java.lang.String getUserProperty(User u, java.lang.String key) throws java.rmi.RemoteException
u
- The user of which you want to get a property.key
- The property key.String
or null
if
no such property exists.java.rmi.RemoteException
void setUserProperty(User u, java.lang.String key, java.lang.String value) throws java.rmi.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.java.rmi.RemoteException
@Deprecated Role getRole(long oid) throws java.rmi.RemoteException
RemoteStore.get(Class, long)
with Role
.class as first parameter instead.oid
- the unique oid of the objectjava.rmi.RemoteException
@Deprecated Right getRight(long oid) throws java.rmi.RemoteException
RemoteStore.get(Class, long)
with Right
.class as first parameter instead.oid
- the unique oid of the objectjava.rmi.RemoteException
@Deprecated OrgUnit getOrgUnit(long oid) throws java.rmi.RemoteException
RemoteStore.get(Class, long)
with OrgUnit
.class as first parameter instead.oid
- the unique oid of the objectjava.rmi.RemoteException
@Deprecated Application getApplication(long oid) throws java.rmi.RemoteException
RemoteStore.get(Class, long)
with Application
.class as first parameter instead.oid
- the unique oid of the objectjava.rmi.RemoteException
<T> T getById(java.lang.Class<? extends T> c, java.lang.String id) throws java.rmi.RemoteException
c
- the classid
- the id of the objectjava.rmi.RemoteException
<T> T getById(java.lang.String classname, java.lang.String id) throws java.lang.ClassNotFoundException, java.rmi.RemoteException
classname
- the classnameid
- the id of the objectjava.lang.ClassNotFoundException
java.rmi.RemoteException
OrgUnit getHomeOrg(User u) throws java.rmi.RemoteException
u
- the Userjava.rmi.RemoteException
@Deprecated <T> java.util.List<T> list(java.lang.Class<? extends T> c, java.lang.String cond, java.lang.String order) throws java.rmi.RemoteException
list(Class, String, String, Object[])
c
- the classcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than onejava.rmi.RemoteException
<T> java.util.List<T> list(java.lang.Class<? extends T> c, java.lang.String cond, java.lang.String order, java.lang.Object[] bindVars) throws java.rmi.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 valuesjava.rmi.RemoteException
java.util.List<Persistent> list(java.lang.String classname, java.lang.String cond, java.lang.String order, java.lang.Object[] bindVars) throws java.rmi.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 valuesjava.rmi.RemoteException
java.util.Map<? extends Role,java.util.Set<java.lang.String>> getRoles(User u) throws java.rmi.RemoteException
u
- the userjava.rmi.RemoteException
java.util.List<Role> getRoles(User u, OrgUnit d) throws java.rmi.RemoteException
u
- the userd
- the OrgUnitjava.rmi.RemoteException
boolean hasRole(User u, Role r, OrgUnit d, Application appl) throws java.rmi.RemoteException
u
- the userr
- the roled
- the OrgUnitjava.rmi.RemoteException
<T extends Persistent> java.util.List<T> hasRightForList(User u, Right r, java.util.List<? extends T> l, Application app) throws java.rmi.RemoteException
u
- the userr
- the rightl
- the list containing the unchecked elementsappl
- the application for referencing an org-treejava.rmi.RemoteException
<T extends Persistent> java.util.List<T> hasRightForList(User u, Right r, java.util.List<? extends T> l, boolean ignoreOrgs, boolean ignoreSubsts, Application app) throws java.rmi.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 substitutesappl
- the application for referencing an org-treejava.rmi.RemoteException
boolean hasRight(User u, Right r, java.lang.Object o) throws java.rmi.RemoteException
u
- the userr
- the righto
- the object (may be null)java.rmi.RemoteException
boolean hasRight(User u, Right r, java.lang.Object o, Application app) throws java.rmi.RemoteException
java.rmi.RemoteException
<T extends Persistent> 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) throws java.rmi.RemoteException
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 department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopejava.rmi.RemoteException
<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) throws java.rmi.RemoteException
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 department tree should be used for checkingignoreDepts
- ignore the right a user has via dept scopejava.rmi.RemoteException
void checkRight(Right r, java.lang.Object o) throws java.rmi.RemoteException
r
- a righto
- an object (optional)java.rmi.RemoteException
boolean mayInsert(User u, Persistent o) throws java.rmi.RemoteException
u
- the user requesting the accesso
- the objectjava.rmi.RemoteException
boolean mayUpdate(User u, Persistent o) throws java.rmi.RemoteException
u
- the user requesting the accesso
- the objectjava.rmi.RemoteException
boolean mayView(User u, Persistent o) throws java.rmi.RemoteException
u
- the user requesting the accesso
- the objectjava.rmi.RemoteException
boolean mayExecute(User u, Persistent o) throws java.rmi.RemoteException
u
- the user requesting the accesso
- the objectjava.rmi.RemoteException
boolean mayDelete(User u, Persistent o) throws java.rmi.RemoteException
u
- the user requesting the accesso
- the objectjava.rmi.RemoteException
void insert(Persistent o) throws java.rmi.RemoteException
o
- the objectjava.rmi.RemoteException
void update(Persistent o) throws java.rmi.RemoteException
o
- the objectjava.rmi.RemoteException
void delete(Persistent o) throws java.rmi.RemoteException
o
- the objectjava.rmi.RemoteException
<P extends Persistent> P getVersion(P o, java.util.Date d) throws java.rmi.RemoteException
o
- the objectd
- the datejava.rmi.RemoteException
<P extends Persistent> Pair<LogEntry,P> getLogAndVersion(P o, java.util.Date d) throws java.rmi.RemoteException
o
- the objectd
- the datejava.rmi.RemoteException
<P extends Persistent> Pair<LogEntry,P> getLogAndVersion(P o, long vid) throws java.rmi.RemoteException
o
- the objectvid
- the version idjava.rmi.RemoteException
LogEntry makeLogEntry(Persistent o, int mode, long versionid, java.lang.String desc) throws java.rmi.RemoteException
o
- the logged objectmode
- the change mode, choose one of LogEntry constantsversionid
- a number identifying the versiondesc
- a description testjava.rmi.RemoteException
java.util.List<LogEntry> getLogEntries(java.lang.String classname, long oid, java.util.Date from, java.util.Date to) throws java.rmi.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)java.rmi.RemoteException
java.util.Map<User,java.util.List<OrgUnit>> listUsersWithRole(Role r, OrgUnit ou, Application appl) throws java.rmi.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.java.rmi.RemoteException
java.util.List<java.lang.String> checkPasswordPolicy(java.lang.String password) throws java.rmi.RemoteException
password
- - the password string to check against the policyjava.rmi.RemoteException
java.lang.String getPolicyInfoText(User u) throws java.rmi.RemoteException
u
- - the userjava.rmi.RemoteException
User setPassword(User u, java.lang.String password) throws java.rmi.RemoteException
u
- the user, whose password should be changedpassword
- - the new password (plain string)java.rmi.RemoteException
User createUser() throws java.rmi.RemoteException
java.rmi.RemoteException
Role createRole() throws java.rmi.RemoteException
java.rmi.RemoteException
OrgUnit createOrgUnit() throws java.rmi.RemoteException
java.rmi.RemoteException
UserRole createUserRole() throws java.rmi.RemoteException
java.rmi.RemoteException
Right createRight() throws java.rmi.RemoteException
java.rmi.RemoteException
Permission createPermission() throws java.rmi.RemoteException
java.rmi.RemoteException
PermissionList createPermissionList() throws java.rmi.RemoteException
java.rmi.RemoteException
void setPermissionList(HasPermissionList o, PermissionList pl) throws java.rmi.RemoteException
o
- pl
- java.rmi.RemoteException
void deleteCascade(OrgUnit ou) throws java.rmi.RemoteException
ou
- the organizational unit to deletejava.rmi.RemoteException
java.util.List<OrgUnit> getSubOrgs(OrgUnit ou, OrgTree tree) throws java.rmi.RemoteException
java.rmi.RemoteException
OrgUnit getSuperOrg(OrgUnit ou, OrgTree tree) throws java.rmi.RemoteException
java.rmi.RemoteException
OrgTree createOrgTree() throws java.rmi.RemoteException
java.rmi.RemoteException
void placeOrgInTree(OrgUnit parent, OrgUnit child, OrgTree tree) throws java.rmi.RemoteException
parent,
- may be null.child
- tree
- the treejava.rmi.RemoteException
boolean isInTree(OrgUnit ou, OrgTree tree) throws java.rmi.RemoteException
ou
- tree
- java.rmi.RemoteException
java.util.List<OrgUnit> getDeptsInScope(OrgUnit ou, int orgScope, OrgTree tree) throws java.rmi.RemoteException
ou
- the organizational unit to start withorgScope
- the scope c.f. Permission
tree
- the treejava.rmi.RemoteException
Persistent getObjectExtension(Persistent obj, java.lang.String formclass, boolean create) throws java.rmi.RemoteException
obj
- an object having extensionsformclass
- the name of a form-classcreate
- if true extensions are createdjava.rmi.RemoteException
void deleteObjectExtension(Persistent obj, java.lang.String formclass) throws java.rmi.RemoteException
java.rmi.RemoteException
void changeDeferred(Persistent p, java.util.Date d) throws java.rmi.RemoteException
p
- the Objectd
- the time of changejava.rmi.RemoteException
void clearCachedUserProperties(User u) throws java.rmi.RemoteException
u
- the Userjava.rmi.RemoteException
void addRoleToSession(Role r, OrgUnit ou) throws java.rmi.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.java.rmi.RemoteException
void removeRoleFromSession(Role r, OrgUnit ou) throws java.rmi.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.java.rmi.RemoteException
void removeAllRolesFromSession() throws java.rmi.RemoteException
java.rmi.RemoteException
boolean hasRoleInSession(Role r, OrgUnit ou) throws java.rmi.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.java.rmi.RemoteException
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.