Class AuditModel
- All Implemented Interfaces:
XMLMarshallable
Java class represents the description of an audit custom filter as seen by your client applications;
This data model allows filtering a list of
user operation execution recordings already stored by the SAP CC system. These recordings relate to the audited user operations.
An audit custom filter has a unique identification code and can have a comprehensive description. Cyclic time periods are defined by an original audit date and a frequency type. A set of user operation filters has to be defined for the audit.
When an audit is consulted, previous audit date and last audit date are automatically computed and correspond to the beginning and the end dates of the last audit cycle. The next audit date is also automatically computed and corresponds to the beginning date of the next audit cycle. The list of user's operations corresponds to the user's operations filtered from the last audit cycle between the previous audit date and the last audit date. A filtered user's operation has to be retrieved at least by one of the filters assigned to the audit.
You can implement the complete management of audits from you client application, or only implement the consultation of audits or use the default provided graphical user interface (see the SAP CC Core Tool user interface).
Note
If you do not specify any filter in the creation request, then all the user's operations are retrieved from the last audit cycle.
Example of Implementation
By default, you manage the audits with the SAP CC Core Tool user interface that implements the Java APIs dedicated to this data model.
Related Operation
Additional Information
For more information about the audit function, consult the SAP CC Application Help.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="audit">
<xs:complexType>
<xs:sequence>
<xs:element ref="userOperationFilter" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="userOperation" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="ref" type="xs:string" />
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="originalAuditDate" type="xs:dateTime"/>
<xs:attribute name="previousAuditDate" type="xs:dateTime"/>
<xs:attribute name="lastAuditDate" type="xs:dateTime"/>
<xs:attribute name="nextAuditDate" type="xs:dateTime"/>
<xs:attribute name="auditFrequency" type="FrequencyType" default="monthly"/>
</xs:complexType>
</xs:element><xs:simpleType name="FrequencyType">
<xs:restriction base="xs:string">
<xs:enumeration value="daily"/>
<xs:enumeration value="weekly"/>
<xs:enumeration value="biweekly"/>
<xs:enumeration value="monthly"/>
<xs:enumeration value="bimonthly"/>
<xs:enumeration value="trimonthly"/>
<xs:enumeration value="semiannual"/>
<xs:enumeration value="yearly"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longConstant used for calculation of the most faraway date (apocalypse). -
Constructor Summary
ConstructorsConstructorDescriptionBuilds an empty audit model.AuditModel(String code, String description) Builds an audit model.AuditModel(String code, String description, int auditFrequency, Date originalAuditDate, Vector<UserOperationFilterModel> userOperationFilters) Builds an audit model. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidaddUserOperation(UserOperationModel userOperation) Adds a filtered user's operation.voidaddUserOperationFilter(UserOperationFilterModel userOperationFilter) Adds a user's operation filter.intReturns the value of audit frequency.getCode()Returns the code of the audit.Returns a textual description of the audit.getFilteredUserOperations(Vector<UserOperationModel> usrOperations, Date from, Date to) Returns the list user's operations filtered in given period.Gets the last date of the audit.Gets the next date of the audit.Gets the original date.Gets the previous date.Gets the reference.Returns the list of user's operation filters.Returns the list of filtered user's operations.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidremoveUserOperation(int index) Removes a filtered user's operation.voidremoveUserOperationFilter(int index) Removes a user's operation filter.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetAuditFrequency(int auditFrequency) Sets the value of audit frequency.voidSets the code of the audit.voidsetDescription(String desc) Sets a textual description of the audit.voidSets the value of last audit date.voidSets the value of the next date.voidSets the value of original date.voidSets the value of previous date.voidSets the reference.voidsetUserOperationFilters(Vector<UserOperationFilterModel> userOperationFilters) Sets the list of user's operation filters.voidsetUserOperations(Vector<UserOperationModel> userOperations) Sets the list of filtered user's operations.voidupdateOccurenceDates(Date date) Updates the audit occurrence dates (previous date, last date, next date) at a specified date.
-
Field Details
-
APOCALYPSE
public static final long APOCALYPSEConstant used for calculation of the most faraway date (apocalypse).- See Also:
-
-
Constructor Details
-
AuditModel
public AuditModel()Builds an empty audit model. -
AuditModel
Builds an audit model.- Parameters:
code- The code of the auditdescription- A textual description for this audit
-
AuditModel
public AuditModel(String code, String description, int auditFrequency, Date originalAuditDate, Vector<UserOperationFilterModel> userOperationFilters) Builds an audit model.- Parameters:
code- The code of the auditdescription- A textual description for this auditauditFrequency- Defines the frequency type for audit cycle. The available values are:originalAuditDate- The date of the first audit cycle release according to the chosen audit frequency. Ifnullthe first trigger date is set to to current date.userOperationFilters- The list of user's operation filters referenced by the audit
-
-
Method Details
-
getCode
Returns the code of the audit.- Returns:
- The code of the audit
-
setCode
Sets the code of the audit.- Parameters:
c- The code of the audit
-
getReference
Gets the reference.- Returns:
- The reference of the audit
-
setReference
Sets the reference.- Parameters:
r- The reference of the audit
-
getDescription
Returns a textual description of the audit.- Returns:
- The textual description
-
setDescription
Sets a textual description of the audit.- Parameters:
desc- The textual description of the audit
-
getOriginalAuditDate
Gets the original date.- Returns:
- The value of original audit date
-
setOriginalAuditDate
Sets the value of original date.- Parameters:
v- The value to assign to original audit date
-
getPreviousAuditDate
Gets the previous date.- Returns:
- The value of beginning date of the last audit cycle
-
setPreviousAuditDate
Sets the value of previous date.- Parameters:
v- The value to assign to beginning date of the last audit cycle
-
getLastAuditDate
Gets the last date of the audit.- Returns:
- The value of the end date of the last audit cycle
-
setLastAuditDate
Sets the value of last audit date.- Parameters:
v- The value to assign to the end date of the last audit cycle
-
getNextAuditDate
Gets the next date of the audit.- Returns:
- The value of the beginning date of the next audit cycle
-
setNextAuditDate
Sets the value of the next date.- Parameters:
v- The value to assign to the beginning date of the next audit cycle
-
getUserOperationFilters
Returns the list of user's operation filters.- Returns:
- The list of user's operation filters
-
setUserOperationFilters
Sets the list of user's operation filters.- Parameters:
userOperationFilters- A list of user's operation filters
-
addUserOperationFilter
Adds a user's operation filter.- Parameters:
userOperationFilter- A user's operation filter to be added
-
removeUserOperationFilter
public void removeUserOperationFilter(int index) Removes a user's operation filter.- Parameters:
index- The index of the user's operation filter to be removed
-
getUserOperations
Returns the list of filtered user's operations.- Returns:
- The list of user's operations filtered in the last audit cycle
-
setUserOperations
Sets the list of filtered user's operations.- Parameters:
userOperations- A list of user's operations filtered in the last audit cycle
-
addUserOperation
Adds a filtered user's operation.- Parameters:
userOperation- A filtered user's operation to be added in the list
-
removeUserOperation
public void removeUserOperation(int index) Removes a filtered user's operation.- Parameters:
index- The index of the filtered user's operation to be removed from the list
-
getAuditFrequency
public int getAuditFrequency()Returns the value of audit frequency.- Returns:
- The value of audit frequency. The available values are:
-
setAuditFrequency
public void setAuditFrequency(int auditFrequency) Sets the value of audit frequency.- Parameters:
auditFrequency- The value of the audit frequency. The available values are:
-
updateOccurenceDates
Updates the audit occurrence dates (previous date, last date, next date) at a specified date.- Parameters:
date- The given date
-
getFilteredUserOperations
public Vector<UserOperationModel> getFilteredUserOperations(Vector<UserOperationModel> usrOperations, Date from, Date to) Returns the list user's operations filtered in given period. If from date or to date is null: no period to be used for filtration.- Parameters:
usrOperations- The user's operation list to be filteredfrom- The from date of the periodto- The to date of the period- Returns:
- The list of filtered user's operations
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-