com.ibm.websphere.ant.tasks
Class ModuleValidator

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--com.ibm.websphere.ant.tasks.ModuleValidator
All Implemented Interfaces:
com.ibm.etools.validation.IReporter, com.ibm.etools.validation.SeverityEnum

public class ModuleValidator
extends org.apache.tools.ant.Task
implements com.ibm.etools.validation.IReporter

The wsValidateModule task performs validation of the deployment descriptor, extensions, and bindings documents of an EAR, WAR, EJB Jar, or Application Client Jar. Given the source jar file, it will execute the WebSphere validation logic against the jar and emit messages indicating errors, warnings, or information about the configuration and structure of your application. It looks at the standard J2EE deployment descriptors and the IBM WebSphere-specific bindings and extensions documents, if present. The structure of the wsValidateModule task is shown below:

		<wsValidateModule src="path to the ear/war/ejb-jar/client to validate"/>
 
The src attribute is required and specifies the path, full or relative, to the ear/war/ejb-jar/client jar module you wish to validate
To use the task, include the following taskdef in your build.xml file and run ant with the ws_ant script.
    <taskdef name="wsValidateModule" classname="com.ibm.websphere.ant.tasks.ModuleValidator"/>

Version:
1.0
See Also:
Copyright IBM Corp. 2002 Source File: ModuleValidator.java Creation Date: August 12, 2002

Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Fields inherited from interface com.ibm.etools.validation.SeverityEnum
ALL_MESSAGES, ERROR_AND_WARNING, HIGH_SEVERITY, LOW_SEVERITY, NORMAL_SEVERITY
 
Constructor Summary
ModuleValidator()
           
 
Method Summary
 void addMessage(com.ibm.etools.validation.IValidator origin, com.ibm.etools.validation.IMessage message)
           
 void displaySubtask(com.ibm.etools.validation.IValidator validator, com.ibm.etools.validation.IMessage message)
           
 void execute()
           
 com.ibm.etools.validation.IMessageAccess getMessageAccess()
           
 boolean isCancelled()
           
 void removeAllMessages(com.ibm.etools.validation.IValidator origin)
           
 void removeAllMessages(com.ibm.etools.validation.IValidator origin, java.lang.Object object)
           
 void removeMessageSubset(com.ibm.etools.validation.IValidator validator, java.lang.Object obj, java.lang.String groupName)
           
 void setSrc(java.lang.String src)
          Sets the src module path.
protected  void validate(com.ibm.etools.commonarchive.ModuleFile archive, com.ibm.etools.validation.IReporter reporter)
           
protected  void validateApplicationClientFile(com.ibm.etools.commonarchive.ApplicationClientFile clientFile, com.ibm.etools.validation.IReporter reporter)
           
protected  void validateEARFile(com.ibm.etools.commonarchive.EARFile earFile, com.ibm.etools.validation.IReporter reporter)
           
protected  void validateEJBJarFile(com.ibm.etools.commonarchive.EJBJarFile ejbJarFile, com.ibm.etools.validation.IReporter reporter)
           
protected  void validateWARFile(com.ibm.etools.commonarchive.WARFile warFile, com.ibm.etools.validation.IReporter reporter)
           
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleValidator

public ModuleValidator()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
See Also:
Task.execute()

setSrc

public void setSrc(java.lang.String src)
Sets the src module path.
Parameters:
src - The path to the module to validate

validate

protected void validate(com.ibm.etools.commonarchive.ModuleFile archive,
                        com.ibm.etools.validation.IReporter reporter)
                 throws com.ibm.etools.validation.ValidationException,
                        java.lang.Exception

validateEARFile

protected void validateEARFile(com.ibm.etools.commonarchive.EARFile earFile,
                               com.ibm.etools.validation.IReporter reporter)
                        throws java.lang.Exception

validateWARFile

protected void validateWARFile(com.ibm.etools.commonarchive.WARFile warFile,
                               com.ibm.etools.validation.IReporter reporter)
                        throws java.lang.Exception

validateEJBJarFile

protected void validateEJBJarFile(com.ibm.etools.commonarchive.EJBJarFile ejbJarFile,
                                  com.ibm.etools.validation.IReporter reporter)
                           throws java.lang.Exception

validateApplicationClientFile

protected void validateApplicationClientFile(com.ibm.etools.commonarchive.ApplicationClientFile clientFile,
                                             com.ibm.etools.validation.IReporter reporter)
                                      throws java.lang.Exception

addMessage

public void addMessage(com.ibm.etools.validation.IValidator origin,
                       com.ibm.etools.validation.IMessage message)
                throws com.ibm.etools.validation.MessageLimitException
Specified by:
addMessage in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.addMessage(IValidator, IMessage)

displaySubtask

public void displaySubtask(com.ibm.etools.validation.IValidator validator,
                           com.ibm.etools.validation.IMessage message)
Specified by:
displaySubtask in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.displaySubtask(IValidator, IMessage)

getMessageAccess

public com.ibm.etools.validation.IMessageAccess getMessageAccess()
Specified by:
getMessageAccess in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.getMessageAccess()

isCancelled

public boolean isCancelled()
Specified by:
isCancelled in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.isCancelled()

removeAllMessages

public void removeAllMessages(com.ibm.etools.validation.IValidator origin,
                              java.lang.Object object)
Specified by:
removeAllMessages in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.removeAllMessages(IValidator, Object)

removeAllMessages

public void removeAllMessages(com.ibm.etools.validation.IValidator origin)
Specified by:
removeAllMessages in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.removeAllMessages(IValidator)

removeMessageSubset

public void removeMessageSubset(com.ibm.etools.validation.IValidator validator,
                                java.lang.Object obj,
                                java.lang.String groupName)
Specified by:
removeMessageSubset in interface com.ibm.etools.validation.IReporter
See Also:
IReporter.removeMessageSubset(IValidator, Object, String)