|
||||||||||
| 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, management, NO_ACCOUNT_NEEDED, pdp, thisServiceAddress |
| 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 |
| Methods inherited from class uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl |
|---|
addUserRule, checkUser, getAccount, getAccount, getBudgetHolderRules, getEPR, getResourceType, getUserRules, removeUserRule |
| Methods inherited from class uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite |
|---|
addHibernatedObject, addPolicyRule, addTrustedAccountService, deleteHibernatedObject, generateEPR, getAvailableSignals, getConversationFromContext, getCurrentUser, getEPR, getEPR, getManagingConversation, getPolicyRules, getPrivateKey, getResourceFromEPR, GetResourceProperty, getResources, getResources, getResourcesFromEPRs, getServiceFromEPR, getServiceProviderCertificate, getServiceProviderID, getServiceProviderIssuer, getTrustedAccountServices, getValidRoles, removePolicyRule, removeTrustedAccountService, RequestSecurityToken_Issuance, RequestSecurityToken, setLabel, setLabel, signal, validateOwner |
| 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 GridFailureException
GridFailureException| Method Detail |
|---|
public void reloadConfiguration()
Exception - if the configuration is not yet valid
public void ensurePoliciesDeployed()
throws GridFailureException
WebAdmin
ensurePoliciesDeployed in interface WebAdminGridFailureException
public org.apache.axis.message.addressing.EndpointReferenceType openAccount(String budgetHolderName,
String budgetHolderTelephone,
String budgetHolderEmail,
AddressType clientOrganisationAddress,
String clientOrganisationCreditDetails,
String label,
MatchRule owner)
throws GridFailureException
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
GridFailureException - If the account was legitimately not createdpublic Account[] getAccountsByStatus(String status)
getAccountsByStatus in class AccountServiceImpl
public AccountStatement getAccountStatement(Date startDate,
Date endDate)
throws GridFailureException
AccountResource
getAccountStatement in interface AccountResourcestartDate - - the start of the period the statement should coverendDate - - the start of the period the statement should cover
GridFailureException
public AccountStatement generateStatement(Account account,
Date startDate,
Date endDate)
throws GridFailureException
GridFailureException
public String getAccountStatus()
throws GridFailureException
AccountResource
getAccountStatus in interface AccountResourcegetAccountStatus in class AccountServiceImplGridFailureException
@Deprecated
public void addBudgetHolderRule(MatchRule rule)
throws GridFailureException
AccountResource
addBudgetHolderRule in interface AccountResourceaddBudgetHolderRule in class AccountServiceImplrule - - the rule to add (role must be "budget-holder")
GridFailureException
@Deprecated
public void removeBudgetHolderRule(MatchRule rule)
throws GridFailureException
AccountResource
removeBudgetHolderRule in interface AccountResourceremoveBudgetHolderRule in class AccountServiceImplrule - - the rule to remove (role must be "budget-holder")
GridFailureException
@Deprecated
public void enableAccess(MatchRule delegate)
throws GridFailureException
GridFailureException
@Deprecated
public void disableAccess(MatchRule delegate)
throws GridFailureException
GridFailureException
public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
throws GridFailureException
GridService
getResources in interface GridServiceGridFailureException
public void closeAccount()
throws GridFailureException
AccountResource
closeAccount in interface AccountResourcecloseAccount in class AccountServiceImplGridFailureException
public void bill(IDType onBehalfOf,
BigDecimal amount,
String currency,
String resource,
String message)
throws GridFailureException
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
GridFailureException
public void makePayment(IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
throws GridFailureException
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
GridFailureException
public void makePaymentInternal(String conversationID,
IDType user,
IDType paidBy,
BigDecimal amount,
String currency,
String resource,
String message)
throws GridFailureException
GridFailureException
@Deprecated
public MatchRule[] getUserAccessRules()
throws GridFailureException
GridFailureException
public void setCreditLimit(BigDecimal creditLimit)
throws GridFailureException
TradeAccountResource
setCreditLimit in interface TradeAccountResourcecreditLimit - the new limit
GridFailureException
@Deprecated
public void checkWhetherCreditAvailable(BigDecimal amount)
throws InsufficientCreditException,
GridFailureException
TradeAccountResource
checkWhetherCreditAvailable in interface TradeAccountResourceamount - amount to test
InsufficientCreditException - if there are insufficient funds
GridFailureException
public void checkCreditAvailable(BigDecimal amount,
String currency)
throws InsufficientCreditException,
GridFailureException
TradeAccountResource
checkCreditAvailable in interface TradeAccountResourceamount - amount to testcurrency - units for amount
InsufficientCreditException - if there are insufficient funds
GridFailureException
public Document getAtomFeed(String atomFeed,
String serviceBase)
throws GridFailureException
getAtomFeed in interface WebAdminatomFeed - the URL of the feedserviceBase - the service administration URL (for creating hyperlinks)
GridFailureExceptionAtomUtils
public Document RequestSecurityToken_Validation(Element request)
throws GridFailureException
GridServiceLiteGridServiceLite.RequestSecurityToken(org.w3c.dom.Element) for validation requests.
RequestSecurityToken_Validation in class GridServiceLiteGridFailureException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||