jaxp/src/com/sun/org/apache/xerces/internal/impl/PropertyManager.java
changeset 20973 cc1cc8eb501b
parent 20968 dde41f8b7b96
child 22139 f4b2aa462b46
equal deleted inserted replaced
20972:4c38ecdb7353 20973:cc1cc8eb501b
   176         else if(property == XMLInputFactory.RESOLVER || property.equals(XMLInputFactory.RESOLVER)){
   176         else if(property == XMLInputFactory.RESOLVER || property.equals(XMLInputFactory.RESOLVER)){
   177             //add internal stax property
   177             //add internal stax property
   178             supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ;
   178             supportedProps.put( Constants.XERCES_PROPERTY_PREFIX + Constants.STAX_ENTITY_RESOLVER_PROPERTY , new StaxEntityResolverWrapper((XMLResolver)value)) ;
   179         }
   179         }
   180 
   180 
       
   181         /**
       
   182          * It's possible for users to set a security manager through the interface.
       
   183          * If it's the old SecurityManager, convert it to the new XMLSecurityManager
       
   184          */
       
   185         if (property.equals(Constants.SECURITY_MANAGER)) {
       
   186             fSecurityManager = XMLSecurityManager.convert(value, fSecurityManager);
       
   187             supportedProps.put(Constants.SECURITY_MANAGER, fSecurityManager);
       
   188             return;
       
   189         }
       
   190         if (property.equals(Constants.XML_SECURITY_PROPERTY_MANAGER)) {
       
   191             if (value == null) {
       
   192                 fSecurityPropertyMgr = new XMLSecurityPropertyManager();
       
   193             } else {
       
   194                 fSecurityPropertyMgr = (XMLSecurityPropertyManager)value;
       
   195             }
       
   196             supportedProps.put(Constants.XML_SECURITY_PROPERTY_MANAGER, fSecurityPropertyMgr);
       
   197             return;
       
   198         }
       
   199 
   181         //check if the property is managed by security manager
   200         //check if the property is managed by security manager
   182         if (fSecurityManager == null ||
   201         if (fSecurityManager == null ||
   183                 !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) {
   202                 !fSecurityManager.setLimit(property, XMLSecurityManager.State.APIPROPERTY, value)) {
   184             //check if the property is managed by security property manager
   203             //check if the property is managed by security property manager
   185             if (fSecurityPropertyMgr == null ||
   204             if (fSecurityPropertyMgr == null ||