|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.management.subsystems.AbstractPropertyBackedBean
org.alfresco.repo.audit.model.AuditModelRegistryImpl
public class AuditModelRegistryImpl
Component used to store audit model definitions. It ensures that duplicate application and converter definitions are detected and provides a single lookup for code using the Audit model. It is factored as a subsystem and exposes a global enablement property plus enablement properties for each individual audit application.
Nested Class Summary | |
---|---|
class |
AuditModelRegistryImpl.AuditModelRegistryState
A class encapsulating the disposable/resettable state of the audit model registry. |
Nested classes/interfaces inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean |
---|
AbstractPropertyBackedBean.DefaultResolver |
Field Summary | |
---|---|
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. |
Fields inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean |
---|
DEFAULT_INSTANCE_NAME, lock |
Fields inherited from interface org.alfresco.repo.audit.model.AuditModelRegistry |
---|
AUDIT_PROPERTY_AUDIT_ENABLED, AUDIT_RESERVED_KEY_SYSTEMTIME, AUDIT_RESERVED_KEY_USERNAME |
Constructor Summary | |
---|---|
AuditModelRegistryImpl()
Default constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.alfresco.repo.management.subsystems.AbstractPropertyBackedBean |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROPERTY_AUDIT_ENABLED
public static final java.lang.String PROPERTY_AUDIT_CONFIG_STRICT
Constructor Detail |
---|
public AuditModelRegistryImpl()
Method Detail |
---|
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 application
public AuditApplication getAuditApplicationByName(java.lang.String applicationName)
getAuditApplicationByName
in interface AuditModelRegistry
applicationName
- the name of the audited application
public 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 url
org.alfresco.error.AlfrescoRuntimeException
- if an IOException occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |