diff options
Diffstat (limited to 'sandbox/kgoodson/jagg/src/main/java')
-rw-r--r-- | sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java index 13edacaaea..b4c5840154 100644 --- a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java +++ b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java @@ -31,6 +31,8 @@ import javax.xml.bind.Unmarshaller; import org.oasisopen.sca.annotation.Init; +import com.example.ipo.jaxb.Item; +import com.example.ipo.jaxb.JiraData; import com.example.ipo.jaxb.Milestone; import com.example.ipo.jaxb.Plan; import com.example.ipo.jaxb.RSS; @@ -83,27 +85,9 @@ public class PlanViewImpl implements PlanView { for (WorkItem wi: m.getWorkItem()) { String jira = wi.getJira(); String feed = rssPrefix += jira + "/" + jira + ".xml"; - -// SyndFeedInput input = new SyndFeedInput(); -// try { -// SyndFeed sfeed = input.build(new XmlReader(new URL(feed))); -// List<SyndEntry> entries = sfeed.getEntries(); -// SyndEntry jiraEntry = (SyndEntry)entries.toArray()[0]; -// String title = jiraEntry.getTitle(); -// System.out.println(sfeed.toString()); -// } catch (IllegalArgumentException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (MalformedURLException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (FeedException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } catch (IOException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } + JiraData jd = new JiraData(); + wi.setJiraData(jd); + jd.setID(jira); try { JAXBContext jaxbContext = JAXBContext @@ -113,7 +97,18 @@ public class PlanViewImpl implements PlanView { .getAbsoluteFile(); RSS j = ((JAXBElement<RSS>) m2.unmarshal(inputFile)).getValue(); - augment_plan(_p); + System.out.println(j.toString()); + Item i = j.getChannel().getItem(); + System.out.println(i.toString()); + List<JAXBElement<?>> c = i.getContent(); + for (JAXBElement<?> element : c) { + if("status".equals(element.getName().getLocalPart())){ + jd.setStatus((String)element.getValue()); + } + if("responsible".equals(element.getName().getLocalPart())) { + jd.setAssignedTo((String)element.getValue()); + } + } } catch (Exception e) { e.printStackTrace(); } finally { |