Class MenuEntryServiceImpl
- 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<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
- org.cyclos.impl.contentmanagement.MenuEntryServiceImpl
-
- All Implemented Interfaces:
MenuEntryServiceLocal,CRUDServiceLocal<MenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>,MenuEntryService,CRUDService<MenuEntryDTO,MenuEntryData,MenuEntryDataParams>,CRUDWithConfirmationPasswordService<MenuEntryDTO,MenuEntryData,MenuEntryDataParams>,Service
@Service public class MenuEntryServiceImpl extends BaseContentItemServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams> implements MenuEntryServiceLocal
Implementation forMenuEntryService
-
-
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 MenuEntryServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MenuEntryDatagetData(MenuEntry contentItem)Returns details data for the given entityMenuEntriesListDatagetListData(ConfigurationVO configurationVO)Returns data with the list of menus for the given configurationList<MenuEntryVO>getMenu(Frontend frontend)Returns the menu entries for the logged user.MenuItemDetailedVOgetMenuItemDetails(MenuItemVO vo)Returns details for the given menu itemList<MenuEntryVO>list(ConfigurationVO configurationVO)Lists menu entries in the given configurationList<MenuEntry>list(Frontend frontend, Configuration configuration, boolean rootOnly, Collection<ContentItemVisibility> visibilities, boolean includeFloatingPages)Lists the pages applicable to the given frontend and visibilityList<MenuItem>listByWizard(MenuItemWizard wizard)Returns the menu items that show the given wizard, if anyList<SitemapItemVO>listForSitemap()Returns the sitemap entries for all enabled menu items of type content and floating pages in this networkvoidmove(Long id, boolean up)Moves the given entry in order, either up or downMenuEntrynewEntity(MenuEntryDataParams params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterRemove(MenuEntry entity)May be overridden in order to perform custom logic after removing an entityprotected voidonAfterSave(MenuEntry entity, MenuEntry currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected ObjectonBeforeSave(MenuEntry entry, MenuEntry 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(MenuEntryDTO dto)protected org.apache.commons.collections4.BidiMap<Class<? extends MenuEntry>,Class<? extends MenuEntryDTO>>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, 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
-
getListData
public MenuEntriesListData getListData(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:MenuEntryServiceReturns data with the list of menus for the given configuration- Specified by:
getListDatain interfaceMenuEntryService- Throws:
FrameworkException
-
getMenu
public List<MenuEntryVO> getMenu(Frontend frontend)
Description copied from interface:MenuEntryServiceLocalReturns the menu entries for the logged user. Not the same as converting the list ofMenuEntrytoMenuEntryVO, but each element is converted to it's corresponding vo, likeMenuGroupVOandMenuItemVO, and only visible entries are returned.- Specified by:
getMenuin interfaceMenuEntryServiceLocal
-
getMenuItemDetails
public MenuItemDetailedVO getMenuItemDetails(MenuItemVO vo) throws FrameworkException
Description copied from interface:MenuEntryServiceReturns details for the given menu item- Specified by:
getMenuItemDetailsin interfaceMenuEntryService- Throws:
FrameworkException
-
list
public List<MenuEntryVO> list(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:MenuEntryServiceLists menu entries in the given configuration- Specified by:
listin interfaceMenuEntryService- Throws:
FrameworkException
-
list
public List<MenuEntry> list(Frontend frontend, Configuration configuration, boolean rootOnly, Collection<ContentItemVisibility> visibilities, boolean includeFloatingPages)
Description copied from interface:MenuEntryServiceLocalLists the pages applicable to the given frontend and visibility- Specified by:
listin interfaceMenuEntryServiceLocal
-
listByWizard
public List<MenuItem> listByWizard(MenuItemWizard wizard)
Description copied from interface:MenuEntryServiceLocalReturns the menu items that show the given wizard, if any- Specified by:
listByWizardin interfaceMenuEntryServiceLocal
-
listForSitemap
public List<SitemapItemVO> listForSitemap()
Description copied from interface:MenuEntryServiceLocalReturns the sitemap entries for all enabled menu items of type content and floating pages in this network- Specified by:
listForSitemapin interfaceMenuEntryServiceLocal
-
move
public void move(Long id, boolean up) throws EntityNotFoundException
Description copied from interface:MenuEntryServiceMoves the given entry in order, either up or down- Specified by:
movein interfaceMenuEntryService- Throws:
EntityNotFoundException
-
newEntity
public MenuEntry newEntity(MenuEntryDataParams 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<MenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>- Specified by:
newEntityin classCRUDServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
getData
protected MenuEntryData getData(MenuEntry contentItem)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
onAfterRemove
protected void onAfterRemove(MenuEntry entity)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after removing an entity- Overrides:
onAfterRemovein classCRUDServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
onAfterSave
protected void onAfterSave(MenuEntry entity, MenuEntry currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
onBeforeSave
protected Object onBeforeSave(MenuEntry entry, MenuEntry 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<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
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(MenuEntryDTO dto)
- Overrides:
resolveValidatorin classBaseContentItemServiceImpl<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
subClassMappings
protected org.apache.commons.collections4.BidiMap<Class<? extends MenuEntry>,Class<? extends MenuEntryDTO>> 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<MenuEntry,QMenuEntry,MenuEntryDTO,MenuEntryData,MenuEntryDataParams>
-
-