Package org.cyclos.impl.access
Class ChannelServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
- org.cyclos.impl.access.ChannelServiceImpl
-
- All Implemented Interfaces:
ChannelServiceLocal,CRUDServiceLocal<Channel,ChannelDTO,ChannelData,Void>,ChannelService,CRUDService<ChannelDTO,ChannelData,Void>,CRUDWithConfirmationPasswordService<ChannelDTO,ChannelData,Void>,Service
@Service public class ChannelServiceImpl extends CRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void> implements ChannelServiceLocal
implementation forChannelService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.CRUDServiceImpl
$, ATTR_CURRENT_COPY, cacheHandler, dtoClass, entityClass, extensionPointService, idPath, internalNamePath, namePath, ownerEntityIdPath, ownerEntityPath, ownerEntityPropertyName, passwordHandler, richTextHandler, withConfirmationPassword
-
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 ChannelServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCustomInternalNameValidations(Property internalName, ChannelDTO dto)This method may be overridden to add custom validations for the INTERNAL_NAME property.Channelfind(String internalName, Network network)Finds a channel by internal name in the specified networkprotected ChannelDatagetData(Channel channel)Returns details data for the given entityChannelgetEasyInvoice()Returns the easy invoice channelChannelgetMain()Returns the main channelChannelgetMobile()Returns the mobile channelChannelgetOidc()Returns the OAuth2 / OpenID Connect channelChannelgetPos()Returns the POS channelChannelgetSms()Returns the sms channelChannelgetTicket()Returns the ticket channelChannelgetWebServices()Returns the web services channelprotected booleanisEntityInternalNameRequired()NOTE: This method will be only invoked if the entity is anIInternalNamedEntity.List<ChannelVO>list()List all available channelsList<Channel>listAll()Returns all channelsChannelload(String internalName)Loads a channel by internal nameChannelnewEntity(Void params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterSave(Channel channel, Channel currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected voidonBeforeRemove(Channel entity)May be overridden in order to perform custom logic before removing an entityprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkprotected ValidatorresolveValidator(ChannelDTO dto)-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isNameRequired, load, logEntity, onAfterRemove, onBeforeSave, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toDTO, toEntity, validate
-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
-
-
-
Method Detail
-
find
public Channel find(String internalName, Network network) throws FrameworkException
Description copied from interface:ChannelServiceLocalFinds a channel by internal name in the specified network- Specified by:
findin interfaceChannelServiceLocal- Throws:
FrameworkException
-
getEasyInvoice
public Channel getEasyInvoice()
Description copied from interface:ChannelServiceLocalReturns the easy invoice channel- Specified by:
getEasyInvoicein interfaceChannelServiceLocal
-
getMain
public Channel getMain()
Description copied from interface:ChannelServiceLocalReturns the main channel- Specified by:
getMainin interfaceChannelServiceLocal
-
getMobile
public Channel getMobile() throws FrameworkException
Description copied from interface:ChannelServiceLocalReturns the mobile channel- Specified by:
getMobilein interfaceChannelServiceLocal- Throws:
FrameworkException
-
getOidc
public Channel getOidc()
Description copied from interface:ChannelServiceLocalReturns the OAuth2 / OpenID Connect channel- Specified by:
getOidcin interfaceChannelServiceLocal
-
getPos
public Channel getPos()
Description copied from interface:ChannelServiceLocalReturns the POS channel- Specified by:
getPosin interfaceChannelServiceLocal
-
getSms
public Channel getSms() throws FrameworkException
Description copied from interface:ChannelServiceLocalReturns the sms channel- Specified by:
getSmsin interfaceChannelServiceLocal- Throws:
FrameworkException
-
getTicket
public Channel getTicket()
Description copied from interface:ChannelServiceLocalReturns the ticket channel- Specified by:
getTicketin interfaceChannelServiceLocal
-
getWebServices
public Channel getWebServices() throws FrameworkException
Description copied from interface:ChannelServiceLocalReturns the web services channel- Specified by:
getWebServicesin interfaceChannelServiceLocal- Throws:
FrameworkException
-
list
public List<ChannelVO> list()
Description copied from interface:ChannelServiceList all available channels- Specified by:
listin interfaceChannelService
-
listAll
public List<Channel> listAll() throws FrameworkException
Description copied from interface:ChannelServiceLocalReturns all channels- Specified by:
listAllin interfaceChannelServiceLocal- Throws:
FrameworkException
-
load
public Channel load(String internalName)
Description copied from interface:ChannelServiceLocalLoads a channel by internal name- Specified by:
loadin interfaceChannelServiceLocal
-
newEntity
public Channel newEntity(Void params)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<Channel,ChannelDTO,ChannelData,Void>- Specified by:
newEntityin classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
addCustomInternalNameValidations
protected void addCustomInternalNameValidations(Property internalName, ChannelDTO dto)
Description copied from class:CRUDServiceImplThis method may be overridden to add custom validations for the INTERNAL_NAME property.- Overrides:
addCustomInternalNameValidationsin classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
getData
protected ChannelData getData(Channel channel)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
isEntityInternalNameRequired
protected boolean isEntityInternalNameRequired()
Description copied from class:CRUDServiceImplNOTE: This method will be only invoked if the entity is anIInternalNamedEntity. Subclasses could override it if the internal name is required.- Overrides:
isEntityInternalNameRequiredin classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>- Returns:
- false (optional by default)
-
onAfterSave
protected void onAfterSave(Channel channel, Channel currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
onBeforeRemove
protected void onBeforeRemove(Channel entity)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before removing an entity- Overrides:
onBeforeRemovein classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
resolveValidator
protected Validator resolveValidator(ChannelDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<Channel,QChannel,ChannelDTO,ChannelData,Void>
-
-