Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2011-05-03 17:11:11 -0400
committerRyan D. Brooks2011-05-03 17:11:11 -0400
commitd0ba9178aa64a2216b7a00934a29940b8f8970d4 (patch)
treece990ef5091a5cefe0ede8ff9b211f37d4aef3f7 /plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework
parentc68a5c5ad6083409ce94aba7e9705a22fff4acb0 (diff)
downloadorg.eclipse.osee-d0ba9178aa64a2216b7a00934a29940b8f8970d4.tar.gz
org.eclipse.osee-d0ba9178aa64a2216b7a00934a29940b8f8970d4.tar.xz
org.eclipse.osee-d0ba9178aa64a2216b7a00934a29940b8f8970d4.zip
refinement: Expose recursive purge operation to client through http
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework')
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java8
-rw-r--r--plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java12
2 files changed, 14 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
index 9495601f4e..201bb393c6 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/PurgeBranchRequest.java
@@ -16,13 +16,19 @@ package org.eclipse.osee.framework.core.message;
*/
public class PurgeBranchRequest {
private final int branchId;
+ private final boolean recursive;
- public PurgeBranchRequest(int branchId) {
+ public PurgeBranchRequest(int branchId, boolean recursive) {
super();
this.branchId = branchId;
+ this.recursive = recursive;
}
public int getBranchId() {
return branchId;
}
+
+ public boolean isRecursive() {
+ return recursive;
+ }
}
diff --git a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java
index f93dbc50e2..068cc497b0 100644
--- a/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java
+++ b/plugins/org.eclipse.osee.framework.core.message/src/org/eclipse/osee/framework/core/message/internal/translation/PurgeBranchRequestTranslator.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.framework.core.message.internal.translation;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.message.PurgeBranchRequest;
import org.eclipse.osee.framework.core.translation.ITranslator;
import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
@@ -21,20 +20,23 @@ import org.eclipse.osee.framework.jdk.core.type.PropertyStore;
*/
public class PurgeBranchRequestTranslator implements ITranslator<PurgeBranchRequest> {
private static enum Entry {
- BRANCH_ID
+ BRANCH_ID,
+ RECURSIVE
}
@Override
- public PurgeBranchRequest convert(PropertyStore propertyStore) throws OseeCoreException {
+ public PurgeBranchRequest convert(PropertyStore propertyStore) {
int branchId = propertyStore.getInt(Entry.BRANCH_ID.name());
- PurgeBranchRequest request = new PurgeBranchRequest(branchId);
+ boolean recursive = propertyStore.getBoolean(Entry.RECURSIVE.name());
+ PurgeBranchRequest request = new PurgeBranchRequest(branchId, recursive);
return request;
}
@Override
- public PropertyStore convert(PurgeBranchRequest data) throws OseeCoreException {
+ public PropertyStore convert(PurgeBranchRequest data) {
PropertyStore store = new PropertyStore();
store.put(Entry.BRANCH_ID.name(), data.getBranchId());
+ store.put(Entry.RECURSIVE.name(), data.isRecursive());
return store;
}
}

Back to the top