Package org.cyclos.security.users
Class GroupServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<DTO,E,D,DP>
-
- org.cyclos.security.ConfigurationEntityCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
- org.cyclos.security.users.GroupServiceSecurity
-
- All Implemented Interfaces:
CRUDService<BasicGroupDTO,BasicGroupData,BasicGroupNature>,CRUDWithConfirmationPasswordService<BasicGroupDTO,BasicGroupData,BasicGroupNature>,Service,GroupService
@Security public class GroupServiceSecurity extends ConfigurationEntityCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature> implements GroupService
Security forGroupService
-
-
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 GroupServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanPerformOperation(BasicGroup entity, CRUDOperation operation)Returns whether the logged user can perform the given operation over the given entityvoidchangeConfiguration(BasicGroupVO basicGroupVO, ConfigurationVO configurationVO)Changes the configuration for the specified BasicGroup by assigning a new Configuration.protected voidcheckCreateNew(BasicGroupNature params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notprotected voidcustomizeData(BasicGroupData data)Can be overridden in order to process the returned data object for the given entityprotected booleandoHasManageAccess(BasicGroup entity)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(BasicGroup entity)Should be implemented in order to return whether the caller is allowed to view the given entity.ActiveConfigurationForGroupsDatagetActiveConfiguration(BasicGroupVO basicGroupVO)Returns theActiveConfigurationForGroupsData, containing all the actual configuration for the given group or group setprotected GroupServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the serviceGroupSearchDatagetSearchData()Returns the data for searching groupsPage<BasicGroupVO>search(BasicGroupQuery query)Searches for groups, returning results hierarchically-
Methods inherited from class org.cyclos.security.ConfigurationEntityCRUDServiceSecurity
isAccessible
-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, 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, 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
-
-
-
-
Method Detail
-
canPerformOperation
public boolean canPerformOperation(BasicGroup entity, CRUDOperation operation)
Description copied from class:CRUDServiceSecurityReturns whether the logged user can perform the given operation over the given entity- Overrides:
canPerformOperationin classCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
changeConfiguration
public void changeConfiguration(BasicGroupVO basicGroupVO, ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:GroupServiceChanges the configuration for the specified BasicGroup by assigning a new Configuration. As a result, the configuration formerly assigned is not assigned anymore to the group.- Specified by:
changeConfigurationin interfaceGroupService- Throws:
IllegalActionException- If the given configuration is not enabled for logged usersFrameworkException
-
doHasViewAccess
public boolean doHasViewAccess(BasicGroup entity)
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<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
getActiveConfiguration
public ActiveConfigurationForGroupsData getActiveConfiguration(BasicGroupVO basicGroupVO) throws EntityNotFoundException
Description copied from interface:GroupServiceReturns theActiveConfigurationForGroupsData, containing all the actual configuration for the given group or group set- Specified by:
getActiveConfigurationin interfaceGroupService- Throws:
EntityNotFoundException
-
getSearchData
public GroupSearchData getSearchData()
Description copied from interface:GroupServiceReturns the data for searching groups- Specified by:
getSearchDatain interfaceGroupService
-
search
public Page<BasicGroupVO> search(BasicGroupQuery query)
Description copied from interface:GroupServiceSearches for groups, returning results hierarchically- Specified by:
searchin interfaceGroupService
-
checkCreateNew
protected void checkCreateNew(BasicGroupNature params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
customizeData
protected void customizeData(BasicGroupData data)
Description copied from class:CRUDServiceSecurityCan be overridden in order to process the returned data object for the given entity- Overrides:
customizeDatain classCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
doHasManageAccess
protected boolean doHasManageAccess(BasicGroup entity)
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<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
getImplementation
protected GroupServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<BasicGroupDTO,BasicGroup,BasicGroupData,BasicGroupNature>
-
-