src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java
Print this page
*** 85,97 ****
*/
public PropertyManager(PropertyManager propertyManager){
HashMap properties = propertyManager.getProperties();
supportedProps.putAll(properties);
! fSecurityManager = (XMLSecurityManager)getProperty(SECURITY_MANAGER);
! fSecurityPropertyMgr = (XMLSecurityPropertyManager)getProperty(XML_SECURITY_PROPERTY_MANAGER);
}
private HashMap getProperties(){
return supportedProps ;
}
--- 85,107 ----
*/
public PropertyManager(PropertyManager propertyManager){
HashMap properties = propertyManager.getProperties();
supportedProps.putAll(properties);
! Object temp = getProperty(SECURITY_MANAGER);
! //writers have no need for the managers
! if (temp != null) {
! fSecurityManager = new XMLSecurityManager((XMLSecurityManager)temp);
! supportedProps.put(SECURITY_MANAGER, fSecurityManager);
}
+ temp = getProperty(XML_SECURITY_PROPERTY_MANAGER);
+ if (temp != null) {
+ fSecurityPropertyMgr = new XMLSecurityPropertyManager(
+ (XMLSecurityPropertyManager)temp);
+ supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
+ }
+ }
private HashMap getProperties(){
return supportedProps ;
}
*** 180,201 ****
/**
* It's possible for users to set a security manager through the interface.
* If it's the old SecurityManager, convert it to the new XMLSecurityManager
*/
! if (property.equals(Constants.SECURITY_MANAGER)) {
fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager);
! supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager);
return;
}
! if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) {
if (value == null) {
fSecurityPropertyMgr = new XMLSecurityPropertyManager();
} else {
fSecurityPropertyMgr = (XMLSecurityPropertyManager)value;
}
! supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
return;
}
//check if the property is managed by security manager
if (fSecurityManager == null ||
--- 190,211 ----
/**
* It's possible for users to set a security manager through the interface.
* If it's the old SecurityManager, convert it to the new XMLSecurityManager
*/
! if (property.equals(SECURITY_MANAGER)) {
fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager);
! supportedProps.put(SECURITY_MANAGER, fSecurityManager);
return;
}
! if (property.equals(XML_SECURITY_PROPERTY_MANAGER)) {
if (value == null) {
fSecurityPropertyMgr = new XMLSecurityPropertyManager();
} else {
fSecurityPropertyMgr = (XMLSecurityPropertyManager)value;
}
! supportedProps.put(XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
return;
}
//check if the property is managed by security manager
if (fSecurityManager == null ||