Class QueryData

  • All Implemented Interfaces:
    java.lang.Iterable<QueryData.Row>

    public class QueryData
    extends XMLRequest
    implements java.lang.Iterable<QueryData.Row>
    Returns exactly one table based on query parameters. There are already some predefined static methods for existing queries (for example list of host types or OS Agents, list of LOGIN objects)
    • Constructor Detail

      • QueryData

        public QueryData​(java.lang.String requestName,
                         java.lang.String src,
                         java.util.Map<java.lang.String,​java.lang.String> attributes)
        Generic constructor (internal use only).
        Parameters:
        requestName - Name of the XML request
        src - Source
        attributes - Additional parameters; null should be used if no additional parameters are provided
    • Method Detail

      • createHostTypeList

        public static QueryData createHostTypeList()
        Creates a list of host types.
        Returns:
        Query for host types
      • createHostTypeList

        public static QueryData createHostTypeList​(java.lang.String parameter)
        Creates a list of host types. If you use "dnames" as param you get display names instead of host types.
        Parameters:
        parameter - use "dnames" to get display names instead of host types
        Returns:
        Query for host types
      • createLoginTypeList

        public static QueryData createLoginTypeList()
        Creates a list of login types.
        Returns:
        Query for login types
      • createHostRoleList

        public static QueryData createHostRoleList()
        Creates a list of host roles.
        Returns:
        Query for host roles
      • createParentWorkflowList

        public static QueryData createParentWorkflowList​(java.lang.String objName)
        Creates a list of all Workflows that contain task objName
        Parameters:
        objName - object name
        Returns:
        Query for parent WFs
      • createReportTypeList

        public static QueryData createReportTypeList()
        Creates a list of report types.
        Returns:
        Query for report types
      • createHostList

        public static QueryData createHostList​(java.lang.String agentType)
        Creates a list of Agents.
        Parameters:
        agentType - Type of the Host for example "WINDOWS" The following special values an also be used
        • * ... All Agents and dummmies
        • *_realnoerp ... Real OS Agents (no ERP/RA Agents or dummies)
        • *_real ... All Agents without dummies
        If null is passed all Agents and dummies are returned.
        Returns:
        Query for agents
      • createClientList

        public static QueryData createClientList()
        Creates a list of clients.
        Returns:
        Query of clients
      • createDBConnList

        public static QueryData createDBConnList()
        Creates a list of database connection objects.
        Returns:
        Query for DB CONN objects
      • createFilterList

        public static QueryData createFilterList()
        Creates a list of OUTPUT filters.
        Returns:
        Query for filters
      • createLicenseList

        @Deprecated
        public static QueryData createLicenseList()
        Deprecated.
        the license check has been removed in version 12.2 and higher
        Creates a list of license categories.
        Returns:
        Category list
      • createObjectList

        public static QueryData createObjectList​(java.lang.String objectType)
        Creates a list of objects.
        Parameters:
        objectType - Object type
        Returns:
        Query for object names
      • createCodeListForFT

        public static QueryData createCodeListForFT()
        Creates a list of CODE objects which can be used for FileTransfers.
        Returns:
        Query for code objects in FTs
      • createHOSTListForFT

        public static QueryData createHOSTListForFT()
        Creates a list of HOST objects which can be used for FileTransfers.
        Returns:
        Query for code objects in FTs
      • createForecastList

        public static QueryData createForecastList()
        Creates a query for forecast status values.
        Returns:
        Query instance
      • createStatusList

        public static QueryData createStatusList()
        Creates a list of final status values of tasks.
        Returns:
        Query instance
      • createStatusListWithoutUserReturnCodes

        public static QueryData createStatusListWithoutUserReturnCodes()
        Creates a list of final status values of tasks and ignore User Return Codes.
        Returns:
        Query instance without User Return Codes.
      • createExtendedObjectList

        public static QueryData createExtendedObjectList​(java.lang.String objectType)
        Creates a list of objects. This method return additional information like created/modified timestamp and object version.
        Parameters:
        objectType - Object type
        Returns:
        Query for object names
      • createObjectList

        public static QueryData createObjectList​(java.lang.String objectType,
                                                 java.lang.String subtype,
                                                 java.lang.String filter,
                                                 java.lang.String right)
        Creates a list of objects according to the given parameters. Objects were the user does not have right will be filtered out. Objects were the user has private rights will be flagged as "private".
        Parameters:
        objectType - Object type
        subtype - Platform/Subtype
        filter - Filter for object names
        right - one of the following rights
        r Access method: Read
        w Access method: Write
        x Access method: Execute
        d Access method: Delete
        c Access method: Cancel
        s Access to Statistics
        p Access to Reports
        m Access method: Modify at runtime
        l This access type allows the user to define an SLA for the particular objects
        Returns:
        Query for objects names
      • createGroupCriteriaList

        public static QueryData createGroupCriteriaList()
        Creates a list of grouping criteria for the activity window.
        Returns:
        Grouping criteria
      • createObjectTypeList

        public static QueryData createObjectTypeList()
        Creates a list of object types.
        Returns:
        Query for object types
      • createObjectTypeList

        public static QueryData createObjectTypeList​(java.lang.String parameter,
                                                     java.lang.String right)
        Creates a list of object types according to the given parameters.
        Parameters:
        parameter - use "dnames" to get display names instead of host types
        right - available right:
        "x" Access method: Execute, to filtering executable object only
        Returns:
        Query for object types
      • createExecutableDisplayTypeList

        public static QueryData createExecutableDisplayTypeList()
        Creates a list of display names for executable object types. The object type is returned in attribute "id", the display name is in attribute "value".
        Returns:
        Query for executable object types
      • createExecutableObjectTypeList

        public static QueryData createExecutableObjectTypeList()
        Creates a list of executable object types.
        Returns:
        Query for executable object types
      • createStoreObjectList

        public static QueryData createStoreObjectList​(java.lang.String filter)
        Creates a list of Store Objects. If you don't care about the platform just pass an empty String.
        Parameters:
        filter - Name filter
        Returns:
        Query for Store Objects; Can be null.
      • createDashObjectList

        public static QueryData createDashObjectList​(java.lang.String right)
        Creates a list of Dash Objects considering object rights.
        Parameters:
        right - Object right
        Returns:
        Query for Dash Objects; Can be null.
      • createEventRuleList

        public static QueryData createEventRuleList​(java.lang.String filter)
        Creates a list of Rule Event Objects. If you don't care about the platform just pass an empty String.
        Parameters:
        filter - Name filter
        Returns:
        Query for Rule Event Objects; Can be null.
      • createEventCollectorList

        public static QueryData createEventCollectorList​(java.lang.String filter)
        Creates a list of Rule Event Objects. If you don't care about the platform just pass an empty String.
        Parameters:
        filter - Name filter
        Returns:
        Query for Rule Event Objects; Can be null.
      • createEventDefinitionList

        public static QueryData createEventDefinitionList​(java.lang.String filter)
        Creates a list of Event Definition Objects. If you don't care about the platform just pass an empty String.
        Parameters:
        filter - Name filter
        Returns:
        Query for Rule Definition Objects; Can be null.
      • createVaultProvidersList

        public static QueryData createVaultProvidersList()
        Creates a list of Vault Providers. E.g. CyberArk, CA Pam etc..
        Returns:
        Query for Rule Definition Objects; Can be null.
      • createVaultSafeProvidersList

        public static QueryData createVaultSafeProvidersList()
        Creates a list of VaultSafe Providers. E.g. Safe etc..
        Returns:
        Query for Rule Definition Objects; Can be null.
      • createVaultAliasProvidersList

        public static QueryData createVaultAliasProvidersList()
        Creates a list of VaultAliasis Providers. E.g. Alias etc..
        Returns:
        Query for Rule Definition Objects; Can be null.
      • createRequest

        protected void createRequest​(com.uc4.util.XMLDocument doc,
                                     org.w3c.dom.Element request,
                                     ConnectionAttributes sessionInfo)
        Description copied from class: XMLRequest
        Creates the XML Document for the request. This method is used internally.
        Specified by:
        createRequest in class XMLRequest
        Parameters:
        doc - Document, used to create new Elements
        request - Request Element - classes append information to this request element
        sessionInfo - Information about the session
      • getSrc

        protected java.lang.String getSrc()
        Description copied from class: XMLRequest
        Returns the request source. This method is used internally.
        Specified by:
        getSrc in class XMLRequest
        Returns:
        Source
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns or -1 if no table was returned.
        Returns:
        Column count
      • getColumnNames

        public java.lang.String[] getColumnNames()
        Returns an array of columns of this row or null if no table was returned.
        Returns:
        column names
      • handleContent

        protected void handleContent​(com.uc4.util.XMLDocument doc,
                                     ConnectionAttributes session)
        Description copied from class: XMLRequest
        Sub classes extract the values from the XML document and provide public getter methods.
        Overrides:
        handleContent in class XMLRequest
        Parameters:
        doc - XML Document
        session - Info about the user session
      • iterator

        public java.util.Iterator<QueryData.Row> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<QueryData.Row>
      • size

        public int size()
        Returns the number of rows.
        Returns:
        Number of rows
      • isAllowedInClientZero

        protected boolean isAllowedInClientZero()
        Description copied from class: XMLRequest
        This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
        Overrides:
        isAllowedInClientZero in class XMLRequest
        Returns:
        true if this request is allowed in client 0, false otherwise