uk.org.ogsadai.activity
Class ActivityClassDocumentValidator
java.lang.Object
|
+--uk.org.ogsadai.common.DocumentValidator
|
+--uk.org.ogsadai.activity.ActivityClassDocumentValidator
- public class ActivityClassDocumentValidator
- extends DocumentValidator
This DocumentValidator
scans through the activity
elements contained in an activity configuration document and
validates the specified implementation classes.
The following must be satisfied in order for an implementation
class to be deemed valid:
- the class is on the classpath and can be accessed
- the class inherits from the base
Activity
class
- if the activity makes use of an individual activity configuration file,
then the implementation class must also implement the
ActivityConfigurationCreator
interface.
If an activity implementation class is deemed to be invalid, a
DocumentValidationException
is raised.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
Method Summary |
protected void |
performValidation(org.w3c.dom.Document document)
Validates the specified document and throws a
DocumentValidationException with a desctiptive
error message if the document is invalid. |
private void |
validateImplementation(java.lang.String implementation,
boolean usesConfigFile)
Validates the implementation class, making sure is accessible
and that it inherits from Activity . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
- Copyright statement
- See Also:
- Constant Field Values
ActivityClassDocumentValidator
public ActivityClassDocumentValidator()
performValidation
protected void performValidation(org.w3c.dom.Document document)
throws DocumentValidationException
- Description copied from class:
DocumentValidator
- Validates the specified document and throws a
DocumentValidationException
with a desctiptive
error message if the document is invalid.
- Specified by:
performValidation
in class DocumentValidator
- Parameters:
document
- Document to validate.
- Throws:
DocumentValidationException
- if the document is
invalid.
validateImplementation
private void validateImplementation(java.lang.String implementation,
boolean usesConfigFile)
throws DocumentValidationException
- Validates the implementation class, making sure is accessible
and that it inherits from
Activity
.
- Parameters:
implementation
- The implementation class name.usesConfigFile
- Indicates whether or not the activity uses an individual
configuration file.
- Throws:
DocumentValidationException
- if the class cannot be
loaded or does not inherit from Activity
and
implement the neccessary interface.