Package org.cyclos.impl.system
Interface EntityLogServiceLocal
-
- All Superinterfaces:
EntityLogService,Service
public interface EntityLogServiceLocal extends EntityLogService
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPOUND_NAME_SEPARATORSeparator used to form the name of an entity property log when is compound (for nested beans or table properties)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static voidapplyUserActionsFilters(EntityPropertyLogQuery params, DBQuery<?> query)Apply specific user actions filtersEntityLoglog(String entityName, String entityNamePrefix, long entityId, Boolean isPrivateEntity, Long ownerEntityId, Long relatedEntityId, EntityLogType type, EntityLogEvent event, EntityActionLog entityAction, List<EntityPropertyLog> propertyLogs, boolean asManager)Creates a newEntityLogassociated to the given list ofEntityPropertyLog.
IMPORTANT: This method is intended to be used only for specific cases, instead, thelogEntity(SimpleEntity, SimpleEntity, Supplier)method should be used.EntityLoglog(SimpleEntity entity, String propertyLogName, String propertyName, String oldValue, String newValue, EntityActionLog entityAction)Creates a newEntityLogand a newEntityPropertyLogwith the given values.
IMPORTANT: This method is intended to be used only for specific cases, instead, thelogEntity(SimpleEntity, SimpleEntity, Supplier)method should be used.EntityLoglogEntity(SimpleEntity oldEntity, SimpleEntity newEntity, Supplier<String> ownerEntityPropNameSupplier)Logs the changes from oldEntity to newEntity.voidremoveAll(BasicUser basicUser)Removes all entity logs for the given user.-
Methods inherited from interface org.cyclos.services.system.EntityLogService
exportEntityPropertyLogs, getGeneralSearchData, getSearchData, getSystemRecordsLogsSearchData, load, search
-
-
-
-
Field Detail
-
COMPOUND_NAME_SEPARATOR
static final String COMPOUND_NAME_SEPARATOR
Separator used to form the name of an entity property log when is compound (for nested beans or table properties)- See Also:
- Constant Field Values
-
-
Method Detail
-
applyUserActionsFilters
static void applyUserActionsFilters(EntityPropertyLogQuery params, DBQuery<?> query)
Apply specific user actions filters
-
log
EntityLog log(SimpleEntity entity, String propertyLogName, String propertyName, String oldValue, String newValue, EntityActionLog entityAction)
Creates a newEntityLogand a newEntityPropertyLogwith the given values.
IMPORTANT: This method is intended to be used only for specific cases, instead, thelogEntity(SimpleEntity, SimpleEntity, Supplier)method should be used.
-
log
EntityLog log(String entityName, String entityNamePrefix, long entityId, Boolean isPrivateEntity, Long ownerEntityId, Long relatedEntityId, EntityLogType type, EntityLogEvent event, EntityActionLog entityAction, List<EntityPropertyLog> propertyLogs, boolean asManager)
Creates a newEntityLogassociated to the given list ofEntityPropertyLog.
IMPORTANT: This method is intended to be used only for specific cases, instead, thelogEntity(SimpleEntity, SimpleEntity, Supplier)method should be used.
-
logEntity
EntityLog logEntity(SimpleEntity oldEntity, SimpleEntity newEntity, Supplier<String> ownerEntityPropNameSupplier)
Logs the changes from oldEntity to newEntity. Returns the createdEntityLogor null if no changes were found or the log is not enabled for the entity.- Parameters:
oldEntity- the current persisted (and detached) entity or null if the entity is being created.newEntity- the new status after the DTO was applied or null if the entity is being removed.ownerEntityPropNameSupplier- The optional supplier for the owner entity property, if null then it look for a field annotated with \@OwnerEntity. Otherwise the supplied property will be used (if any) to get the owner id
-
removeAll
void removeAll(BasicUser basicUser)
Removes all entity logs for the given user. Logs of typeEntityLogType.USERthat the user is the entity and of typeEntityLogType.PHONEandEntityLogType.ADDRESSthat the given user is the owner entity are removed
-
-