uk.ac.soton.itinnovation.grid.service.account
Class PrivateAccountServiceImpl

java.lang.Object
  extended by uk.ac.soton.itinnovation.grid.service.utils.gridservit.GridServiceLite
      extended by uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl
          extended by uk.ac.soton.itinnovation.grid.service.account.PrivateAccountServiceImpl
All Implemented Interfaces:
AccountResource, AccountService, PrivateAccountResource, PrivateAccountService, PrivateAccountServiceSOAP, WebAdmin, WSRFService, SimpleRegistry, FederationSelector, GridService, PolicyManagement, ResourceMetadata, Signallable

public class PrivateAccountServiceImpl
extends AccountServiceImpl
implements PrivateAccountServiceSOAP


Field Summary
static String PRIVATE_ACCOUNT_SERVICE_RESOURCE_TYPE
           
 
Fields inherited from class uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl
log
 
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.PrivateAccountResource
PRIVATE_ACCOUNT_RESOURCE_TYPE
 
Fields inherited from interface uk.ac.soton.itinnovation.grid.types.FederationSelector
DEFAULT_FEDERATION_SELECTOR
 
Constructor Summary
PrivateAccountServiceImpl()
           
 
Method Summary
 void addPeerAccount(org.apache.axis.message.addressing.EndpointReferenceType peer)
          Add 'peer' to the list of peers of this account.
 void ensurePoliciesDeployed()
          Ensure that any required PBAC policies are deployed.
 Account[] getAccountsByStatus(String status)
           
 AccountStatement getAccountStatement(Date startDate, Date endDate)
          Get a statement for an account
 Document getAtomFeed(String atomFeed, String serviceBase)
          Return notices from the account service as an Atom feed.
 org.apache.axis.message.addressing.EndpointReferenceType getBillingEPR(org.apache.axis.message.addressing.EndpointReferenceType[] targetTrustedAccounts, org.apache.axis.message.addressing.EndpointReferenceType targetService)
          Gets an EPR for a resource to which usage of another service can be billed.
 org.apache.axis.message.addressing.EndpointReferenceType[] getPeerAccounts()
          List the current peer accounts.
 org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String resourceType)
          List the currently registered resources.
 org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
          List the resources managed by this service for which the caller has some role.
 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 registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Add 'resource' to the list of resources registered to this account.
 void reloadConfiguration()
           
 void removePeerAccount(org.apache.axis.message.addressing.EndpointReferenceType peer)
          Remove a peer previously added with addPeerAccount.
 void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
          Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).
 
Methods inherited from class uk.ac.soton.itinnovation.grid.service.account.AccountServiceImpl
addBudgetHolderRule, addUserRule, checkUser, closeAccount, getAccount, getAccount, getAccountStatus, getBudgetHolderRules, getEPR, getResourceType, getUserRules, removeBudgetHolderRule, 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_Validation, 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
addBudgetHolderRule, addUserRule, checkUser, closeAccount, getAccountStatus, getBudgetHolderRules, getUserRules, removeBudgetHolderRule, 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.wsrf.WSRFService
GetResourceProperty
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.types.GridService
getServiceProviderID, getServiceProviderIssuer
 

Field Detail

PRIVATE_ACCOUNT_SERVICE_RESOURCE_TYPE

public static final String PRIVATE_ACCOUNT_SERVICE_RESOURCE_TYPE
See Also:
Constant Field Values
Constructor Detail

PrivateAccountServiceImpl

public PrivateAccountServiceImpl()
                          throws GridFailureException
Throws:
GridFailureException
Method Detail

reloadConfiguration

public void reloadConfiguration()

ensurePoliciesDeployed

public void ensurePoliciesDeployed()
                            throws GridFailureException
Description copied from interface: WebAdmin
Ensure that any required PBAC policies are deployed.

Specified by:
ensurePoliciesDeployed in interface WebAdmin
Throws:
GridFailureException

openAccount

public org.apache.axis.message.addressing.EndpointReferenceType openAccount(String budgetHolderName,
                                                                            String budgetHolderTelephone,
                                                                            String budgetHolderEmail,
                                                                            AddressType clientOrganisationAddress,
                                                                            String clientOrganisationCreditDetails,
                                                                            String label,
                                                                            MatchRule owner)
                                                                     throws GridFailureException
Description copied from interface: PrivateAccountService
Attempt to open a new account. The arguments are the account and billing details to be used.

Specified by:
openAccount in interface AccountService
Specified by:
openAccount in interface PrivateAccountService
label - A human-readable label for the account (for other clients)
owner - A rule to allow access for the owner role
Returns:
The endpoint for the new account resource.
Throws:
GridFailureException

getAccountStatement

public AccountStatement getAccountStatement(Date startDate,
                                            Date endDate)
                                     throws GridFailureException
Description copied from interface: AccountResource
Get a statement for an account

Specified by:
getAccountStatement in interface AccountResource
Parameters:
startDate - - the start of the period the statement should cover
endDate - - the start of the period the statement should cover
Returns:
A generated statement for the account
Throws:
GridFailureException

getBillingEPR

public org.apache.axis.message.addressing.EndpointReferenceType getBillingEPR(org.apache.axis.message.addressing.EndpointReferenceType[] targetTrustedAccounts,
                                                                              org.apache.axis.message.addressing.EndpointReferenceType targetService)
                                                                       throws GridFailureException
Description copied from interface: FederationSelector
Gets an EPR for a resource to which usage of another service can be billed.

Specified by:
getBillingEPR in interface FederationSelector
Parameters:
targetTrustedAccounts - - the trusted resources of the service
targetService - - the target service (which will pass the tokens on to its account service)
Returns:
an EPR for the chosen resource, including any security tokens needed to access it, or null if no EPR is required
Throws:
GridFailureException

getResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getResources()
                                                                        throws GridFailureException
Description copied from interface: GridService
List the resources managed by this service for which the caller has some role.

Specified by:
getResources in interface GridService
Throws:
GridFailureException

getAccountsByStatus

public Account[] getAccountsByStatus(String status)
Specified by:
getAccountsByStatus in class AccountServiceImpl

getAtomFeed

public Document getAtomFeed(String atomFeed,
                            String serviceBase)
                     throws GridFailureException
Return notices from the account service as an Atom feed. The feed includes details such as bad configuration and notices of pending accounts.

Specified by:
getAtomFeed in interface WebAdmin
Parameters:
atomFeed - the URL of the feed
serviceBase - the service administration URL (for creating hyperlinks)
Throws:
GridFailureException
See Also:
AtomUtils

addPeerAccount

public void addPeerAccount(org.apache.axis.message.addressing.EndpointReferenceType peer)
                    throws GridFailureException
Description copied from interface: PrivateAccountResource
Add 'peer' to the list of peers of this account. After calling this, anyone with the user role on this account will be able to get a billing token valid at the peer. This account service must have the budget-holder role on the peer.

Specified by:
addPeerAccount in interface PrivateAccountResource
Parameters:
peer - a trade account
Throws:
GridFailureException

removePeerAccount

public void removePeerAccount(org.apache.axis.message.addressing.EndpointReferenceType peer)
                       throws GridFailureException
Description copied from interface: PrivateAccountResource
Remove a peer previously added with addPeerAccount.

Specified by:
removePeerAccount in interface PrivateAccountResource
Throws:
GridFailureException

unregisterResource

public void unregisterResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
                        throws GridFailureException
Description copied from interface: SimpleRegistry
Remove a resource previously added with SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).

Specified by:
unregisterResource in interface SimpleRegistry
Throws:
GridFailureException

getPeerAccounts

public org.apache.axis.message.addressing.EndpointReferenceType[] getPeerAccounts()
                                                                           throws GridFailureException
Description copied from interface: PrivateAccountResource
List the current peer accounts.

Specified by:
getPeerAccounts in interface PrivateAccountResource
Throws:
GridFailureException

registerResource

public void registerResource(org.apache.axis.message.addressing.EndpointReferenceType resource)
                      throws RemoteException
Description copied from interface: SimpleRegistry
Add 'resource' to the list of resources registered to this account.

Specified by:
registerResource in interface SimpleRegistry
Parameters:
resource - the resource to be added
Throws:
RemoteException

getRegisteredResources

public org.apache.axis.message.addressing.EndpointReferenceType[] getRegisteredResources(String resourceType)
                                                                                  throws RemoteException
Description copied from interface: SimpleRegistry
List the currently registered resources.

Specified by:
getRegisteredResources in interface SimpleRegistry
Parameters:
resourceType - the type of resources to return, or null to return all types. Returns resources added by SimpleRegistry.registerResource(org.apache.axis.message.addressing.EndpointReferenceType).
Throws:
RemoteException


Copyright © 2001-2007 University of Southampton IT Innovation Centre. All Rights Reserved.