Package org.cyclos.impl.banking
Class TransferFeeServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
- org.cyclos.impl.banking.TransferFeeServiceImpl
-
- All Implemented Interfaces:
TransferFeeServiceLocal,CRUDServiceLocal<TransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>,TransferFeeService,CRUDService<TransferFeeDTO,TransferFeeData,TransferTypeVO>,CRUDWithConfirmationPasswordService<TransferFeeDTO,TransferFeeData,TransferTypeVO>,Service
@Service public class TransferFeeServiceImpl extends CRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO> implements TransferFeeServiceLocal
Service implementation for transaction fees
-
-
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
-
Fields inherited from interface org.cyclos.impl.banking.TransferFeeServiceLocal
ATTR_FEE, ATTR_PREVIEW_PARAMETERS, ATTR_TRANSFER
-
-
Constructor Summary
Constructors Constructor Description TransferFeeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransferFeeTransferbuildTransfer(PerformTransactionDTO performTransaction, TransferFee fee, Transfer parent)Builds the transfer which would pay the given fee when the given original transfer is performedprotected TransferFeeDatagetData(TransferFee fee)Returns details data for the given entityList<TransferFeeVO>list(TransferTypeVO transferTypeVO)Returns a list of all transfer fees for the given transfer typeList<TransferFee>listAll(TransferType transferType)Returns all fees for the given transfer typeList<TransferTypeWithCurrencyVO>listPossibleGeneratedTransferTypes(TransferFeeDTO fee)Returns the possible generated transfer types for the given transfer feeTransferFeenewEntity(TransferTypeVO transferTypeVO)Should be implemented in order to instantiate a new entity based on the given context parametersprotected ObjectonBeforeSave(TransferFee entity, TransferFee currentCopy)May be overridden in order to perform custom logic before saving an entity.protected voidpreProcessCurrentCopy(TransferFeeDTO dto, TransferFee currentCopy)This method is invoked before saving the entity and also, if the log is enabled, before removing.TransferFeesPreviewVOpreview(PerformTransactionDTO performTransaction, PaymentTransferType paymentType, InternalAccountOwner fromOwner, InternalAccountOwner toOwner, BigDecimal originalAmount)Preview the fees which would be generated by the given paymentprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkprotected ValidatorresolveValidator(TransferFeeDTO 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, onAfterRemove, onAfterSave, onBeforeRemove, 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, 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, toDTO, toEntity, validate
-
-
-
-
Method Detail
-
buildTransfer
public TransferFeeTransfer buildTransfer(PerformTransactionDTO performTransaction, TransferFee fee, Transfer parent)
Description copied from interface:TransferFeeServiceLocalBuilds the transfer which would pay the given fee when the given original transfer is performed- Specified by:
buildTransferin interfaceTransferFeeServiceLocal
-
list
public List<TransferFeeVO> list(TransferTypeVO transferTypeVO)
Description copied from interface:TransferFeeServiceReturns a list of all transfer fees for the given transfer type- Specified by:
listin interfaceTransferFeeService
-
listAll
public List<TransferFee> listAll(TransferType transferType)
Description copied from interface:TransferFeeServiceLocalReturns all fees for the given transfer type- Specified by:
listAllin interfaceTransferFeeServiceLocal
-
listPossibleGeneratedTransferTypes
public List<TransferTypeWithCurrencyVO> listPossibleGeneratedTransferTypes(TransferFeeDTO fee) throws FrameworkException
Description copied from interface:TransferFeeServiceReturns the possible generated transfer types for the given transfer fee- Specified by:
listPossibleGeneratedTransferTypesin interfaceTransferFeeService- Throws:
FrameworkException
-
newEntity
public TransferFee 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<TransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>- Specified by:
newEntityin classCRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
preview
public TransferFeesPreviewVO preview(PerformTransactionDTO performTransaction, PaymentTransferType paymentType, InternalAccountOwner fromOwner, InternalAccountOwner toOwner, BigDecimal originalAmount)
Description copied from interface:TransferFeeServiceLocalPreview the fees which would be generated by the given payment- Specified by:
previewin interfaceTransferFeeServiceLocal
-
getData
protected TransferFeeData getData(TransferFee fee)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
onBeforeSave
protected Object onBeforeSave(TransferFee entity, TransferFee 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<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
preProcessCurrentCopy
protected void preProcessCurrentCopy(TransferFeeDTO dto, TransferFee 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.- Overrides:
preProcessCurrentCopyin classCRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
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(TransferFeeDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<TransferFee,QTransferFee,TransferFeeDTO,TransferFeeData,TransferTypeVO>
-
-