uk.ac.soton.itinnovation.grid.comms.account
Interface TradeAccountResource
- All Superinterfaces:
- AccountResource, PolicyManagement, ResourceMetadata, Signallable, WSTrust
- All Known Subinterfaces:
- TradeAccountConversation, TradeAccountServiceSOAP
- All Known Implementing Classes:
- TradeAccountConversationImpl, TradeAccountServiceImpl
public interface TradeAccountResource
- extends AccountResource, WSTrust
| Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.wstrust.WSTrust |
DEFAULT_WSTRUST_ISSUER, requestSecurityToken, VALIDATE_SUBJECT_DESCRIPTION, WSTRUST_REQUEST_TYPE_ISSUANCE, WSTRUST_REQUEST_TYPE_VALIDATION, WSTRUST_SAML_1_1, WSTRUST_STATUS, WSTRUST_STATUS_INVALID, WSTRUST_STATUS_VALID, XMLNS_WSTRUST, XMLNS_WSU |
|
Method Summary |
void |
bill(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
Charge something to the account. |
void |
checkCreditAvailable(BigDecimal amount,
String currency)
Test whether we can withdraw this amount now. |
void |
checkWhetherCreditAvailable(BigDecimal amount)
Deprecated. see checkCreditAvailable(java.math.BigDecimal, java.lang.String) |
void |
makePayment(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
Make a payment on an account |
void |
setCreditLimit(BigDecimal creditLimit)
Set the account's credit limit |
TRADE_ACCOUNT_RESOURCE_TYPE
static final String TRADE_ACCOUNT_RESOURCE_TYPE
- See Also:
- Constant Field Values
bill
@WebMethod
void bill(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
throws RemoteException
- Charge something to the account. This is normally called by a service which wants to
charge a user for using it. Since a service will have permission to bill to an account
even though the client of the service doesn't, services should call
AccountResource.checkUser(uk.ac.soton.itinnovation.grid.types.SubjectDescription)
first.
If the new liability is greater than the credit limit a warning is
logged but the transaction is still recorded. Call checkWhetherCreditAvailable(java.math.BigDecimal)
before starting an activity to ensure that credit is available.
- Parameters:
onBehalfOf - - the user we are billing on behalf of (may be same as caller)amount - - the amount to billcurrency - - the currency code for the amount (must match the account's currency)resource - - the resource which was paid for (optional)message - - the message to show on the statement
- Throws:
RemoteException - for other errors
makePayment
@WebMethod
void makePayment(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
throws RemoteException
- Make a payment on an account
- Parameters:
onBehalfOf - the user who made the payment (usually the budget holder)amount - the amount paid in (must be greater than or equal to zero)resource - a resource which the payment is for (optional)message - a message to show on the statement for this payment
- Throws:
RemoteException
setCreditLimit
@WebMethod
void setCreditLimit(BigDecimal creditLimit)
throws RemoteException
- Set the account's credit limit
- Parameters:
creditLimit - the new limit
- Throws:
RemoteException
checkWhetherCreditAvailable
@WebMethod
@Deprecated
void checkWhetherCreditAvailable(BigDecimal amount)
throws InsufficientCreditException,
RemoteException
- Deprecated. see
checkCreditAvailable(java.math.BigDecimal, java.lang.String)
- Test whether we can withdraw this amount now.
- Parameters:
amount - amount to test
- Throws:
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors
checkCreditAvailable
@WebMethod
void checkCreditAvailable(BigDecimal amount,
String currency)
throws InsufficientCreditException,
RemoteException
- Test whether we can withdraw this amount now.
- Parameters:
amount - amount to testcurrency - units for amount
- Throws:
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors
Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.