Package com.thoughtworks.xstream

Examples of com.thoughtworks.xstream.XStream.aliasField()


    }
   
    public static Settings fromXML(String s) {
        XStream xstream = new XStream(new DomDriver());
        xstream.aliasField("BeanList", Settings.class, "beans");
        xstream.aliasField("AttributeList", MBeanData.class, "attributes");
        xstream.alias("Settings", Settings.class);
        xstream.alias("Bean", MBeanData.class);
        xstream.alias("Attribute", Attribute.class);
       
        Settings settings = (Settings)xstream.fromXML(s);
View Full Code Here


       
    }
   
    public static Settings fromXML(InputStream s) {
        XStream xstream = new XStream(new DomDriver());
        xstream.aliasField("BeanList", Settings.class, "beans");
        xstream.aliasField("AttributeList", MBeanData.class, "attributes");
        xstream.alias("Settings", Settings.class);
        xstream.alias("Bean", MBeanData.class);
        xstream.alias("Attribute", Attribute.class);
View Full Code Here

    }
   
    public static Settings fromXML(InputStream s) {
        XStream xstream = new XStream(new DomDriver());
        xstream.aliasField("BeanList", Settings.class, "beans");
        xstream.aliasField("AttributeList", MBeanData.class, "attributes");
        xstream.alias("Settings", Settings.class);
        xstream.alias("Bean", MBeanData.class);
        xstream.alias("Attribute", Attribute.class);

        Settings settings = (Settings)xstream.fromXML(s);
View Full Code Here

   */
  private void loadWorkflow(InputStream in) {
    XStream stream = new XStream();
    stream.alias("flow", Flow.class);
    stream.aliasAttribute(Flow.class, "name", "name");
    stream.aliasField("start-event", Flow.class, "startEvent");
    stream.aliasField("end-event", Flow.class, "endEvent");
    stream.alias("gateway", Gateway.class);
    stream.alias("task", Task.class);
    stream.alias("end-event", Event.class);
    stream.aliasAttribute(Event.class, "path", "path");
View Full Code Here

  private void loadWorkflow(InputStream in) {
    XStream stream = new XStream();
    stream.alias("flow", Flow.class);
    stream.aliasAttribute(Flow.class, "name", "name");
    stream.aliasField("start-event", Flow.class, "startEvent");
    stream.aliasField("end-event", Flow.class, "endEvent");
    stream.alias("gateway", Gateway.class);
    stream.alias("task", Task.class);
    stream.alias("end-event", Event.class);
    stream.aliasAttribute(Event.class, "path", "path");
    stream.aliasAttribute(Activity.class, "name", "name");
View Full Code Here

    stream.aliasAttribute(FlowCondition.class, "path", "path");
    stream.aliasAttribute(Implementation.class, "className", "class-name");
    stream.aliasAttribute(Implementation.class, "methodName", "method");
    stream.aliasAttribute(Implementation.class, "beanName", "bean-name");
    stream.alias("if-condition", IfCondition.class);
    stream.aliasField("if-condition", Outbound.class, "ifCondition");
    stream.aliasField("then", IfCondition.class, "thenFlow");
    stream.aliasField("else", IfCondition.class, "elseFlow");
    workflow = (Workflow) stream.fromXML(in);
  }
View Full Code Here

    stream.aliasAttribute(Implementation.class, "className", "class-name");
    stream.aliasAttribute(Implementation.class, "methodName", "method");
    stream.aliasAttribute(Implementation.class, "beanName", "bean-name");
    stream.alias("if-condition", IfCondition.class);
    stream.aliasField("if-condition", Outbound.class, "ifCondition");
    stream.aliasField("then", IfCondition.class, "thenFlow");
    stream.aliasField("else", IfCondition.class, "elseFlow");
    workflow = (Workflow) stream.fromXML(in);
  }

  /**
 
View Full Code Here

    stream.aliasAttribute(Implementation.class, "methodName", "method");
    stream.aliasAttribute(Implementation.class, "beanName", "bean-name");
    stream.alias("if-condition", IfCondition.class);
    stream.aliasField("if-condition", Outbound.class, "ifCondition");
    stream.aliasField("then", IfCondition.class, "thenFlow");
    stream.aliasField("else", IfCondition.class, "elseFlow");
    workflow = (Workflow) stream.fromXML(in);
  }

  /**
   *
 
View Full Code Here

  private static XStream createXStream() {
    XStream xstream = new XStream(new DomDriver());
    xstream.setMode(XStream.NO_REFERENCES);
    xstream.alias("document-format", DocumentFormat.class);
    xstream.aliasField("mime-type", DocumentFormat.class, "mimeType");
        xstream.aliasField("file-extension", DocumentFormat.class, "fileExtension");
    xstream.aliasField("export-filters", DocumentFormat.class, "exportFilters");
    xstream.aliasField("export-options", DocumentFormat.class, "exportOptions");
        xstream.aliasField("import-options", DocumentFormat.class, "importOptions");
    xstream.alias("family", DocumentFamily.class);
View Full Code Here

  private static XStream createXStream() {
    XStream xstream = new XStream(new DomDriver());
    xstream.setMode(XStream.NO_REFERENCES);
    xstream.alias("document-format", DocumentFormat.class);
    xstream.aliasField("mime-type", DocumentFormat.class, "mimeType");
        xstream.aliasField("file-extension", DocumentFormat.class, "fileExtension");
    xstream.aliasField("export-filters", DocumentFormat.class, "exportFilters");
    xstream.aliasField("export-options", DocumentFormat.class, "exportOptions");
        xstream.aliasField("import-options", DocumentFormat.class, "importOptions");
    xstream.alias("family", DocumentFamily.class);
    xstream.registerConverter(new AbstractSingleValueConverter() {
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.