Class GroovyOrgStructureWrapper


  • @Scriptable
    public final class GroovyOrgStructureWrapper
    extends Object
    Since:
    Intrexx 5.2.
    • 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, or false 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, or true otherwise.
        Returns:
        true if the specified user exists, or false 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, or true 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, or false 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, or true otherwise.
        Returns:
        true if the specified user exists, or false 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, or true 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, or false 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, or true otherwise.
        Returns:
        true if the specified user exists, or false 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, or true 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, or false 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 - If p_strContainer is null 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, or false 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 - If p_strSet is null 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.