Package org.cyclos.impl.banking
Class ChargebackServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.banking.ChargebackServiceImpl
-
- All Implemented Interfaces:
ChargebackServiceLocal,ChargebackService,Service
@Service public class ChargebackServiceImpl extends BaseServiceImpl implements ChargebackServiceLocal
Implementation forChargebackService
-
-
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 ChargebackServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanChargeback(Transfer transfer)Returns whether the given transfer can be charged back.Longchargeback(TransferActionDTO params)Performs the chargeback for the given transfer, returning the chargeback id.ChargebackDatagetData(Long id)Returns details about a chargebackprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the network-
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
-
canChargeback
public boolean canChargeback(Transfer transfer)
Description copied from interface:ChargebackServiceLocalReturns whether the given transfer can be charged back. In order to be charged back, a transfer needs to be processed and not be charged back already. Also, theTransferType.getMaxChargebackTime()needs to be honored.- Specified by:
canChargebackin interfaceChargebackServiceLocal
-
chargeback
public Long chargeback(TransferActionDTO params) throws FrameworkException, TransferException
Description copied from interface:ChargebackServicePerforms the chargeback for the given transfer, returning the chargeback id. The chargeback transfer is from / to the same original transfer, but the amount is negative- Specified by:
chargebackin interfaceChargebackService- Throws:
IllegalActionException- When the given transfer has already been charged backInsufficientBalanceException- When the source account, or source account for any generated fee is limited and had insufficient balance for such a paymentMaxAmountPerDayExceededException- When the maximum amount for payments of this transfer type has been exceeded, according to the transfer type configurationUpperCreditLimitReachedException- When the destination account, or destination account for any generated fee is limited and would have more balance than the allowed maximumFrameworkExceptionTransferException
-
getData
public ChargebackData getData(Long id) throws FrameworkException
Description copied from interface:ChargebackServiceReturns details about a chargeback- Specified by:
getDatain interfaceChargebackService- 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
-
-