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 class
Represents a row in the result of the change list. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newGetChangeLog
request without filters (everything is returned). -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.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()
void
Select all types of changes.void
Select all object types.boolean
setChangeType
(String type, boolean value) Sets the filter for the type of the change (Object modified, Objects created, ...).void
setFirstNameFilter
(String firstNameFilter) Sets the filter for the first name of the user who did the change.void
setLastNameFilter
(String lastNameFilter) Sets the filter for the last name of the user who did the change.void
setMaxResultCount
(int max) Sets the maximum number of rows in the returned result list.void
setMessagesBefore
(DateTime offsetTimestamp) Sets a filter for the message timestamp.void
setObjectName
(String objectName) Sets a filter for the object name.boolean
setObjectType
(String objectType, boolean value) Sets the filter for object types.void
setUserObjectName
(String userObjectName) Sets a filter for the object name of the user who did the change (for example USER/DEPARTMENT).int
size()
Returns the number of rows in the result list.void
Unselect all types of changes.void
Unselect 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, 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
-
GetChangeLog
public GetChangeLog()Creates a newGetChangeLog
request 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: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
-
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
-
getSrc
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
iterator
- Specified by:
iterator
in interfaceIterable<GetChangeLog.Entry>
-
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
-
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
-