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 || |