[jboss-cvs] JBossAS SVN: r66097 - projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 12 14:50:13 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-10-12 14:50:13 -0400 (Fri, 12 Oct 2007)
New Revision: 66097

Modified:
   projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
Log:
Add useSchemaValidation, useValidation properties.

Modified: projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
===================================================================
--- projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2007-10-12 18:16:19 UTC (rev 66096)
+++ projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java	2007-10-12 18:50:13 UTC (rev 66097)
@@ -36,7 +36,8 @@
  * 
  * @param <T> the expected type 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @author Scott.Stark at jboss.org
+ * @version $Revision 1.1 $
  */
 public abstract class SchemaResolverDeployer<T> extends AbstractVFSParsingDeployer<T>
 {
@@ -45,7 +46,13 @@
 
    /** The resolver */
    private static final SchemaBindingResolver resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
-   
+
+   /** Whether the Unmarshaller will use schema validation */
+   private boolean useSchemaValidation = true;
+
+   /** Whether to validate */
+   private boolean useValidation = true;
+
    /**
     * Create a new SchemaResolverDeployer.
     * 
@@ -57,6 +64,46 @@
       super(output);
    }
 
+   /**
+    * Get the useSchemaValidation.
+    * 
+    * @return the useSchemaValidation.
+    */
+   public boolean isUseSchemaValidation()
+   {
+      return useSchemaValidation;
+   }
+
+   /**
+    * Set the useSchemaValidation.
+    * 
+    * @param useSchemaValidation the useSchemaValidation.
+    */
+   public void setUseSchemaValidation(boolean useSchemaValidation)
+   {
+      this.useSchemaValidation = useSchemaValidation;
+   }
+
+   /**
+    * Get the useValidation.
+    * 
+    * @return the useValidation.
+    */
+   public boolean isUseValidation()
+   {
+      return useValidation;
+   }
+
+   /**
+    * Set the useValidation.
+    * 
+    * @param useValidation the useValidation.
+    */
+   public void setUseValidation(boolean useValidation)
+   {
+      this.useValidation = useValidation;
+   }
+
    protected T parse(VFSDeploymentUnit unit, VirtualFile file, T root) throws Exception
    {
       if (file == null)
@@ -64,6 +111,8 @@
 
       log.debug("Parsing file: "+file+" for deploymentType: " + getOutput());
       Unmarshaller unmarshaller = factory.newUnmarshaller();
+      unmarshaller.setSchemaValidation(isUseSchemaValidation());
+      unmarshaller.setValidation(isUseValidation());
       InputStream is = file.openStream();
       Object parsed = null;
       try


Property changes on: projects/microcontainer/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/deployer/SchemaResolverDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision




More information about the jboss-cvs-commits mailing list