Package org.apache.struts.digester

Examples of org.apache.struts.digester.Digester


    _types.add(bean);
  }

  protected static TypeBean parse(InputStream in) throws Exception {
    TypeBean bean = new TypeBean();
    Digester digester = new Digester();
    digester.push(bean);
    digester.setValidating(false);
    digester.addObjectCreate(
      "templates-description/template",
      "org.nextime.ion.backoffice.bean.TypeBean");
    digester.addSetProperties("templates-description/template");
    digester.addSetNext("templates-description/template", "addBean");
    digester.addCallMethod(
      "templates-description/template/description",
      "setDescription",
      0);
    digester.addCallMethod(
      "templates-description/template/publication-types",
      "setPublicationTypes",
      0);
    digester.addObjectCreate(
      "templates-description/template/property",
      "org.nextime.ion.backoffice.bean.PropertyBean");
    digester.addSetProperties("templates-description/template/property");
    digester.addSetTop(
      "templates-description/template/property",
      "setSectionType");
    digester.parse(in);
    return bean;
  }
View Full Code Here


  private String icon;
  private static Hashtable roots = new Hashtable();

  protected static ResourceXmlBean parse(InputStream in) throws Exception {
    ResourceXmlBean bean = new ResourceXmlBean();
    Digester digester = new Digester();
    digester.push(bean);
    digester.setValidating(false);
    digester.addObjectCreate(
      "resources-description/resources",
      "org.nextime.ion.backoffice.bean.ResourceXmlBean");
    digester.addSetProperties("resources-description/resources");
    digester.addSetNext("resources-description/resources", "addResource");
    digester.parse(in);
    return bean;
  }
View Full Code Here

  private String icon;
  private static Hashtable roots = new Hashtable();

  protected static ResourceXmlBean parse(InputStream in) throws Exception {
    ResourceXmlBean bean = new ResourceXmlBean();
    Digester digester = new Digester();
    digester.push(bean);
    digester.setValidating(false);
    digester.addObjectCreate(
      "resources-description/resources",
      "org.nextime.ion.export.bean.ResourceXmlBean");
    digester.addSetProperties("resources-description/resources");
    digester.addSetNext("resources-description/resources", "addResource");
    digester.parse(in);
    return bean;
  }
View Full Code Here

  private String icon;
  private static Hashtable roots = new Hashtable();

  protected static ResourceXmlBean parse(InputStream in) throws Exception {
    ResourceXmlBean bean = new ResourceXmlBean();
    Digester digester = new Digester();
    digester.push(bean);
    digester.setValidating(false);
    digester.addObjectCreate(
      "resources-description/resources",
      "org.nextime.ion.frontoffice.bean.ResourceXmlBean");
    digester.addSetProperties("resources-description/resources");
    digester.addSetNext("resources-description/resources", "addResource");
    digester.parse(in);
    return bean;
  }
View Full Code Here

    _types.add(bean);
  }
 
  protected static TypeBean parse( InputStream in ) throws Exception {
    TypeBean bean = new TypeBean();
    Digester digester = new Digester();
    digester.push(bean);
    digester.setValidating(false);
    digester.addObjectCreate("templates-description/template","org.nextime.ion.frontoffice.bean.TypeBean");
    digester.addSetProperties("templates-description/template");
    digester.addSetNext("templates-description/template","addBean");
    digester.addCallMethod("templates-description/template/description","setDescription",0);
    digester.addCallMethod("templates-description/template/publication-types","setPublicationTypes",0);
    digester.addObjectCreate("templates-description/template/property","org.nextime.ion.frontoffice.bean.PropertyBean");
    digester.addSetProperties("templates-description/template/property");
    digester.addSetTop("templates-description/template/property","setSectionType");
    digester.parse(in);
    return bean;
  }
View Full Code Here

            return;
        }
  BufferedInputStream bis = new BufferedInputStream(is);

  // Construct a digester to use for parsing
  Digester digester = new Digester();
  digester.push(this);
  digester.setDebug(debug);
  digester.setValidating(false);
  digester.addObjectCreate("database/user",
         "org.apache.struts.webapp.example.User");
  digester.addSetProperties("database/user");
  digester.addSetNext("database/user", "addUser");
  digester.addObjectCreate("database/user/subscription",
         "org.apache.struts.webapp.example.Subscription");
  digester.addSetProperties("database/user/subscription");
  digester.addSetTop("database/user/subscription", "setUser");

  // Parse the input stream to initialize our database
  digester.parse(bis);
  bis.close();

    }
View Full Code Here

     * file format.
     */
    protected Digester initDigester(int detail) {

  // Initialize a new Digester instance
  Digester digester = new Digester();
  digester.push(this);
  digester.setDebug(detail);
  digester.setValidating(validating);

  // Register our local copy of the DTDs that we can find
        for (int i = 0; i < registrations.length; i += 2) {
            URL url = this.getClass().getResource(registrations[i+1]);
            if (url != null)
                digester.register(registrations[i], url.toString());
        }

  // Configure the processing rules

        digester.addObjectCreate("struts-config/data-sources/data-source",
                                 "org.apache.struts.util.GenericDataSource",
                                 "type");
        digester.addSetProperties("struts-config/data-sources/data-source");
        digester.addRule("struts-config/data-sources/data-source",
                         new AddDataSourceRule(digester));
        digester.addSetProperty
            ("struts-config/data-sources/data-source/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/action-mappings/action",
                                 mappingClass, "className");
        digester.addSetProperties("struts-config/action-mappings/action");
        digester.addSetNext("struts-config/action-mappings/action",
                            "addMapping",
                            "org.apache.struts.action.ActionMapping");

        digester.addSetProperty
            ("struts-config/action-mappings/action/set-property",
             "property", "value");

        digester.addObjectCreate
            ("struts-config/action-mappings/action/forward",
             forwardClass, "className");
        digester.addSetProperties
            ("struts-config/action-mappings/action/forward");
        digester.addSetNext("struts-config/action-mappings/action/forward",
                            "addForward",
                            "org.apache.struts.action.ActionForward");

        digester.addSetProperty
            ("struts-config/action-mappings/action/forward/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/form-beans/form-bean",
                                 formBeanClass, "className");
        digester.addSetProperties("struts-config/form-beans/form-bean");
        digester.addSetNext("struts-config/form-beans/form-bean",
                            "addFormBean",
                            "org.apache.struts.action.ActionFormBean");

        digester.addSetProperty
            ("struts-config/form-beans/form-bean/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/global-forwards/forward",
                                 forwardClass, "className");
        digester.addSetProperties("struts-config/global-forwards/forward");
        digester.addSetNext("struts-config/global-forwards/forward",
                            "addForward",
                            "org.apache.struts.action.ActionForward");

        digester.addSetProperty
            ("struts-config/global-forwards/forward/set-property",
             "property", "value");

  return (digester);

View Full Code Here

     * file format.
     */
    protected Digester initDigester(int detail) {

  // Initialize a new Digester instance
  Digester digester = new Digester();
  digester.push(this);
  digester.setDebug(detail);
  digester.setValidating(validating);

  // Register our local copy of the DTDs that we can find
        for (int i = 0; i < registrations.length; i += 2) {
            URL url = this.getClass().getResource(registrations[i+1]);
            if (url != null)
                digester.register(registrations[i], url.toString());
        }

  // Configure the processing rules

        digester.addObjectCreate("struts-config/data-sources/data-source",
                                 "org.apache.struts.util.GenericDataSource",
                                 "type");
        digester.addSetProperties("struts-config/data-sources/data-source");
        digester.addRule("struts-config/data-sources/data-source",
                         new AddDataSourceRule(digester));
        digester.addSetProperty
            ("struts-config/data-sources/data-source/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/action-mappings/action",
                                 mappingClass, "className");
        digester.addSetProperties("struts-config/action-mappings/action");
        digester.addSetNext("struts-config/action-mappings/action",
                            "addMapping",
                            "org.apache.struts.action.ActionMapping");

        digester.addSetProperty
            ("struts-config/action-mappings/action/set-property",
             "property", "value");

        digester.addObjectCreate
            ("struts-config/action-mappings/action/forward",
             forwardClass, "className");
        digester.addSetProperties
            ("struts-config/action-mappings/action/forward");
        digester.addSetNext("struts-config/action-mappings/action/forward",
                            "addForward",
                            "org.apache.struts.action.ActionForward");

        digester.addSetProperty
            ("struts-config/action-mappings/action/forward/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/form-beans/form-bean",
                                 formBeanClass, "className");
        digester.addSetProperties("struts-config/form-beans/form-bean");
        digester.addSetNext("struts-config/form-beans/form-bean",
                            "addFormBean",
                            "org.apache.struts.action.ActionFormBean");

        digester.addSetProperty
            ("struts-config/form-beans/form-bean/set-property",
             "property", "value");

        digester.addObjectCreate("struts-config/global-forwards/forward",
                                 forwardClass, "className");
        digester.addSetProperties("struts-config/global-forwards/forward");
        digester.addSetNext("struts-config/global-forwards/forward",
                            "addForward",
                            "org.apache.struts.action.ActionForward");

        digester.addSetProperty
            ("struts-config/global-forwards/forward/set-property",
             "property", "value");

  return (digester);

View Full Code Here

     * file format.
     */
    protected Digester initDigesterOld(int detail) {

  // Initialize a new Digester instance
  Digester digester = new Digester();
  digester.push(this);
  digester.setDebug(detail);
  digester.setValidating(false);

  // Configure the processing rules
  digester.addObjectCreate("action-mappings/action", mappingClass,
         "className");
  digester.addSetProperties("action-mappings/action");
  digester.addSetNext("action-mappings/action", "addMapping",
          "org.apache.struts.action.ActionMapping");
  digester.addObjectCreate("action-mappings/action/forward",
         forwardClass, "className");
  digester.addSetProperties("action-mappings/action/forward");
  digester.addSetNext("action-mappings/action/forward", "addForward",
          "org.apache.struts.action.ActionForward");
  digester.addSetProperty("action-mappings/action/forward/property",
        "name", "value");
  digester.addSetProperty("action-mappings/action/property",
        "name", "value");
  digester.addObjectCreate("action-mappings/forward",
         forwardClass, "className");
  digester.addSetProperties("action-mappings/forward");
  digester.addSetNext("action-mappings/forward", "addForward",
          "org.apache.struts.action.ActionForward");
  digester.addSetProperty("action-mappings/forward/property",
        "name", "value");

  return (digester);

    }
View Full Code Here

     * file format.
     */
    protected Digester initDigesterOld(int detail) {

  // Initialize a new Digester instance
  Digester digester = new Digester();
  digester.push(this);
  digester.setDebug(detail);
  digester.setValidating(false);

  // Configure the processing rules
  digester.addObjectCreate("action-mappings/action", mappingClass,
         "className");
  digester.addSetProperties("action-mappings/action");
  digester.addSetNext("action-mappings/action", "addMapping",
          "org.apache.struts.action.ActionMapping");
  digester.addObjectCreate("action-mappings/action/forward",
         forwardClass, "className");
  digester.addSetProperties("action-mappings/action/forward");
  digester.addSetNext("action-mappings/action/forward", "addForward",
          "org.apache.struts.action.ActionForward");
  digester.addSetProperty("action-mappings/action/forward/property",
        "name", "value");
  digester.addSetProperty("action-mappings/action/property",
        "name", "value");
  digester.addObjectCreate("action-mappings/forward",
         forwardClass, "className");
  digester.addSetProperties("action-mappings/forward");
  digester.addSetNext("action-mappings/forward", "addForward",
          "org.apache.struts.action.ActionForward");
  digester.addSetProperty("action-mappings/forward/property",
        "name", "value");

  return (digester);

    }
View Full Code Here

TOP

Related Classes of org.apache.struts.digester.Digester

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.