[jboss-cvs] JBossAS SVN: r61889 - projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Mar 30 11:02:11 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-03-30 11:02:11 -0400 (Fri, 30 Mar 2007)
New Revision: 61889
Modified:
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java
Log:
JBMICROCONT-169, add a schema validation flag
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java 2007-03-30 14:57:26 UTC (rev 61888)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java 2007-03-30 15:02:11 UTC (rev 61889)
@@ -45,7 +45,9 @@
{
/** Unmarshaller factory */
private static final UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
-
+ /** Whether the Unmarshaller will use schema validation */
+ private boolean useSchemaValidation = true;
+
/**
* Create a new SchemaResolverDeployer.
*
@@ -57,6 +59,16 @@
super(deploymentType);
}
+ public boolean isUseSchemaValidation()
+ {
+ return useSchemaValidation;
+ }
+
+ public void setUseSchemaValidation(boolean useSchemaValidation)
+ {
+ this.useSchemaValidation = useSchemaValidation;
+ }
+
/**
* Parse a deployment. The entails obtaining the metadata file contents via
* its URL handler, creating a jbossxb Unmarshaller, and unmarshalling the
@@ -74,7 +86,9 @@
if (file == null)
throw new IllegalArgumentException("Null file");
+
Unmarshaller unmarshaller = factory.newUnmarshaller();
+ unmarshaller.setSchemaValidation(useSchemaValidation);
Object parsed = null;
try
{
@@ -99,4 +113,5 @@
* @return the object model factory
*/
protected abstract ObjectModelFactory getObjectModelFactory(T root);
+
}
More information about the jboss-cvs-commits
mailing list