Package com.uc4.communication.requests
Class QueryData
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.QueryData
- All Implemented Interfaces:
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)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class represents a row in the returned result set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryData
Creates a list of clients.static QueryData
Creates a list of CODE objects which can be used for FileTransfers.static QueryData
createDashObjectList
(String right) Creates a list of Dash Objects considering object rights.static QueryData
Creates a list of database connection objects.static QueryData
createEventCollectorList
(String filter) Creates a list of Rule Event Objects.static QueryData
createEventDefinitionList
(String filter) Creates a list of Event Definition Objects.static QueryData
createEventRuleList
(String filter) Creates a list of Rule Event Objects.static QueryData
Creates a list of display names for executable object types.static QueryData
Creates a list of executable object types.static QueryData
createExtendedObjectList
(String objectType) Creates a list of objects.static QueryData
Creates a list of OUTPUT filters.static QueryData
Creates a query for forecast status values.static QueryData
Creates a list of grouping criteria for the activity window.static QueryData
createHostList
(String agentType) Creates a list of Agents.static QueryData
Creates a list of HOST objects which can be used for FileTransfers.static QueryData
Creates a list of host roles.static QueryData
Creates a list of host types.static QueryData
createHostTypeList
(String parameter) Creates a list of host types.static QueryData
Deprecated.the license check has been removed in version 12.2 and higherstatic QueryData
Creates a list of login types.static QueryData
createObjectList
(String objectType) Creates a list of objects.static QueryData
createObjectList
(String objectType, String subtype, String filter, String right) Creates a list of objects according to the given parameters.static QueryData
Creates a list of object types.static QueryData
createObjectTypeList
(String parameter, String right) Creates a list of object types according to the given parameters.static QueryData
createParentWorkflowList
(String objName) Creates a list of all Workflows that contain task objNamestatic QueryData
Creates a list of report types.protected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.static QueryData
Creates a list of final status values of tasks.static QueryData
Creates a list of final status values of tasks and ignore User Return Codes.static QueryData
createStoreObjectList
(String filter) Creates a list of Store Objects.static QueryData
Creates a list of VaultAliasis Providers.static QueryData
Creates a list of Vault Providers.static QueryData
Creates a list of VaultSafe Providers.int
Returns the number of columns or-1
if no table was returned.String[]
Returns an array of columns of this row ornull
if no table was returned.protected String
getSrc()
Returns the request source.protected void
handleContent
(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected boolean
This method is used internally.iterator()
int
size()
Returns the number of rows.Methods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
QueryData
Generic constructor (internal use only).- Parameters:
requestName
- Name of the XML requestsrc
- Sourceattributes
- Additional parameters;null
should be used if no additional parameters are provided
-
-
Method Details
-
createHostTypeList
Creates a list of host types.- Returns:
- Query for host types
-
createHostTypeList
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
Creates a list of login types.- Returns:
- Query for login types
-
createHostRoleList
Creates a list of host roles.- Returns:
- Query for host roles
-
createParentWorkflowList
Creates a list of all Workflows that contain task objName- Parameters:
objName
- object name- Returns:
- Query for parent WFs
-
createReportTypeList
Creates a list of report types.- Returns:
- Query for report types
-
createHostList
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
null
is passed all Agents and dummies are returned.- Returns:
- Query for agents
-
createClientList
Creates a list of clients.- Returns:
- Query of clients
-
createDBConnList
Creates a list of database connection objects.- Returns:
- Query for DB CONN objects
-
createFilterList
Creates a list of OUTPUT filters.- Returns:
- Query for filters
-
createLicenseList
Deprecated.the license check has been removed in version 12.2 and higherCreates a list of license categories.- Returns:
- Category list
-
createObjectList
Creates a list of objects.- Parameters:
objectType
- Object type- Returns:
- Query for object names
-
createCodeListForFT
Creates a list of CODE objects which can be used for FileTransfers.- Returns:
- Query for code objects in FTs
-
createHOSTListForFT
Creates a list of HOST objects which can be used for FileTransfers.- Returns:
- Query for code objects in FTs
-
createForecastList
Creates a query for forecast status values.- Returns:
- Query instance
-
createStatusList
Creates a list of final status values of tasks.- Returns:
- Query instance
-
createStatusListWithoutUserReturnCodes
Creates a list of final status values of tasks and ignore User Return Codes.- Returns:
- Query instance without User Return Codes.
-
createExtendedObjectList
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(String objectType, String subtype, String filter, 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 typesubtype
- Platform/Subtypefilter
- Filter for object namesright
- one of the following rightsr 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
Creates a list of grouping criteria for the activity window.- Returns:
- Grouping criteria
-
createObjectTypeList
Creates a list of object types.- Returns:
- Query for object types
-
createObjectTypeList
Creates a list of object types according to the given parameters.- Parameters:
parameter
- use "dnames" to get display names instead of host typesright
- available right:
"x" Access method: Execute, to filtering executable object only- Returns:
- Query for object types
-
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
Creates a list of executable object types.- Returns:
- Query for executable object types
-
createStoreObjectList
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
Creates a list of Dash Objects considering object rights.- Parameters:
right
- Object right- Returns:
- Query for Dash Objects; Can be null.
-
createEventRuleList
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
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
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
Creates a list of Vault Providers. E.g. CyberArk, CA Pam etc..- Returns:
- Query for Rule Definition Objects; Can be null.
-
createVaultSafeProvidersList
Creates a list of VaultSafe Providers. E.g. Safe etc..- Returns:
- Query for Rule Definition Objects; Can be null.
-
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, 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 classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
getSrc
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
getColumnCount
public int getColumnCount()Returns the number of columns or-1
if no table was returned.- Returns:
- Column count
-
getColumnNames
Returns an array of columns of this row ornull
if no table was returned.- Returns:
- column names
-
handleContent
Description copied from class:XMLRequest
Sub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContent
in classXMLRequest
- Parameters:
doc
- XML Documentsession
- Info about the user session
-
iterator
- Specified by:
iterator
in interfaceIterable<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 thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Overrides:
isAllowedInClientZero
in classXMLRequest
- Returns:
true
if this request is allowed in client 0,false
otherwise
-