Class GroovyOrgStructureWrapper
- java.lang.Object
-
- de.uplanet.lucy.server.usermanager.groovy.GroovyOrgStructureWrapper
-
@Scriptable public final class GroovyOrgStructureWrapper extends Object
- Since:
- Intrexx 5.2.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearLocalUserCache()
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(long p_lId)
Check if the specified user exists.boolean
existsUser(long p_lId, 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.GroovyDsContainerNode
findContainerNode(String p_strContainer)
Find a container by its GUID, its name or its path.GroovyDsSetNode
findSetNode(String p_strSet)
Find a set by its GUID, its name or its path.List<GroovyDsContainerNode>
getContainerClassNodes()
Get a list of all containers in the org structure that have class CONTAINER.GroovyDsContainerNode
getContainerNode(String p_strGuid)
Get a container by it's unique identifier.List<GroovyDsContainerNode>
getContainerNodes()
Get a list of all containers in the org structure.Collection<GroovyDsSetNode>
getContainingSets(IUser p_user)
Collection<GroovyDsSetNode>
getContainingSets(String p_strUserGuid)
List<GroovyDsSetNode>
getDistListClassNodes()
Get a list of all sets in the org structure that have class DISTLIST.List<GroovyDsSetNode>
getGroupClassNodes()
Get a list of all sets in the org structure that have class GROUP.List<GroovyUser>
getMembers(Object p_obj, boolean p_bIncludeDeactivated)
List<GroovyUser>
getMembers(Collection<?> p_collection, boolean p_bIncludeDeactivated)
Collection<AbstractGroovyDsNode>
getMembership(IUser p_user)
Collection<AbstractGroovyDsNode>
getMembership(String p_strUserGuid)
Collection<AbstractGroovyDsNode>
getMembership(Subject p_subject)
Collection<GroovyDsContainerNode>
getMembershipContainers(IUser p_user)
Collection<GroovyDsContainerNode>
getMembershipContainers(String p_strUserGuid)
Collection<GroovyDsSetNode>
getMembershipSets(IUser p_user)
Collection<GroovyDsSetNode>
getMembershipSets(String p_strUserGuid)
List<GroovyDsContainerNode>
getOrganizationClassNodes()
Get a list of all containers in the org structure that have class ORGANIZATION.List<GroovyDsContainerNode>
getOrgUnitClassNodes()
Get a list of all containers in the org structure that have class ORGUNIT.List<GroovyDsSetNode>
getRoleClassNodes()
Get a list of all sets in the org structure that have class ROLE.GroovyDsContainerNode
getRootNode()
Get the pseudo root node of the organizational structure.List<GroovyDsSetNode>
getSetClassNodes()
Get a list of all sets in the org structure that have class SET.GroovyDsSetNode
getSetNode(String p_strGuid)
Get a set by it's unique identifier.List<GroovyDsSetNode>
getSetNodes()
Get a list of all sets in the org structure.GroovyUser
getUser(long p_lId)
Get the user with the specified integer ID.GroovyUser
getUser(long p_lId, boolean p_bIncludeDeactivated)
Get the user with the specified integer ID.GroovyUser
getUser(String p_strGuid)
Get the user with the specified GUID.GroovyUser
getUser(String p_strGuid, boolean p_bIncludeDeactivated)
Get the user with the specified GUID.GroovyUser
getUser(String p_strLoginName, String p_strLoginDomain)
Get the user with the specified login name and domain.GroovyUser
getUser(String p_strLoginName, String p_strLoginDomain, boolean p_bIncludeDeactivated)
Get the user with the specified login name and domain.
-
-
-
Method Detail
-
clearLocalUserCache
public void clearLocalUserCache()
Clears the local user cache.
-
existsUser
public boolean existsUser(String p_strGuid) throws SQLException
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.- Since:
- Intrexx 6.0.
-
existsUser
public boolean existsUser(String p_strGuid, boolean p_bIncludeDeactivated) throws SQLException
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
public GroovyUser getUser(String p_strGuid) throws SQLException
Get the user with the specified GUID.The method returns
null
if the user exists but is deactivated.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 could not be found. - Throws:
SQLException
- If a database error occurred.
-
getUser
public GroovyUser getUser(String p_strGuid, boolean p_bIncludeDeactivated) throws SQLException
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. - Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
existsUser
public boolean existsUser(String p_strLoginName, String p_strLoginDomain) throws SQLException
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
public GroovyUser getUser(String p_strLoginName, String p_strLoginDomain) throws SQLException
Get the user with the specified login name and domain.The method returns
null
if the user exists but is deactivated.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.- Returns:
- The user, or
null
if the user could not be found. - Throws:
SQLException
- If a database error occurred.
-
getUser
public GroovyUser 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. - Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
existsUser
public boolean existsUser(long p_lId) throws SQLException
Check if the specified user exists.Note: Do not use this method except in cases where only the user's integer ID is known.
The method returns
false
if the user exists but is deactivated.- Parameters:
p_lId
- 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
public boolean existsUser(long p_lId, boolean p_bIncludeDeactivated) throws SQLException
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_lId
- 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
public GroovyUser getUser(long p_lId) throws SQLException
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_lId
- The user's integer identifier.- Returns:
- The user, or
null
if the user could not be found. - Throws:
SQLException
- If a database error occurred.
-
getUser
public GroovyUser getUser(long p_lId, boolean p_bIncludeDeactivated) throws SQLException
Get the user with the specified integer ID.- Parameters:
p_bIncludeDeactivated
-false
if deactivated users should be ignored, ortrue
otherwise.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.
p_lId
- The user's integer identifier.- Returns:
- The user, or
null
if the user could not be found. - Throws:
SQLException
- If a database error occurred.- Since:
- Intrexx 6.0.
-
getRootNode
public GroovyDsContainerNode 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
public boolean containsContainerNode(String p_strGuid)
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
public GroovyDsContainerNode getContainerNode(String p_strGuid)
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
public GroovyDsContainerNode findContainerNode(String p_strContainer)
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 List<GroovyDsContainerNode> getContainerNodes()
Get a list of all containers in the org structure.- Returns:
- A list that contains all containers in the org structure.
-
getContainerClassNodes
public List<GroovyDsContainerNode> 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 List<GroovyDsContainerNode> 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 List<GroovyDsContainerNode> 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
public boolean containsSetNode(String p_strGuid)
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
public GroovyDsSetNode getSetNode(String p_strGuid)
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
public GroovyDsSetNode findSetNode(String p_strSet)
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 List<GroovyDsSetNode> getSetNodes()
Get a list of all sets in the org structure.- Returns:
- A list that contains all sets in the org structure.
-
getSetClassNodes
public List<GroovyDsSetNode> 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 List<GroovyDsSetNode> 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 List<GroovyDsSetNode> 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 List<GroovyDsSetNode> 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 Collection<GroovyDsSetNode> getContainingSets(IUser p_user) throws SQLException
- Throws:
SQLException
- See Also:
GroovyOrgBuilder.getContainingSets(IUser)
-
getContainingSets
public Collection<GroovyDsSetNode> getContainingSets(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException
- Throws:
SQLException
de.uplanet.lucy.usermanager.NotFoundException
- See Also:
GroovyOrgBuilder.getContainingSets(String)
-
getMembershipSets
public Collection<GroovyDsSetNode> getMembershipSets(IUser p_user) throws SQLException
- Throws:
SQLException
- See Also:
GroovyOrgBuilder.getMembershipSets(IUser)
-
getMembershipSets
public Collection<GroovyDsSetNode> getMembershipSets(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException
- Throws:
SQLException
de.uplanet.lucy.usermanager.NotFoundException
- See Also:
GroovyOrgBuilder.getMembershipSets(String)
-
getMembershipContainers
public Collection<GroovyDsContainerNode> getMembershipContainers(IUser p_user) throws SQLException
- Throws:
SQLException
- See Also:
GroovyOrgBuilder.getMembershipContainers(IUser)
-
getMembershipContainers
public Collection<GroovyDsContainerNode> getMembershipContainers(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException
- Throws:
SQLException
de.uplanet.lucy.usermanager.NotFoundException
- See Also:
GroovyOrgBuilder.getMembershipContainers(String)
-
getMembership
public Collection<AbstractGroovyDsNode> getMembership(Subject p_subject)
- See Also:
GroovyOrgBuilder.getMembership(Subject)
-
getMembership
public Collection<AbstractGroovyDsNode> getMembership(IUser p_user) throws SQLException
- Throws:
SQLException
- See Also:
GroovyOrgBuilder.getMembership(IUser)
-
getMembership
public Collection<AbstractGroovyDsNode> getMembership(String p_strUserGuid) throws SQLException, de.uplanet.lucy.usermanager.NotFoundException
- Throws:
SQLException
de.uplanet.lucy.usermanager.NotFoundException
- See Also:
GroovyOrgBuilder.getMembership(String)
-
getMembers
public List<GroovyUser> getMembers(Object p_obj, boolean p_bIncludeDeactivated) throws SQLException
- Throws:
SQLException
- Since:
- Intrexx 6.0.
- See Also:
GroovyOrgBuilder.getMembers(Object, boolean)
-
getMembers
public List<GroovyUser> getMembers(Collection<?> p_collection, boolean p_bIncludeDeactivated) throws SQLException
- Throws:
SQLException
- Since:
- Intrexx 6.0.
- See Also:
GroovyOrgBuilder.getMembers(Collection, boolean)
-
-