SAP CC 1.0
API 4.2 (Core)

com.highdeal.hci
Class AuditModel

java.lang.Object
  extended by com.highdeal.hci.AuditModel
All Implemented Interfaces:
XMLMarshallable

public class AuditModel
extends java.lang.Object
implements XMLMarshallable

The AuditModel implements the description of audit as seen by the client applications. An audit allows to filter a list of user's operations already stored by the server. 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. Note: If an audit has no filter all user's operations are retrieved from the last audit cycle. You can consult the online help of the Desktop Tool for more details.


XML Schema 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 objects, the child represents the marshallable object to be added into the content tree.
 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> userOperations, 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, and of 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 tag beeing 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 given date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APOCALYPSE

public static final long APOCALYPSE
Constant used for calculation of the most faraway date (apocalypse).

See Also:
Constant Field Values
Constructor Detail

AuditModel

public AuditModel()
Builds an empty audit model.


AuditModel

public AuditModel(java.lang.String code,
                  java.lang.String description)
Builds an audit model.

Parameters:
code - the code of the audit.
description - a textual description for this audit.

AuditModel

public AuditModel(java.lang.String code,
                  java.lang.String description,
                  int auditFrequency,
                  java.util.Date originalAuditDate,
                  java.util.Vector<UserOperationFilterModel> userOperationFilters)
Builds an audit model.

Parameters:
code - the code of the audit.
description - a textual description for this audit.
auditFrequency - defines the frequency type for audit cycle. Available values are :
originalAuditDate - 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

getCode

public java.lang.String getCode()
Returns the code of the audit.

Returns:
the code of the audit.

setCode

public void setCode(java.lang.String c)
Sets the code of the audit.

Parameters:
c - the code of the audit.

getReference

public java.lang.String getReference()
Gets the reference.

Returns:
the reference of the audit.

setReference

public void setReference(java.lang.String r)
Sets the reference.

Parameters:
r - the reference of the audit.

getDescription

public java.lang.String getDescription()
Returns a textual description of the audit.

Returns:
the textual description

setDescription

public void setDescription(java.lang.String desc)
Sets a textual description of the audit.

Parameters:
desc - the textual description of the audit.

getOriginalAuditDate

public java.util.Date getOriginalAuditDate()
Gets the original date.

Returns:
value of original audit date.

setOriginalAuditDate

public void setOriginalAuditDate(java.util.Date v)
Sets the value of original date.

Parameters:
v - Value to assign to original audit date.

getPreviousAuditDate

public java.util.Date getPreviousAuditDate()
Gets the previous date.

Returns:
value of beginning date of the last audit cycle.

setPreviousAuditDate

public void setPreviousAuditDate(java.util.Date v)
Sets the value of previous date.

Parameters:
v - Value to assign to beginning date of the last audit cycle.

getLastAuditDate

public java.util.Date getLastAuditDate()
Gets the last date of the audit.

Returns:
value of the end date of the last audit cycle.

setLastAuditDate

public void setLastAuditDate(java.util.Date v)
Sets the value of last audit date.

Parameters:
v - Value to assign to the end date of the last audit cycle.

getNextAuditDate

public java.util.Date getNextAuditDate()
Gets the next date of the audit.

Returns:
value of the beginning date of the next audit cycle.

setNextAuditDate

public void setNextAuditDate(java.util.Date v)
Sets the value of the next date.

Parameters:
v - Value to assign to the beginning date of the next audit cycle.

getUserOperationFilters

public java.util.Vector<UserOperationFilterModel> getUserOperationFilters()
Returns the list of user's operation filters.

Returns:
the list of user's operation filters.

setUserOperationFilters

public void setUserOperationFilters(java.util.Vector<UserOperationFilterModel> userOperationFilters)
Sets the list of user's operation filters.

Parameters:
userOperationFilters - a list of user's operation filters.

addUserOperationFilter

public void addUserOperationFilter(UserOperationFilterModel userOperationFilter)
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 - index of the user's operation filter to be removed.

getUserOperations

public java.util.Vector<UserOperationModel> getUserOperations()
Returns the list of filtered user's operations.

Returns:
the list of user's operations filtered in the last audit cycle.

setUserOperations

public void setUserOperations(java.util.Vector<UserOperationModel> userOperations)
Sets the list of filtered user's operations.

Parameters:
userOperations - a list of user's operations filtered in the last audit cycle.

addUserOperation

public void addUserOperation(UserOperationModel userOperation)
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 - index of the filtered user's operation to be removed from the list.

getAuditFrequency

public int getAuditFrequency()
Returns the value of audit frequency.

Returns:
value of audit frequency. Available values are :

setAuditFrequency

public void setAuditFrequency(int auditFrequency)
Sets the value of audit frequency.

Parameters:
auditFrequency - the value of the audit frequency. Available values are :

updateOccurenceDates

public void updateOccurenceDates(java.util.Date date)
updates the audit occurrence dates (previous date, last date, next date) at a given date.

Parameters:
date - the given date.

getFilteredUserOperations

public java.util.Vector<UserOperationModel> getFilteredUserOperations(java.util.Vector<UserOperationModel> userOperations,
                                                                      java.util.Date from,
                                                                      java.util.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:
userOperations - the user's operation list to be filtered.
from - the from date of the period.
to - the to date of the period.
Returns:
the list of filtered user's operations.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XML attributes of the current tag.

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of tag for the child.
child - the child to be added.

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - the character data to be added.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XML output to marshall the object into.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.