uk.ac.soton.ecs.iam.grid.client.staterepos
Class TradeAccountConversationImpl

java.lang.Object
  extended by uk.ac.soton.ecs.iam.grid.client.staterepos.AccountConversationImpl
      extended by uk.ac.soton.ecs.iam.grid.client.staterepos.TradeAccountConversationImpl
All Implemented Interfaces:
Comparable<StorableInStateRepository>, AccountConversation, Conversation, StorableInStateRepository, TradeAccountConversation, AccountResource, TradeAccountResource, WSTrust, PolicyManagement, ResourceMetadata, Signallable

Deprecated.

@Deprecated
public class TradeAccountConversationImpl
extends AccountConversationImpl
implements TradeAccountConversation

The default implementation of AccountConversation.


Field Summary
 
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
TradeAccountConversationImpl(StateRepository repository, org.apache.axis.message.addressing.EndpointReferenceType EPR)
          Deprecated.  
 
Method Summary
 void addAccessControlRule(MatchRule rule)
          Deprecated.  
 void addPolicyRule(PolicyRule rule)
          Deprecated. Add an access control rule to this resource's dynamic access control policy.
 void bill(IDType onBehalfOf, BigDecimal amount, String currency, String resourceID, String message)
          Deprecated. Charge something to the account.
 void checkCreditAvailable(BigDecimal amount, String curr)
          Deprecated. Test whether we can withdraw this amount now.
 void checkWhetherCreditAvailable(BigDecimal amount)
          Deprecated. Test whether we can withdraw this amount now.
 int compareTo(StorableInStateRepository other)
          Deprecated.  
 void ensureIsUser(SubjectDescription subject)
          Deprecated.  
 void finish()
          Deprecated. Indicate that this conversation is no longer required.
 MatchRule[] getAccessControlRules()
          Deprecated.  
 String[] getAvailableSignals()
          Deprecated. List the signals which are available given the resource's current state.
 StorableInStateRepository[] getChildConversations()
          Deprecated. Returns an array of all conversations having this one as a parent.
 String getDescription()
          Deprecated. Returns a textual description of the object.
 org.apache.axis.message.addressing.EndpointReferenceType getEndpointRef()
          Deprecated. Return an EndpointReferenceType for this conversation.
 org.apache.axis.message.addressing.EndpointReferenceType getEPR()
          Deprecated. Get the EPR for this resource.
 Class getInterface()
          Deprecated. Returns the type of this object.
 URL getParentURL()
          Deprecated. Returns the URL of this object's parent.
 PolicyRule[] getPolicyRules()
          Deprecated. Get the access control rules in this resource's dynamic access control policy.
 StateRepository getRepository()
          Deprecated. Get the StateRepository holding this object.
 RemoteService getService()
          Deprecated. Return the conversation's RemoteService.
 URL getURL()
          Deprecated. Returns the globally unique identifier.
 String[] getValidRoles()
          Deprecated. List the roles the caller is permitted to see.
 boolean isFinished()
          Deprecated. Returns true if the finish method has been called.
 void makePayment(IDType onBehalfOf, BigDecimal amount, String currency, String resourceID, String message)
          Deprecated. Make a payment on an account
 void outOfDate()
          Deprecated. Used by the StateRepository if the server returns new resource with our ID.
 void removeAccessControlRule(MatchRule rule)
          Deprecated.  
 void removePolicyRule(PolicyRule rule)
          Deprecated. Remove an access control rule from this resource's dynamic access control policy.
 Document RequestSecurityToken(Element e)
          Deprecated. Request a security token, as defined by the WS-Trust specification.
 void setCreditLimit(BigDecimal newLimit)
          Deprecated. Set the account's credit limit
 void setDescription(String description)
          Deprecated. Change the textual description, as returned by getDescription.
 void setLabel(String label)
          Deprecated. Change the resource's label.
 String signal(String signalName)
          Deprecated. Signal an event to the resource's PBAC process.
 
Methods inherited from class uk.ac.soton.ecs.iam.grid.client.staterepos.AccountConversationImpl
addBudgetHolderRule, addUserRule, checkUser, closeAccount, getAccountStatement, getAccountStatus, getBudgetHolderRules, getUserRules, removeBudgetHolderRule, 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
addBudgetHolderRule, addUserRule, checkUser, closeAccount, getAccountStatement, getAccountStatus, getBudgetHolderRules, getUserRules, removeBudgetHolderRule, removeUserRule
 
Methods inherited from interface uk.ac.soton.itinnovation.grid.comms.account.AccountResource
addBudgetHolderRule, addUserRule, checkUser, closeAccount, getAccountStatement, getAccountStatus, getBudgetHolderRules, getUserRules, removeBudgetHolderRule, removeUserRule
 

Constructor Detail

TradeAccountConversationImpl

public TradeAccountConversationImpl(StateRepository repository,
                                    org.apache.axis.message.addressing.EndpointReferenceType EPR)
                             throws ObjectAlreadyExists
Deprecated. 
Throws:
ObjectAlreadyExists
Method Detail

getInterface

public Class getInterface()
Deprecated. 
Description copied from interface: StorableInStateRepository
Returns the type of this object. When loading the object, a StateRepository locates a class implementing the interface and uses that for the object.

Specified by:
getInterface in interface StorableInStateRepository
Overrides:
getInterface in class AccountConversationImpl

outOfDate

public void outOfDate()
Deprecated. 
Description copied from interface: Conversation
Used by the StateRepository if the server returns new resource with our ID.

Specified by:
outOfDate in interface Conversation

getChildConversations

public StorableInStateRepository[] getChildConversations()
Deprecated. 
Description copied from interface: Conversation
Returns an array of all conversations having this one as a parent.

Specified by:
getChildConversations in interface Conversation

finish

public void finish()
Deprecated. 
Description copied from interface: Conversation
Indicate that this conversation is no longer required. It will be removed from the StateRepository. No other methods on a Conversation can be called once finish() has been invoked.

Note that this does not close the conversation with the remote supplier. You should normally call a different method, such as WSResourceLifetime.destroy().

Specified by:
finish in interface Conversation

isFinished

public boolean isFinished()
Deprecated. 
Description copied from interface: Conversation
Returns true if the finish method has been called.

Specified by:
isFinished in interface Conversation

getURL

public URL getURL()
Deprecated. 
Description copied from interface: StorableInStateRepository
Returns the globally unique identifier. No two distinct objects may have the same URL, even if they have different types.

Specified by:
getURL in interface StorableInStateRepository

getEndpointRef

public org.apache.axis.message.addressing.EndpointReferenceType getEndpointRef()
Deprecated. 
Description copied from interface: StorableInStateRepository
Return an EndpointReferenceType for this conversation. This contains both the endpoint address of the service, and the resource itself.

Specified by:
getEndpointRef in interface StorableInStateRepository

getParentURL

public URL getParentURL()
Deprecated. 
Description copied from interface: StorableInStateRepository
Returns the URL of this object's parent. Returns null if this is a top-level (service) object.

Specified by:
getParentURL in interface StorableInStateRepository

getDescription

public String getDescription()
Deprecated. 
Description copied from interface: StorableInStateRepository
Returns a textual description of the object. This can be presented to the user when choosing from a list, for example.

Specified by:
getDescription in interface StorableInStateRepository

setDescription

public void setDescription(String description)
Deprecated. 
Description copied from interface: StorableInStateRepository
Change the textual description, as returned by getDescription.

Specified by:
setDescription in interface StorableInStateRepository

getRepository

public StateRepository getRepository()
Deprecated. 
Description copied from interface: StorableInStateRepository
Get the StateRepository holding this object.

Specified by:
getRepository in interface StorableInStateRepository

getEPR

public org.apache.axis.message.addressing.EndpointReferenceType getEPR()
Deprecated. 
Description copied from interface: ResourceMetadata
Get the EPR for this resource. The EPR gives the canonical endpoint for the service, and various meta-data items.

Specified by:
getEPR in interface ResourceMetadata
See Also:
the label set with {@link setLabel}, a unique type URI, the state of the resource, the resource which manages this one (e.g. an SLA manages a job), the resource which contains this one (e.g. a job service is the parent of a job)

getService

public RemoteService getService()
Deprecated. 
Description copied from interface: Conversation
Return the conversation's RemoteService.

Specified by:
getService in interface Conversation

compareTo

public int compareTo(StorableInStateRepository other)
Deprecated. 
Specified by:
compareTo in interface Comparable<StorableInStateRepository>

addPolicyRule

public void addPolicyRule(PolicyRule rule)
                   throws RemoteException
Deprecated. 
Description copied from interface: PolicyManagement
Add an access control rule to this resource's dynamic access control policy.

Specified by:
addPolicyRule in interface PolicyManagement
Throws:
RemoteException
See Also:
PDP.addAccessControlRule(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule)

removePolicyRule

public void removePolicyRule(PolicyRule rule)
                      throws RemoteException
Deprecated. 
Description copied from interface: PolicyManagement
Remove an access control rule from this resource's dynamic access control policy.

Specified by:
removePolicyRule in interface PolicyManagement
Throws:
RemoteException
See Also:
PDP.removeAccessControlRule(java.lang.String, uk.ac.soton.itinnovation.grid.types.MatchRule)

getPolicyRules

public PolicyRule[] getPolicyRules()
                            throws RemoteException
Deprecated. 
Description copied from interface: PolicyManagement
Get the access control rules in this resource's dynamic access control policy. Rules are only returned for the roles the caller is permitted to see. Note: The rules are filtered to only include those for roles listed by PolicyManagement.getValidRoles().

Specified by:
getPolicyRules in interface PolicyManagement
Throws:
RemoteException
See Also:
PDP.getAccessControlRules(java.lang.String, java.lang.String)

setLabel

public void setLabel(String label)
              throws RemoteException
Deprecated. 
Description copied from interface: ResourceMetadata
Change the resource's label. Each resource is given a label by the client when it is created. This label is returned in the metadata from getResources, making it easier for other users to identify the resource.

Specified by:
setLabel in interface ResourceMetadata
Parameters:
label - the new label
Throws:
RemoteException

addAccessControlRule

public void addAccessControlRule(MatchRule rule)
                          throws RemoteException
Deprecated. 
Throws:
RemoteException

removeAccessControlRule

public void removeAccessControlRule(MatchRule rule)
                             throws RemoteException
Deprecated. 
Throws:
RemoteException

getAccessControlRules

public MatchRule[] getAccessControlRules()
                                  throws RemoteException
Deprecated. 
Throws:
RemoteException

getValidRoles

public String[] getValidRoles()
                       throws RemoteException
Deprecated. 
Description copied from interface: PolicyManagement
List the roles the caller is permitted to see. This is the list of roles whose rules are returned by PolicyManagement.getPolicyRules().

Specified by:
getValidRoles in interface PolicyManagement
Throws:
RemoteException
See Also:
PDP.getValidProcessRoles(java.lang.String)

RequestSecurityToken

public Document RequestSecurityToken(Element e)
                              throws RemoteException
Deprecated. 
Description copied from interface: WSTrust
Request a security token, as defined by the WS-Trust specification.

Specified by:
RequestSecurityToken in interface WSTrust
Parameters:
e - a <RequestSecurityToken>
Returns:
a <RequestSecurityTokenResponse>
Throws:
RemoteException

setCreditLimit

public void setCreditLimit(BigDecimal newLimit)
                    throws RemoteException
Deprecated. 
Description copied from interface: TradeAccountResource
Set the account's credit limit

Specified by:
setCreditLimit in interface TradeAccountResource
Parameters:
newLimit - the new limit
Throws:
RemoteException

bill

public void bill(IDType onBehalfOf,
                 BigDecimal amount,
                 String currency,
                 String resourceID,
                 String message)
          throws RemoteException
Deprecated. 
Description copied from interface: TradeAccountResource
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 TradeAccountResource.checkWhetherCreditAvailable(java.math.BigDecimal) before starting an activity to ensure that credit is available.

Specified by:
bill in interface TradeAccountResource
Parameters:
onBehalfOf - - the user we are billing on behalf of (may be same as caller)
amount - - the amount to bill
currency - - the currency code for the amount (must match the account's currency)
resourceID - - the resource which was paid for (optional)
message - - the message to show on the statement
Throws:
RemoteException - for other errors

makePayment

public void makePayment(IDType onBehalfOf,
                        BigDecimal amount,
                        String currency,
                        String resourceID,
                        String message)
                 throws RemoteException
Deprecated. 
Description copied from interface: TradeAccountResource
Make a payment on an account

Specified by:
makePayment in interface TradeAccountResource
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)
resourceID - a resource which the payment is for (optional)
message - a message to show on the statement for this payment
Throws:
RemoteException

checkWhetherCreditAvailable

public void checkWhetherCreditAvailable(BigDecimal amount)
                                 throws RemoteException
Deprecated. 
Description copied from interface: TradeAccountResource
Test whether we can withdraw this amount now.

Specified by:
checkWhetherCreditAvailable in interface TradeAccountResource
Parameters:
amount - amount to test
Throws:
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors

checkCreditAvailable

public void checkCreditAvailable(BigDecimal amount,
                                 String curr)
                          throws RemoteException
Deprecated. 
Description copied from interface: TradeAccountResource
Test whether we can withdraw this amount now.

Specified by:
checkCreditAvailable in interface TradeAccountResource
Parameters:
amount - amount to test
curr - units for amount
Throws:
InsufficientCreditException - if there are insufficient funds
RemoteException - for other errors

signal

public String signal(String signalName)
              throws RemoteException
Deprecated. 
Description copied from interface: Signallable
Signal an event to the resource's PBAC process. The process state may be updated in response to this, according to the service policy.

Specified by:
signal in interface Signallable
Parameters:
signalName - the event causing the transition
Returns:
the new state of the resource
Throws:
RemoteException

getAvailableSignals

public String[] getAvailableSignals()
                             throws RemoteException
Deprecated. 
Description copied from interface: Signallable
List the signals which are available given the resource's current state.

Specified by:
getAvailableSignals in interface Signallable
Returns:
the list of possible signals
Throws:
RemoteException
See Also:
Signallable.signal(java.lang.String)

ensureIsUser

public void ensureIsUser(SubjectDescription subject)
                  throws RemoteException,
                         GridFailureException,
                         TokenInvalidException
Deprecated. 
Specified by:
ensureIsUser in interface TradeAccountConversation
Throws:
RemoteException
GridFailureException
TokenInvalidException


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