src/com/sun/org/apache/xerces/internal/utils/XMLSecurityPropertyManager.java
Print this page
@@ -89,10 +89,23 @@
}
//read system properties or jaxp.properties
readSystemProperties();
}
+ /**
+ * Clone a XMLSecurityPropertyManager
+ * @param propertyManager the base XMLSecurityPropertyManager
+ */
+ public XMLSecurityPropertyManager(XMLSecurityPropertyManager propertyManager) {
+ values = new String[Property.values().length];
+ if (propertyManager != null) {
+ for (Property property : Property.values()) {
+ values[property.ordinal()] = propertyManager.getValue(property);
+ states[property.ordinal()] = propertyManager.getState(property);
+ }
+ }
+ }
/**
* Set limit by property name and state
* @param propertyName property name
* @param state the state of the property
@@ -186,10 +199,19 @@
}
}
return -1;
}
+ /**
+ * Return the state of a property
+ * @param property
+ * @return return the state of the property
+ */
+ public State getState(Property property) {
+ return states[property.ordinal()];
+ }
+
/**
* Read from system properties, or those in jaxp.properties
*/
private void readSystemProperties() {
getSystemProperty(Property.ACCESS_EXTERNAL_DTD,