Class VelocityOrgStructureWrapper
-
Constructor Summary
ConstructorDescriptionVelocityOrgStructureWrapper
(de.uplanet.jdbc.JdbcConnection p_conn, de.uplanet.lucy.server.usermanager.orgstructure.IOrgStructure p_org, de.uplanet.lucy.server.usermanager.ds.IDsDbSchema p_schema, de.uplanet.lucy.server.usermanager.usecases.IDsucObject p_dsucObject, de.uplanet.lucy.server.usermanager.usecases.IDsucUser p_dsucUser, de.uplanet.lucy.server.usermanager.usecases.IDsucSet p_dsucSet, de.uplanet.lucy.server.usermanager.usecases.IDsucGetMembers p_dsucGetMembers) -
Method Summary
Modifier and TypeMethodDescriptionclassifyGuids
(CharSequence p_chseq, boolean p_bIncludeDeactivatedUsers) classifyGuids
(Collection<?> p_guids, boolean p_bIncludeDeactivatedUsers) Classify the given GUIDs.void
Clears the local user cache.boolean
containsContainerNode
(String p_strGuid) Check if the org structure contains a container with the given given unique identifier.boolean
containsSetNode
(String p_strGuid) Check if the org structure contains a set with the given given unique identifier.boolean
existsUser
(Number p_numId) Check if the specified user exists.boolean
existsUser
(Number p_numId, boolean p_bIncludeDeactivated) Check if the specified user exists.boolean
existsUser
(String p_strGuid) Check if the specified user exists.boolean
existsUser
(String p_strGuid, boolean p_bIncludeDeactivated) Check if the specified user exists.boolean
existsUser
(String p_strLoginName, String p_strLoginDomain) Check if the specified user exists.boolean
existsUser
(String p_strLoginName, String p_strLoginDomain, boolean p_bIncludeDeactivated) Check if the specified user exists.findContainerNode
(String p_strContainer) Find a container by its GUID, its name or its path.findSetNode
(String p_strSet) Find a set by its GUID, its name or its path.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
Get a list of all containers in the org structure that have class CONTAINER.getContainerNode
(String p_strGuid) Get a container by it's unique identifier.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
Get a list of all containers in the org structure.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
getContainingSets
(IUser p_user) Get a collection of sets that directly contain the given user.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
getContainingSets
(String p_strUserGuid) de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
Get a list of all sets in the org structure that have class DISTLIST.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
Get a list of all sets in the org structure that have class GROUP.getMembers
(Object p_obj, boolean p_bIncludeDeactivated) Get a list of users that are referenced by the given object.getMembers
(Collection<?> p_collection, boolean p_bIncludeDeactivated) Get a list of users that are referenced by the given collection.getMembership
(IUser p_user) Get a list of containers and sets that directly or indirectly contain the given user.getMembership
(String p_strUserGuid) Get a list of containers and sets that directly or indirectly contain the given user.getMembership
(Subject p_subject) Get a list of containers and sets that are part of the given subject.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
getMembershipContainers
(IUser p_user) Get a collection of containers that directly or indirectly contain the given user.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
getMembershipContainers
(String p_strUserGuid) Get a collection of containers that directly or indirectly contain the given user.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
getMembershipSets
(IUser p_user) Get a collection of sets that directly or indirectly contain the given user.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
getMembershipSets
(String p_strUserGuid) Get a collection of sets that directly or indirectly contain the given user.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
Get a list of all containers in the org structure that have class ORGANIZATION.de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes
Get a list of all containers in the org structure that have class ORGUNIT.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
Get a list of all sets in the org structure that have class ROLE.Get the pseudo root node of the organizational structure.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
Get a list of all sets in the org structure that have class SET.getSetNode
(String p_strGuid) Get a set by it's unique identifier.de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes
Get a list of all sets in the org structure.Get the user with the specified integer ID.Get the user with the specified integer ID.Get the user with the specified GUID.Get the user with the specified GUID.Get the user with the specified login name and domain.Get the user with the specified login name and domain.boolean
isContainer
(Object p_obj) Check if the given object represents a container.boolean
isDistList
(Object p_obj) Check if the given object represents a distribution list.boolean
Check if the given object represents a group.boolean
isOrganization
(Object p_obj) Check if the given object represents an organization.boolean
Check if the given object represents an organizational unit.boolean
Check if the given object represents a role.boolean
Check if the given object represents a set.boolean
Check if the given object represents a user.
-
Constructor Details
-
VelocityOrgStructureWrapper
public VelocityOrgStructureWrapper(de.uplanet.jdbc.JdbcConnection p_conn, de.uplanet.lucy.server.usermanager.orgstructure.IOrgStructure p_org, de.uplanet.lucy.server.usermanager.ds.IDsDbSchema p_schema, de.uplanet.lucy.server.usermanager.usecases.IDsucObject p_dsucObject, de.uplanet.lucy.server.usermanager.usecases.IDsucUser p_dsucUser, de.uplanet.lucy.server.usermanager.usecases.IDsucSet p_dsucSet, de.uplanet.lucy.server.usermanager.usecases.IDsucGetMembers p_dsucGetMembers)
-
-
Method Details
-
clearLocalUserCache
public void clearLocalUserCache()Clears the local user cache. -
existsUser
Check if the specified user exists.The method returns
false
if the user exists but is deactivated.- Parameters:
p_strGuid
- The user's unique identifier (GUID).- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.
-
existsUser
Check if the specified user exists.- Parameters:
p_strGuid
- The user's unique identifier (GUID).p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
getUser
Get the user with the specified GUID.Note: Do not store this user object for later use by another thread or transaction.
- Parameters:
p_strGuid
- The user's unique identifier (GUID).- Returns:
- The user, or
null
if the user was deactivated or could not be found in the database. - Throws:
SQLException
- If a database error occurred.
-
getUser
Get the user with the specified GUID.Note: Do not store this user object for later use by another thread or transaction.
- Parameters:
p_strGuid
- The user's unique identifier (GUID).p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- The user, or
null
if the user could not be found in the database. - Throws:
SQLException
- If a database error occurred.IllegalArgumentException
- Ifp_strGuid
is not a valid GUID.- Since:
- Intrexx 6.0.
-
existsUser
Check if the specified user exists.The method returns
false
if the user exists but is deactivated.Note: Do not use this method except in cases where only the user's integer ID is known.
- Parameters:
p_numId
- The user's integer identifier.- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
existsUser
Check if the specified user exists.Note: Do not use this method except in cases where only the user's integer ID is known.
- Parameters:
p_numId
- The user's integer identifier.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
getUser
Get the user with the specified integer ID.Note: Do not use this method except in cases where only the user's integer ID is known.
Note: Do not store this user object for later use by another thread or transaction.
- Parameters:
p_numId
- The user's integer identifier.- Returns:
- The user, or
null
if the user could not be found in the database. - Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 5.2.
-
getUser
Get the user with the specified integer ID.Note: Do not use this method except in cases where only the user's integer ID is known.
Note: Do not store this user object for later use by another thread or transaction.
- Parameters:
p_numId
- The user's integer identifier.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- The user, or
null
if the user could not be found in the database. - Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
existsUser
Check if the specified user exists.The method returns
false
if the user exists but is deactivated.- Parameters:
p_strLoginName
- The login name.p_strLoginDomain
- The login domain.- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
existsUser
public boolean existsUser(String p_strLoginName, String p_strLoginDomain, boolean p_bIncludeDeactivated) throws SQLException Check if the specified user exists.- Parameters:
p_strLoginName
- The login name.p_strLoginDomain
- The login domain.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
true
if the specified user exists, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
getUser
Get the user with the specified login name and domain.Note: Do not use this method except in cases where only the user's integer ID is known.
- Parameters:
p_strLoginName
- The login name.p_strLoginDomain
- The login domain.- Returns:
- The user, or
null
if the user could not be found. - Throws:
SQLException
- If a database error occurred.
-
getUser
public IUser getUser(String p_strLoginName, String p_strLoginDomain, boolean p_bIncludeDeactivated) throws SQLException Get the user with the specified login name and domain.Note: Do not store this user object for later use by another thread or transaction.
- Parameters:
p_strLoginName
- The login name.p_strLoginDomain
- The login domain.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- The user, or
null
if the user could not be found in the database. - Throws:
SQLException
- If a database error occurred.IllegalArgumentException
- Ifp_strLoginName
isnull
.- Since:
- Intrexx 6.0.
-
getRootNode
Get the pseudo root node of the organizational structure.The children of this node are the top-level organizational container nodes and do not report the pseudo root as their parent.
- Returns:
- The pseudo root node.
-
containsContainerNode
Check if the org structure contains a container with the given given unique identifier.- Parameters:
p_strGuid
- The unique identifier.- Returns:
true
if the container was found, orfalse
otherwise.
-
getContainerNode
Get a container by it's unique identifier.- Parameters:
p_strGuid
- The organizational container's unique identifier.- Returns:
- The organizational container node, or
null
if none was found for the given unique identifier.
-
findContainerNode
Find a container by its GUID, its name or its path.- Parameters:
p_strContainer
- The GUID, name, or path of the container.- Returns:
- The container, or
null
if the requested container was not found. - Throws:
IllegalArgumentException
- Ifp_strContainer
isnull
or empty, or if the given identifier was ambiguous.
-
getContainerNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getContainerNodes()Get a list of all containers in the org structure.- Returns:
- A list that contains all containers in the org structure.
-
getContainerClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getContainerClassNodes()Get a list of all containers in the org structure that have class CONTAINER.- Returns:
- A list that contains all containers in the org structure that have class CONTAINER.
-
getOrgUnitClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getOrgUnitClassNodes()Get a list of all containers in the org structure that have class ORGUNIT.- Returns:
- A list that contains all containers in the org structure that have class ORGUNIT.
-
getOrganizationClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getOrganizationClassNodes()Get a list of all containers in the org structure that have class ORGANIZATION.- Returns:
- A list that contains all containers in the org structure that have class ORGANIZATION.
-
containsSetNode
Check if the org structure contains a set with the given given unique identifier.- Parameters:
p_strGuid
- The unique identifier.- Returns:
true
if the set was found, orfalse
otherwise.
-
getSetNode
Get a set by it's unique identifier.- Parameters:
p_strGuid
- The set's unique identifier.- Returns:
- The set node, or
null
if none was found for the given unique identifier.
-
findSetNode
Find a set by its GUID, its name or its path.- Parameters:
p_strSet
- The GUID, name, or path of the set.- Returns:
- The set, or
null
if the requested set was not found. - Throws:
IllegalArgumentException
- Ifp_strSet
isnull
or empty, or if the given identifier was ambiguous.
-
getSetNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getSetNodes()Get a list of all sets in the org structure.- Returns:
- A list that contains all sets in the org structure.
-
getSetClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getSetClassNodes()Get a list of all sets in the org structure that have class SET.- Returns:
- A list that contains all sets in the org structure that have class SET.
-
getRoleClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getRoleClassNodes()Get a list of all sets in the org structure that have class ROLE.- Returns:
- A list that contains all sets in the org structure that have class ROLE.
-
getGroupClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getGroupClassNodes()Get a list of all sets in the org structure that have class GROUP.- Returns:
- A list that contains all sets in the org structure that have class GROUP.
-
getDistListClassNodes
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getDistListClassNodes()Get a list of all sets in the org structure that have class DISTLIST.- Returns:
- A list that contains all sets in the org structure that have class DISTLIST.
-
getContainingSets
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getContainingSets(IUser p_user) throws SQLException Get a collection of sets that directly contain the given user.- Parameters:
p_user
- The user.- Returns:
- A collection of sets the given user is a direct member of.
- Throws:
SQLException
- If a database error occurred.
-
getContainingSets
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getContainingSets(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException - Throws:
SQLException
de.uplanet.lucy.usermanager.NotFoundException
-
getMembershipSets
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getMembershipSets(IUser p_user) throws SQLException Get a collection of sets that directly or indirectly contain the given user.- Parameters:
p_user
- The user.- Returns:
- A collection of sets the given user is member of.
- Throws:
SQLException
- If a database error occurred.
-
getMembershipSets
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsSetNodes getMembershipSets(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException Get a collection of sets that directly or indirectly contain the given user.- Parameters:
p_strUserGuid
- The user's GUID.- Returns:
- A collection of sets the given user is member of.
- Throws:
SQLException
- If a database error occurred.de.uplanet.lucy.usermanager.NotFoundException
- If the user was not found in the database.
-
getMembershipContainers
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getMembershipContainers(IUser p_user) throws SQLException Get a collection of containers that directly or indirectly contain the given user.- Parameters:
p_user
- The user.- Returns:
- A collection of containers the given user is member of.
- Throws:
SQLException
- If a database error occurred.
-
getMembershipContainers
public de.uplanet.lucy.server.usermanager.velocity.VelocityDsContainerNodes getMembershipContainers(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException Get a collection of containers that directly or indirectly contain the given user.- Parameters:
p_strUserGuid
- The user's GUID.- Returns:
- A collection of containers the given user is member of.
- Throws:
SQLException
- If a database error occurred.de.uplanet.lucy.usermanager.NotFoundException
- If the user was not found in the database.
-
getMembership
Get a list of containers and sets that directly or indirectly contain the given user. Containers are listed before sets.- Parameters:
p_user
- The user.- Returns:
- A list of containers ans sets the given user is member of.
- Throws:
SQLException
- If a database error occurred.
-
getMembership
Get a list of containers and sets that are part of the given subject. Containers are listed before sets.Using this method can be more efficient than using
getMembership(IUser)
in the common case where the user's subject is available through the session.- Parameters:
p_subject
- The subject.- Returns:
- A list of containers ans sets that are part of the given subject.
-
getMembership
public VelocityDsNodes getMembership(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException Get a list of containers and sets that directly or indirectly contain the given user. Containers are listed before sets.- Parameters:
p_strUserGuid
- The user's GUID.- Returns:
- A list of containers ans sets the given user is member of.
- Throws:
SQLException
- If a database error occurred.de.uplanet.lucy.usermanager.NotFoundException
- If the user was not found in the database.
-
getMembers
Get a list of users that are referenced by the given object.The method recognizes user, set, and container GUIDs, org structure nodes (
IDsNode
,AbstractVelocityDsNode
), and Intrexx principal objects.- Parameters:
p_obj
- An object as described above.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- The list of users referenced by the given object.
- Throws:
SQLException
- If a database error occurred.IllegalArgumentException
- If the given object isnull
, or it is not of the above mentioned type.- Since:
- Intrexx 6.0.
-
getMembers
public List<IUser> getMembers(Collection<?> p_collection, boolean p_bIncludeDeactivated) throws SQLException Get a list of users that are referenced by the given collection.The method recognizes user, set, and container GUIDs, org structure nodes (
IDsNode
,AbstractVelocityDsNode
), and Intrexx principal objects.- Parameters:
p_collection
- A collection as described above.p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- The list of users referenced by the given collection.
- Throws:
SQLException
- If a database error occurred.IllegalArgumentException
- If the given collection isnull
, or the contents of the collections is not of the above mentioned type.- Since:
- Intrexx 6.0.
-
classifyGuids
public Map<String,List<String>> classifyGuids(CharSequence p_chseq, boolean p_bIncludeDeactivatedUsers) throws SQLException - Parameters:
p_chseq
- Text to extract GUIDs from.p_bIncludeDeactivatedUsers
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- A map that contains the classified GUIDs.
- Throws:
SQLException
- If a database error occurred.IllegalArgumentException
- If the given input isnull
.- Since:
- Intrexx 6.0.
- See Also:
-
classifyGuids
public Map<String,List<String>> classifyGuids(Collection<?> p_guids, boolean p_bIncludeDeactivatedUsers) throws SQLException Classify the given GUIDs. The resultant map will contain the following lists:users
: exising (i.e. not deleted) users,containers
: containers,sets
: sets,unclassified
: GUIDs that fall into none of the above categories.
Elements that are not GUIDs are ignored.
- Parameters:
p_guids
- A collection of GUIDs.p_bIncludeDeactivatedUsers
-false
if deactivated users should be ignored, ortrue
otherwise.- Returns:
- A map that contains the classified GUIDs.
- Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
isUser
Check if the given object represents a user.The method recognizes GUIDs,
user
objects, and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a user, orfalse
otherwise.- Throws:
SQLException
- If a database error occurred.
-
isSet
Check if the given object represents a set.The method recognizes GUIDs, org structure nodes (
DsSetNode
,VelocityDsSetNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a set, orfalse
otherwise.
-
isGroup
Check if the given object represents a group.The method recognizes GUIDs, org structure nodes (
DsSetNode
,VelocityDsSetNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a group, orfalse
otherwise.
-
isRole
Check if the given object represents a role.The method recognizes GUIDs, org structure nodes (
DsSetNode
,VelocityDsSetNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a role, orfalse
otherwise.
-
isDistList
Check if the given object represents a distribution list.The method recognizes GUIDs, org structure nodes (
DsSetNode
,VelocityDsSetNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a distribution list, orfalse
otherwise.
-
isContainer
Check if the given object represents a container.The method recognizes GUIDs, org structure nodes (
DsContainerNode
,VelocityDsContainerNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents a container, orfalse
otherwise.
-
isOrganization
Check if the given object represents an organization.The method recognizes GUIDs, org structure nodes (
DsContainerNode
,VelocityDsContainerNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents an organization, orfalse
otherwise.
-
isOrgUnit
Check if the given object represents an organizational unit.The method recognizes GUIDs, org structure nodes (
DsContainerNode
,VelocityDsContainerNode
), and Intrexx principal objects.- Parameters:
p_obj
- The object to check.- Returns:
true
if the given object represents an organizational unit, orfalse
otherwise.
-