Package com.uc4.communication.requests
Class GetChangeLog
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.GetChangeLog
-
- All Implemented Interfaces:
java.lang.Iterable<GetChangeLog.Entry>
public class GetChangeLog extends XMLRequest implements java.lang.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 Classes Modifier and Type Class Description static classGetChangeLog.EntryRepresents a row in the result of the change list.
-
Constructor Summary
Constructors Constructor Description GetChangeLog()Creates a newGetChangeLogrequest without filters (everything is returned).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)Creates the XML Document for the request.protected java.lang.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 booleanisAllowedInClientZero()This method is used internally.java.util.Iterator<GetChangeLog.Entry>iterator()voidselectAllChangeTypes()Select all types of changes.voidselectAllObjects()Select all object types.booleansetChangeType(java.lang.String type, boolean value)Sets the filter for the type of the change (Object modified, Objects created, ...).voidsetFirstNameFilter(java.lang.String firstNameFilter)Sets the filter for the first name of the user who did the change.voidsetLastNameFilter(java.lang.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(java.lang.String objectName)Sets a filter for the object name.booleansetObjectType(java.lang.String objectType, boolean value)Sets the filter for object types.voidsetUserObjectName(java.lang.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.voidunselectAllChangeTypes()Unselect all types of changes.voidunselectAllObjects()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
-
-
-
-
Method Detail
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.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
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)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
protected java.lang.String getSrc()
Description copied from class:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
iterator
public java.util.Iterator<GetChangeLog.Entry> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<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
public void setMessagesBefore(DateTime offsetTimestamp)
Sets a filter for the message timestamp. Only actions which happened before this timestamp are returned. *- Parameters:
offsetTimestamp- Max date and time
-
setUserObjectName
public void setUserObjectName(java.lang.String userObjectName)
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
public void setFirstNameFilter(java.lang.String firstNameFilter)
Sets the filter for the first name of the user who did the change.- Parameters:
firstNameFilter- First name filter, max. 20 characters
-
setLastNameFilter
public void setLastNameFilter(java.lang.String lastNameFilter)
Sets the filter for the last name of the user who did the change.- Parameters:
lastNameFilter- Last name, max. 20 characters
-
setObjectName
public void setObjectName(java.lang.String objectName)
Sets a filter for the object name.- Parameters:
objectName- Filter for the object name
-
setChangeType
public boolean setChangeType(java.lang.String type, boolean value)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
public boolean setObjectType(java.lang.String objectType, boolean value)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
-
-