|
SAP Convergent Charging
Java and XML APIs (Core) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.highdeal.hci.AuditModel
public class AuditModel
This Java class represents the description of an audit as seen by your client applications; An audit allows filtering a list of
user's operations already stored by the SAP CC system.
An audit has a unique code and can have a description. Cyclic time periods are defined by an original audit date and a frequency type. A set of user's 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 SAP CC Core Tool).
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.
CreateAuditOp
SearchAuditOp
ModifyAuditOp
DeleteAuditOp
For more information about the audit function, consult the SAP CC Library (Application Help) documentation.
CreateAuditOpThe 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 | |
|---|---|
static long |
APOCALYPSE
Constant used for calculation of the most faraway date (apocalypse). |
| Constructor Summary | |
|---|---|
AuditModel()
Builds an empty audit model. |
|
AuditModel(java.lang.String code,
java.lang.String description)
Builds an audit model. |
|
AuditModel(java.lang.String code,
java.lang.String description,
int auditFrequency,
java.util.Date originalAuditDate,
java.util.Vector<UserOperationFilterModel> userOperationFilters)
Builds an audit model. |
|
| Method Summary | |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element. |
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the child representing
the marshallable object which must be added to the element. |
void |
addUserOperation(UserOperationModel userOperation)
Adds a filtered user's operation. |
void |
addUserOperationFilter(UserOperationFilterModel userOperationFilter)
Adds a user's operation filter. |
int |
getAuditFrequency()
Returns the value of audit frequency. |
java.lang.String |
getCode()
Returns the code of the audit. |
java.lang.String |
getDescription()
Returns a textual description of the audit. |
java.util.Vector<UserOperationModel> |
getFilteredUserOperations(java.util.Vector<UserOperationModel> usrOperations,
java.util.Date from,
java.util.Date to)
Returns the list user's operations filtered in given period. |
java.util.Date |
getLastAuditDate()
Gets the last date of the audit. |
java.util.Date |
getNextAuditDate()
Gets the next date of the audit. |
java.util.Date |
getOriginalAuditDate()
Gets the original date. |
java.util.Date |
getPreviousAuditDate()
Gets the previous date. |
java.lang.String |
getReference()
Gets the reference. |
java.util.Vector<UserOperationFilterModel> |
getUserOperationFilters()
Returns the list of user's operation filters. |
java.util.Vector<UserOperationModel> |
getUserOperations()
Returns the list of filtered user's operations. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children. |
void |
removeUserOperation(int index)
Removes a filtered user's operation. |
void |
removeUserOperationFilter(int index)
Removes a user's operation filter. |
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being processed. |
void |
setAuditFrequency(int auditFrequency)
Sets the value of audit frequency. |
void |
setCode(java.lang.String c)
Sets the code of the audit. |
void |
setDescription(java.lang.String desc)
Sets a textual description of the audit. |
void |
setLastAuditDate(java.util.Date v)
Sets the value of last audit date. |
void |
setNextAuditDate(java.util.Date v)
Sets the value of the next date. |
void |
setOriginalAuditDate(java.util.Date v)
Sets the value of original date. |
void |
setPreviousAuditDate(java.util.Date v)
Sets the value of previous date. |
void |
setReference(java.lang.String r)
Sets the reference. |
void |
setUserOperationFilters(java.util.Vector<UserOperationFilterModel> userOperationFilters)
Sets the list of user's operation filters. |
void |
setUserOperations(java.util.Vector<UserOperationModel> userOperations)
Sets the list of filtered user's operations. |
void |
updateOccurenceDates(java.util.Date date)
Updates the audit occurrence dates (previous date, last date, next date) at a specified date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final long APOCALYPSE
| Constructor Detail |
|---|
public AuditModel()
public AuditModel(java.lang.String code,
java.lang.String description)
code - The code of the auditdescription - A textual description for this audit
public AuditModel(java.lang.String code,
java.lang.String description,
int auditFrequency,
java.util.Date originalAuditDate,
java.util.Vector<UserOperationFilterModel> userOperationFilters)
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.
If null the first trigger date is set to
to current date.userOperationFilters - The list of user's operation filters referenced by the audit| Method Detail |
|---|
public java.lang.String getCode()
public void setCode(java.lang.String c)
c - The code of the auditpublic java.lang.String getReference()
public void setReference(java.lang.String r)
r - The reference of the auditpublic java.lang.String getDescription()
public void setDescription(java.lang.String desc)
desc - The textual description of the auditpublic java.util.Date getOriginalAuditDate()
public void setOriginalAuditDate(java.util.Date v)
v - The value to assign to original audit datepublic java.util.Date getPreviousAuditDate()
public void setPreviousAuditDate(java.util.Date v)
v - The value to assign to beginning date of the last audit cyclepublic java.util.Date getLastAuditDate()
public void setLastAuditDate(java.util.Date v)
v - The value to assign to the end date of the last audit cyclepublic java.util.Date getNextAuditDate()
public void setNextAuditDate(java.util.Date v)
v - The value to assign to the beginning date of the next audit cyclepublic java.util.Vector<UserOperationFilterModel> getUserOperationFilters()
public void setUserOperationFilters(java.util.Vector<UserOperationFilterModel> userOperationFilters)
userOperationFilters - A list of user's operation filterspublic void addUserOperationFilter(UserOperationFilterModel userOperationFilter)
userOperationFilter - A user's operation filter to be addedpublic void removeUserOperationFilter(int index)
index - The index of the user's operation filter to be removedpublic java.util.Vector<UserOperationModel> getUserOperations()
public void setUserOperations(java.util.Vector<UserOperationModel> userOperations)
userOperations - A list of user's operations filtered in the last audit cyclepublic void addUserOperation(UserOperationModel userOperation)
userOperation - A filtered user's operation to be added in the listpublic void removeUserOperation(int index)
index - The index of the filtered user's operation to be removed from the listpublic int getAuditFrequency()
public void setAuditFrequency(int auditFrequency)
auditFrequency - The value of the audit frequency.
The available values are:
public void updateOccurenceDates(java.util.Date date)
date - The given date
public java.util.Vector<UserOperationModel> getFilteredUserOperations(java.util.Vector<UserOperationModel> usrOperations,
java.util.Date from,
java.util.Date to)
usrOperations - The user's operation list to be filteredfrom - The from date of the periodto - The to date of the period
public void setAttributes(XMLAttributes atts)
XMLMarshallable
setAttributes in interface XMLMarshallableatts - The XML attributes of the current element
public void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.
addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallable
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallable
marshal in interface XMLMarshallableoutput - The XML output to marshal the object into
|
Document Published: October 2015 (SAP CC 4.0 SP10 and Later) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||