Class AuditTrailServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<AuditTrail>
ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailServiceImpl
- All Implemented Interfaces:
BaseImmutableService<AuditTrail>,BaseReadOnlyService<AuditTrail>,BaseService<AuditTrail>,AuditTrailService
@Service
public class AuditTrailServiceImpl
extends AbstractService<AuditTrail>
implements AuditTrailService
- Author:
- pavlidis
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log -
Constructor Summary
ConstructorsConstructorDescriptionAuditTrailServiceImpl(AuditTrailDao auditTrailDao, GenericCuratableDao curatableDao, UserManager userManager, SessionFactory sessionFactory) -
Method Summary
Modifier and TypeMethodDescriptionaddUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note) addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, String detail) addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, String detail, Date performedDate) Add an update audit event of a specific type to the passed auditable entity.addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, String note, Throwable throwable) This is using thePropagation.REQUIRES_NEWso that if the throwable is raised, it will not roll back the audit trail event.addUpdateEvent(Auditable auditable, String note) Add an update event defined by the given parameters, to the given auditable.Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, streamAll, streamAll, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService
createMethods inherited from interface ubic.gemma.persistence.service.BaseImmutableService
create, findOrCreate, remove, remove, removeMethods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAll
-
Constructor Details
-
AuditTrailServiceImpl
@Autowired public AuditTrailServiceImpl(AuditTrailDao auditTrailDao, GenericCuratableDao curatableDao, UserManager userManager, SessionFactory sessionFactory)
-
-
Method Details
-
addUpdateEvent
Description copied from interface:AuditTrailServiceAdd an update event defined by the given parameters, to the given auditable. Returns the generated event.- Specified by:
addUpdateEventin interfaceAuditTrailService- Parameters:
auditable- the entitynote- a short note (optional)- Returns:
- the newly created event, which will be somewhere in the auditable's
AuditTrail.getEvents()collection.
-
addUpdateEvent
@Transactional public AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note) - Specified by:
addUpdateEventin interfaceAuditTrailService- See Also:
-
addUpdateEvent
@Transactional public AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, String detail) - Specified by:
addUpdateEventin interfaceAuditTrailService- See Also:
-
addUpdateEvent
@Transactional(propagation=REQUIRES_NEW) public AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, Throwable throwable) This is using thePropagation.REQUIRES_NEWso that if the throwable is raised, it will not roll back the audit trail event.- Specified by:
addUpdateEventin interfaceAuditTrailService- See Also:
-
addUpdateEvent
@Transactional public AuditEvent addUpdateEvent(Auditable auditable, Class<? extends AuditEventType> type, @Nullable String note, @Nullable String detail, Date performedDate) Description copied from interface:AuditTrailServiceAdd an update audit event of a specific type to the passed auditable entity.- Specified by:
addUpdateEventin interfaceAuditTrailService- Parameters:
auditable- the entity being auditedtype- the audit event typenote- a short note (optional)detail- full details for that eventperformedDate- the moment the audit was performed (must not be in the future!)- Returns:
- the newly created event, which will be somewhere in the auditable's
AuditTrail.getEvents()collection.
-