Package org.cyclos.impl.banking
Class EasyInvoiceServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.banking.EasyInvoiceServiceImpl
-
- All Implemented Interfaces:
EasyInvoiceServiceLocal,EasyInvoiceService,Service
@Service public class EasyInvoiceServiceImpl extends BaseServiceImpl implements EasyInvoiceServiceLocal
implementation forPaymentService
-
-
Field Summary
-
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 EasyInvoiceServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SerializableInputStreambarcode(EasyInvoiceBarcodeParams params)Generates a QR-Code image for the givenPerformPaymentDTOEasyInvoiceDatagetEasyInvoiceData(PerformPaymentDTO params)Returns data for an easy invoice after logging in.LocateAccountOwnerResultlocateReceiver(InternalAccountOwner subject)Locates the user that will receive the paymentPaymentVOperform(PerformPaymentDTO parameters)Same asPaymentService.perform(PerformPaymentDTO)but through theBuiltInChannel.EASY_INVOICEchannelPrepareEasyInvoiceDataprepareEasyInvoice(PrepareEasyInvoiceParams params)Returns data for displaying details of an easy invoice while still as guest.PaymentPreviewVOpreview(PerformPaymentDTO parameters)Previews a payment to be performedprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidvalidate(PerformPaymentDTO dto)Validates the parameters to perform a payment without actually performing the payment.-
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
-
-
-
-
Method Detail
-
barcode
public SerializableInputStream barcode(EasyInvoiceBarcodeParams params) throws FrameworkException
Description copied from interface:EasyInvoiceServiceGenerates a QR-Code image for the givenPerformPaymentDTO- Specified by:
barcodein interfaceEasyInvoiceService- Throws:
FrameworkException
-
getEasyInvoiceData
public EasyInvoiceData getEasyInvoiceData(PerformPaymentDTO params) throws FrameworkException
Description copied from interface:EasyInvoiceServiceReturns data for an easy invoice after logging in. Minimally, a owner user is required. The amount either is not specified or a currency must be resolved, in the same way asEasyInvoiceService.prepareEasyInvoice(PrepareEasyInvoiceParams)The resulting data will contain the resolved read-only custom field values. The resultingPerformPaymentTypeDatawill contain the custom fields for the missing values.- Specified by:
getEasyInvoiceDatain interfaceEasyInvoiceService- Throws:
FrameworkException
-
locateReceiver
public LocateAccountOwnerResult locateReceiver(InternalAccountOwner subject)
Description copied from interface:EasyInvoiceServiceLocalLocates the user that will receive the payment- Specified by:
locateReceiverin interfaceEasyInvoiceServiceLocal
-
perform
public PaymentVO perform(PerformPaymentDTO parameters) throws TransferException, ValidationException, PasswordException
Description copied from interface:EasyInvoiceServiceSame asPaymentService.perform(PerformPaymentDTO)but through theBuiltInChannel.EASY_INVOICEchannel- Specified by:
performin interfaceEasyInvoiceService- Throws:
TransferExceptionValidationExceptionPasswordException
-
prepareEasyInvoice
public PrepareEasyInvoiceData prepareEasyInvoice(PrepareEasyInvoiceParams params) throws FrameworkException
Description copied from interface:EasyInvoiceServiceReturns data for displaying details of an easy invoice while still as guest. Minimally, the owner user is required. If an amount is specified, it is required that a single currency is resolved. This can be either because:- A payment type was specified
- A currency was specified
- The destination user has a single currency
EntityNotFoundExceptionwill be thrown.- Specified by:
prepareEasyInvoicein interfaceEasyInvoiceService- Throws:
FrameworkException
-
preview
public PaymentPreviewVO preview(PerformPaymentDTO parameters) throws ValidationException
Description copied from interface:EasyInvoiceServicePreviews a payment to be performed- Specified by:
previewin interfaceEasyInvoiceService- Throws:
ValidationException
-
validate
public void validate(PerformPaymentDTO dto) throws FrameworkException
Description copied from interface:EasyInvoiceServiceValidates the parameters to perform a payment without actually performing the payment. Attention: will only validate for required / invalid fields, but will not check for balance, maximum amount per day or other validations that require access to actual accounts.- Specified by:
validatein interfaceEasyInvoiceService- Throws:
FrameworkException
-
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
-
-