Package com.uc4.communication.requests
Class GetChangeLog
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.GetChangeLog
- All Implemented Interfaces:
Iterable<GetChangeLog.Entry>
Returns a list of recent changes in the current client.
This information is only available if the OBJECT_AUDIT parameter is set to "Y" in UC_CLIENT_SETTINGS.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents a row in the result of the change list. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newGetChangeLogrequest without filters (everything is returned). -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.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()voidSelect all types of changes.voidSelect all object types.booleansetChangeType(String type, boolean value) Sets the filter for the type of the change (Object modified, Objects created, ...).voidsetFirstNameFilter(String firstNameFilter) Sets the filter for the first name of the user who did the change.voidsetLastNameFilter(String lastNameFilter) Sets the filter for the last name of the user who did the change.voidsetMaxResultCount(int max) Sets the maximum number of rows in the returned result list.voidsetMessagesBefore(DateTime offsetTimestamp) Sets a filter for the message timestamp.voidsetObjectName(String objectName) Sets a filter for the object name.booleansetObjectType(String objectType, boolean value) Sets the filter for object types.voidsetUserObjectName(String userObjectName) Sets a filter for the object name of the user who did the change (for example USER/DEPARTMENT).intsize()Returns the number of rows in the result list.voidUnselect all types of changes.voidUnselect all object types.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
-
GetChangeLog
public GetChangeLog()Creates a newGetChangeLogrequest without filters (everything is returned). The setter methods in this class can be used set filters.
-
-
Method Details
-
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
-
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
-
getSrc
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
iterator
- Specified by:
iteratorin interfaceIterable<GetChangeLog.Entry>
-
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
-
size
public int size()Returns the number of rows in the result list.- Returns:
- Row count
-
setMaxResultCount
public void setMaxResultCount(int max) Sets the maximum number of rows in the returned result list. The default value is 50.- Parameters:
max- Max number of rows or zero to disable the limit.
-
setMessagesBefore
Sets a filter for the message timestamp. Only actions which happened before this timestamp are returned. *- Parameters:
offsetTimestamp- Max date and time
-
setUserObjectName
Sets a filter for the object name of the user who did the change (for example USER/DEPARTMENT).- Parameters:
userObjectName- Filter for User object
-
setFirstNameFilter
Sets the filter for the first name of the user who did the change.- Parameters:
firstNameFilter- First name filter, max. 20 characters
-
setLastNameFilter
Sets the filter for the last name of the user who did the change.- Parameters:
lastNameFilter- Last name, max. 20 characters
-
setObjectName
Sets a filter for the object name.- Parameters:
objectName- Filter for the object name
-
setChangeType
Sets the filter for the type of the change (Object modified, Objects created, ...).- Parameters:
type- Possible values are:- CANCEL Aborts tasks
- CREATE Creates new objects
- DELETE Deletes objects
- IMPORT Imports objects
- MOVE Moves objects
- OBJ_MOD Object modifications
- RENAME Renames objects
- RESTART Restarts tasks
- RESTORE Restores objects
- RUN_MOD Modifies at runtime
- START Starts tasks
- TRNSPRT Transports objects
value- true to enable the filter for the specified type and false to disable it.- Returns:
- true if the filter was set successfully, false if the type is not supported.
-
unselectAllChangeTypes
public void unselectAllChangeTypes()Unselect all types of changes. -
selectAllChangeTypes
public void selectAllChangeTypes()Select all types of changes. -
selectAllObjects
public void selectAllObjects()Select all object types. -
unselectAllObjects
public void unselectAllObjects()Unselect all object types. -
setObjectType
Sets the filter for object types.- Parameters:
objectType- Object type, for example JOBS or JOBPvalue- true to enable the filter for the specified object type or false to disable it.- Returns:
- true if the filter was set successfully
-