Package org.apache.xerces.util

Examples of org.apache.xerces.util.SecurityManager


    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 );
    }
View Full Code Here


            fEntityResolver = null;
        }
   
        // Get security manager.
        try {
            SecurityManager value =
                (SecurityManager)componentManager.getProperty(
                    SECURITY_MANAGER);

            if (value != null) {
                fSecurityManager = 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

        addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer);
       
        // if the secure processing feature is set to true, add a security manager to the configuration
        Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING);
        if (Boolean.TRUE.equals(secureProcessing)) {
            fInitSecurityManager = new SecurityManager();
        }
        else {
            fInitSecurityManager = null;
        }
        fComponents.put(SECURITY_MANAGER, fInitSecurityManager);
View Full Code Here

        }
        else if (USE_GRAMMAR_POOL_ONLY.equals(featureId) && value != fUseGrammarPoolOnly) {
            throw new XMLConfigurationException(XMLConfigurationException.NOT_SUPPORTED, featureId);
        }
        if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) {
            setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null);
            return;
        }
        fConfigUpdated = true;
        fEntityManager.setFeature(featureId, value);
        fErrorReporter.setFeature(featureId, 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

            xmlReader.setFeature0(XINCLUDE_FEATURE, true);
        }
       
        // If the secure processing feature is on set a security manager.
        if (secureProcessing) {
            xmlReader.setProperty0(SECURITY_MANAGER, new SecurityManager());
        }
       
        // Set application's features, followed by validation features.
        setFeatures(features);
       
View Full Code Here

                // TODO: Add localized error message.
                throw new NullPointerException();
            }
            if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
                try {
                    setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null);
                }
                catch (SAXNotRecognizedException exc) {
                    // If the property is not supported
                    // re-throw the exception if the value is true.
                    if (value) {
View Full Code Here

            domParser.setFeature(XINCLUDE_FEATURE, true);
        }
       
        // If the secure processing feature is on set a security manager.
        if (secureProcessing) {
            domParser.setProperty(SECURITY_MANAGER, new SecurityManager());
        }
       
        this.grammar = dbf.getSchema();
        if (grammar != null) {
            XMLParserConfiguration config = domParser.getXMLParserConfiguration();
View Full Code Here

            fEntityResolver = null;
        }

        // Get security manager.
        try {
            SecurityManager value =
                (SecurityManager)componentManager.getProperty(
                    SECURITY_MANAGER);

            if (value != null) {
                fSecurityManager = value;
                if (fChildConfig != null) {
                    fChildConfig.setProperty(SECURITY_MANAGER, value);
                }
            }
        }
        catch (XMLConfigurationException e) {
            fSecurityManager = null;
        }
       
        // Get buffer size.
        try {
            Integer value =
                (Integer)componentManager.getProperty(
                    BUFFER_SIZE);

            if (value != null && value.intValue() > 0) {
                fBufferSize = value.intValue();
                if (fChildConfig != null) {
                    fChildConfig.setProperty(BUFFER_SIZE, value);
                }
            }
            else {
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.