Class BannerServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<E,A,DTO,D,DP>
-
- org.cyclos.impl.contentmanagement.BaseContentItemServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
- org.cyclos.impl.contentmanagement.BannerServiceImpl
-
- All Implemented Interfaces:
BannerServiceLocal,CRUDServiceLocal<Banner,BannerDTO,BannerData,BannerDataParams>,BannerService,CRUDService<BannerDTO,BannerData,BannerDataParams>,CRUDWithConfirmationPasswordService<BannerDTO,BannerData,BannerDataParams>,Service
@Service public class BannerServiceImpl extends BaseContentItemServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams> implements BannerServiceLocal
Implementation forBannerService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.contentmanagement.BaseContentItemServiceImpl
configurationPath, configurationService
-
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 BannerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ClassicBanner>getClassicBanners()Returns the classic banners for the logged userprotected BannerDatagetData(Banner banner)Returns details data for the given entityList<FrontendBanner>getFrontendBanners()Returns the banners for the new frontend for the logged userBannersListDatagetListData(ConfigurationVO configurationVO)Returns data to list banners in a given configurationList<BannerVO>list(ConfigurationVO configurationVO)Lists all banners for the given configurationvoidmove(Long id, boolean up)Moves the banner in order, either up or downBannernewEntity(BannerDataParams params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected ObjectonBeforeSave(Banner banner, Banner currentCopy)May be overridden in order to perform custom logic before saving an entity.protected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkprotected ValidatorresolveValidator(BannerDTO dto)protected org.apache.commons.collections4.BidiMap<Class<? extends Banner>,Class<? extends BannerDTO>>subClassMappings()Should be overridden by subclasses which handle entity / dto hierarchies.-
Methods inherited from class org.cyclos.impl.contentmanagement.BaseContentItemServiceImpl
toDTO
-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isEntityInternalNameRequired, isNameRequired, load, logEntity, onAfterRemove, onAfterSave, onBeforeRemove, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, 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
-
getClassicBanners
public List<ClassicBanner> getClassicBanners()
Description copied from interface:BannerServiceLocalReturns the classic banners for the logged user- Specified by:
getClassicBannersin interfaceBannerServiceLocal
-
getFrontendBanners
public List<FrontendBanner> getFrontendBanners()
Description copied from interface:BannerServiceLocalReturns the banners for the new frontend for the logged user- Specified by:
getFrontendBannersin interfaceBannerServiceLocal
-
getListData
public BannersListData getListData(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:BannerServiceReturns data to list banners in a given configuration- Specified by:
getListDatain interfaceBannerService- Throws:
FrameworkException
-
list
public List<BannerVO> list(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:BannerServiceLists all banners for the given configuration- Specified by:
listin interfaceBannerService- Throws:
FrameworkException
-
move
public void move(Long id, boolean up) throws FrameworkException
Description copied from interface:BannerServiceMoves the banner in order, either up or down- Specified by:
movein interfaceBannerService- Throws:
FrameworkException
-
newEntity
public Banner newEntity(BannerDataParams 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<Banner,BannerDTO,BannerData,BannerDataParams>- Specified by:
newEntityin classCRUDServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
getData
protected BannerData getData(Banner banner)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
onBeforeSave
protected Object onBeforeSave(Banner banner, Banner currentCopy)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before saving an entity. Any returned value will be passed to theCRUDServiceImpl.onAfterSave(BaseEntity, BaseEntity, Object)method- Overrides:
onBeforeSavein classCRUDServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
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(BannerDTO dto)
- Overrides:
resolveValidatorin classBaseContentItemServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
subClassMappings
protected org.apache.commons.collections4.BidiMap<Class<? extends Banner>,Class<? extends BannerDTO>> subClassMappings()
Description copied from class:CRUDServiceImplShould be overridden by subclasses which handle entity / dto hierarchies. The map key should be the entity class, while the map value, the DTO class- Overrides:
subClassMappingsin classCRUDServiceImpl<Banner,QBanner,BannerDTO,BannerData,BannerDataParams>
-
-