Package org.apache.xerces.util

Examples of org.apache.xerces.util.SecurityManager


                        SAXMessageFormatter.formatMessage(getLocale(),
                        "feature-read-only", new Object [] {name}));
            }
        }
        if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
            fSecurityManager = value ? new SecurityManager() : null;
            fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
            return;
        }
        else if (name.equals(USE_GRAMMAR_POOL_ONLY)) {
            fUseGrammarPoolOnly = value;
View Full Code Here


        if (name == null) {
            throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(Locale.getDefault(),
                    "FeatureNameNull", null));
        }
        if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
            fSecurityManager = value ? new SecurityManager() : null;
            fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
            return;
        }
        try {
            fXMLSchemaLoader.setFeature(name, value);
View Full Code Here

                                         XMLGrammarPool grammarPool,
                                         XMLComponentManager parentSettings) {
        super(symbolTable, grammarPool, parentSettings);
       
        // create the SecurityManager property:
        setProperty(SECURITY_MANAGER_PROPERTY, new SecurityManager());
    } // <init>(SymbolTable,XMLGrammarPool)
View Full Code Here

        else if (USE_GRAMMAR_POOL_ONLY.equals(featureId) && value != fUseGrammarPoolOnly) {
            throw new XMLConfigurationException(XMLConfigurationException.NOT_SUPPORTED, featureId);
        }
        fConfigUpdated = true;
        if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) {
            setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null);
            return;
        }
        fEntityManager.setFeature(featureId, value);
        fErrorReporter.setFeature(featureId, value);
        fSchemaValidator.setFeature(featureId, value);
View Full Code Here

    public static XmlOptions createDefaultXmlOptions() {
        XmlOptions xmlOptions;

        try {
            SAXParser saxParser = SAXParserFactory.newInstance().newSAXParser();
            SecurityManager securityManager = new SecurityManager();
            // Default seems to be 64000!
            securityManager.setEntityExpansionLimit(16);

            saxParser.setProperty("http://apache.org/xml/properties/security-manager", securityManager);
            XMLReader xmlReader = saxParser.getXMLReader();
            xmlOptions = new XmlOptions().setLoadUseXMLReader(xmlReader);
        } catch (Exception e) {
View Full Code Here

    this.xmlReader.setFeature0("http://xml.org/sax/features/namespaces", paramSAXParserFactoryImpl.isNamespaceAware());
    this.xmlReader.setFeature0("http://xml.org/sax/features/namespace-prefixes", !paramSAXParserFactoryImpl.isNamespaceAware());
    if (paramSAXParserFactoryImpl.isXIncludeAware())
      this.xmlReader.setFeature0("http://apache.org/xml/features/xinclude", true);
    if (paramBoolean)
      this.xmlReader.setProperty0("http://apache.org/xml/properties/security-manager", new SecurityManager());
    setFeatures(paramHashtable);
    if (paramSAXParserFactoryImpl.isValidating())
    {
      this.fInitErrorHandler = new DefaultValidationErrorHandler();
      this.xmlReader.setErrorHandler(this.fInitErrorHandler);
View Full Code Here

        throw new NullPointerException();
      if (paramString.equals("http://javax.xml.XMLConstants/feature/secure-processing"))
      {
        try
        {
          setProperty("http://apache.org/xml/properties/security-manager", paramBoolean ? new SecurityManager() : null);
        }
        catch (SAXNotRecognizedException localSAXNotRecognizedException)
        {
          if (paramBoolean)
            throw localSAXNotRecognizedException;
View Full Code Here

    addRecognizedParamsAndSetDefaults(this.fEntityManager, paramXSGrammarPoolContainer);
    addRecognizedParamsAndSetDefaults(this.fErrorReporter, paramXSGrammarPoolContainer);
    addRecognizedParamsAndSetDefaults(this.fSchemaValidator, paramXSGrammarPoolContainer);
    Boolean localBoolean = paramXSGrammarPoolContainer.getFeature("http://javax.xml.XMLConstants/feature/secure-processing");
    if (Boolean.TRUE.equals(localBoolean))
      this.fInitSecurityManager = new SecurityManager();
    this.fComponents.put("http://apache.org/xml/properties/security-manager", this.fInitSecurityManager);
    this.fFeatures.put("http://apache.org/xml/features/validation/schema/ignore-xsi-type-until-elemdecl", Boolean.FALSE);
    this.fFeatures.put("http://apache.org/xml/features/validation/id-idref-checking", Boolean.TRUE);
    this.fFeatures.put("http://apache.org/xml/features/validation/identity-constraint-checking", Boolean.TRUE);
    this.fFeatures.put("http://apache.org/xml/features/validation/unparsed-entity-checking", Boolean.TRUE);
View Full Code Here

      throw new XMLConfigurationException(1, paramString);
    if (("http://apache.org/xml/features/internal/validation/schema/use-grammar-pool-only".equals(paramString)) && (paramBoolean != this.fUseGrammarPoolOnly))
      throw new XMLConfigurationException(1, paramString);
    if ("http://javax.xml.XMLConstants/feature/secure-processing".equals(paramString))
    {
      setProperty("http://apache.org/xml/properties/security-manager", paramBoolean ? new SecurityManager() : null);
      return;
    }
    this.fConfigUpdated = true;
    this.fEntityManager.setFeature(paramString, paramBoolean);
    this.fErrorReporter.setFeature(paramString, paramBoolean);
View Full Code Here

    this.domParser.setFeature("http://apache.org/xml/features/include-comments", !paramDocumentBuilderFactoryImpl.isIgnoringComments());
    this.domParser.setFeature("http://apache.org/xml/features/create-cdata-nodes", !paramDocumentBuilderFactoryImpl.isCoalescing());
    if (paramDocumentBuilderFactoryImpl.isXIncludeAware())
      this.domParser.setFeature("http://apache.org/xml/features/xinclude", true);
    if (paramBoolean)
      this.domParser.setProperty("http://apache.org/xml/properties/security-manager", new SecurityManager());
    this.grammar = paramDocumentBuilderFactoryImpl.getSchema();
    if (this.grammar != null)
    {
      XMLParserConfiguration localXMLParserConfiguration = this.domParser.getXMLParserConfiguration();
      Object localObject = null;
View Full Code Here

TOP

Related Classes of org.apache.xerces.util.SecurityManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.