Package org.cyclos.impl.users
Class OperatorGroupServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
- org.cyclos.impl.users.OperatorGroupServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>,OperatorGroupServiceLocal,CRUDService<OperatorGroupDTO,OperatorGroupData,UserLocatorVO>,CRUDWithConfirmationPasswordService<OperatorGroupDTO,OperatorGroupData,UserLocatorVO>,Service,OperatorGroupService
@Service public class OperatorGroupServiceImpl extends CRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO> implements OperatorGroupServiceLocal
Implementation forOperatorGroupService
-
-
Field Summary
-
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 OperatorGroupServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleananyRequiresAuthorization(OperatorGroup group)Returns whether the given operator group has at least 1 payment type that requires authorization to be performedbooleananyRequiresAuthorization(User user)Returns whether the given user has at least 1 operator group that have at least 1 payment type that requires authorization to be performedbooleancanAuthorizeAnyPayment(OperatorGroup group)Returns whether the group has any payment type set to as can authorizeLongchangeGroup(ChangeOperatorGroupDTO dto)Changes the group of an operator, returning the identifier of the group change logOperatorGroupLogcreateInitialGroupHistoryLog(Operator operator)Creates the initial group history log for the given operatorChangeOperatorGroupDatagetChangeGroupData(UserLocatorVO locator)Gets the data needed to change the group of an operator.protected OperatorGroupDatagetData(OperatorGroup group)Returns details data for the given entityprotected Object[]getExcludedPropertiesToDTO(OperatorGroup entity)May be overridden in order to exclude properties when converting the given entity to DTOprotected Object[]getExcludedPropertiesToEntity(OperatorGroupDTO dto)May be overridden in order to exclude properties when converting the given DTO to entityOperatorGroupListDatagetListData(UserLocatorVO locator)Returns the operator groups of the given user, plus additional informationList<OperatorGroup>list(User user)Returns all operator groups for this userList<AccountType>listAccountTypesWithAuthorization(OperatorGroup group)Lists the account types which are source of any payment type that either require authorization or can authorizeList<PaymentTransferType>listPaymentTypesWithAuthorize(OperatorGroup group)Lists the payment types that the given group can authorizeOperatorGroupnewEntity(UserLocatorVO locator)Should be implemented in order to instantiate a new entity based on the given context parametersprotected ObjectonBeforeSave(OperatorGroup group, OperatorGroup 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(OperatorGroupDTO dto)OperatorGroupDTOtoDTO(OperatorGroup group)Converts the given entity in a DTO, handling theCRUDServiceImpl.subClassMappings()mappings for subclassesOperatorGrouptoEntity(OperatorGroupDTO dto)Converts the given DTO in an entity, handling theCRUDServiceImpl.subClassMappings()mappings for subclasses-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, 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, subClassMappings, 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, validate
-
-
-
-
Method Detail
-
anyRequiresAuthorization
public boolean anyRequiresAuthorization(OperatorGroup group)
Description copied from interface:OperatorGroupServiceLocalReturns whether the given operator group has at least 1 payment type that requires authorization to be performed- Specified by:
anyRequiresAuthorizationin interfaceOperatorGroupServiceLocal
-
anyRequiresAuthorization
public boolean anyRequiresAuthorization(User user)
Description copied from interface:OperatorGroupServiceLocalReturns whether the given user has at least 1 operator group that have at least 1 payment type that requires authorization to be performed- Specified by:
anyRequiresAuthorizationin interfaceOperatorGroupServiceLocal
-
canAuthorizeAnyPayment
public boolean canAuthorizeAnyPayment(OperatorGroup group)
Description copied from interface:OperatorGroupServiceLocalReturns whether the group has any payment type set to as can authorize- Specified by:
canAuthorizeAnyPaymentin interfaceOperatorGroupServiceLocal
-
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
-
createInitialGroupHistoryLog
public OperatorGroupLog createInitialGroupHistoryLog(Operator operator) throws FrameworkException
Description copied from interface:OperatorGroupServiceLocalCreates the initial group history log for the given operator- Specified by:
createInitialGroupHistoryLogin interfaceOperatorGroupServiceLocal- Throws:
FrameworkException
-
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
-
list
public List<OperatorGroup> list(User user)
Description copied from interface:OperatorGroupServiceLocalReturns all operator groups for this user- Specified by:
listin interfaceOperatorGroupServiceLocal
-
listAccountTypesWithAuthorization
public List<AccountType> listAccountTypesWithAuthorization(OperatorGroup group)
Description copied from interface:OperatorGroupServiceLocalLists the account types which are source of any payment type that either require authorization or can authorize- Specified by:
listAccountTypesWithAuthorizationin interfaceOperatorGroupServiceLocal
-
listPaymentTypesWithAuthorize
public List<PaymentTransferType> listPaymentTypesWithAuthorize(OperatorGroup group)
Description copied from interface:OperatorGroupServiceLocalLists the payment types that the given group can authorize- Specified by:
listPaymentTypesWithAuthorizein interfaceOperatorGroupServiceLocal
-
newEntity
public OperatorGroup newEntity(UserLocatorVO locator)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>- Specified by:
newEntityin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
toDTO
public OperatorGroupDTO toDTO(OperatorGroup group)
Description copied from class:CRUDServiceImplConverts the given entity in a DTO, handling theCRUDServiceImpl.subClassMappings()mappings for subclasses- Specified by:
toDTOin interfaceCRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>- Overrides:
toDTOin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
toEntity
public OperatorGroup toEntity(OperatorGroupDTO dto)
Description copied from class:CRUDServiceImplConverts the given DTO in an entity, handling theCRUDServiceImpl.subClassMappings()mappings for subclasses- Specified by:
toEntityin interfaceCRUDServiceLocal<OperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>- Overrides:
toEntityin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
getData
protected OperatorGroupData getData(OperatorGroup group)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
getExcludedPropertiesToDTO
protected Object[] getExcludedPropertiesToDTO(OperatorGroup entity)
Description copied from class:CRUDServiceImplMay be overridden in order to exclude properties when converting the given entity to DTO- Overrides:
getExcludedPropertiesToDTOin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
getExcludedPropertiesToEntity
protected Object[] getExcludedPropertiesToEntity(OperatorGroupDTO dto)
Description copied from class:CRUDServiceImplMay be overridden in order to exclude properties when converting the given DTO to entity- Overrides:
getExcludedPropertiesToEntityin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
onBeforeSave
protected Object onBeforeSave(OperatorGroup group, OperatorGroup 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<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
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(OperatorGroupDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<OperatorGroup,QOperatorGroup,OperatorGroupDTO,OperatorGroupData,UserLocatorVO>
-
-