public class AuditEventHandlerContextImpl extends Object implements AuditEventHandlerContext
Constructor and Description |
---|
AuditEventHandlerContextImpl(AuditSpecification auditSpec)
Constructs an AuditEventHandlerContextImpl.
|
Modifier and Type | Method and Description |
---|---|
LibrarySession |
acquireAuxiliarySession()
Acquires an additional session context to use for processing.
|
AuditSpecification |
getAuditSpecification()
Returns the custom Audit Specification corresponding
to the "Audit History" associated with this handler, indicating
where the AuditEvents are posted.
|
Long |
getAuditSpecificationId()
Returns the custom Audit Specification ID corresponding
to the "Audit History" associated with this handler, indicating
where the AuditEvents are posted.
|
AttributeValue |
getHandlerProperty(String key)
Gets a property of the custom Audit Specification by its property name.
|
LibrarySession |
getLibrarySession()
Returns the session context to use for processing.
|
long |
getMinimumDispatchedEventId()
Returns the minimum event ID encountered when AuditEvents
were last dispatched in the handler.
|
long |
getNextSequenceId()
Returns the next sequence ID value that would have been leveraged for a
new Object created in the repository.
|
AttributeValue |
getNodeProperty(String key)
Gets a property of the running Node context.
|
AttributeValue |
getServerProperty(String key)
Gets a property of the running Server context.
|
boolean |
isDeactivated()
Determines whether a deactivation has occurred for this handler,
indicated that it should complete processing the current operation
as soon as possible.
|
void |
purgeEvent(AuditEvent event)
Purges an AuditEvent from its audit history.
|
void |
purgeEvents(AuditEvent[] events)
Purges a set of AuditEvents from their audit histories.
|
void |
removeHandlerProperty(String key)
Removes a property of the custom Audit Specification by its property name.
|
void |
restartAuditEventHandler()
Causes a reset of the handler settings.
|
void |
setDomainId(long domainId)
Sets the Domain that should be used while processing an AuditEvent.
|
void |
setHandlerProperty(String key,
AttributeValue value)
Sets a property of the custom Audit Specification.
|
public AuditEventHandlerContextImpl(AuditSpecification auditSpec) throws IfsException
auditSpec
- the AuditSpecification to processIfsException
- if the operation failspublic LibrarySession getLibrarySession()
AuditEventHandlerContext
getLibrarySession
in interface AuditEventHandlerContext
public LibrarySession acquireAuxiliarySession() throws IfsException
AuditEventHandlerContext
acquireAuxiliarySession
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic Long getAuditSpecificationId()
AuditEventHandlerContext
Use this ID when using
AuditingUtilities.searchAuditHistory
to
find AuditEvents that have occurred that are of interest to this
handler.
getAuditSpecificationId
in interface AuditEventHandlerContext
public AuditSpecification getAuditSpecification() throws IfsException
AuditEventHandlerContext
getAuditSpecification
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic AttributeValue getHandlerProperty(String key) throws IfsException
AuditEventHandlerContext
getHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyIfsException
- if the operation failspublic void setHandlerProperty(String key, AttributeValue value) throws IfsException
AuditEventHandlerContext
setHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyvalue
- the Audit Specification property valueIfsException
- if the operation failspublic void removeHandlerProperty(String key) throws IfsException
AuditEventHandlerContext
removeHandlerProperty
in interface AuditEventHandlerContext
key
- the Audit Specification property keyIfsException
- if the operation failspublic AttributeValue getServerProperty(String key) throws IfsException
AuditEventHandlerContext
getServerProperty
in interface AuditEventHandlerContext
key
- the Server property keyIfsException
- if the operation failspublic AttributeValue getNodeProperty(String key) throws IfsException
AuditEventHandlerContext
getNodeProperty
in interface AuditEventHandlerContext
key
- the Node property keyIfsException
- if the operation failspublic void setDomainId(long domainId) throws IfsException
AuditEventHandlerContext
By default, this is the default Domain. In a multi-Domain instance, this must be set to the ID of the Domain for the AuditEvent that is being processed, because an AuditEventHandler will be invoked for Events that have occurred in any Domain in the instance.
A value of zero for the Domain ID will effectively clear the previously established Domain context.
setDomainId
in interface AuditEventHandlerContext
domainId
- the ID of the Domain to use while processing an Event
or zero to clear the previously established
Domain contextIfsException
- if the operation failspublic void restartAuditEventHandler() throws IfsException
AuditEventHandlerContext
restartAuditEventHandler
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic void purgeEvent(AuditEvent event) throws IfsException
AuditEventHandlerContext
purgeEvent
in interface AuditEventHandlerContext
event
- the AuditEvent to purgeIfsException
- if the operation failspublic void purgeEvents(AuditEvent[] events) throws IfsException
AuditEventHandlerContext
purgeEvents
in interface AuditEventHandlerContext
events
- the AuditEvents to purgeIfsException
- if the operation failspublic boolean isDeactivated()
isDeactivated
in interface AuditEventHandlerContext
public long getNextSequenceId() throws IfsException
getNextSequenceId
in interface AuditEventHandlerContext
IfsException
- if the operation failspublic long getMinimumDispatchedEventId() throws IfsException
getMinimumDispatchedEventId
in interface AuditEventHandlerContext
IfsException
- if the operation failsCopyright © 2023. All rights reserved.