Class AbstractContractOperationAction

  extended by com.codemonster.surinam.controller.AbstractOperationAction
      extended by com.codemonster.surinam.controller.AbstractContractOperationAction
All Implemented Interfaces:
Direct Known Subclasses:
RetireContractAction, UnbindContractAction

public abstract class AbstractContractOperationAction
extends AbstractOperationAction

This is an abstract Action object which handles the details related to operations performed on Contracts. This generally means things other than registration activities.

See Also:

Constructor Summary
Method Summary
abstract  void apply(ServiceBlock serviceBlock)
          This is where the subclass will implement its action code.
 String getContractName()
 void setContractName(String contractName)
Methods inherited from class com.codemonster.surinam.controller.AbstractOperationAction
getName, getRequiredServices, injectServices
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public AbstractContractOperationAction()
Method Detail


public abstract void apply(ServiceBlock serviceBlock)
This is where the subclass will implement its action code.

This is the only callback that subclasses will need to provide implementations for; you take the ServiceBlock and do what you will.

This is the primary execution point for all ServiceBlock actions. Not all operations will throw all of these exceptions but we wanted a unified interface for these actions to allow the code to handle a broad ranged of actions and still be able to respond in a fine-grained manner.

Note that if you aren't interested in fine-grained exceptions, all Surinam exceptions extend SurinamException, so you could just trap that along with the Java exceptions separately. Or catching Exception should do the trick.

Specified by:
apply in interface Action
Specified by:
apply in class AbstractOperationAction
serviceBlock - The ServiceBlock that the actions will be given access to.


public String getContractName()


public void setContractName(String contractName)

Copyright © 2010. All Rights Reserved.