Package org.cyclos.security.users
Class OperatorGroupServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
- org.cyclos.security.users.OperatorGroupServiceSecurity
-
- All Implemented Interfaces:
CRUDService<OperatorGroupDTO,OperatorGroupData,UserLocatorVO>,CRUDWithConfirmationPasswordService<OperatorGroupDTO,OperatorGroupData,UserLocatorVO>,Service,OperatorGroupService
@Security public class OperatorGroupServiceSecurity extends CRUDServiceSecurity<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO> implements OperatorGroupService
Security layer forOperatorGroupService
-
-
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 OperatorGroupServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanManageGroups(User user)LongchangeGroup(ChangeOperatorGroupDTO dto)Changes the group of an operator, returning the identifier of the group change logprotected voidcheckCreateNew(UserLocatorVO userLocatorVO)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notprotected booleandoHasManageAccess(OperatorGroup group)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(OperatorGroup group)Should be implemented in order to return whether the caller is allowed to view the given entity.ChangeOperatorGroupDatagetChangeGroupData(UserLocatorVO locator)Gets the data needed to change the group of an operator.protected CRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>getImplementation()Should be implemented in order to return the actual implementation of the serviceOperatorGroupListDatagetListData(UserLocatorVO locator)Returns the operator groups of the given user, plus additional informationbooleanisAccessible(SessionData sessionData, OperatorGroup entity)Must be implemented in order to determine whether the given entity is accessible for the given session data.-
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, 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
-
canManageGroups
public boolean canManageGroups(User user)
-
changeGroup
public Long changeGroup(ChangeOperatorGroupDTO dto) throws FrameworkException
Description copied from interface:OperatorGroupServiceChanges the group of an operator, returning the identifier of the group change log- Specified by:
changeGroupin interfaceOperatorGroupService- Throws:
FrameworkException
-
doHasViewAccess
public boolean doHasViewAccess(OperatorGroup group)
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<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
getChangeGroupData
public ChangeOperatorGroupData getChangeGroupData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:OperatorGroupServiceGets the data needed to change the group of an operator.- Specified by:
getChangeGroupDatain interfaceOperatorGroupService- Throws:
FrameworkException
-
getListData
public OperatorGroupListData getListData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:OperatorGroupServiceReturns the operator groups of the given user, plus additional information- Specified by:
getListDatain interfaceOperatorGroupService- Throws:
FrameworkException
-
isAccessible
public boolean isAccessible(SessionData sessionData, OperatorGroup 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<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
checkCreateNew
protected void checkCreateNew(UserLocatorVO userLocatorVO)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
doHasManageAccess
protected boolean doHasManageAccess(OperatorGroup group)
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<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
getImplementation
protected CRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO> getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<OperatorGroupDTO,OperatorGroup,OperatorGroupData,UserLocatorVO>
-
-