Package org.cyclos.impl.banking
Class AuthorizationLevelServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
- org.cyclos.impl.banking.AuthorizationLevelServiceImpl
-
- All Implemented Interfaces:
AuthorizationLevelServiceLocal,CRUDServiceLocal<AuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>,AuthorizationLevelService,CRUDService<AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>,CRUDWithConfirmationPasswordService<AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>,Service
@Service public class AuthorizationLevelServiceImpl extends CRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO> implements AuthorizationLevelServiceLocal
implementation forAuthorizationLevelService
-
-
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 AuthorizationLevelServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AuthorizationLevelDatagetData(AuthorizationLevel authorizationLevel)Returns details data for the given entityList<AuthorizationLevelVO>list(TransferTypeVO transferTypeVO)List<AuthorizationLevel>listByBroker()Returns all levels which allow authorizing as brokerList<AuthorizationLevel>listByPayer()Returns all levels which allow authorizing as payerList<AuthorizationLevel>listByReceiver()Returns all levels which allow authorizing as payerList<AuthorizationLevel>listByRoles(Set<AuthorizationRole> authorizationRoles)Returns all levels which allow the given rolesAuthorizationLevelnewEntity(TransferTypeVO transferTypeVO)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterRemove(AuthorizationLevel removedAuthorizationLevel)May be overridden in order to perform custom logic after removing an entityprotected voidonAfterSave(AuthorizationLevel entity, AuthorizationLevel currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected voidonBeforeRemove(AuthorizationLevel authorizationLevel)May be overridden in order to perform custom logic before removing an entityprotected ObjectonBeforeSave(AuthorizationLevel entity, AuthorizationLevel currentCopy)May be overridden in order to perform custom logic before saving an entity.protected voidpreProcessCurrentCopy(AuthorizationLevelDTO dto, AuthorizationLevel currentCopy)This method is invoked before saving the entity and also, if the log is enabled, before removing.protected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidremoveEmptyLevels()Remove role based authorization levels with empty role listprotected ValidatorresolveValidator(AuthorizationLevelDTO dto)-
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, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toDTO, 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, 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
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
-
-
-
Method Detail
-
list
public List<AuthorizationLevelVO> list(TransferTypeVO transferTypeVO)
- Specified by:
listin interfaceAuthorizationLevelService- Parameters:
transferTypeVO- transfer type used to list the authorization levels.- Returns:
- a list with the authorization levels for the given transfer type.
-
listByBroker
public List<AuthorizationLevel> listByBroker()
Description copied from interface:AuthorizationLevelServiceLocalReturns all levels which allow authorizing as broker- Specified by:
listByBrokerin interfaceAuthorizationLevelServiceLocal
-
listByPayer
public List<AuthorizationLevel> listByPayer()
Description copied from interface:AuthorizationLevelServiceLocalReturns all levels which allow authorizing as payer- Specified by:
listByPayerin interfaceAuthorizationLevelServiceLocal
-
listByReceiver
public List<AuthorizationLevel> listByReceiver()
Description copied from interface:AuthorizationLevelServiceLocalReturns all levels which allow authorizing as payer- Specified by:
listByReceiverin interfaceAuthorizationLevelServiceLocal
-
listByRoles
public List<AuthorizationLevel> listByRoles(Set<AuthorizationRole> authorizationRoles)
Description copied from interface:AuthorizationLevelServiceLocalReturns all levels which allow the given roles- Specified by:
listByRolesin interfaceAuthorizationLevelServiceLocal
-
newEntity
public AuthorizationLevel newEntity(TransferTypeVO transferTypeVO)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<AuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>- Specified by:
newEntityin classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
removeEmptyLevels
public void removeEmptyLevels()
Description copied from interface:AuthorizationLevelServiceLocalRemove role based authorization levels with empty role list- Specified by:
removeEmptyLevelsin interfaceAuthorizationLevelServiceLocal
-
getData
protected AuthorizationLevelData getData(AuthorizationLevel authorizationLevel)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
onAfterRemove
protected void onAfterRemove(AuthorizationLevel removedAuthorizationLevel)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after removing an entity- Overrides:
onAfterRemovein classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
onAfterSave
protected void onAfterSave(AuthorizationLevel entity, AuthorizationLevel currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
onBeforeRemove
protected void onBeforeRemove(AuthorizationLevel authorizationLevel)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before removing an entity- Overrides:
onBeforeRemovein classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
onBeforeSave
protected Object onBeforeSave(AuthorizationLevel entity, AuthorizationLevel 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<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
preProcessCurrentCopy
protected void preProcessCurrentCopy(AuthorizationLevelDTO dto, AuthorizationLevel currentCopy)
Description copied from class:CRUDServiceImplThis method is invoked before saving the entity and also, if the log is enabled, before removing. Subclasses can override it to fetch lazy relationships, etc as the current copy will be detached. In case of removing (i.e the log is enabled for this entity) the dto parameter will be null.
-
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(AuthorizationLevelDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<AuthorizationLevel,QAuthorizationLevel,AuthorizationLevelDTO,AuthorizationLevelData,TransferTypeVO>
-
-