Package com.groiss.org
Interface OrgData
- All Superinterfaces:
Remote
,RemoteOrgData
This interface allows access to the organizational data stored in @enterprise.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Predefined applications.static final class
Predefined organization trees.static final class
Predefined rights.static final class
Predefined roles.static final class
Predefined users. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRoleToSession
(Role r, OrgUnit ou) Adds a role to the current usersession.void
Deprecated, for removal: This API element is subject to removal in a future version.void
addRule
(Class<? extends PermissionMapping> pm) Add a permission mapping to the permission system.void
changeDeferred
(Persistent p, Date d) Change the Object latervoid
Check if the user is active, not too many unsuccessful logins and system not in admin mode.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
Clears the cache for the user properties of the passed user.Create a new OrgClass object.Return a new organizational tree.Create a new OrgUnit object.Create a new PermissionCreate a new PermissionListCreate a new Right.Create a new Role object.Create a new User object.Create a new user-role relationvoid
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.<P> P
Deprecated, for removal: This API element is subject to removal in a future version.<P> P
Deprecated, for removal: This API element is subject to removal in a future version.getApplication
(long oid) Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withApplication
.class as first parameter instead.<P> P
Get an object from the org-data database.<P> P
Get an object from the org-data database.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.getHomeOrg
(User u) Return the Org.unit where the user has the home role.static OrgData
Get the OrgData to perform action with the organizational structure.<P extends Persistent>
Pair<LogEntry,P> getLogAndVersion
(P o, long vid) Returns the version of the object at a given version id along with the corresponding LogEntry.<P extends Persistent>
Pair<LogEntry,P> getLogAndVersion
(P o, Date d) Returns the version of the object at a given date along with the corresponding 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.getObjectExtension
(Persistent obj, String formclass, boolean create) Returns the extension object to a persistent.getOrgUnit
(long oid) Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withOrgUnit
.class as first parameter instead.Checks if there are any hints for the user according to the password policy.getRight
(long oid) Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withRight
.class as first parameter instead.getRole
(long oid) Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withRole
.class as first parameter instead.Returns a Map of the roles - and org.units - of a user.getRoles
(User u, Application appl) Returns a Map of the roles - and org.units - of a user.Return the roles a user has in a OrgUnit.Returns all the combinations of role and organizational units that have been assigned to the current usersession.getSubOrgs
(OrgUnit ou, OrgTree tree) Return the list of the organizational units that are below the given oe in the given tree.getSuperOrg
(OrgUnit ou, OrgTree tree) Return the organizational unit that is above the given oe in the given tree.getUser
(long oid) Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withUser
.class as first parameter instead.Get the full list of properties for a user.getUserProperty
(User u, String key) Use this method to get a user property.<P extends Persistent>
PgetVersion
(P o, Date d) Returns the version of the object at a given date.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) boolean
Checks whether the given user has the given right on the given object.<P> List<P>
hasRightForList
(User u, Right r, List<? extends P> 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.<P> List<P>
hasRightForList
(User u, Right r, List<? extends P> l, 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
Is the given org-unit in the specified org-tree.<P> List<P>
Deprecated, for removal: This API element is subject to removal in a future version.<P> List<P>
Deprecated, for removal: This API element is subject to removal in a future version.<P extends Persistent>
List<P>Deprecated, for removal: This API element is subject to removal in a future version.listUsersWithRole
(Role r, OrgUnit ou, Application appl) List the users that have a role<P> List<P>
listWithRightCheck
(User u, Class<? extends P> 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.<P> List<P>
listWithRightCheck
(User u, Class<? extends P> clazz, String condition, String order, Object[] args, Right right, Application app, boolean ignoreDepts) Deprecated, for removal: This API element is subject to removal in a future version.<P extends Persistent>
List<P>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.<P extends Persistent>
List<P>listWithRightCheck
(User u, String classname, String condition, String order, Object[] bindVars, Right right, Application app, boolean ignoreDepts) Deprecated, for removal: This API element is subject to removal in a future version.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
Removes all roles from the current usersession.void
removeRoleFromSession
(Role r, OrgUnit ou) Removes a role from the current usersession.setPassword
(User u, String password) Set the password of a user.void
Set the Permissionlist pl for an object ovoid
setUserProperty
(User u, String key, String value) Set a user property.void
update
(Persistent o) Update the object including right check.
-
Method Details
-
getInstance
Get the OrgData to perform action with the organizational structure.- Returns:
- a OrgData object
-
get
Deprecated, for removal: This API element is subject to removal in a future version.Get an object from the org-data database. The class is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
get
in interfaceRemoteOrgData
- Parameters:
c
- the classoid
- the unique oid of the object- Returns:
- the object, you can cast the result to the class you specified in the first argument
-
get
Deprecated, for removal: This API element is subject to removal in a future version.Get an object from the org-data database. The classname is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
get
in interfaceRemoteOrgData
- Parameters:
classname
- the classnameoid
- the unique oid of the object- Returns:
- the object, you can cast the result to the class you specified in the first argument
-
getUser
Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withUser
.class as first parameter instead.Get an user from the org-data database.- Specified by:
getUser
in interfaceRemoteOrgData
- Parameters:
oid
- the unique oid of the object- Returns:
- the requested user
-
getUserProperty
Use this method to get a user property. The method accesses system defined as well as application defined properties.- Specified by:
getUserProperty
in interfaceRemoteOrgData
- Parameters:
u
- The user of which you want to get a property.key
- The property key.- Returns:
- Returns the property value as
String
ornull
if no such property exists.
-
getUserProperties
Get the full list of properties for a user.- Specified by:
getUserProperties
in interfaceRemoteOrgData
- Parameters:
u
- The user of which you want to get the list.- Returns:
- a Properties object
-
checkLoginAllowed
Check if the user is active, not too many unsuccessful logins and system not in admin mode.- Specified by:
checkLoginAllowed
in interfaceRemoteOrgData
-
setUserProperty
Set a user property. The method accesses system defined as well as application defined properties.- Specified by:
setUserProperty
in interfaceRemoteOrgData
- Parameters:
u
- The user of which you want to get a property.key
- The property key.value
- The property value. With valuenull
the property will be removed.
-
getRole
Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withRole
.class as first parameter instead.Get an Role from the org-data database.- Specified by:
getRole
in interfaceRemoteOrgData
- Parameters:
oid
- the unique oid of the object- Returns:
- the requested Role
-
getRight
Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withRight
.class as first parameter instead.Get an Right from the org-data database.- Specified by:
getRight
in interfaceRemoteOrgData
- Parameters:
oid
- the unique oid of the object- Returns:
- the requested Right
-
getOrgUnit
Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withOrgUnit
.class as first parameter instead.Get an OrgUnit from the org-data database.- Specified by:
getOrgUnit
in interfaceRemoteOrgData
- Parameters:
oid
- the unique oid of the object- Returns:
- the requested OrgUnit
-
getApplication
Deprecated, for removal: This API element is subject to removal in a future version.Useget(Class, long)
withApplication
.class as first parameter instead.Get an application from the org-data database.- Specified by:
getApplication
in interfaceRemoteOrgData
- Parameters:
oid
- the unique oid of the object- Returns:
- the requested application
-
getById
Get an object from the org-data database. The class is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
getById
in interfaceRemoteOrgData
- Parameters:
c
- the classid
- the id of the object- Returns:
- the object, you can cast the result to the class you specified in the first argument
-
getById
Get an object from the org-data database. The classname is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
getById
in interfaceRemoteOrgData
- Parameters:
classname
- the classnameid
- the id of the object- Returns:
- the object, you can cast the result to the class you specified in the first argument
-
getHomeOrg
Return the Org.unit where the user has the home role.- Specified by:
getHomeOrg
in interfaceRemoteOrgData
- Parameters:
u
- the User- Returns:
- the OrgUnit
-
list
@Deprecated(since="11.0", forRemoval=true) <P> List<P> list(Class<? extends P> c, String cond, String order) Deprecated, for removal: This API element is subject to removal in a future version.Get a list of objects from the org-data database. The class is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
list
in interfaceRemoteOrgData
- Parameters:
c
- the classcond
- the condition expressionorder
- the order attribute(s), comma-separated if more than one- Returns:
- a list of objects of the given class
-
list
@Deprecated(since="11.0", forRemoval=true) <P> List<P> list(Class<? extends P> c, String cond, String order, Object... bindVars) Deprecated, for removal: This API element is subject to removal in a future version.Get a list of objects from the org-data database. The class is one of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
list
in interfaceRemoteOrgData
- Parameters:
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- Returns:
- a list of objects of the given class
-
list
@Deprecated(since="11.0", forRemoval=true) <P extends Persistent> List<P> list(String classname, String cond, String order, Object... bindVars) Deprecated, for removal: This API element is subject to removal in a future version.Get a list of objects from the org-data database. The classname is one of fully qualified name of User, Right, Role, OrgUnit, Application, OrgTree. All of them from this package.- Specified by:
list
in interfaceRemoteOrgData
- Parameters:
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- Returns:
- a list of objects of the given class
-
getRoles
Returns a Map of the roles - and org.units - of a user. The org-tree of the default application is used for determining the result for hierarchical roles.- Specified by:
getRoles
in interfaceRemoteOrgData
- Parameters:
u
- the user- Returns:
- a Map where the keys are the roles, the values are sets of org-units. If the role is global, this Set is empty.
-
getRoles
Returns a Map of the roles - and org.units - of a user.- Specified by:
getRoles
in interfaceRemoteOrgData
- Parameters:
u
- the userappl
- an application object, the org-tree of this application is used for determining the result for hierarchical roles.- Returns:
- a Map where the keys are the roles, the values are sets of org-units If the role is global, this Set is empty.
-
getRoles
Return the roles a user has in a OrgUnit.- Specified by:
getRoles
in interfaceRemoteOrgData
- Parameters:
u
- the userd
- the OrgUnit- Returns:
- a list of roles
-
hasRole
Has the user u the role r in the org.unit d?- Specified by:
hasRole
in interfaceRemoteOrgData
- Parameters:
u
- the userr
- the roled
- the OrgUnit- Returns:
- true, if the user has the role.
-
addRule
Deprecated, for removal: This API element is subject to removal in a future version.Add a permission mapping to the permission system.- Specified by:
addRule
in interfaceRemoteOrgData
- Parameters:
pm
- the permission mapping
-
addRule
Add a permission mapping to the permission system.- Specified by:
addRule
in interfaceRemoteOrgData
- Parameters:
pm
- the permission mapping class
-
hasRight
Checks whether the given user has the given right on the given object. See the description of the @enterprise permission system for details.- Specified by:
hasRight
in interfaceRemoteOrgData
- Parameters:
u
- the userr
- the righto
- the object may be null, must be a Persistent- Returns:
- true if the user has the right
-
hasRight
Checks whether the given user has the given right on the given object. See the description of the @enterprise permission system for details.- Specified by:
hasRight
in interfaceRemoteOrgData
- Parameters:
u
- the userr
- the righto
- the object (may be null)- Returns:
- true if the user has the right
-
hasRight
- Specified by:
hasRight
in interfaceRemoteOrgData
-
hasRightForList
Returns a list containing all the elements of passed list l for which the user has the specified right.- Specified by:
hasRightForList
in interfaceRemoteOrgData
- Parameters:
u
- the userr
- the rightl
- the list containing the unchecked elementsapp
- the application for referencing an org-tree- Returns:
- a list containing the permitted elements
-
hasRightForList
<P> List<P> hasRightForList(User u, Right r, List<? extends P> 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.- Specified by:
hasRightForList
in interfaceRemoteOrgData
- Parameters:
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-tree- Returns:
- a list containing the permitted elements
-
listWithRightCheck
@Deprecated(since="10.0", forRemoval=true) <P> List<P> listWithRightCheck(User u, Class<? extends P> clazz, String condition, String order, Object[] args, Right right, Application app, boolean ignoreDepts) Deprecated, for removal: This API element is subject to removal in a future version.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.- Specified by:
listWithRightCheck
in interfaceRemoteOrgData
- Parameters:
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 scope- Returns:
- the list
-
listWithRightCheck
<P> List<P> listWithRightCheck(User u, Class<? extends P> 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.- Specified by:
listWithRightCheck
in interfaceRemoteOrgData
- Parameters:
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 condition- Returns:
- the list
-
listWithRightCheck
@Deprecated(since="10.0", forRemoval=true) <P extends Persistent> List<P> listWithRightCheck(User u, String classname, String condition, String order, Object[] bindVars, Right right, Application app, boolean ignoreDepts) Deprecated, for removal: This API element is subject to removal in a future version.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.- Specified by:
listWithRightCheck
in interfaceRemoteOrgData
- Parameters:
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 scope- Returns:
- the list
-
listWithRightCheck
<P extends Persistent> List<P> 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.- Specified by:
listWithRightCheck
in interfaceRemoteOrgData
- Parameters:
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 condition- Returns:
- the list
-
checkRight
Check whether the thread user has the right r on object o. Throws ApplicationException 520 if not.- Specified by:
checkRight
in interfaceRemoteOrgData
- Parameters:
r
- a righto
- an object (optional)
-
mayInsert
Check whether the user may create the object (insert it into the database).- Specified by:
mayInsert
in interfaceRemoteOrgData
- Parameters:
u
- the user requesting the accesso
- the object- Returns:
- true, if access is allowed.
-
mayUpdate
Check whether the user may edit the object.- Specified by:
mayUpdate
in interfaceRemoteOrgData
- Parameters:
u
- the user requesting the accesso
- the object- Returns:
- true, if access is allowed.
-
mayView
Check whether the user may view the object.- Specified by:
mayView
in interfaceRemoteOrgData
- Parameters:
u
- the user requesting the accesso
- the object- Returns:
- true, if access is allowed.
-
mayExecute
Check whether the user may execute the object (function).- Specified by:
mayExecute
in interfaceRemoteOrgData
- Parameters:
u
- the user requesting the accesso
- the object- Returns:
- true, if access is allowed.
-
mayDelete
Check whether the user may delete the object.- Specified by:
mayDelete
in interfaceRemoteOrgData
- Parameters:
u
- the user requesting the accesso
- the object- Returns:
- true, if access is allowed.
-
insert
Insert the object including right check.- Specified by:
insert
in interfaceRemoteOrgData
- Parameters:
o
- the object
-
update
Update the object including right check.- Specified by:
update
in interfaceRemoteOrgData
- Parameters:
o
- the object
-
delete
Delete the object including right check.- Specified by:
delete
in interfaceRemoteOrgData
- Parameters:
o
- the object
-
getVersion
Returns the version of the object at a given date.- Specified by:
getVersion
in interfaceRemoteOrgData
- Parameters:
o
- the objectd
- the date- Returns:
- a Persistent
-
getLogAndVersion
Returns the version of the object at a given date along with the corresponding LogEntry.- Specified by:
getLogAndVersion
in interfaceRemoteOrgData
- Parameters:
o
- the objectd
- the date- Returns:
- a Pair of LogEntry and Persistent
-
getLogAndVersion
Returns the version of the object at a given version id along with the corresponding LogEntry.- Specified by:
getLogAndVersion
in interfaceRemoteOrgData
- Parameters:
o
- the objectvid
- the version id- Returns:
- a Pair of LogEntry and Persistent
-
getLogEntries
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.- Specified by:
getLogEntries
in interfaceRemoteOrgData
- Parameters:
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)- Returns:
- a list of log entries
-
makeLogEntry
Create an entry in the log table.- Specified by:
makeLogEntry
in interfaceRemoteOrgData
- Parameters:
o
- the logged objectmode
- the change mode, choose one of LogEntry constantsversionid
- a number identifying the versiondesc
- a description test- Returns:
-
listUsersWithRole
List the users that have a role- Specified by:
listUsersWithRole
in interfaceRemoteOrgData
- Parameters:
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.- Returns:
- a map where the keys are users the values are lists of the departments where the user have the role. For global roles the lists are empty.
-
checkPasswordPolicy
Check a password against the password policy.- Specified by:
checkPasswordPolicy
in interfaceRemoteOrgData
- Parameters:
password
- - the password string to check against the policy- Returns:
- a vector of strings representing the reasons, why password does not fit the policy. null if password is ok
-
getPolicyInfoText
Checks if there are any hints for the user according to the password policy.- Specified by:
getPolicyInfoText
in interfaceRemoteOrgData
- Parameters:
u
- - the user- Returns:
- a String with a policy info message, null if ther is no neccessary message.
-
setPassword
Set the password of a user. Note: Be aware that the User Object is updated and a BeanManager.commit() is called in this method.- Specified by:
setPassword
in interfaceRemoteOrgData
- Parameters:
u
- the user, whose password should be changedpassword
- - the new password (plain string)- Returns:
- the updated user object
-
createUser
User createUser()Create a new User object.- Specified by:
createUser
in interfaceRemoteOrgData
- Returns:
- a new User
-
createRole
Role createRole()Create a new Role object.- Specified by:
createRole
in interfaceRemoteOrgData
- Returns:
- a new Role
-
createRight
Right createRight()Create a new Right.- Specified by:
createRight
in interfaceRemoteOrgData
- Returns:
- a new Right
-
createOrgUnit
OrgUnit createOrgUnit()Create a new OrgUnit object.- Specified by:
createOrgUnit
in interfaceRemoteOrgData
- Returns:
- a new OrgUnit
-
createOrgClass
OrgClass createOrgClass()Create a new OrgClass object.- Specified by:
createOrgClass
in interfaceRemoteOrgData
- Returns:
- a new OrgClass
-
createUserRole
UserRole createUserRole()Create a new user-role relation- Specified by:
createUserRole
in interfaceRemoteOrgData
- Returns:
- a new UserRole
-
createPermission
Permission createPermission()Create a new Permission- Specified by:
createPermission
in interfaceRemoteOrgData
- Returns:
- a new Permission
-
createPermissionList
PermissionList createPermissionList()Create a new PermissionList- Specified by:
createPermissionList
in interfaceRemoteOrgData
- Returns:
- a new PermissionList
-
setPermissionList
Set the Permissionlist pl for an object o- Specified by:
setPermissionList
in interfaceRemoteOrgData
-
deleteCascade
Delete the passed organizational unit and also objects which are of no use without it.- Specified by:
deleteCascade
in interfaceRemoteOrgData
- Parameters:
ou
- the organizational unit to delete
-
getSubOrgs
Return the list of the organizational units that are below the given oe in the given tree. If the argument ou is null, it returns the top level org-units of the given tree.- Specified by:
getSubOrgs
in interfaceRemoteOrgData
-
getSuperOrg
Return the organizational unit that is above the given oe in the given tree.- Specified by:
getSuperOrg
in interfaceRemoteOrgData
-
createOrgTree
OrgTree createOrgTree()Return a new organizational tree.- Specified by:
createOrgTree
in interfaceRemoteOrgData
-
placeOrgInTree
Change the organizational hierarchy. Note that each org.unit has zero or one parent org.units in an org.tree.- Specified by:
placeOrgInTree
in interfaceRemoteOrgData
- Parameters:
parent
- , may be null.tree
- the tree
-
isInTree
Is the given org-unit in the specified org-tree.- Specified by:
isInTree
in interfaceRemoteOrgData
- Returns:
- true if the org-unit is part of the tree.
-
getDeptsInScope
Returns the list of of organizational units which are in the given scope relatively from the given organizational unit.- Specified by:
getDeptsInScope
in interfaceRemoteOrgData
- Parameters:
ou
- the organizational unit to start withorgScope
- the scope c.f.Permission
tree
- the tree- Returns:
- the list of organizational units in the specified scope within the tree
-
getObjectExtension
Returns the extension object to a persistent. If none exists and create is true, the extension is created.- Specified by:
getObjectExtension
in interfaceRemoteOrgData
- Parameters:
obj
- an object having extensionsformclass
- the name of a form-classcreate
- if true extensions are created- Returns:
- the extension object
-
deleteObjectExtension
delete the object extension for the given object.- Specified by:
deleteObjectExtension
in interfaceRemoteOrgData
-
changeDeferred
Change the Object later- Specified by:
changeDeferred
in interfaceRemoteOrgData
- Parameters:
p
- the Objectd
- the time of change
-
clearCachedUserProperties
Clears the cache for the user properties of the passed user. May be needed in clustered installations when login depends on newest values of user properties.- Specified by:
clearCachedUserProperties
in interfaceRemoteOrgData
- Parameters:
u
- the User
-
addRoleToSession
Adds a role to the current usersession.- Specified by:
addRoleToSession
in interfaceRemoteOrgData
- Parameters:
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.
-
removeRoleFromSession
Removes a role from the current usersession.- Specified by:
removeRoleFromSession
in interfaceRemoteOrgData
- Parameters:
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.
-
removeAllRolesFromSession
void removeAllRolesFromSession()Removes all roles from the current usersession.- Specified by:
removeAllRolesFromSession
in interfaceRemoteOrgData
-
hasRoleInSession
Checks if the given combination of role and organizational unit has been added to the current usersession.- Specified by:
hasRoleInSession
in interfaceRemoteOrgData
- Parameters:
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.- Returns:
- true, if the combination of role (and optional organizational unit) has been assigned to the current usersession.
-
getSessionRoles
Returns all the combinations of role and organizational units that have been assigned to the current usersession.- Specified by:
getSessionRoles
in interfaceRemoteOrgData
- Returns:
-
Store.get(Class, long)