[jboss-cvs] JBossAS SVN: r62110 - projects/microcontainer/tags/JBossMC_2_0_0_Beta3/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Apr 4 22:12:27 EDT 2007
Author: scott.stark at jboss.org
Date: 2007-04-04 22:12:27 -0400 (Wed, 04 Apr 2007)
New Revision: 62110
Modified:
projects/microcontainer/tags/JBossMC_2_0_0_Beta3/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java
Log:
JBMICROCONT-169, add a useValidation property
Modified: projects/microcontainer/tags/JBossMC_2_0_0_Beta3/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java
===================================================================
--- projects/microcontainer/tags/JBossMC_2_0_0_Beta3/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java 2007-04-05 02:04:56 UTC (rev 62109)
+++ projects/microcontainer/tags/JBossMC_2_0_0_Beta3/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/ObjectModelFactoryDeployer.java 2007-04-05 02:12:27 UTC (rev 62110)
@@ -47,6 +47,8 @@
private static final UnmarshallerFactory factory = UnmarshallerFactory.newInstance();
/** Whether the Unmarshaller will use schema validation */
private boolean useSchemaValidation = true;
+ /** Whether the Unmarshaller will use validation */
+ private boolean useValidation = true;
/**
* Create a new SchemaResolverDeployer.
@@ -69,6 +71,16 @@
this.useSchemaValidation = useSchemaValidation;
}
+ public boolean isUseValidation()
+ {
+ return useValidation;
+ }
+
+ public void setUseValidation(boolean useValidation)
+ {
+ this.useValidation = useValidation;
+ }
+
/**
* Parse a deployment. The entails obtaining the metadata file contents via
* its URL handler, creating a jbossxb Unmarshaller, and unmarshalling the
@@ -86,8 +98,10 @@
if (file == null)
throw new IllegalArgumentException("Null file");
+
Unmarshaller unmarshaller = factory.newUnmarshaller();
unmarshaller.setSchemaValidation(useSchemaValidation);
+ unmarshaller.setValidation(useValidation);
Object parsed = null;
try
{
@@ -112,4 +126,5 @@
* @return the object model factory
*/
protected abstract ObjectModelFactory getObjectModelFactory(T root);
+
}
More information about the jboss-cvs-commits
mailing list