com.sri.emo.wizard.completion.model
Class CompletionBean

java.lang.Object
  extended by com.sri.emo.wizard.completion.model.CompletionBean
All Implemented Interfaces:
Serializable

public class CompletionBean
extends Object
implements Serializable

Bean for handling action form.

Version:
1.0
Author:
Michael Rimov
See Also:
Serialized Form
To Do:
Change Constructor to use NodeId for constructor to allow automatic initialization.

Constructor Summary
CompletionBean()
          Default constructor.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 Set getCompletionParts()
          Retrieve all completion parts.
 Node getCurrentNode()
          Retrieve the currently set node.
 CompletionPartsBean getPartsBeanFromPart(Part key)
          Retrieve a specific parts bean given the specified part.
 String getSummary()
          Get the wizard directive.
 Integer getTargetId()
          Retrieve the target node id.
 Class getWizardClass()
          Retrieve the wizard class.
 Set getWizardCompletionParts()
          Retrieve the set of all completion parts that have the field completion value set to 'wizard'.
 Integer getWizardId()
           
 String getWizardTitle()
          Get the wizard title.
 int hashCode()
          Returns a hash code value for the object.
 void initializeFromNodeId(ErrorCollection errorMessages)
          Initialize from the node id.
 boolean isDynamicTarget()
           
 boolean isInitialized()
          Checks to make sure the bean is initialize.d
 void setDynamicTarget(boolean dynamicTarget)
           
 void setSummary(String wizardDirective)
          Sets the wizard directive.
 void setTargetId(int nodeId)
          Sets the target id (as integer)
 void setTargetId(String newTargetId)
          Sets the target id.
 void setWizardClass(Class wizardClass)
          Sets the wizard class to use.
 void setWizardClass(String wizardClass)
          Sets the wizard class to use
 void setWizardId(Integer wizardId)
          Sets the wizard id.
 void setWizardTitle(String wizardTitle)
          Sets the wizard title.
 String toString()
          Returns a string representation of the object.
 ErrorCollection validate(ErrorCollection returnValue)
          Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompletionBean

public CompletionBean()
Default constructor.

Method Detail

isDynamicTarget

public boolean isDynamicTarget()

setDynamicTarget

public void setDynamicTarget(boolean dynamicTarget)
To Do:
should this just be set whenever setTargetId() is called??

setTargetId

public void setTargetId(int nodeId)
Sets the target id (as integer)

Parameters:
nodeId - int

setTargetId

public void setTargetId(String newTargetId)
Sets the target id.

Parameters:
newTargetId - String

getTargetId

public Integer getTargetId()
Retrieve the target node id.

Returns:
Integer

getCompletionParts

public Set getCompletionParts()
Retrieve all completion parts.

Returns:
Set a set of all completion parts.

getPartsBeanFromPart

public CompletionPartsBean getPartsBeanFromPart(Part key)
Retrieve a specific parts bean given the specified part.

Parameters:
key - Part
Returns:
CompletionPartsBean

getWizardCompletionParts

public Set getWizardCompletionParts()
Retrieve the set of all completion parts that have the field completion value set to 'wizard'.

Returns:
Set of CompletionPartsBeans

getCurrentNode

public Node getCurrentNode()
Retrieve the currently set node.

Returns:
Node

getWizardTitle

public String getWizardTitle()
Get the wizard title.

Returns:
String

getSummary

public String getSummary()
Get the wizard directive.

Returns:
String

getWizardClass

public Class getWizardClass()
Retrieve the wizard class.

Returns:
Class

getWizardId

public Integer getWizardId()

validate

public ErrorCollection validate(ErrorCollection returnValue)

Validate the properties that have been set for this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.

Parameters:
returnValue - the constructed ErrorCollection to populate into.
Returns:
ActionErrors

isInitialized

public boolean isInitialized()
Checks to make sure the bean is initialize.d

Returns:
boolean

initializeFromNodeId

public void initializeFromNodeId(ErrorCollection errorMessages)
Initialize from the node id. Populate ErrorCollection if there is problems initializing.

Parameters:
errorMessages - ErrorCollection may be null, in which case the method throws IllegalArgumentExceptions if validation/construction fails.

setWizardTitle

public void setWizardTitle(String wizardTitle)
Sets the wizard title.

Parameters:
wizardTitle - String

setSummary

public void setSummary(String wizardDirective)
Sets the wizard directive.

Parameters:
wizardDirective - String

setWizardClass

public void setWizardClass(Class wizardClass)
Sets the wizard class to use.

Parameters:
wizardClass - Class

setWizardId

public void setWizardId(Integer wizardId)
Sets the wizard id.

Parameters:
wizardId - Integer.

setWizardClass

public void setWizardClass(String wizardClass)
                    throws ClassNotFoundException
Sets the wizard class to use

Parameters:
wizardClass - String
Throws:
ClassNotFoundException - if unable to load the specified class with the Thread's current context class loader.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.