Class MenuEntryServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
- org.cyclos.security.contentmanagement.MenuEntryServiceSecurity
-
- All Implemented Interfaces:
MenuEntryService,CRUDService<MenuEntryDTO,MenuEntryData,MenuEntryDataParams>,CRUDWithConfirmationPasswordService<MenuEntryDTO,MenuEntryData,MenuEntryDataParams>,Service
@Security public class MenuEntryServiceSecurity extends CRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams> implements MenuEntryService
Security layer forMenuEntryService
-
-
Field Summary
-
Fields inherited from class org.cyclos.security.CRUDServiceSecurity
entityClass
-
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 MenuEntryServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(MenuEntryDataParams params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notbooleandoHasManageAccess(MenuEntry menuEntry)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(MenuEntry menuEntry)Should be implemented in order to return whether the caller is allowed to view the given entity.protected MenuEntryServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the serviceMenuEntriesListDatagetListData(ConfigurationVO configurationVO)Returns data with the list of menus for the given configurationMenuItemDetailedVOgetMenuItemDetails(MenuItemVO vo)Returns details for the given menu itembooleanisAccessible(SessionData sessionData, MenuEntry entity)Must be implemented in order to determine whether the given entity is accessible for the given session data.List<MenuEntryVO>list(ConfigurationVO configurationVO)Lists menu entries in the given configurationvoidmove(Long id, boolean up)Moves the given entry in order, either up or down-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPassword
-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
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, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, 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
-
-
-
-
Method Detail
-
doHasManageAccess
public boolean doHasManageAccess(MenuEntry menuEntry)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to manage the given entity, for the given operation- Specified by:
doHasManageAccessin classCRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
doHasViewAccess
public boolean doHasViewAccess(MenuEntry menuEntry)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to view the given entity.- Specified by:
doHasViewAccessin classCRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
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
-
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
-
isAccessible
public boolean isAccessible(SessionData sessionData, MenuEntry entity)
Description copied from class:CRUDServiceSecurityMust be implemented in order to determine whether the given entity is accessible for the given session data. This method shouldn't check the same condition asCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity isCRUDServiceSecurity.hasViewAccess(BaseEntity), this method should return false.- Specified by:
isAccessiblein classCRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
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
-
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
-
checkCreateNew
protected void checkCreateNew(MenuEntryDataParams params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
getImplementation
protected MenuEntryServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<MenuEntryDTO,MenuEntry,MenuEntryData,MenuEntryDataParams>
-
-