public class AuditModelRegistryImpl extends AbstractPropertyBackedBean implements AuditModelRegistry
Modifier and Type | Class and Description |
---|---|
class |
AuditModelRegistryImpl.AuditModelRegistryState
A class encapsulating the disposable/resettable state of the audit model registry.
|
AbstractPropertyBackedBean.DefaultResolver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY_AUDIT_CONFIG_STRICT
The name of the strict loading flag.
|
static java.lang.String |
PROPERTY_AUDIT_ENABLED
The name of the global enablement property.
|
DEFAULT_INSTANCE_NAME, lock
AUDIT_PROPERTY_AUDIT_ENABLED, AUDIT_RESERVED_KEY_SYSTEMTIME, AUDIT_RESERVED_KEY_USERNAME
Constructor and Description |
---|
AuditModelRegistryImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected PropertyBackedBeanState |
createInitialState()
Creates the initial state.
|
AuditApplication |
getAuditApplicationByKey(java.lang.String key)
Get the application model for the given root key (as defined on the application)
|
AuditApplication |
getAuditApplicationByName(java.lang.String applicationName)
Get the application model for the given application name
|
java.util.Map |
getAuditApplications()
Get a map of all audit applications key by name
|
org.alfresco.util.PathMapper |
getAuditPathMapper()
Get the path mapper.
|
boolean |
isAuditEnabled()
Determines whether audit is globally enabled or disabled.
|
void |
loadAuditModels()
Method to load audit models into memory.
|
void |
registerModel(java.net.URL auditModelUrl)
Enables audit and registers an audit model at a given URL.
|
void |
setAuditDAO(AuditDAO auditDAO)
Set the DAO used to persisted the registered audit models.
|
void |
setDataExtractors(org.alfresco.util.registry.NamedObjectRegistry dataExtractors)
Set the registry of
data extractors . |
void |
setDataGenerators(org.alfresco.util.registry.NamedObjectRegistry dataGenerators)
Set the registry of
data generators . |
void |
setSearchPath(java.lang.String[] searchPath)
Sets the search path for config files.
|
void |
setTransactionService(TransactionService transactionService)
Service to ensure DAO calls are transactionally wrapped.
|
static Audit |
unmarshallModel(java.net.URL configUrl)
Unmarshalls the Audit model from the URL.
|
applyDefaultOverrides, destroy, destroy, doInit, getCategory, getDescription, getId, getInstancePath, getParent, getProperty, getPropertyDefaults, getPropertyNames, getRegistry, getState, init, isUpdateable, onApplicationEvent, resolveDefault, revert, setApplicationContext, setAutoStart, setBeanName, setCategory, setInstancePath, setProperties, setProperty, setPropertyDefaults, setRegistry, start, start, stop, stop
public static final java.lang.String PROPERTY_AUDIT_ENABLED
public static final java.lang.String PROPERTY_AUDIT_CONFIG_STRICT
public void setSearchPath(java.lang.String[] searchPath)
public void setTransactionService(TransactionService transactionService)
public void setAuditDAO(AuditDAO auditDAO)
public void setDataExtractors(org.alfresco.util.registry.NamedObjectRegistry dataExtractors)
data extractors
.public void setDataGenerators(org.alfresco.util.registry.NamedObjectRegistry dataGenerators)
data generators
.public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractPropertyBackedBean
java.lang.Exception
public java.util.Map getAuditApplications()
getAuditApplications
in interface AuditModelRegistry
public AuditApplication getAuditApplicationByKey(java.lang.String key)
getAuditApplicationByKey
in interface AuditModelRegistry
key
- the key defined on the applicationpublic AuditApplication getAuditApplicationByName(java.lang.String applicationName)
getAuditApplicationByName
in interface AuditModelRegistry
applicationName
- the name of the audited applicationpublic org.alfresco.util.PathMapper getAuditPathMapper()
getAuditPathMapper
in interface AuditModelRegistry
public void loadAuditModels()
loadAuditModels
in interface AuditModelRegistry
public boolean isAuditEnabled()
isAuditEnabled
in interface AuditModelRegistry
true
if audit is enabledpublic void registerModel(java.net.URL auditModelUrl)
auditModelUrl
- the source of the modelprotected PropertyBackedBeanState createInitialState() throws java.io.IOException
createInitialState
in class AbstractPropertyBackedBean
java.io.IOException
- Signals that an I/O exception has occurred.public static Audit unmarshallModel(java.net.URL configUrl)
configUrl
- the config urlorg.alfresco.error.AlfrescoRuntimeException
- if an IOException occursCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.