Beispiel #1
0
    @Issue("JENKINS-9367")
    @Test public void persistence() throws Exception {
        ListView view = listView("foo");

        ListView v = (ListView) Jenkins.XSTREAM.fromXML(Jenkins.XSTREAM.toXML(view));
        System.out.println(v.getProperties());
        assertNotNull(v.getProperties());
    }
Beispiel #2
0
  private static View copy(StaplerRequest req, ViewGroup owner, String name) throws IOException {
    View v;
    String from = req.getParameter("from");
    View src = src = owner.getView(from);

    if (src == null) {
      if (Util.fixEmpty(from) == null) throw new Failure("Specify which view to copy");
      else throw new Failure("No such view: " + from);
    }
    String xml = Jenkins.XSTREAM.toXML(src);
    v = createViewFromXML(name, new StringInputStream(xml));
    return v;
  }