Package speculoos.config.xml

Examples of speculoos.config.xml.TagHandler


   *
   */
  public JNDIXMLConfigurator() {
    PropertyHandler ph = new PropertyHandler();
    // for backward compatibility of descriptors
    handlers.put("jndi-mapper", new TagHandler() {

      public void endElement(String uri, String localName, String qName)
          throws SAXException {
        // NOP
      }

      public void startElement(String uri, String localName,
          String qName, Attributes attributes) throws SAXException {
        // NOP
      }

    });
    handlers.put("map", new MapHandler());
    handlers.put("attr", ph);
    handlers.put("bean", new BeanHandler());
    handlers.put("source", new SourceHandler());
    handlers.put("config", new ConfigHandler());
    handlers.put("property", ph);
    // validation rules
    handlers.put("and", new AndValidHandler());
    handlers.put("or", new OrValidHandler());
    handlers.put("not", new NotValidHandler());
    handlers.put("regex", new RegexValidHandler());
    handlers.put("defaults", new DefaultsValidHandler());
    handlers.put("mandatory", new MandatoryValidHandler());
    // chains
    ChainHandler ch = new ChainHandler();
    handlers.put("chain", ch);
    // basic
    handlers.put("root", new RootHandler());
    // modify
    handlers.put("modify", new ModifyHandler());
    handlers.put("operations", new TagHandler() {

      public void endElement(String uri, String localName, String qName)
          throws SAXException {
        ModificationsVariables mods = (ModificationsVariables) pop();
        ((JNDIMapper) current).getInputChain().addMapper(mods);
View Full Code Here


   * @see org.xml.sax.ContentHandler#endElement(java.lang.String,
   *      java.lang.String, java.lang.String)
   */
  public void endElement(String uri, String localName, String qName)
      throws SAXException {
    TagHandler th = (TagHandler) handlers.get(localName);
    th.endElement(uri, localName, qName);
  }
View Full Code Here

   * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
   *      java.lang.String, java.lang.String, org.xml.sax.Attributes)
   */
  public void startElement(String uri, String localName, String qName,
      Attributes attributes) throws SAXException {
    TagHandler th = (TagHandler) handlers.get(localName);
    if (th == null)
      throw new SAXException("Don't know how to handle tag " + localName);
    th.startElement(uri, localName, qName, attributes);
  }
View Full Code Here

TOP

Related Classes of speculoos.config.xml.TagHandler

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.