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 classThis class represents a row in the returned result set. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryDataCreates a list of clients.static QueryDataCreates a list of CODE objects which can be used for FileTransfers.static QueryDatacreateDashObjectList(String right) Creates a list of Dash Objects considering object rights.static QueryDataCreates a list of database connection objects.static QueryDatacreateEventCollectorList(String filter) Creates a list of Rule Event Objects.static QueryDatacreateEventDefinitionList(String filter) Creates a list of Event Definition Objects.static QueryDatacreateEventRuleList(String filter) Creates a list of Rule Event Objects.static QueryDataCreates a list of display names for executable object types.static QueryDataCreates a list of executable object types.static QueryDatacreateExtendedObjectList(String objectType) Creates a list of objects.static QueryDataCreates a list of OUTPUT filters.static QueryDataCreates a query for forecast status values.static QueryDataCreates a list of grouping criteria for the activity window.static QueryDatacreateHostList(String agentType) Creates a list of Agents.static QueryDataCreates a list of HOST objects which can be used for FileTransfers.static QueryDataCreates a list of host roles.static QueryDataCreates a list of host types.static QueryDatacreateHostTypeList(String parameter) Creates a list of host types.static QueryDataDeprecated.the license check has been removed in version 12.2 and higherstatic QueryDataCreates a list of login types.static QueryDatacreateObjectList(String objectType) Creates a list of objects.static QueryDatacreateObjectList(String objectType, String subtype, String filter, String right) Creates a list of objects according to the given parameters.static QueryDataCreates a list of object types.static QueryDatacreateObjectTypeList(String parameter, String right) Creates a list of object types according to the given parameters.static QueryDatacreateParentWorkflowList(String objName) Creates a list of all Workflows that contain task objNamestatic QueryDataCreates a list of report types.protected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.static QueryDataCreates a list of final status values of tasks.static QueryDataCreates a list of final status values of tasks and ignore User Return Codes.static QueryDatacreateStoreObjectList(String filter) Creates a list of Store Objects.static QueryDataCreates a list of VaultAliasis Providers.static QueryDataCreates a list of Vault Providers.static QueryDataCreates a list of VaultSafe Providers.intReturns the number of columns or-1if no table was returned.String[]Returns an array of columns of this row ornullif no table was returned.protected StringgetSrc()Returns the request source.protected voidhandleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected booleanThis method is used internally.iterator()intsize()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, showQuarantineNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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;nullshould 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
nullis 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:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin 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:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
getColumnCount
public int getColumnCount()Returns the number of columns or-1if no table was returned.- Returns:
- Column count
-
getColumnNames
Returns an array of columns of this row ornullif no table was returned.- Returns:
- column names
-
handleContent
Description copied from class:XMLRequestSub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContentin classXMLRequest- Parameters:
doc- XML Documentsession- Info about the user session
-
iterator
- Specified by:
iteratorin interfaceIterable<QueryData.Row>
-
size
public int size()Returns the number of rows.- Returns:
- Number of rows
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-