public abstract class AbstractAuditDAOImpl extends Object implements AuditDAO
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractAuditDAOImpl.AuditQueryRowHandler
Class that passes results from a result entity into the client callback
|
AuditDAO.AuditApplicationInfo
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
logger |
protected PropertyValueDAO |
propertyValueDAO |
Constructor and Description |
---|
AbstractAuditDAOImpl() |
Modifier and Type | Method and Description |
---|---|
protected abstract AuditApplicationEntity |
createAuditApplication(Long appNameId,
Long modelId,
Long disabledPathsId) |
AuditDAO.AuditApplicationInfo |
createAuditApplication(String application,
Long modelId)
Creates a new audit application.
|
protected abstract AuditEntryEntity |
createAuditEntry(Long applicationId,
long time,
Long usernameId,
Long valuesId) |
Long |
createAuditEntry(Long applicationId,
long time,
String username,
Map<String,Serializable> values)
Create a new audit entry with the given map of values.
|
protected abstract AuditModelEntity |
createAuditModel(Long contentDataId,
long crc) |
int |
deleteAuditEntries(List<Long> auditEntryIds)
Delete a discrete list of audit entries.
|
protected abstract int |
deleteAuditEntriesImpl(List<Long> auditEntryIds) |
protected abstract void |
findAuditEntries(AbstractAuditDAOImpl.AuditQueryRowHandler rowHandler,
boolean forward,
String applicationName,
String user,
Long fromId,
Long toId,
Long fromTime,
Long toTime,
int maxResults,
String searchKey,
Serializable searchValue) |
void |
findAuditEntries(AuditService.AuditQueryCallback callback,
AuditQueryParameters parameters,
int maxResults)
Find audit entries using the given parameters, any of which may be null
|
AuditDAO.AuditApplicationInfo |
getAuditApplication(String application)
Get the audit application details.
|
protected abstract AuditApplicationEntity |
getAuditApplicationById(Long id) |
protected abstract AuditApplicationEntity |
getAuditApplicationByName(String appName) |
protected abstract AuditModelEntity |
getAuditModelByCrc(long crc) |
org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> |
getOrCreateAuditModel(URL url)
Creates a new audit model entry or finds an existing one
|
protected PropertyValueDAO |
getPropertyValueDAO() |
void |
setContentDataDAO(ContentDataDAO contentDataDAO) |
void |
setContentService(ContentService contentService) |
void |
setPropertyValueDAO(PropertyValueDAO propertyValueDAO) |
protected abstract AuditApplicationEntity |
updateAuditApplication(AuditApplicationEntity entity) |
void |
updateAuditApplicationDisabledPaths(Long id,
Set<String> disabledPaths)
Update the audit application to hold a new set of disabled paths.
|
void |
updateAuditApplicationModel(Long id,
Long modelId)
Update the audit application to refer to a new model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deleteAuditEntries
protected final org.apache.commons.logging.Log logger
protected PropertyValueDAO propertyValueDAO
public void setContentService(ContentService contentService)
public void setContentDataDAO(ContentDataDAO contentDataDAO)
public void setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
protected PropertyValueDAO getPropertyValueDAO()
public org.alfresco.util.Pair<Long,org.alfresco.service.cmr.repository.ContentData> getOrCreateAuditModel(URL url)
getOrCreateAuditModel
in interface AuditDAO
url
- the URL of the configurationprotected abstract AuditModelEntity getAuditModelByCrc(long crc)
protected abstract AuditModelEntity createAuditModel(Long contentDataId, long crc)
public AuditDAO.AuditApplicationInfo getAuditApplication(String application)
AuditDAO
getAuditApplication
in interface AuditDAO
application
- the name of the applicationpublic AuditDAO.AuditApplicationInfo createAuditApplication(String application, Long modelId)
AuditDAO
createAuditApplication
in interface AuditDAO
application
- the name of the applicationmodelId
- the ID of the model configurationpublic void updateAuditApplicationModel(Long id, Long modelId)
AuditDAO
updateAuditApplicationModel
in interface AuditDAO
id
- the ID of the audit applicationmodelId
- the ID of the new modelpublic void updateAuditApplicationDisabledPaths(Long id, Set<String> disabledPaths)
AuditDAO
updateAuditApplicationDisabledPaths
in interface AuditDAO
id
- the ID of the audit applicationdisabledPaths
- the new disabled pathsprotected abstract AuditApplicationEntity getAuditApplicationById(Long id)
protected abstract AuditApplicationEntity getAuditApplicationByName(String appName)
protected abstract AuditApplicationEntity createAuditApplication(Long appNameId, Long modelId, Long disabledPathsId)
protected abstract AuditApplicationEntity updateAuditApplication(AuditApplicationEntity entity)
public Long createAuditEntry(Long applicationId, long time, String username, Map<String,Serializable> values)
AuditDAO
createAuditEntry
in interface AuditDAO
applicationId
- an existing audit application IDtime
- the time (ms since epoch) to log the entry againstusername
- the authenticated user (null if not present)values
- the values to recordpublic int deleteAuditEntries(List<Long> auditEntryIds)
AuditDAO
deleteAuditEntries
in interface AuditDAO
auditEntryIds
- the IDs of all audit entries to deleteprotected abstract AuditEntryEntity createAuditEntry(Long applicationId, long time, Long usernameId, Long valuesId)
public void findAuditEntries(AuditService.AuditQueryCallback callback, AuditQueryParameters parameters, int maxResults)
AuditDAO
findAuditEntries
in interface AuditDAO
callback
- the data callback per entryparameters
- the parameters for the query (may not be null)maxResults
- the maximum number of results to retrieve (must be greater than 0)protected abstract void findAuditEntries(AbstractAuditDAOImpl.AuditQueryRowHandler rowHandler, boolean forward, String applicationName, String user, Long fromId, Long toId, Long fromTime, Long toTime, int maxResults, String searchKey, Serializable searchValue)
Copyright © 2005–2017 Alfresco Software. All rights reserved.