shocks.framework.meta.repository
Class MDBean

java.lang.Object
  extended byshocks.framework.meta.repository.MDBean
All Implemented Interfaces:
java.lang.Cloneable, DataSource

public class MDBean
extends java.lang.Object
implements java.lang.Cloneable, DataSource

Encapsulates XML metadata for the workflow engine. Because the structure of the workflow.xml file is defined in XML Schema, we are able to assume a great deal of knowledge about the content and structure of the XML file. That allows us to construct "metadata beans" or MDBeans to bind the values of the XML document into memory for fast retrieval. We can also provide custom solutions for the different types of elements in our workflow descriptor to increase performance and ease of use. One of the requirements of the data contained in MDBeans is that it be provide sufficient information for looking up other MDBeans that it references. This means if an <action> points at another <action>, it needs to specify the name and the type.


Constructor Summary
MDBean()
           
 
Method Summary
 java.lang.Object clone()
          Returns a clone of the object identical in all regards save its location in memory.
 java.lang.Object getAttribute(java.lang.String key)
          This returns the value of the attribute specified.
 java.lang.String getResult(java.lang.String resultName)
          This returns the result string of an action.
 void setAttribute(java.lang.String key, java.lang.Object value)
          This binds the value of an attribute into memory.
 void setResult(java.lang.String resultName, java.lang.String resultValue)
          MDBeans which represent actions must provide a simple way to access information about that action's results.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDBean

public MDBean()
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
This returns the value of the attribute specified.

Specified by:
getAttribute in interface DataSource
Parameters:
key -
Returns:
Object

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
This binds the value of an attribute into memory.

Specified by:
setAttribute in interface DataSource
Parameters:
key -
value -

clone

public java.lang.Object clone()
Returns a clone of the object identical in all regards save its location in memory.


setResult

public void setResult(java.lang.String resultName,
                      java.lang.String resultValue)
MDBeans which represent actions must provide a simple way to access information about that action's results. That information is stored here. MDBeans representing other components needn't use this method.


getResult

public java.lang.String getResult(java.lang.String resultName)
This returns the result string of an action. Accepts the result name as an attribute and will return the contents of the "next" parameter from the workflow.xml file.