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 class
GetChangeLog.Entry
Represents a row in the result of the change list.
-
Constructor Summary
Constructors Constructor Description GetChangeLog()
Creates a newGetChangeLog
request without filters (everything is returned).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
Creates the XML Document for the request.protected java.lang.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
isAllowedInClientZero()
This method is used internally.java.util.Iterator<GetChangeLog.Entry>
iterator()
void
selectAllChangeTypes()
Select all types of changes.void
selectAllObjects()
Select all object types.boolean
setChangeType(java.lang.String type, boolean value)
Sets the filter for the type of the change (Object modified, Objects created, ...).void
setFirstNameFilter(java.lang.String firstNameFilter)
Sets the filter for the first name of the user who did the change.void
setLastNameFilter(java.lang.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(java.lang.String objectName)
Sets a filter for the object name.boolean
setObjectType(java.lang.String objectType, boolean value)
Sets the filter for object types.void
setUserObjectName(java.lang.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
unselectAllChangeTypes()
Unselect all types of changes.void
unselectAllObjects()
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: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
protected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
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
protected java.lang.String getSrc()
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
iterator
public java.util.Iterator<GetChangeLog.Entry> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<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
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
-
-