summaryrefslogtreecommitdiffstats
path: root/sandbox/kgoodson
diff options
context:
space:
mode:
authorkelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68>2010-02-02 17:48:53 +0000
committerkelvingoodson <kelvingoodson@13f79535-47bb-0310-9956-ffa450edef68>2010-02-02 17:48:53 +0000
commitfde2aad35a35ef39a37514614a7b7154bcc79690 (patch)
tree90b26393e32b81af55ab1fb2f64ece5619d19ed9 /sandbox/kgoodson
parent10b54a07c2976213bf024c216231fe0441bf1fd7 (diff)
write plan after jira data refresh
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@905731 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sandbox/kgoodson')
-rw-r--r--sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
index 9be9d967ef..fad6f68b63 100644
--- a/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
+++ b/sandbox/kgoodson/jagg/src/main/java/services/PlanViewImpl.java
@@ -50,7 +50,7 @@ public class PlanViewImpl implements PlanView {
static String rssPrefix = "http://issues.apache.org/jira/si/jira.issueviews:issue-xml/";
@Property
public String planFile = "src/main/resources/jiraSideBand.xml";
-
+
@Init
public void init() {
}
@@ -60,6 +60,7 @@ public class PlanViewImpl implements PlanView {
try {
p = readPlan();
augmentPlan(p);
+ writePlan(p);
} catch (Exception e) {
e.printStackTrace();
}
@@ -236,10 +237,15 @@ public class PlanViewImpl implements PlanView {
Unmarshaller m = jaxbContext.createUnmarshaller();
File inputFile = new File(planFile).getAbsoluteFile();
+ if(!inputFile.exists()){ // start afresh
+ Plan newPlan = new Plan();
+ writePlan(newPlan);
+ inputFile = new File(planFile).getAbsoluteFile();
+ }
p = (Plan)m.unmarshal(inputFile);
} catch(Exception e) {
- // FIXME
+ throw new IllegalStateException("Failed to read plan file",e);
}
return p;
}