FW: How can I create a view through XML?

2014-08-08 Thread XuLj
Does anyone know how to solve this problem?

From: icbcsdcpmox...@outlook.com
To: jenkinsci-dev@googlegroups.com
Subject: How can I create a view through XML?
Date: Wed, 6 Aug 2014 01:32:22 +




Hello, I'd like to create a view by calling method createViewFromXML(String 
name, InputStream xml) in the View class. How can I achieve that?
It appears that each time I pass a StringInputStream object to this method, it 
throws an Unable to read exception.
My test code is as follows:
String xml = hudson.plugins.nested__view.NestedView  
   +   owner 
class=\hudson\ reference=\../../..\/  
+   name1/name 
   +   
filterExecutorsfalse/filterExecutors   
   +   filterQueuefalse/filterQueue   
   +  
 properties class=\hudson.model.View$PropertyList\/ 
   +   views
   +  
   au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
   +   owner 
class=\hudson.plugins.nested_view.NestedView\ reference=\../../..\/   
+   name1/name 
   +   
filterExecutorsfalse/filterExecutors   
   +   filterQueuefalse/filterQueue
  +   
properties class=\hudson.model.View$PropertyList\/ 
   +   
noOfDisplayedBuilds1/noOfDisplayedBuilds   
   +   buildViewTitle/buildViewTitle   
  +   
triggerOnlyLatestJobfalse/triggerOnlyLatestJob 
   +   
alwaysAllowManualTriggertrue/alwaysAllowManualTrigger  
   +   
showPipelineParameterstrue/showPipelineParameters  
   +   refreshFrequency3/refreshFrequency  
  +   
showPipelineDefinitionHeaderfalse/showPipelineDefinitionHeader 
   +   
displayProgressBarfalse/displayProgressBar 
   + 
/au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView 
 +   /views  
+   
columns  
   + columns/   
   +  
 /columns 
   + /hudson.plugins.nested__view.NestedView
;  InputStream xx=new 
StringInputStream(xml, utf-8); try {  
 View.createViewFromXML(aa, xx);   } catch (IOException e) {  
 // TODO Auto-generated catch block  
e.printStackTrace();}


  

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How can I create a view through XML?

2014-08-05 Thread XuLj
Hello, I'd like to create a view by calling method createViewFromXML(String 
name, InputStream xml) in the View class. How can I achieve that?
It appears that each time I pass a StringInputStream object to this method, it 
throws an Unable to read exception.
My test code is as follows:
String xml = hudson.plugins.nested__view.NestedView  
   +   owner 
class=\hudson\ reference=\../../..\/  
+   name1/name 
   +   
filterExecutorsfalse/filterExecutors   
   +   filterQueuefalse/filterQueue   
   +  
 properties class=\hudson.model.View$PropertyList\/ 
   +   views
   +  
   au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView
   +   owner 
class=\hudson.plugins.nested_view.NestedView\ reference=\../../..\/   
+   name1/name 
   +   
filterExecutorsfalse/filterExecutors   
   +   filterQueuefalse/filterQueue
  +   
properties class=\hudson.model.View$PropertyList\/ 
   +   
noOfDisplayedBuilds1/noOfDisplayedBuilds   
   +   buildViewTitle/buildViewTitle   
  +   
triggerOnlyLatestJobfalse/triggerOnlyLatestJob 
   +   
alwaysAllowManualTriggertrue/alwaysAllowManualTrigger  
   +   
showPipelineParameterstrue/showPipelineParameters  
   +   refreshFrequency3/refreshFrequency  
  +   
showPipelineDefinitionHeaderfalse/showPipelineDefinitionHeader 
   +   
displayProgressBarfalse/displayProgressBar 
   + 
/au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView 
 +   /views  
+   
columns  
   + columns/   
   +  
 /columns 
   + /hudson.plugins.nested__view.NestedView
;  InputStream xx=new 
StringInputStream(xml, utf-8); try {  
 View.createViewFromXML(aa, xx);   } catch (IOException e) {  
 // TODO Auto-generated catch block  
e.printStackTrace();}

  

-- 
You received this message because you are subscribed to the Google Groups 
Jenkins Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.