Package org.duracloud.mill.auditor.jpa
Class JpaAuditLogStore
- java.lang.Object
-
- org.duracloud.mill.auditor.jpa.JpaAuditLogStore
-
- All Implemented Interfaces:
AuditLogStore
public class JpaAuditLogStore extends Object implements AuditLogStore
- Author:
- Daniel Bernstein
-
-
Constructor Summary
Constructors Constructor Description JpaAuditLogStore(JpaAuditLogItemRepo auditLogRepo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditLogItemgetLatestLogItem(String account, String storeId, String spaceId, String contentId)Retrieves log history for a content item in chronological orderIterator<AuditLogItem>getLogItems(String account, String storeId, String spaceId, String contentId)Retrieves log history for a content item.voidupdateProperties(AuditLogItem item, String properties)Adds the following properties to the specified item.voidwrite(String account, String storeId, String spaceId, String contentId, String contentMd5, String mimetype, String contentSize, String user, String action, String properties, String spaceAcls, String sourceSpaceId, String sourceContentId, Date timestamp)This method writes the logItem to the audit log.
-
-
-
Constructor Detail
-
JpaAuditLogStore
@Autowired public JpaAuditLogStore(JpaAuditLogItemRepo auditLogRepo)
-
-
Method Detail
-
write
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public void write(String account, String storeId, String spaceId, String contentId, String contentMd5, String mimetype, String contentSize, String user, String action, String properties, String spaceAcls, String sourceSpaceId, String sourceContentId, Date timestamp) throws AuditLogWriteFailedExceptionDescription copied from interface:AuditLogStoreThis method writes the logItem to the audit log.- Specified by:
writein interfaceAuditLogStore- Throws:
AuditLogWriteFailedException
-
getLogItems
@Transactional(value="millJpaRepoTransactionManager", readOnly=true) public Iterator<AuditLogItem> getLogItems(String account, String storeId, String spaceId, String contentId)Description copied from interface:AuditLogStoreRetrieves log history for a content item.- Specified by:
getLogItemsin interfaceAuditLogStore- Returns:
-
getLatestLogItem
@Transactional(value="millJpaRepoTransactionManager", readOnly=true) public AuditLogItem getLatestLogItem(String account, String storeId, String spaceId, String contentId) throws NotFoundExceptionDescription copied from interface:AuditLogStoreRetrieves log history for a content item in chronological order- Specified by:
getLatestLogItemin interfaceAuditLogStore- Returns:
- Throws:
NotFoundException
-
updateProperties
@Transactional(value="millJpaRepoTransactionManager", propagation=REQUIRES_NEW) public void updateProperties(AuditLogItem item, String properties) throws AuditLogWriteFailedExceptionDescription copied from interface:AuditLogStoreAdds the following properties to the specified item.- Specified by:
updatePropertiesin interfaceAuditLogStore- Throws:
AuditLogWriteFailedException
-
-