|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl
uk.ac.soton.itinnovation.grid.service.account.TradeAccountServiceImpl
public class TradeAccountServiceImpl
| Field Summary | |
|---|---|
static String |
TRADE_ACCOUNT_SERVICE_RESOURCE_TYPE
|
| Fields inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite |
|---|
factory, groupUtils, management, NO_ACCOUNT_NEEDED, pbacUtils, pdp, proxyFactory, thisServiceAddress, wsdlCache |
| Fields inherited from interface uk.ac.soton.itinnovation.grid.comms.account.TradeAccountResource |
|---|
TRADE_ACCOUNT_RESOURCE_TYPE |
| 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 |
| Constructor Summary | |
|---|---|
TradeAccountServiceImpl()
|
|
| Method Summary | |
|---|---|
void |
addBudgetHolderRule(MatchRule rule)
Deprecated. |
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. |
void |
closeAccount()
Close an account |
void |
disableAccess(MatchRule delegate)
Deprecated. |
void |
enableAccess(MatchRule delegate)
Deprecated. |
void |
ensurePoliciesDeployed()
Ensure that any required PBAC policies are deployed. |
AccountStatement |
generateStatement(Account account,
Date startDate,
Date endDate)
Used by web-admin interface. |
Account[] |
getAccountsByStatus(String status)
|
AccountStatement |
getAccountStatement(Date startDate,
Date endDate)
Get a statement for an account |
String |
getAccountStatus()
Get the current status of an account |
Document |
getAtomFeed(String atomFeed,
String serviceBase)
Return notices from the account service as an Atom feed. |
org.apache.axis.message.addressing.EndpointReferenceType[] |
getResources()
List the resources managed by this service for which the caller has some role. |
MatchRule[] |
getUserAccessRules()
Deprecated. |
void |
makePayment(IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
Make a payment on an account |
void |
makePaymentInternal(String conversationID,
IDType user,
IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
|
org.apache.axis.message.addressing.EndpointReferenceType |
openAccount(String budgetHolderName,
String budgetHolderTelephone,
String budgetHolderEmail,
AddressType clientOrganisationAddress,
String clientOrganisationCreditDetails,
String label,
MatchRule owner)
Attempt to open a new account. |
void |
reloadConfiguration()
Reload the configuration. |
void |
removeBudgetHolderRule(MatchRule rule)
Deprecated. |
Document |
RequestSecurityToken_Validation(Element request)
Validate security tokens. |
void |
setCreditLimit(BigDecimal creditLimit)
Set the account's credit limit |
void |
setCreditLimit(String conversationID,
BigDecimal creditLimit)
|
| Methods inherited from class uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl |
|---|
addUserRule, checkUser, getAccount, getAccount, getBudgetHolderRules, getResourceType, getUserRules, removeUserRule |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.account.AccountResource |
|---|
addUserRule, checkUser, getBudgetHolderRules, getUserRules, removeUserRule |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.types.PolicyManagement |
|---|
addPolicyRule, getPolicyRules, getValidRoles, removePolicyRule |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.types.ResourceMetadata |
|---|
getEPR, setLabel |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.types.Signallable |
|---|
getAvailableSignals, signal |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.wstrust.WSTrust |
|---|
RequestSecurityToken |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.wsrf.WSRFService |
|---|
GetResourceProperty |
| Methods inherited from interface uk.ac.soton.itinnovation.grid.types.GridService |
|---|
getServiceProviderID, getServiceProviderIssuer |
| Field Detail |
|---|
public static final String TRADE_ACCOUNT_SERVICE_RESOURCE_TYPE
| Constructor Detail |
|---|
public TradeAccountServiceImpl()
throws RemoteException
RemoteException| Method Detail |
|---|
public void reloadConfiguration()
Exception - if the configuration is not yet valid
public void ensurePoliciesDeployed()
throws RemoteException
WebAdmin
ensurePoliciesDeployed in interface WebAdminRemoteException
public org.apache.axis.message.addressing.EndpointReferenceType openAccount(String budgetHolderName,
String budgetHolderTelephone,
String budgetHolderEmail,
AddressType clientOrganisationAddress,
String clientOrganisationCreditDetails,
String label,
MatchRule owner)
throws RemoteException
TradeAccountService
openAccount in interface AccountServiceopenAccount in interface TradeAccountServicelabel - A human-readable label for the account (for other clients)owner - A rule to allow access for the owner role
RemoteExceptionpublic Account[] getAccountsByStatus(String status)
getAccountsByStatus in class AccountServiceImpl
public AccountStatement getAccountStatement(Date startDate,
Date endDate)
throws RemoteException
AccountResource
getAccountStatement in interface AccountResourcestartDate - - the start of the period the statement should coverendDate - - the start of the period the statement should cover
RemoteException - If the account statement cannot be generated
public AccountStatement generateStatement(Account account,
Date startDate,
Date endDate)
throws RemoteException
RemoteException
public String getAccountStatus()
throws RemoteException
AccountResource
getAccountStatus in interface AccountResourcegetAccountStatus in class AccountServiceImplRemoteException - If the account status cannot be accessed
@Deprecated
public void addBudgetHolderRule(MatchRule rule)
throws RemoteException
AccountResource
addBudgetHolderRule in interface AccountResourceaddBudgetHolderRule in class AccountServiceImplrule - - the rule to add (role must be "budget-holder")
RemoteException
@Deprecated
public void removeBudgetHolderRule(MatchRule rule)
throws RemoteException
AccountResource
removeBudgetHolderRule in interface AccountResourceremoveBudgetHolderRule in class AccountServiceImplrule - - the rule to remove (role must be "budget-holder")
RemoteException
@Deprecated
public void enableAccess(MatchRule delegate)
throws RemoteException
RemoteException
@Deprecated
public void disableAccess(MatchRule delegate)
throws RemoteException
RemoteException
public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
throws RemoteException
GridService
getResources in interface GridServiceRemoteException
public void closeAccount()
throws RemoteException
AccountResource
closeAccount in interface AccountResourcecloseAccount in class AccountServiceImplRemoteException - If the account cannot be closed
public void bill(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
throws RemoteException
TradeAccountResourceAccountResource.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 TradeAccountResource.checkWhetherCreditAvailable(java.math.BigDecimal)
before starting an activity to ensure that credit is available.
bill in interface TradeAccountResourceonBehalfOf - - 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
RemoteException - for other errors
public void makePayment(IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
throws RemoteException
TradeAccountResource
makePayment in interface TradeAccountResourcepaidBy - 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
RemoteException
public void makePaymentInternal(String conversationID,
IDType user,
IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
throws RemoteException
RemoteException
@Deprecated
public MatchRule[] getUserAccessRules()
throws RemoteException
RemoteException
public void setCreditLimit(BigDecimal creditLimit)
throws RemoteException
TradeAccountResource
setCreditLimit in interface TradeAccountResourcecreditLimit - the new limit
RemoteException
public void setCreditLimit(String conversationID,
BigDecimal creditLimit)
throws RemoteException
RemoteException
@Deprecated
public void checkWhetherCreditAvailable(BigDecimal amount)
throws InsufficientCreditException,
RemoteException
TradeAccountResource
checkWhetherCreditAvailable in interface TradeAccountResourceamount - amount to test
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors
public void checkCreditAvailable(BigDecimal amount,
String currency)
throws InsufficientCreditException,
RemoteException
TradeAccountResource
checkCreditAvailable in interface TradeAccountResourceamount - amount to testcurrency - units for amount
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors
public Document getAtomFeed(String atomFeed,
String serviceBase)
throws RemoteException
getAtomFeed in interface WebAdminatomFeed - the URL of the feedserviceBase - the service administration URL (for creating hyperlinks)
RemoteExceptionAtomUtils
public Document RequestSecurityToken_Validation(Element request)
throws RemoteException
GridServiceLiteGridServiceLite.RequestSecurityToken(org.w3c.dom.Element) for validation requests.
RequestSecurityToken_Validation in class GridServiceLiteRemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||