Examples of Digester


Examples of org.apache.tomcat.util.digester.Digester

     * web application deployment descriptor (web.xml).
     */
    public static Digester createWebXmlDigester(boolean namespaceAware,
                                                boolean validation) {
       
        Digester webDigester =  DigesterFactory.newDigester(xmlValidation,
                                                            xmlNamespaceAware,
                                                            webRuleSet);
        return webDigester;
    }
View Full Code Here

Examples of org.apache.tomcat.util.digester.Digester

    /**
     * Create (if necessary) and return a Digester configured to process the
     * context configuration descriptor for an application.
     */
    protected Digester createContextDigester() {
        Digester digester = new Digester();
        digester.setValidating(false);
        RuleSet contextRuleSet = new ContextRuleSet("", false);
        digester.addRuleSet(contextRuleSet);
        RuleSet namingRuleSet = new NamingRuleSet("Context/");
        digester.addRuleSet(namingRuleSet);
        return digester;
    }
View Full Code Here

Examples of org.apache.tomcat.util.digester.Digester

     * the XML input file, creating a new one if necessary.
     */
    protected synchronized Digester getDigester() {

        if (digester == null) {
            digester = new Digester();
            digester.setValidating(false);
            digester.addRuleSet(new MemoryRuleSet());
        }
        return (digester);

View Full Code Here

Examples of org.apache.tomcat.util.digester.Digester

        // Load the contents of the database file
        if (log.isDebugEnabled())
            log.debug(sm.getString("memoryRealm.loadPath",
                             file.getAbsolutePath()));
        Digester digester = getDigester();
        try {
            synchronized (digester) {
                digester.push(this);
                digester.parse(file);
            }
        } catch (Exception e) {
            throw new LifecycleException("memoryRealm.readXml", e);
        }
View Full Code Here

Examples of org.apache.tomcat.util.digester.Digester

    public static Digester newDigester(boolean xmlValidation,
                                       boolean xmlNamespaceAware,
                                       RuleSet rule) {

        URL url = null;
        Digester digester = new Digester();
        digester.setNamespaceAware(xmlNamespaceAware);
        digester.setValidating(xmlValidation);
        digester.setUseContextClassLoader(true);

        String parserName =
                digester.getFactory().getClass().getName();
        if (parserName.indexOf("xerces")!=-1) {
            digester = patchXerces(digester);
        }

        schemaResolver = new SchemaResolver(digester);
        if (xmlValidation) {
            // Xerces 2.3 and up has a special way to turn on validation
            // for both DTD and Schema
            if (parserName.indexOf("xerces")!=-1) {
                turnOnXercesValidation(digester);
            } else {
                turnOnValidation(digester);
            }
        }
        registerLocalSchema();
       
        digester.setEntityResolver(schemaResolver);
        if ( rule != null )
            digester.addRuleSet(rule);

        return (digester);
    }
View Full Code Here

Examples of org.apache.tomcat.util.digester.Digester

   
    /**
     * Create the digester which will be used to parse context config files.
     */
    protected static Digester createDigester() {
        Digester digester = new Digester();
        digester.setValidating(false);
        // Add object creation rule
        digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext",
            "className");
        // Set the properties on that object (it doesn't matter if extra
        // properties are set)
        digester.addSetProperties("Context");
        return (digester);
    }
View Full Code Here

Examples of org.codehaus.plexus.digest.Digester

    public void initialize()
        throws InitializationException
    {
        for ( Iterator<Digester> itDigesters = digesterList.iterator(); itDigesters.hasNext(); )
        {
            Digester digester = itDigesters.next();
            includes.add( "**/*" + digester.getFilenameExtension() );
        }
    }
View Full Code Here

Examples of org.jasypt.util.digest.Digester

   * Gets the 128 bit MD5 checksum for the specified String as a Hex String (consisting of 32 characters).
   * @param s String
   * @Return MD5 checksum of the specified String as a Hex String
   */
  public static String getMd5Checksum(String s) {
    Digester digester = new Digester();
    return JuStringUtils.toHexString(digester.digest(s.getBytes()));
  }
View Full Code Here

Examples of org.springframework.security.crypto.password.Digester

public class DigesterTests {

    @Test
    public void digestIsCorrectFor3Iterations() {
        Digester digester = new Digester("SHA-1", 3);
        byte[] result = digester.digest(Utf8.encode("text"));
        // echo -n text | openssl sha1 -binary | openssl sha1 -binary | openssl sha1
        assertEquals("3cfa28da425eca5b894f0af2b158adf7001e000f", new String(Hex.encode(result)));
    }
View Full Code Here

Examples of our.apache.commons.digester.Digester

            throws IOException, SAXException {
        // Create the digester
        // @todo ought this digester use our repackaged parser?
        // I have used our repackaged parser to get it to work for now...
        // This will probably have to be changed as part of VBM:2003022702.
        Digester digester = new MarinerDigester(new SAXParser());
        digester.addObjectCreate("parent", ParentConf.class);
        digester.addObjectCreate("parent/enabled", EnabledConf.class);
        digester.addSetProperties("parent/enabled", "property", "property");
        digester.addSetNext("parent/enabled", "setEnabled");
       
        // Parse the document using the digester.
        ByteArrayInputStream stream = new ByteArrayInputStream(
                document.getBytes());
        InputSource source = new InputSource(stream);
        ParentConf parent = (ParentConf) digester.parse(source);
       
        assertNotNull(parent);
        return parent;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.