|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.services.StandardManager
wt.audit.StandardAuditService
Standard implementation of the audit API.
Use the newStandardAuditService
static factory method(s),
not the StandardAuditService
constructor, to construct instances
of this class. Instances must be constructed using the static factory(s),
in order to ensure proper initialization of the instance.
Supported API: false
Extendable: false
Field Summary | |
private static long |
ACTIVITY_PERIOD_SIZE
|
private boolean |
auditEnabled
|
private static String |
CLASSNAME
|
private static int |
NRETRIES
|
private static String |
RESOURCE
|
private static int |
SLEEPTIME
|
private static boolean |
VERBOSE
|
Fields inherited from class wt.services.StandardManager |
|
Fields inherited from interface wt.services.Manager |
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE |
Constructor Summary | |
StandardAuditService()
|
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. |
private long |
getActivityPeriod(Timestamp date1)
Returns the absolute activity period a date is in. |
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. |
String |
getConceptualClassname()
Deprecated. |
private LastAuditEvent |
getLastAuditEvent(AuditEventType event_type,
WTPrincipalReference user_ref,
ObjectReference audit_ref)
Retrieves the last audit event for a type, a user and an target object. |
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 AuditEvent |
getLatestEvent(AuditEventType event_type,
WTPrincipalReference user_ref,
ObjectReference audit_ref)
Returns the latest event of a given type, for a given user and target object. |
boolean |
isAuditEnabled()
Determines if auditing is enabled. |
static StandardAuditService |
newStandardAuditService()
Default factory for the class. |
protected void |
performShutdownProcess()
Dummy method to be overridden by subclasses. |
protected void |
performStartupProcess()
Supported API: false |
private void |
registerAsListener()
|
void |
registerEvents(ManagerService ms)
Register events with the passed ManagerService. |
private void |
registerSpecificEvent(String eventKey)
The specifics for each event are taken care of by the recorder factory, so there is no need to sweat the details here. |
private boolean |
sameActivityPeriod(Timestamp date1,
Timestamp date2)
Determines if two dates are in the same activity period. |
private void |
updateLastAuditEvent(AuditEventType event_type,
WTPrincipalReference user_ref,
ObjectReference audit_ref,
Timestamp event_time)
Updates the latest event type link. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private static final long ACTIVITY_PERIOD_SIZE
private static final boolean VERBOSE
private static final int NRETRIES
private static final int SLEEPTIME
private boolean auditEnabled
Constructor Detail |
public StandardAuditService()
Method Detail |
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
getConceptualClassname
in class StandardManager
protected void performShutdownProcess() throws ManagerException
performShutdownProcess
in class StandardManager
ManagerException
protected void performStartupProcess() throws ManagerException
performStartupProcess
in class StandardManager
ManagerException
public static StandardAuditService newStandardAuditService() throws WTException
WTException
public void createAuditEvent(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref) throws WTException
createAuditEvent
in interface AuditService
event_type
- user_ref
- audit_ref
-
WTException
public void deleteAuditEvents(AuditPeriod period, ObjectReference audit_ref, AuditEventType event_type) throws WTException
deleteAuditEvents
in interface AuditService
period
- audit_ref
- event_type
-
WTException
public QueryResult getAuditEvents(AuditPeriod period, ObjectReference audit_ref, AuditEventType event_type, WTPrincipalReference user_ref) throws WTException
getAuditEvents
in interface AuditService
period
- audit_ref
- event_type
- user_ref
-
WTException
public AuditReport getAuditReport(AuditPeriod period, Vector audit_objs, AuditEventType event_type, boolean only_latest) throws WTException
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
getAuditReport
in interface AuditService
period
- audit_objs
- event_type
- only_latest
-
WTException
public Timestamp getLastEventTime(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref) throws WTException
getLastEventTime
in interface AuditService
event_type
- user_ref
- audit_ref
-
WTException
public boolean isAuditEnabled() throws WTException
ProjectAuditEvent
);
otherwise returns 'false'. Auditing is enabled if and only if
isAuditEnabled
in interface AuditService
WTException
private AuditEvent getLatestEvent(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref) throws WTException
WTException
private void updateLastAuditEvent(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref, Timestamp event_time) throws WTException
WTException
private LastAuditEvent getLastAuditEvent(AuditEventType event_type, WTPrincipalReference user_ref, ObjectReference audit_ref) throws WTException
WTException
private boolean sameActivityPeriod(Timestamp date1, Timestamp date2)
private void registerAsListener() throws WTException
WTException
private void registerSpecificEvent(String eventKey) throws WTException
WTException
public void registerEvents(ManagerService ms)
StandardManager
registerEvents
in interface Manager
registerEvents
in class StandardManager
ms
- the ManagerService with which to register events.private long getActivityPeriod(Timestamp date1)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |