public class AuditSpecification extends TieSystemObject
Allows specification of a disposition rule for AuditEvents in this AuditSpecification's corresponding Audit History.
Allows specification of a custom AuditHandler implementation that should be executed when AuditEvents matching this AuditSpecification's specification occur.
Modifier and Type | Field and Description |
---|---|
static String |
AUDITHANDLERSPECIFICATION_ATTRIBUTE
The AuditTargetSpecification describing this AuditSpecification's AuditHandler.
|
static String |
AUDITTARGETSPECIFICATION_ATTRIBUTE
The AuditTargetSpecification describing the target object IDs of interest.
|
static String |
AUDITTYPELIST_ATTRIBUTE
The AuditTypeList specifying the audit operation types of interest.
|
static String |
CLASS_NAME
The name of the ClassObject this class represents.
|
static String |
DESCRIPTION_ATTRIBUTE
The description of this AuditSpecification.
|
static String |
DISPOSITIONRULE_ATTRIBUTE
The rule used to free AuditEvents from this AuditSpecification's corresponding
AuditHistory.
|
static int |
DISPOSITIONRULE_MANUAL
A disposition rule for the DISPOSITIONRULE attribute.
|
static int |
DISPOSITIONRULE_OBJECTLIFETIME
A disposition rule for the DISPOSITIONRULE attribute.
|
static int |
DISPOSITIONRULE_TIMEOUT
A disposition rule for the DISPOSITIONRULE attribute.
|
static String |
DISPOSITIONTIMEOUT_ATTRIBUTE
The time (in days) to keep AuditEvents in this AuditSpecification's
corresponding AuditHistory when DISPOSITIONRULE = timeout.
|
static String |
HANDLERSTATE_ATTRIBUTE
The current HandlerState reflecting the runtime state for the handler.
|
static String |
NAME_ATTRIBUTE
The name of this AuditSpecification.
|
static String |
PRIVATEPROPERTYTABLEUSED_ATTRIBUTE
Indication as to whether the Audit History for this AuditSpecification
uses a private audit property table.
|
static String |
TABLENAMESUFFIX_ATTRIBUTE
Table name that will hold events for this AuditSpecification.
|
static String |
USERSEARCHABLE_ATTRIBUTE
Indication as to whether the Audit History for this AuditSpecification
is searchable by regular users.
|
ACTIVE_ATTRIBUTE, POLICYBUNDLE_ATTRIBUTE, POLICYLISTS_ATTRIBUTE, PROPERTYBUNDLE_ATTRIBUTE
DOMAIN_UNIQUENAME_DEFAULT_DELIMITER, m_ClassId, m_Id, m_Session
Modifier | Constructor and Description |
---|---|
protected |
AuditSpecification(LibrarySession session,
Long id,
Long classId,
S_LibraryObjectData data)
Constructs an AuditSpecification object.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates this instance.
|
void |
activateHandler()
Activates the handler associated with this instance.
|
void |
auditAuditSpecificationGlobalAuditTypeListChanged()
Audits a change to the Global AuditTypeList.
|
protected void |
auditUpdated(LibraryObjectDefinition lodef)
Creates audit events for the update operation.
|
void |
deactivate()
Deactivates this instance.
|
void |
deactivateHandler()
Deactivates the handler associated with this instance.
|
static AuditSpecification |
find(LibrarySession session,
String name)
Finds an AuditSpecification instance by name, or null if
no AuditSpecification with the given name could be found.
|
AuditHandlerSpecification |
getAuditHandlerSpecification()
Returns the AuditHandlerSpecification for this AuditSpecification.
|
AuditTargetSpecification |
getAuditTargetSpecification()
Returns the AuditTargetSpecification for this AuditSpecification.
|
AuditTypeList |
getAuditTypeList()
Returns the AuditTypeList for this AuditSpecification.
|
static AuditSpecification[] |
getCustomAuditSpecifications(LibrarySession session)
Returns the set of custom AuditSpecification.
|
String |
getDescription()
Returns the description of this AuditSpecification.
|
int |
getDispositionRule()
Returns the disposition rule for AuditEvents in this AuditSpecification's
corresponding AuditHistory.
|
int |
getDispositionTimeout()
Returns the disposition timeout (in days) used when this
AuditSpecification's DISPOSITIONRULE is set to DISPOSITIONRULE_TIMEOUT.
|
static AuditSpecification |
getGlobalAuditSpecification(LibrarySession session)
Returns the out-of-the-box AuditSpecification used for the
Global Audit History.
|
HandlerState |
getHandlerState()
Returns the HandlerState for this instance, if it is
being run and managed by the Controller.
|
static AuditSpecification[] |
getInternalAuditSpecifications(LibrarySession session)
Returns the set of out-of-the-box AuditSpecification.
|
static AuditSpecification |
getObjectAuditSpecification(LibrarySession session)
Returns the out-of-the-box AuditSpecification used for the
Object Audit History.
|
String |
getPropertyTableName()
Returns the table name to use for event properties for
this AuditSpecification.
|
String |
getTableName()
Returns the table name to use for events for this AuditSpecification.
|
String[] |
getTableNames()
Returns the table names that are used for events for this
AuditSpecification.
|
String |
getTableNameSuffix()
Returns the table name suffix, used for table and view for custom
audit event tables.
|
String |
getViewName()
Returns the table name to use for events for this AuditSpecification.
|
boolean |
hasNameAttribute()
Returns true if this object is an instance of a class
that has a NAME attribute, and false otherwise.
|
boolean |
isHandlerActive()
Returns true if this instance has a Handler defined and it is active.
|
boolean |
isHandlerNonCompeting()
Returns true if this instance has a Handler defined that is non-competing.
|
boolean |
isPrivatePropertyTableUsed()
Gets the indication as to whether the Audit History for this
AuditSpecification uses a private audit property table.
|
boolean |
isUserSearchable()
Gets the indication as to whether the Audit History for this
AuditSpecification is searchable by regular users.
|
protected boolean |
isValidEventType(AuditEvent event)
Checks to see if the event type in the process of being posted on the
target LibraryObject is consistent with the target.
|
protected void |
postCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions after the
creation of a SystemObject.
|
protected void |
preCreate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
creation of a PublicObject.
|
protected void |
preFree(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the
permanent deletion ("free") of a object.
|
protected void |
preUpdate(LibraryObjectDefinition lodef)
Extensibility point to perform actions prior to the update of
a PublicObject.
|
int |
purgeAllEvents(int maxItems)
Purges a batch of AuditEvents from their audit histories
indiscriminately.
|
void |
purgeEvent(AuditEvent event)
Purges an AuditEvent from its audit history.
|
void |
purgeEvents(AuditEvent[] events)
Purges a set of AuditEvents from their audit histories.
|
protected void |
purgeEvents(long[] eventIds)
Purge a set of events, by ID.
|
void |
setAuditTypeList(AuditTypeList atl)
Sets the AuditTypeList.
|
void |
setHandlerState(HandlerState hs)
Sets the HandlerState
|
addCategory, constructSystemObject, constructSystemObjectVector, free, freeCategories, getCategories, getCategories, getCategories, getCategories, getPolicyBundle, getPolicyLists, handleCreate, hasPropertyBundleAttribute, isActive, postUpdate, putPolicy, removeAllPolicies, removePolicy, removePolicy, setActive, setPolicyBundle, setPolicyLists
added, addSimpleProperty, addSimpleProperty, applyProperties, auditCreated, canPurge, checkIfPropertyBundleSupported, checkRequiredAttributeSet, clearCopyContext, clearFreeContext, clearUpdateContext, compareTo, constructIdArray, constructIdArray, constructLibraryObject, constructLibraryObjectVector, createDedicatedPropertyBundle, createInstance, deriveDomainUniqueName, dispose, equals, equals, free, freeAll, get, getAttribute, getAttributeByUpperCaseName, getAttributes, getAttributesByUpperCaseNames, getAuditDomainContext, getAuditEventFolderContext, getClassId, getClassname, getClassName, getClassObject, getCommonName, getCommonNameAndClass, getCopyContext, getCreateContext, getData, getDefinition, getDefinitionForSimplePropertyUpdates, getEffectivePolicyListElements, getEventualAttributeByUpperCaseName, getFreeContext, getId, getLabel, getName, getObjectReferenceAttribute, getOperationActionSpecificationContext, getPropertyBundle, getPropertyValue, getPublicObjectAttribute, getResourceString, getResourceString, getSchemaObjectAttribute, getSession, getSessionInterface, getSharedStateFactory, getSimpleObjectAttribute, getSimpleProperties, getSimpleProperty, getSimplePropertyValue, getStringIdentifier, getSystemObjectAttribute, getTraceLogger, getUpdateContext, handleAdminModeChange, handleEvent, handleFree, handleUpdate, hashCode, invalidateState, invokeOperation, invokeOperation, invokeServerMethod, isConnected, isCoreEventPostingEnabled, isInstanceOf, isPersistent, isTraced, lockRows, lookupInstanceLabel, performPostCreateExtensions, performPostFreeExtensions, performPostUpdateExtensions, performPreCreateExtensions, performPreFreeExtensions, performPreUpdateExtensions, postEvent, postEvent, postFree, prePostAuditEvent, putProperty, putProperty, removeAllProperties, removeAllSimpleProperties, removeAllSimpleProperties, removed, removeProperty, removeSimpleProperty, removeSimpleProperty, renderAsRandomAccessContent, renderAsReader, renderAsStream, setAttribute, setAttribute, setAttributes, setAttributes, setCopyContext, setFreeContext, setId, setName, setPropertyBundle, setPropertyValue, setUpdateContext, toString, trace, trustHandleCreate, trustHandleCreateAsAdmin, trustHandleFree, trustHandleFreeAsAdmin, trustHandleUpdate, trustHandleUpdateAsAdmin, update, updateAndExposeDefinition, validatePropertyValues, vectorLibraryObjectElement, vectorToLibraryObjectArray, verifyAdministrationMode, verifyConnected, verifyPersistent, verifySystemUserAccess, verifyTargetObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAttributeByUpperCaseName, getClassId, getId, getSessionInterface
getTraceLogger, isTraced, trace
public static final String CLASS_NAME
public static final String NAME_ATTRIBUTE
public static final String DESCRIPTION_ATTRIBUTE
public static final String DISPOSITIONRULE_ATTRIBUTE
public static final String DISPOSITIONTIMEOUT_ATTRIBUTE
public static final String USERSEARCHABLE_ATTRIBUTE
public static final String TABLENAMESUFFIX_ATTRIBUTE
public static final String AUDITTYPELIST_ATTRIBUTE
public static final String AUDITTARGETSPECIFICATION_ATTRIBUTE
public static final String AUDITHANDLERSPECIFICATION_ATTRIBUTE
public static final String PRIVATEPROPERTYTABLEUSED_ATTRIBUTE
public static final String HANDLERSTATE_ATTRIBUTE
public static final int DISPOSITIONRULE_MANUAL
public static final int DISPOSITIONRULE_TIMEOUT
public static final int DISPOSITIONRULE_OBJECTLIFETIME
protected AuditSpecification(LibrarySession session, Long id, Long classId, S_LibraryObjectData data) throws IfsException
session
- current LibrarySessionid
- object idclassId
- class iddata
- data componentIfsException
- if the operation failspublic boolean hasNameAttribute() throws IfsException
LibraryObject
hasNameAttribute
in class LibraryObject
IfsException
- if operation fails.public String getDescription() throws IfsException
IfsException
- if the operation fails.public String getTableNameSuffix() throws IfsException
IfsException
- if the operation fails.public String getTableName() throws IfsException
If the TABLENAMESUFFIX is null, this returns the default table name.
IfsException
- if the operation fails.public String[] getTableNames() throws IfsException
Typically this returns just a length 1 array containing only
the result of getTableName
, but this can be overridden.
IfsException
- if the operation fails.public String getViewName() throws IfsException
If the TABLENAMESUFFIX is null, this returns the default table name.
IfsException
- if the operation fails.public String getPropertyTableName() throws IfsException
If the TABLENAMESUFFIX is null, this returns the default property table name.
IfsException
- if the operation fails.public int getDispositionRule() throws IfsException
IfsException
- if the operation fails.public int getDispositionTimeout() throws IfsException
IfsException
- if the operation fails.public boolean isUserSearchable() throws IfsException
IfsException
- if operation failspublic boolean isPrivatePropertyTableUsed() throws IfsException
IfsException
- if operation failspublic AuditTypeList getAuditTypeList() throws IfsException
IfsException
- if the operation fails.public AuditTargetSpecification getAuditTargetSpecification() throws IfsException
A value of null means that all objects in the system are registered for interest in AuditEvents.
IfsException
- if the operation fails.public AuditHandlerSpecification getAuditHandlerSpecification() throws IfsException
A value of null means that no custom AuditHandler is registered to handle occurrences of AuditEvents for which this AuditSpecification has registered interest.
IfsException
- if the operation fails.public HandlerState getHandlerState() throws IfsException
IfsException
- if the operation fails.public boolean isHandlerActive() throws IfsException
IfsException
- if the operation fails.public boolean isHandlerNonCompeting() throws IfsException
IfsException
- if the operation fails.public static AuditSpecification getGlobalAuditSpecification(LibrarySession session) throws IfsException
IfsException
- if the operation fails.public static AuditSpecification getObjectAuditSpecification(LibrarySession session) throws IfsException
IfsException
- if the operation fails.public static AuditSpecification[] getInternalAuditSpecifications(LibrarySession session) throws IfsException
These AuditSpecification objects have special processing for dispatch, disposition, and restrictions on delete.
IfsException
- if the operation fails.public static AuditSpecification[] getCustomAuditSpecifications(LibrarySession session) throws IfsException
The internal AuditSpecifications are not included in the returned array.
IfsException
- if the operation fails.public void setAuditTypeList(AuditTypeList atl) throws IfsException
atl
- the AuditTypeList.IfsException
- if the operation failspublic void setHandlerState(HandlerState hs) throws IfsException
hs
- the HandlerStateIfsException
- if the operation failspublic void activate() throws IfsException
IfsException
- if the operation fails.public void deactivate() throws IfsException
IfsException
- if the operation fails.public void activateHandler() throws IfsException
If no handler is defined, this method does nothing.
IfsException
- if the operation fails.public void deactivateHandler() throws IfsException
If no handler is defined, this method does nothing.
IfsException
- if the operation fails.protected void preCreate(LibraryObjectDefinition lodef) throws IfsException
SystemObject
Set an option that indicates that Categories are NOT to be created from within S_SystemObject.
preCreate
in class SystemObject
lodef
- object definition that will be used to create the objectIfsException
- if operation failsprotected void preUpdate(LibraryObjectDefinition lodef) throws IfsException
SystemObject
Set an option that indicates that Categories are NOT to be created from within S_SystemObject.
preUpdate
in class SystemObject
lodef
- definition used to define how the target object
will be updatedIfsException
- if operation failsprotected void postCreate(LibraryObjectDefinition lodef) throws IfsException
SystemObject
This assumes that a transaction context has already been established.
postCreate
in class SystemObject
lodef
- object definition that was used to create the objectIfsException
- if operation failsprotected void preFree(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
This method is typically overridden by subclasses that
perform other operations prior to the target object
being freed in order to all delete or modify objects related
to the target object.
Subclasses are expected to invoke super.preFree
.
preFree
in class LibraryObject
lodef
- object definition used to hold options related to the free
operationIfsException
- if operation fails.protected boolean isValidEventType(AuditEvent event) throws IfsException
isValidEventType
in class LibraryObject
event
- the event being posted on this objectIfsException
- if the operation failspublic void auditAuditSpecificationGlobalAuditTypeListChanged() throws IfsException
Should only get called on the Global AuditSpecification.
IfsException
- if the operation failsprotected void auditUpdated(LibraryObjectDefinition lodef) throws IfsException
LibraryObject
auditUpdated
in class LibraryObject
lodef
- The update definitionIfsException
- if the operation fails.public static AuditSpecification find(LibrarySession session, String name) throws IfsException
Note: the name must be an exact, case-sensitive match.
session
- the current sessionname
- the name of the AuditSpecification instance to returnIfsException
- if the operation failspublic void purgeEvent(AuditEvent event) throws IfsException
event
- the AuditEvent to purgeIfsException
- if the operation failspublic void purgeEvents(AuditEvent[] events) throws IfsException
events
- the AuditEvents to purgeIfsException
- if the operation failsprotected void purgeEvents(long[] eventIds) throws IfsException
eventIds
- the event IDs to deleteIfsException
- if the operation failspublic int purgeAllEvents(int maxItems) throws IfsException
This should only be used when the target AuditSpecification has no events that are of interest - all events are candidates for deletion. Typically this is used when all events are to be purged carefully by a background process.
This operation requires that the session is in administration mode.
maxItems
- the number of AuditEvents to purgeIfsException
- if the operation failsCopyright © 2023. All rights reserved.