org.beanfabrics.model
Class OperationPM

java.lang.Object
  extended by org.beanfabrics.AbstractBean
      extended by org.beanfabrics.ValidatableBean
          extended by org.beanfabrics.model.AbstractPM
              extended by org.beanfabrics.model.AbstractOperationPM
                  extended by org.beanfabrics.model.OperationPM
All Implemented Interfaces:
Bean, ContextOwner, HasComparable, IOperationPM, PresentationModel, Supportable, Validatable

public class OperationPM
extends AbstractOperationPM

The Operation is a presentation model that maintains a list of ExecutionMethods that will be executed whenever the execute() method is invoked.


Nested Class Summary
 class OperationPM.DefaultValidationRule
           
 
Nested classes/interfaces inherited from class org.beanfabrics.model.AbstractPM
AbstractPM.PropertiesValidationRule
 
Field Summary
protected static java.lang.String KEY_MESSAGE_NO_EXECUTION_METHODS
           
 
Fields inherited from class org.beanfabrics.model.AbstractPM
KEY_MESSAGE_ONE_OR_MORE_INVALID
 
Constructor Summary
OperationPM()
           
 
Method Summary
 void addExecutionMethod(ExecutionMethod exe)
           
 boolean containsExecutionMethod(ExecutionMethod exe)
           
 boolean execute()
          Executes this operation.
 java.util.Collection<ExecutionMethod> getExecutionMethods()
           
 boolean hasExecutionMethods()
           
 void removeExecutionMethod(ExecutionMethod exe)
           
 void setExecutionMethods(java.util.Collection<ExecutionMethod> newExecutionMethods)
           
 
Methods inherited from class org.beanfabrics.model.AbstractOperationPM
check, getDescription, getIcon, getTitle, isEnabled, setDescription, setIcon, setIconUrl, setTitle
 
Methods inherited from class org.beanfabrics.model.AbstractPM
getComparable, getContext, getSupportMap, revalidateProperties
 
Methods inherited from class org.beanfabrics.ValidatableBean
getValidationState, getValidator, isValid, revalidate, setValidationState
 
Methods inherited from class org.beanfabrics.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, equals, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.beanfabrics.model.IOperationPM
getValidator
 
Methods inherited from interface org.beanfabrics.Bean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface org.beanfabrics.validation.Validatable
getValidationState, isValid, revalidate
 
Methods inherited from interface org.beanfabrics.support.Supportable
getSupportMap
 
Methods inherited from interface org.beanfabrics.context.ContextOwner
getContext
 
Methods inherited from interface org.beanfabrics.HasComparable
getComparable
 

Field Detail

KEY_MESSAGE_NO_EXECUTION_METHODS

protected static final java.lang.String KEY_MESSAGE_NO_EXECUTION_METHODS
See Also:
Constant Field Values
Constructor Detail

OperationPM

public OperationPM()
Method Detail

execute

public boolean execute()
                throws java.lang.Throwable
Executes this operation.

Specified by:
execute in interface IOperationPM
Specified by:
execute in class AbstractOperationPM
Returns:
true if this operation has been executed successfully
Throws:
java.lang.Throwable

getExecutionMethods

public java.util.Collection<ExecutionMethod> getExecutionMethods()

setExecutionMethods

public void setExecutionMethods(java.util.Collection<ExecutionMethod> newExecutionMethods)

addExecutionMethod

public void addExecutionMethod(ExecutionMethod exe)

removeExecutionMethod

public void removeExecutionMethod(ExecutionMethod exe)

containsExecutionMethod

public boolean containsExecutionMethod(ExecutionMethod exe)

hasExecutionMethods

public boolean hasExecutionMethods()