wt.audit
Class AuditServiceFwd

java.lang.Object
  extended bywt.audit.AuditServiceFwd
All Implemented Interfaces:
AuditService, RemoteAccess, Serializable

public class AuditServiceFwd
extends Object
implements RemoteAccess, AuditService, Serializable

Client accessible audit API.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String FC_RESOURCE
           
(package private) static boolean SERVER
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
AuditServiceFwd()
           
 
Method Summary
 void createAuditEvent(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref)
          Records event in the database and updates the last event association if audit_ref is not null.
 void deleteAuditEvents(AuditPeriod period, ObjectReference audit_ref, AuditEventType event_type)
          Deletes events.
 QueryResult getAuditEvents(AuditPeriod period, ObjectReference audit_ref, AuditEventType event_type, WTPrincipalReference user_ref)
          Returns all the audit events in a given period with the characteristics passed as arguments.
 AuditReport getAuditReport(AuditPeriod period, Vector audit_objs, AuditEventType event_type, boolean only_latest)
          Returns an audit report with information concerning an auditing period, a set of target objects and a specific event type.
 Timestamp getLastEventTime(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref)
          Returns the time of the last event of a certain type involving a given user and a target object.
private static Manager getManager()
           
 boolean isAuditEnabled()
          Determines if auditing is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Constructor Detail

AuditServiceFwd

public AuditServiceFwd()
Method Detail

getManager

private static Manager getManager()
                           throws WTException
Returns:
Manager
Throws:
WTException

createAuditEvent

public void createAuditEvent(AuditEventType event_type,
                             WTPrincipalReference user_ref,
                             ObjectReference audit_ref)
                      throws WTException
Records event in the database and updates the last event association if audit_ref is not null. Only the time of the last event within an activity period is actually recorded.

Supported API: false

Specified by:
createAuditEvent in interface AuditService
Parameters:
event_type -
user_ref -
audit_ref -
Throws:
WTException

deleteAuditEvents

public void deleteAuditEvents(AuditPeriod period,
                              ObjectReference audit_ref,
                              AuditEventType event_type)
                       throws WTException
Deletes events. Removes from the database all events corresponding to an audit event that were recorded for a given audit period for a given target object (given its reference). If event is null, all types of events are deleted. A reference to the target object may be null, in which case events for all objects are removed.

Supported API: false

Specified by:
deleteAuditEvents in interface AuditService
Parameters:
period -
audit_ref -
event_type -
Throws:
WTException

getAuditEvents

public QueryResult getAuditEvents(AuditPeriod period,
                                  ObjectReference audit_ref,
                                  AuditEventType event_type,
                                  WTPrincipalReference user_ref)
                           throws WTException
Returns all the audit events in a given period with the characteristics passed as arguments. If any of these arguments is 'null' it is not used to filter the resulting query.

Supported API: false

Specified by:
getAuditEvents in interface AuditService
Parameters:
period -
audit_ref -
event_type -
user_ref -
Returns:
QueryResult
Throws:
WTException

getAuditReport

public AuditReport getAuditReport(AuditPeriod period,
                                  Vector audit_objs,
                                  AuditEventType event_type,
                                  boolean only_latest)
                           throws WTException
Returns an audit report with information concerning an auditing period, a set of target objects and a specific event type. If the null is passed as argument for the vector of audit_objs, all objects are considered. On the other hand, event type must be not null.

If only latest is 'true' only the latest event for the same user and target object is included in the report; otherwise all are included.

Each element of the vector of target objects may be a reference or the object itself.

Supported API: false

Specified by:
getAuditReport in interface AuditService
Parameters:
period -
audit_objs -
event_type -
only_latest -
Returns:
AuditReport
Throws:
WTException

getLastEventTime

public Timestamp getLastEventTime(AuditEventType event_type,
                                  WTPrincipalReference user_ref,
                                  ObjectReference audit_ref)
                           throws WTException
Returns the time of the last event of a certain type involving a given user and a target object. Both user and target object are passed as references.

Supported API: false

Specified by:
getLastEventTime in interface AuditService
Parameters:
event_type -
user_ref -
audit_ref -
Returns:
Timestamp
Throws:
WTException

isAuditEnabled

public boolean isAuditEnabled()
                       throws WTException
Determines if auditing is enabled. Returns 'true' if project audit events are being captured and stored (ProjectAuditEvent); otherwise returns 'false'. Auditing is enabled if and only if in the configAudit.xml configuration file.

Supported API: false

Specified by:
isAuditEnabled in interface AuditService
Returns:
boolean
Throws:
WTException