shocks.framework.meta.repository
Class MetadataValidator

java.lang.Object
  extended byshocks.framework.meta.repository.MetadataValidator

public final class MetadataValidator
extends java.lang.Object


Constructor Summary
MetadataValidator(javax.servlet.ServletContext ctx)
           
 
Method Summary
 java.lang.String checkManaged(java.lang.String managed)
          This compares the version strings and returns the highest value.
 java.lang.String checkNullString(java.lang.String value)
          This method ensures that null references in the Descriptor are replaced with "null" Strings instead.
 java.util.Stack checkStack(java.util.Stack incoming)
          Ensures there are no duplicate entries in the workflow descriptor and that each MDBean entered is sound of form.
 java.lang.String checkVersion(java.lang.String elementVersion)
          This compares the version strings and returns the highest value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetadataValidator

public MetadataValidator(javax.servlet.ServletContext ctx)
Method Detail

checkStack

public java.util.Stack checkStack(java.util.Stack incoming)
Ensures there are no duplicate entries in the workflow descriptor and that each MDBean entered is sound of form.

Parameters:
incoming -
Returns:
Stack

checkVersion

public java.lang.String checkVersion(java.lang.String elementVersion)
This compares the version strings and returns the highest value. We recommend that people use version numbers (i.e. "1.0", "1.1.1", etc).

Parameters:
elementVersion -
Returns:
String

checkNullString

public java.lang.String checkNullString(java.lang.String value)
This method ensures that null references in the Descriptor are replaced with "null" Strings instead. null references and empty Strings in the metadata should be replaced with the "null" String. Further validation of the metadata is performed by the validateMDBean() method.

Parameters:
value -
Returns:
String

checkManaged

public java.lang.String checkManaged(java.lang.String managed)
This compares the version strings and returns the highest value. We recommend that people use version numbers (i.e. "1.0", "1.1.1", etc).

Parameters:
managed -
Returns:
String representing the correct version input