Package org.cyclos.impl.system
Class ChannelConfigurationEntityLogHandlerImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseNetworkedHandlerImpl
-
- org.cyclos.impl.system.BaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>
-
- org.cyclos.impl.system.ChannelConfigurationEntityLogHandlerImpl
-
- All Implemented Interfaces:
EntityLogHandler<ChannelConfiguration,ChannelConfigurationDTO>
@Component public class ChannelConfigurationEntityLogHandlerImpl extends BaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>
Handler for ChannelConfiguration entity logs.
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.system.BaseEntityLogHandlerImpl
$, el, entityLogRegistry, rawEntityManagerHandler
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description ChannelConfigurationEntityLogHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<EntityPropertyLog>doOnBeforeLog(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, List<EntityPropertyLog> result, EntityLogEvent event)Class<ChannelConfiguration>getEntityClass()The entity class related to this handlerStringgetEntityLogName(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, EntityLogEvent event)Return the name of the entity log being generated.protected ChannelConfigurationgetEntityToViewLog(long entityId)Returns the entity with the given id ONLY if the logged user can view its logs.EntityLogTypegetType()The log type this handler manages.Pair<Object,Object>getValues(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, PropertyLogDescriptor<ChannelConfigurationDTO> propertyDescriptor)Allows custom logic for a specific property to be logged bypassing the default log generation for it.EntityLogDescriptor<? extends ChannelConfigurationDTO>resolveLogDescriptor(ChannelConfiguration channelConfiguration)Return the descriptor with the mappings for each DTO property.-
Methods inherited from class org.cyclos.impl.system.BaseEntityLogHandlerImpl
applyLogFilters, areEquals, canViewEntityLog, canViewPropertiesLog, createEntityPropertyLog, customLogForCreation, doApplyLogFilters, getRelatedUser, isLogEnabled, isPrivateEntity, onBeforeLog, resolveOwnerEntityLogHandler
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
doOnBeforeLog
public List<EntityPropertyLog> doOnBeforeLog(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, List<EntityPropertyLog> result, EntityLogEvent event)
- Overrides:
doOnBeforeLogin classBaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>
-
getEntityClass
public Class<ChannelConfiguration> getEntityClass()
Description copied from interface:EntityLogHandlerThe entity class related to this handler
-
getEntityLogName
public String getEntityLogName(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, EntityLogEvent event)
Description copied from interface:EntityLogHandlerReturn the name of the entity log being generated.- Specified by:
getEntityLogNamein interfaceEntityLogHandler<ChannelConfiguration,ChannelConfigurationDTO>- Overrides:
getEntityLogNamein classBaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>
-
getType
public EntityLogType getType()
Description copied from interface:EntityLogHandlerThe log type this handler manages.
-
getValues
public Pair<Object,Object> getValues(ChannelConfiguration oldEntity, ChannelConfiguration newEntity, PropertyLogDescriptor<ChannelConfigurationDTO> propertyDescriptor)
Description copied from interface:EntityLogHandlerAllows custom logic for a specific property to be logged bypassing the default log generation for it.- Specified by:
getValuesin interfaceEntityLogHandler<ChannelConfiguration,ChannelConfigurationDTO>- Overrides:
getValuesin classBaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>- Returns:
- null for the default generation (i.e no custom logic implemented) or a pair of the form
to be saved as-is only if EntityLogHandler.areEquals(BaseEntity, BaseEntity, PropertyAccess, Object, Object)return false.
-
resolveLogDescriptor
public EntityLogDescriptor<? extends ChannelConfigurationDTO> resolveLogDescriptor(ChannelConfiguration channelConfiguration)
Description copied from interface:EntityLogHandlerReturn the descriptor with the mappings for each DTO property.
-
getEntityToViewLog
protected ChannelConfiguration getEntityToViewLog(long entityId)
Description copied from class:BaseEntityLogHandlerImplReturns the entity with the given id ONLY if the logged user can view its logs. Otherwise it MUST return null.- Specified by:
getEntityToViewLogin classBaseEntityLogHandlerImpl<ChannelConfiguration,ChannelConfigurationDTO>
-
-