provisionr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From as...@apache.org
Subject [19/21] PROVISIONR-20. Change groupId from com.axemblr.provisionr to org.apache.provisionr
Date Mon, 01 Apr 2013 08:52:42 GMT
http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/AbstractActivitiPrintHandler.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/AbstractActivitiPrintHandler.java b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/AbstractActivitiPrintHandler.java
new file mode 100644
index 0000000..be0cb85
--- /dev/null
+++ b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/AbstractActivitiPrintHandler.java
@@ -0,0 +1,178 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands.handlers;
+
+import java.io.PrintWriter;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.activiti.engine.ActivitiException;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.history.HistoricActivityInstance;
+import org.activiti.engine.history.HistoricDetail;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.history.HistoricVariableUpdate;
+import org.apache.provisionr.activiti.karaf.commands.util.Commands;
+
+/**
+ * Abstract class that provides most of the implementation required to print process variable using
+ * print handler.
+ *
+ * @author Srinivasan Chikkala
+ * @see DefaultActivitiPrintHandler
+ */
+public abstract class AbstractActivitiPrintHandler implements ActivitiPrintHandler {
+
+    public static final String PROCESS_DEFINITION_PROP = "bpm.process.definition";
+    public static final String PROCESS_VARS_PROP = "bpm.process.variables";
+
+    private static final Logger LOG = Logger.getLogger(AbstractActivitiPrintHandler.class.getName());
+
+    private boolean verbose;
+    private boolean quiet;
+    private ProcessEngine processEngine;
+
+    public boolean isQuiet() {
+        return quiet;
+    }
+
+    public void setQuiet(boolean quiet) {
+        this.quiet = quiet;
+    }
+
+    public boolean isVerbose() {
+        return verbose;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public ProcessEngine getProcessEngine() {
+        return processEngine;
+    }
+
+    public void setProcessEngine(ProcessEngine processEngine) {
+        this.processEngine = processEngine;
+    }
+
+    /**
+     * Extended class can implement this method to print the variable specific information.
+     */
+    protected abstract void printVariable(PrintWriter out, String varName, Object varValue);
+
+    protected void printVariable(PrintWriter out, HistoricVariableUpdate var) {
+
+        LinkedHashMap<String, String> nvMap = new LinkedHashMap<String, String>();
+        // nvMap.put("Variable Type", var.getVariableTypeName());
+        if (this.isVerbose()) {
+            nvMap.put("Variable ID", var.getId());
+            nvMap.put("Revision", "" + var.getRevision());
+            nvMap.put("Updated Time", Commands.UTIL.formatDate(var.getTime()));
+        }
+        nvMap.put("Variable Name", var.getVariableName());
+        Object value = var.getValue();
+        String simpleValue = Commands.UTIL.valueOf(value);
+        if (simpleValue != null) {
+            nvMap.put("Value", simpleValue);
+        } else {
+            nvMap.put("Value", "");
+        }
+        Commands.UTIL.printNameValues(out, nvMap);
+
+        if (simpleValue == null) {
+            // print the value in a json serialization format.
+            printVariable(out, var.getVariableName(), value);
+        }
+        out.println();
+    }
+
+    protected void printVariables(PrintWriter out, Map<String, HistoricVariableUpdate> vars) {
+        for (HistoricVariableUpdate var : vars.values()) {
+            printVariable(out, var);
+        }
+    }
+
+    protected void printVariables(PrintWriter out, List<HistoricDetail> varList) {
+        Map<String, HistoricVariableUpdate> varMap = new TreeMap<String, HistoricVariableUpdate>();
+        // filter revisions
+        for (HistoricDetail detail : varList) {
+            HistoricVariableUpdate varDetail = (HistoricVariableUpdate) detail;
+            String varName = varDetail.getVariableName();
+            // expects the varList is sorted in a descending order of time.
+            if (!varMap.containsKey(varName)) {
+                varMap.put(varName, varDetail);
+            } else {
+                LOG.info("#### " + varName + " has multiple updates!!! "
+                    + Commands.UTIL.formatDate(varDetail.getTime()) + " Revision= "
+                    + varDetail.getRevision());
+            }
+        }
+        printVariables(out, varMap);
+    }
+
+    @Override
+    public void printInstanceData(PrintWriter out, boolean verbose, boolean quite, HistoricProcessInstance hpi) {
+        this.setVerbose(verbose);
+        this.setQuiet(quite);
+
+        List<HistoricDetail> varList = null;
+        try {
+            varList = this.processEngine.getHistoryService().createHistoricDetailQuery()
+                .variableUpdates().processInstanceId(hpi.getId()).orderByTime().desc().list();
+        } catch (ActivitiException ex) {
+            // silent about the error. and log it.
+            LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex);
+        }
+        if (varList != null && varList.size() > 0) {
+            out.println("-------- Instance Variables ");
+            printVariables(out, varList);
+        } else {
+            LOG.info("------ No Instance Variables! for " + hpi.getId());
+        }
+    }
+
+    @Override
+    public void printActivityData(PrintWriter out, boolean verbose, boolean quite,
+                                  HistoricActivityInstance actInst) {
+        this.setVerbose(verbose);
+        this.setQuiet(quite);
+        if (quite) {
+            // don't print activity variable update per activity
+            return;
+        }
+        List<HistoricDetail> varList = null;
+        try {
+            varList = this.processEngine.getHistoryService().createHistoricDetailQuery()
+                .variableUpdates().activityInstanceId(actInst.getId()).orderByTime().desc().list();
+        } catch (ActivitiException ex) {
+            //silent about the error. and log it.
+            LOG.log(Level.INFO, "Error in getting process variables. " + ex.getMessage(), ex);
+        }
+
+        if (varList != null && varList.size() > 0) {
+            out.println("-------- Task Variables");
+            printVariables(out, varList);
+        } else {
+            LOG.info("------ No Task Variables! for " + actInst.getActivityId());
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/ActivitiPrintHandler.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/ActivitiPrintHandler.java b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/ActivitiPrintHandler.java
new file mode 100644
index 0000000..c395693
--- /dev/null
+++ b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/ActivitiPrintHandler.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands.handlers;
+
+import java.io.PrintWriter;
+import org.activiti.engine.history.HistoricActivityInstance;
+import org.activiti.engine.history.HistoricProcessInstance;
+
+/**
+ * Service interface whose implementations can handle process variables printing as part of bpm:info cmd.
+ * service providers can register implementation of this interface as a OSGi service which the bpm:info cmd
+ * can lookup and use to print a bpmn process specific variable information.
+ * <p/>
+ * Each OSGi service registered can have the following set of properties
+ * process-definition=<process-definition-id> - which handles all process instances variable printing for this
+ * process definition.
+ * process-var-name=<name-of-the-var> - which handles all process instances that contains this variable name
+ * useful when you want to handles any process definitions that contains this variable.
+ *
+ * @author Srinivasan Chikkala
+ */
+public interface ActivitiPrintHandler {
+
+    /**
+     * Print instance level Activiti process variable data
+     */
+    void printInstanceData(PrintWriter out, boolean verbose, boolean quiet, HistoricProcessInstance hpi);
+
+    /**
+     * Print activity level Activiti process variable data
+     */
+    void printActivityData(PrintWriter out, boolean verbose, boolean quiet, HistoricActivityInstance actInst);
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/DefaultActivitiPrintHandler.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/DefaultActivitiPrintHandler.java b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/DefaultActivitiPrintHandler.java
new file mode 100644
index 0000000..67a1f5d
--- /dev/null
+++ b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/handlers/DefaultActivitiPrintHandler.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands.handlers;
+
+import java.io.PrintWriter;
+import java.io.StringReader;
+import java.lang.reflect.Modifier;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import org.apache.provisionr.activiti.karaf.commands.util.Commands;
+
+/**
+ * Default implementation of the process variable print handler.
+ *
+ * @author Srinivasan Chikkala
+ */
+public class DefaultActivitiPrintHandler extends AbstractActivitiPrintHandler {
+
+    private static final Logger LOG = Logger.getLogger(DefaultActivitiPrintHandler.class.getName());
+
+    protected void printVariable(PrintWriter out, String varName, Object varValue) {
+        Gson gson = new GsonBuilder()
+            .setPrettyPrinting()
+            .serializeNulls()
+            .excludeFieldsWithModifiers(Modifier.STATIC, Modifier.TRANSIENT, Modifier.VOLATILE)
+            .create();
+
+        LOG.info("Printing var " + varName);
+        String jsonText = null;
+        try {
+            jsonText = gson.toJson(varValue);
+        } catch (Exception ex) {
+            jsonText = "{\n  " + varValue + "\n}"; // use default toString object            
+            LOG.log(Level.SEVERE, "Serializing Activiti Variable. " + ex.getMessage(), ex);
+        }
+
+        Commands.UTIL.printText(out, new StringReader(jsonText), " ");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/Commands.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/Commands.java b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/Commands.java
new file mode 100644
index 0000000..f3edd30
--- /dev/null
+++ b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/Commands.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.TimeZone;
+
+/**
+ * This class provides common utils for commands processing
+ *
+ * @author Srinivasan Chikkala
+ */
+public class Commands {
+
+    public static final Commands UTIL = new Commands();
+
+    public void printNameValues(PrintWriter out, Map<String, String> nvMap) {
+        String fmt = "  %-16.16s %-20.60s\n";
+        for (String key : nvMap.keySet()) {
+            String value = nvMap.get(key);
+            out.printf(fmt, key + ":", value);
+        }
+    }
+
+    public String formatDate(Date date) {
+        String dateTxt = "--";
+        if (date != null) {
+            dateTxt = DateFormat.getDateTimeInstance().format(date);
+        }
+        return dateTxt;
+    }
+
+    public String formatDuration(Long duration) {
+        String dTxt = "--";
+        if (duration != null) {
+            SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss:SSS");
+            format.setTimeZone(TimeZone.getTimeZone("GMT"));
+            dTxt = format.format(new Date(duration));
+        }
+        return dTxt;
+    }
+
+    public void printText(PrintWriter out, Reader txtReader, String tabSpace) {
+        BufferedReader in = new BufferedReader(txtReader);
+        String line = null;
+        try {
+            while ((line = in.readLine()) != null) {
+                out.printf("  %-16.16s %s\n", tabSpace, line);
+            }
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Convert a simple object to string.
+     *
+     * @param obj object .
+     * @return string if the object is simple. else return null.
+     */
+    public String valueOf(Object obj) {
+        String value = null;
+        if (obj == null) {
+            value = "NULL";
+        } else if (obj.getClass().isPrimitive()
+            || obj.getClass().isEnum()
+            || obj instanceof java.lang.String) {
+            value = obj.toString();
+        } else if (obj instanceof Date) {
+            value = formatDate((Date) obj);
+        } else {
+            value = null;
+        }
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/TextTable.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/TextTable.java b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/TextTable.java
new file mode 100644
index 0000000..24c3831
--- /dev/null
+++ b/activiti/commands/src/main/java/org/apache/provisionr/activiti/karaf/commands/util/TextTable.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.provisionr.activiti.karaf.commands.util;
+
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Srinivasan Chikkala
+ */
+public class TextTable {
+
+    private static final int DEFAULT_WIDTH = 3;
+    private int col;
+
+    private List<String> columnHeaders;
+    private List<Integer> columnWidths;
+    private List<List<String>> rows;
+
+    public TextTable(int col) {
+        this.col = col;
+        this.columnHeaders = new ArrayList<String>();
+        this.columnWidths = new ArrayList<Integer>();
+        this.rows = new ArrayList<List<String>>();
+    }
+
+    public void addHeaders(String... headers) {
+        for (String header : headers) {
+            this.columnHeaders.add(header);
+            this.columnWidths.add(DEFAULT_WIDTH);
+        }
+    }
+
+    public void addRow(String... colValues) {
+        List<String> row = new ArrayList<String>();
+        rows.add(row);
+        if (colValues != null && colValues.length > this.col) {
+            throw new IllegalArgumentException("Number of Column values passed are more than the tables " +
+                "column cound " + this.col);
+        }
+        for (int i = 0; i < this.col; ++i) {
+            String colValue = "";
+            if ((i < colValues.length) && (colValues[i] != null)) {
+                colValue = colValues[i];
+                Integer colWidth = this.columnWidths.get(i);
+                if (colWidth < colValue.length()) {
+                    this.columnWidths.set(i, colValue.length());
+                }
+            }
+            row.add(colValue);
+        }
+    }
+
+    public void print(PrintStream stremaOut) {
+        PrintWriter out = new PrintWriter(stremaOut, true);
+        print(out);
+    }
+
+    public void print(PrintWriter out) {
+        StringBuilder hdrFmtBuff = new StringBuilder();
+        StringBuilder rowFmtBuff = new StringBuilder();
+        // " %-20.20s   %-20.20s [%-20.20s]\n";
+        // "[%-20.20s] [%-20.20s] [%-20.20s]\n";
+        for (Integer width : this.columnWidths) {
+            hdrFmtBuff.append(" %-").append(width).append(".").append(width).append("s ");
+            rowFmtBuff.append("[%-").append(width).append(".").append(width).append("s]");
+        }
+        hdrFmtBuff.append("\n");
+        rowFmtBuff.append("\n");
+        String hdrFmt = hdrFmtBuff.toString();
+        String rowFmt = rowFmtBuff.toString();
+
+        out.printf(hdrFmt, this.columnHeaders.toArray());
+        for (List<String> row : this.rows) {
+            out.printf(rowFmt, row.toArray());
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/main/resources/OSGI-INF/blueprint/bpm-commands.xml
----------------------------------------------------------------------
diff --git a/activiti/commands/src/main/resources/OSGI-INF/blueprint/bpm-commands.xml b/activiti/commands/src/main/resources/OSGI-INF/blueprint/bpm-commands.xml
index 67aa83a..0661bb3 100644
--- a/activiti/commands/src/main/resources/OSGI-INF/blueprint/bpm-commands.xml
+++ b/activiti/commands/src/main/resources/OSGI-INF/blueprint/bpm-commands.xml
@@ -22,67 +22,67 @@
            xmlns:cfg="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0">
     <shell:command-bundle>
         <shell:command name="activiti/list">
-            <shell:action class="org.activiti.karaf.commands.ListActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.ListActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/start">
-            <shell:action class="org.activiti.karaf.commands.StartActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.StartActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/kill">
-            <shell:action class="org.activiti.karaf.commands.KillActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.KillActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/signal">
-            <shell:action class="org.activiti.karaf.commands.SignalActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.SignalActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/undeploy">
-            <shell:action class="org.activiti.karaf.commands.UndeployActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.UndeployActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/clean-history">
-            <shell:action class="org.activiti.karaf.commands.CleanHistoryActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.CleanHistoryActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/info">
-            <shell:action class="org.activiti.karaf.commands.InfoActivitiCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.InfoActivitiCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/add-user">
-            <shell:action class="org.activiti.karaf.commands.AddUserCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.AddUserCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/delete-user">
-            <shell:action class="org.activiti.karaf.commands.DeleteUserCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.DeleteUserCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/add-group">
-            <shell:action class="org.activiti.karaf.commands.AddGroupCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.AddGroupCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/delete-group">
-            <shell:action class="org.activiti.karaf.commands.DeleteGroupCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.DeleteGroupCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/list-groups">
-            <shell:action class="org.activiti.karaf.commands.ListGroupsCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.ListGroupsCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>
         <shell:command name="activiti/list-users">
-            <shell:action class="org.activiti.karaf.commands.ListUsersCommand">
+            <shell:action class="org.apache.provisionr.activiti.karaf.commands.ListUsersCommand">
                 <shell:property name="processEngine" ref="processEngineRef"/>
             </shell:action>
         </shell:command>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiCommandTest.java b/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiCommandTest.java
deleted file mode 100644
index 02f323a..0000000
--- a/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiCommandTest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2012 Cisco Systems
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.activiti.karaf.commands;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import org.activiti.karaf.commands.util.TextTable;
-import org.junit.After;
-import static org.junit.Assert.assertEquals;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * @author Srinivasan Chikkala
- */
-public class ActivitiCommandTest {
-
-    private ByteArrayOutputStream backingStream;
-    private PrintWriter out;
-
-    @Before
-    public void setUp() {
-        backingStream = new ByteArrayOutputStream();
-        out = new PrintWriter(backingStream);
-    }
-
-    @After
-    public void tearDown() {
-        out.close();
-        backingStream.reset();
-    }
-
-    public String collectOutput() {
-        out.flush();
-        return backingStream.toString();
-    }
-
-    @Test
-    public void testTextTable1() {
-        String[] headers = {"col1", "column2", "c3"};
-        String[] row1 = {"myvalue111111111111111x", "myvalue2", "myvalue3"};
-        String[] row2 = {"myvalue1", "myvalue2", "myvalue3"};
-        String[] row3 = {"myvalue1", "myvalue2", "myvalue3"};
-
-        final String expectedOutput = " col1                     column2   c3       \n" +
-            "[myvalue111111111111111x][myvalue2][myvalue3]\n" +
-            "[myvalue1               ][myvalue2][myvalue3]\n" +
-            "[myvalue1               ][myvalue2][myvalue3]\n";
-
-        TextTable table = new TextTable(3);
-        table.addHeaders(headers);
-        table.addRow(row1);
-        table.addRow(row2);
-        table.addRow(row3);
-
-        table.print(out);
-        assertEquals(collectOutput(), expectedOutput);
-    }
-
-    @Test
-    public void testTextTable2() {
-        String[] headers = {"col1", "column2", "c3"};
-        String[] row1 = {"myvalue1", "myvalue2", "myvalue3"};
-        String[] row2 = {"myvalue111111111111111111111111111111x", "myvalue2", "myvalue3"};
-        String[] row3 = {"myvalue1", "myvalue2", "myvalue33333333333333333333x"};
-
-        final String expectedOutput = " col1                                    column2   c3                           \n" +
-            "[myvalue1                              ][myvalue2][myvalue3                    ]\n" +
-            "[myvalue111111111111111111111111111111x][myvalue2][myvalue3                    ]\n" +
-            "[myvalue1                              ][myvalue2][myvalue33333333333333333333x]\n";
-
-        TextTable table = new TextTable(3);
-        table.addHeaders(headers);
-        table.addRow(row1);
-        table.addRow(row2);
-        table.addRow(row3);
-
-        table.print(out);
-        assertEquals(collectOutput(), expectedOutput);
-    }
-
-    @Test
-    public void testTextTable3() {
-        String[] headers = {"col1", "column2", "c3"};
-        String[] row1 = {"myvalue1", "myvalue2", "myvalue3ddddddddddddddddddx"};
-        String[] row2 = {"myvalue1", "myvalue2", "myvalue3"};
-        String[] row3 = {"myvalue11111111111111111111111x", "myvalue2", "myvalue3"};
-
-        final String expectedOutput = " col1                             column2   c3                          \n" +
-            "[myvalue1                       ][myvalue2][myvalue3ddddddddddddddddddx]\n" +
-            "[myvalue1                       ][myvalue2][myvalue3                   ]\n" +
-            "[myvalue11111111111111111111111x][myvalue2][myvalue3                   ]\n";
-
-        TextTable table = new TextTable(3);
-        table.addHeaders(headers);
-        table.addRow(row1);
-        table.addRow(row2);
-        table.addRow(row3);
-
-        table.print(out);
-        assertEquals(collectOutput(), expectedOutput);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiTestCase.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiTestCase.java b/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiTestCase.java
deleted file mode 100644
index 2a2f80e..0000000
--- a/activiti/commands/src/test/java/org/activiti/karaf/commands/ActivitiTestCase.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2012 Cisco Systems
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.activiti.karaf.commands;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Logger;
-import org.activiti.engine.ProcessEngine;
-import org.activiti.engine.RuntimeService;
-import org.activiti.engine.TaskService;
-import org.activiti.engine.history.HistoricProcessInstance;
-import org.activiti.engine.runtime.ProcessInstance;
-import org.activiti.engine.test.ActivitiRule;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-/**
- * @author Srinivasan Chikkala
- */
-@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration("classpath:activiti.cfg.xml")
-public abstract class ActivitiTestCase {
-
-    private static final Logger LOG = Logger.getLogger(ActivitiTestCase.class.getName());
-
-    @Autowired
-    private ProcessEngine processEngine;
-
-    @Autowired
-    private RuntimeService runtimeService;
-
-    @Autowired
-    private TaskService taskService;
-
-    @Autowired
-    @Rule
-    public ActivitiRule activitiSpringRule;
-
-    private ByteArrayOutputStream outputStream;
-    private PrintWriter out;
-
-    private ByteArrayOutputStream errStream;
-    private PrintWriter err;
-
-    @Before
-    public void setUp() {
-        outputStream = new ByteArrayOutputStream();
-        out = new PrintWriter(outputStream);
-
-        errStream = new ByteArrayOutputStream();
-        err = new PrintWriter(errStream);
-    }
-
-    @After
-    public void tearDown() throws IOException {
-        processEngine.close();
-
-        out.close();
-        outputStream.close();
-
-        err.close();
-        errStream.close();
-    }
-
-    public PrintWriter getOut() {
-        return out;
-    }
-
-    public PrintWriter getErr() {
-        return err;
-    }
-
-    public String collectStdOutput() throws IOException {
-        out.flush();
-        outputStream.flush();
-
-        return outputStream.toString();
-    }
-
-    public String collectErrOutput() throws IOException {
-        err.flush();
-        errStream.flush();
-
-        return errStream.toString();
-    }
-
-    protected ProcessEngine getProcessEngine() {
-        return this.processEngine;
-    }
-
-    protected ProcessInstance startProcess(String processKey) throws Exception {
-        return startProcess(processKey, new HashMap<String, Object>());
-    }
-
-    protected ProcessInstance startProcess(String processKey, Map<String, Object> variables) throws Exception {
-        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, variables);
-        String processInstanceId = processInstance.getId();
-
-        LOG.info("Started process instance id " + processInstanceId);
-        runtimeService.createProcessInstanceQuery().count();
-
-        HistoricProcessInstance historicProcessInstance = processEngine
-            .getHistoryService().createHistoricProcessInstanceQuery()
-            .processInstanceId(processInstanceId).singleResult();
-
-        if (historicProcessInstance != null) {
-            LOG.info("Finished " + processKey + "Instance. took "
-                + historicProcessInstance.getDurationInMillis() + " millis");
-        }
-        return processInstance;
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/activiti/karaf/commands/InfoActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/activiti/karaf/commands/InfoActivitiCommandTest.java b/activiti/commands/src/test/java/org/activiti/karaf/commands/InfoActivitiCommandTest.java
deleted file mode 100644
index abf57bb..0000000
--- a/activiti/commands/src/test/java/org/activiti/karaf/commands/InfoActivitiCommandTest.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2012 Cisco Systems
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.activiti.karaf.commands;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.TreeMap;
-import org.activiti.engine.runtime.ProcessInstance;
-import org.activiti.engine.test.Deployment;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-
-/**
- * @author Srinivasan Chikkala
- */
-public class InfoActivitiCommandTest extends ActivitiTestCase {
-
-    @Test
-    @Deployment(resources = {"diagrams/test-bpm-1.bpmn20.xml", "diagrams/test-bpm-2.bpmn20.xml",
-        "diagrams/test-bpm-3.bpmn20.xml"})
-    public void testListBPMCommand1() throws Exception {
-        String processKey = "Test-bpm-1";
-
-        Map<String, Object> variables = new TreeMap<String, Object>();
-        variables.put("myfoo", new Foo());
-        variables.put("mybar", new Bar());
-        variables.put("my.array", new Object[]{new Foo(), new Bar()});
-
-        ProcessInstance processInstance = this.startProcess(processKey, variables);
-
-        InfoActivitiCommand command = new InfoActivitiCommand();
-        command.setProcessEngine(this.getProcessEngine());
-        command.setInstanceID(processInstance.getId());
-        command.setOut(getOut());
-        command.setErr(getErr());
-
-        command.doExecute();
-
-        assertThat(collectStdOutput())
-            .contains("Instance ID:")
-            .contains("Start Activity:  startevent1")
-            .contains("End Activity:    endevent1")
-            .contains("Variable Name:   my.array")
-            .contains("\"mybar\": \"bar3\"")
-            .contains("Variable Name:   mybar")
-            .contains(" Variable Name:   myfoo");
-    }
-
-    public static class Foo implements Serializable {
-
-        private static final long serialVersionUID = 1L;
-        private String myfoo = "foo2";
-        private boolean yes;
-        private String[] users = {"foo1", "foo2", "foo3"};
-        private Bar fooBar = new Bar();
-
-        public Bar getFooBar() {
-            return fooBar;
-        }
-
-        public void setFooBar(Bar fooBar) {
-            this.fooBar = fooBar;
-        }
-
-        public String getMyfoo() {
-            return myfoo;
-        }
-
-        public void setMyfoo(String myfoo) {
-            this.myfoo = myfoo;
-        }
-
-        public boolean isYes() {
-            return yes;
-        }
-
-        public void setYes(boolean yes) {
-            this.yes = yes;
-        }
-
-        public String[] getUsers() {
-            return users;
-        }
-
-        public void setUsers(String[] users) {
-            this.users = users;
-        }
-
-        public static Foo getFoo() {
-            return new Foo();
-        }
-    }
-
-    public static class Bar implements Serializable {
-
-        private static final long serialVersionUID = 1L;
-        private String mybar = "bar3";
-        private boolean yes;
-        private String[] users = {"bar1", "bar2", "bar3"};
-
-        public String getMybar() {
-            return mybar;
-        }
-
-        public void setMybar(String mybar) {
-            this.mybar = mybar;
-        }
-
-        public boolean isYes() {
-            return yes;
-        }
-
-        public void setYes(boolean yes) {
-            this.yes = yes;
-        }
-
-        public String[] getUsers() {
-            return users;
-        }
-
-        public void setUsers(String[] users) {
-            this.users = users;
-        }
-
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/activiti/karaf/commands/ListActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/activiti/karaf/commands/ListActivitiCommandTest.java b/activiti/commands/src/test/java/org/activiti/karaf/commands/ListActivitiCommandTest.java
deleted file mode 100644
index 10dcef1..0000000
--- a/activiti/commands/src/test/java/org/activiti/karaf/commands/ListActivitiCommandTest.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2012 Cisco Systems
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.activiti.karaf.commands;
-
-import org.activiti.engine.test.Deployment;
-import static org.fest.assertions.api.Assertions.assertThat;
-import org.junit.Test;
-
-/**
- * @author Srinivasan Chikkala
- */
-public class ListActivitiCommandTest extends ActivitiTestCase {
-
-    @Test
-    @Deployment(resources = {"diagrams/test-bpm-1.bpmn20.xml", "diagrams/test-bpm-2.bpmn20.xml",
-        "diagrams/test-bpm-3.bpmn20.xml"})
-    public void testListCommand() throws Exception {
-        ListActivitiCommand command = new ListActivitiCommand();
-
-        command.setProcessEngine(getProcessEngine());
-        command.setOut(getOut());
-        command.setErr(getErr());
-
-        command.doExecute();
-
-        assertThat(collectStdOutput())
-            .contains("[diagrams/test-bpm-2.bpmn20.xml]")
-            .contains("[diagrams/test-bpm-3.bpmn20.xml]")
-            .contains("[diagrams/test-bpm-1.bpmn20.xml]")
-            .contains("[ListActivitiCommandTest.testListCommand]");
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiCommandTest.java b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiCommandTest.java
new file mode 100644
index 0000000..7afc0f2
--- /dev/null
+++ b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiCommandTest.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import org.apache.provisionr.activiti.karaf.commands.util.TextTable;
+import org.junit.After;
+import static org.junit.Assert.assertEquals;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * @author Srinivasan Chikkala
+ */
+public class ActivitiCommandTest {
+
+    private ByteArrayOutputStream backingStream;
+    private PrintWriter out;
+
+    @Before
+    public void setUp() {
+        backingStream = new ByteArrayOutputStream();
+        out = new PrintWriter(backingStream);
+    }
+
+    @After
+    public void tearDown() {
+        out.close();
+        backingStream.reset();
+    }
+
+    public String collectOutput() {
+        out.flush();
+        return backingStream.toString();
+    }
+
+    @Test
+    public void testTextTable1() {
+        String[] headers = {"col1", "column2", "c3"};
+        String[] row1 = {"myvalue111111111111111x", "myvalue2", "myvalue3"};
+        String[] row2 = {"myvalue1", "myvalue2", "myvalue3"};
+        String[] row3 = {"myvalue1", "myvalue2", "myvalue3"};
+
+        final String expectedOutput = " col1                     column2   c3       \n" +
+            "[myvalue111111111111111x][myvalue2][myvalue3]\n" +
+            "[myvalue1               ][myvalue2][myvalue3]\n" +
+            "[myvalue1               ][myvalue2][myvalue3]\n";
+
+        TextTable table = new TextTable(3);
+        table.addHeaders(headers);
+        table.addRow(row1);
+        table.addRow(row2);
+        table.addRow(row3);
+
+        table.print(out);
+        assertEquals(collectOutput(), expectedOutput);
+    }
+
+    @Test
+    public void testTextTable2() {
+        String[] headers = {"col1", "column2", "c3"};
+        String[] row1 = {"myvalue1", "myvalue2", "myvalue3"};
+        String[] row2 = {"myvalue111111111111111111111111111111x", "myvalue2", "myvalue3"};
+        String[] row3 = {"myvalue1", "myvalue2", "myvalue33333333333333333333x"};
+
+        final String expectedOutput = " col1                                    column2   c3                           \n" +
+            "[myvalue1                              ][myvalue2][myvalue3                    ]\n" +
+            "[myvalue111111111111111111111111111111x][myvalue2][myvalue3                    ]\n" +
+            "[myvalue1                              ][myvalue2][myvalue33333333333333333333x]\n";
+
+        TextTable table = new TextTable(3);
+        table.addHeaders(headers);
+        table.addRow(row1);
+        table.addRow(row2);
+        table.addRow(row3);
+
+        table.print(out);
+        assertEquals(collectOutput(), expectedOutput);
+    }
+
+    @Test
+    public void testTextTable3() {
+        String[] headers = {"col1", "column2", "c3"};
+        String[] row1 = {"myvalue1", "myvalue2", "myvalue3ddddddddddddddddddx"};
+        String[] row2 = {"myvalue1", "myvalue2", "myvalue3"};
+        String[] row3 = {"myvalue11111111111111111111111x", "myvalue2", "myvalue3"};
+
+        final String expectedOutput = " col1                             column2   c3                          \n" +
+            "[myvalue1                       ][myvalue2][myvalue3ddddddddddddddddddx]\n" +
+            "[myvalue1                       ][myvalue2][myvalue3                   ]\n" +
+            "[myvalue11111111111111111111111x][myvalue2][myvalue3                   ]\n";
+
+        TextTable table = new TextTable(3);
+        table.addHeaders(headers);
+        table.addRow(row1);
+        table.addRow(row2);
+        table.addRow(row3);
+
+        table.print(out);
+        assertEquals(collectOutput(), expectedOutput);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiTestCase.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiTestCase.java b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiTestCase.java
new file mode 100644
index 0000000..7879636
--- /dev/null
+++ b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ActivitiTestCase.java
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Logger;
+import org.activiti.engine.ProcessEngine;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.history.HistoricProcessInstance;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.test.ActivitiRule;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * @author Srinivasan Chikkala
+ */
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration("classpath:activiti.cfg.xml")
+public abstract class ActivitiTestCase {
+
+    private static final Logger LOG = Logger.getLogger(ActivitiTestCase.class.getName());
+
+    @Autowired
+    private ProcessEngine processEngine;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private TaskService taskService;
+
+    @Autowired
+    @Rule
+    public ActivitiRule activitiSpringRule;
+
+    private ByteArrayOutputStream outputStream;
+    private PrintWriter out;
+
+    private ByteArrayOutputStream errStream;
+    private PrintWriter err;
+
+    @Before
+    public void setUp() {
+        outputStream = new ByteArrayOutputStream();
+        out = new PrintWriter(outputStream);
+
+        errStream = new ByteArrayOutputStream();
+        err = new PrintWriter(errStream);
+    }
+
+    @After
+    public void tearDown() throws IOException {
+        processEngine.close();
+
+        out.close();
+        outputStream.close();
+
+        err.close();
+        errStream.close();
+    }
+
+    public PrintWriter getOut() {
+        return out;
+    }
+
+    public PrintWriter getErr() {
+        return err;
+    }
+
+    public String collectStdOutput() throws IOException {
+        out.flush();
+        outputStream.flush();
+
+        return outputStream.toString();
+    }
+
+    public String collectErrOutput() throws IOException {
+        err.flush();
+        errStream.flush();
+
+        return errStream.toString();
+    }
+
+    protected ProcessEngine getProcessEngine() {
+        return this.processEngine;
+    }
+
+    protected ProcessInstance startProcess(String processKey) throws Exception {
+        return startProcess(processKey, new HashMap<String, Object>());
+    }
+
+    protected ProcessInstance startProcess(String processKey, Map<String, Object> variables) throws Exception {
+        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processKey, variables);
+        String processInstanceId = processInstance.getId();
+
+        LOG.info("Started process instance id " + processInstanceId);
+        runtimeService.createProcessInstanceQuery().count();
+
+        HistoricProcessInstance historicProcessInstance = processEngine
+            .getHistoryService().createHistoricProcessInstanceQuery()
+            .processInstanceId(processInstanceId).singleResult();
+
+        if (historicProcessInstance != null) {
+            LOG.info("Finished " + processKey + "Instance. took "
+                + historicProcessInstance.getDurationInMillis() + " millis");
+        }
+        return processInstance;
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/InfoActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/InfoActivitiCommandTest.java b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/InfoActivitiCommandTest.java
new file mode 100644
index 0000000..6e32b1c
--- /dev/null
+++ b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/InfoActivitiCommandTest.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.TreeMap;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.test.Deployment;
+import static org.fest.assertions.api.Assertions.assertThat;
+import org.junit.Test;
+
+/**
+ * @author Srinivasan Chikkala
+ */
+public class InfoActivitiCommandTest extends ActivitiTestCase {
+
+    @Test
+    @Deployment(resources = {"diagrams/test-bpm-1.bpmn20.xml", "diagrams/test-bpm-2.bpmn20.xml",
+        "diagrams/test-bpm-3.bpmn20.xml"})
+    public void testListBPMCommand1() throws Exception {
+        String processKey = "Test-bpm-1";
+
+        Map<String, Object> variables = new TreeMap<String, Object>();
+        variables.put("myfoo", new Foo());
+        variables.put("mybar", new Bar());
+        variables.put("my.array", new Object[]{new Foo(), new Bar()});
+
+        ProcessInstance processInstance = this.startProcess(processKey, variables);
+
+        InfoActivitiCommand command = new InfoActivitiCommand();
+        command.setProcessEngine(this.getProcessEngine());
+        command.setInstanceID(processInstance.getId());
+        command.setOut(getOut());
+        command.setErr(getErr());
+
+        command.doExecute();
+
+        assertThat(collectStdOutput())
+            .contains("Instance ID:")
+            .contains("Start Activity:  startevent1")
+            .contains("End Activity:    endevent1")
+            .contains("Variable Name:   my.array")
+            .contains("\"mybar\": \"bar3\"")
+            .contains("Variable Name:   mybar")
+            .contains(" Variable Name:   myfoo");
+    }
+
+    public static class Foo implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+        private String myfoo = "foo2";
+        private boolean yes;
+        private String[] users = {"foo1", "foo2", "foo3"};
+        private Bar fooBar = new Bar();
+
+        public Bar getFooBar() {
+            return fooBar;
+        }
+
+        public void setFooBar(Bar fooBar) {
+            this.fooBar = fooBar;
+        }
+
+        public String getMyfoo() {
+            return myfoo;
+        }
+
+        public void setMyfoo(String myfoo) {
+            this.myfoo = myfoo;
+        }
+
+        public boolean isYes() {
+            return yes;
+        }
+
+        public void setYes(boolean yes) {
+            this.yes = yes;
+        }
+
+        public String[] getUsers() {
+            return users;
+        }
+
+        public void setUsers(String[] users) {
+            this.users = users;
+        }
+
+        public static Foo getFoo() {
+            return new Foo();
+        }
+    }
+
+    public static class Bar implements Serializable {
+
+        private static final long serialVersionUID = 1L;
+        private String mybar = "bar3";
+        private boolean yes;
+        private String[] users = {"bar1", "bar2", "bar3"};
+
+        public String getMybar() {
+            return mybar;
+        }
+
+        public void setMybar(String mybar) {
+            this.mybar = mybar;
+        }
+
+        public boolean isYes() {
+            return yes;
+        }
+
+        public void setYes(boolean yes) {
+            this.yes = yes;
+        }
+
+        public String[] getUsers() {
+            return users;
+        }
+
+        public void setUsers(String[] users) {
+            this.users = users;
+        }
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ListActivitiCommandTest.java
----------------------------------------------------------------------
diff --git a/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ListActivitiCommandTest.java b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ListActivitiCommandTest.java
new file mode 100644
index 0000000..c675735
--- /dev/null
+++ b/activiti/commands/src/test/java/org/apache/provisionr/activiti/karaf/commands/ListActivitiCommandTest.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2012 Cisco Systems
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.provisionr.activiti.karaf.commands;
+
+import org.activiti.engine.test.Deployment;
+import static org.fest.assertions.api.Assertions.assertThat;
+import org.junit.Test;
+
+/**
+ * @author Srinivasan Chikkala
+ */
+public class ListActivitiCommandTest extends ActivitiTestCase {
+
+    @Test
+    @Deployment(resources = {"diagrams/test-bpm-1.bpmn20.xml", "diagrams/test-bpm-2.bpmn20.xml",
+        "diagrams/test-bpm-3.bpmn20.xml"})
+    public void testListCommand() throws Exception {
+        ListActivitiCommand command = new ListActivitiCommand();
+
+        command.setProcessEngine(getProcessEngine());
+        command.setOut(getOut());
+        command.setErr(getErr());
+
+        command.doExecute();
+
+        assertThat(collectStdOutput())
+            .contains("[diagrams/test-bpm-2.bpmn20.xml]")
+            .contains("[diagrams/test-bpm-3.bpmn20.xml]")
+            .contains("[diagrams/test-bpm-1.bpmn20.xml]")
+            .contains("[ListActivitiCommandTest.testListCommand]");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/activiti/explorer/pom.xml
----------------------------------------------------------------------
diff --git a/activiti/explorer/pom.xml b/activiti/explorer/pom.xml
index c010873..f0ad6fa 100644
--- a/activiti/explorer/pom.xml
+++ b/activiti/explorer/pom.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <!--
         Copyright 2012 Cisco Systems
         
@@ -21,17 +22,16 @@
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
-        <groupId>com.axemblr.provisionr</groupId>
+        <groupId>org.apache.provisionr</groupId>
         <artifactId>provisionr-parent</artifactId>
         <version>0.4.0-SNAPSHOT</version>
         <relativePath>../../parent</relativePath>
     </parent>
 
-    <groupId>org.activiti.karaf</groupId>
     <artifactId>activiti-karaf-web-explorer</artifactId>
     <packaging>war</packaging>
 
-    <name>Activiti Karaf :: Web Explorer</name>
+    <name>Apache Provisionr :: Activiti Karaf :: Explorer</name>
     <description>Activiti Explorer Web Application As OGSi War</description>
     <url>http://activiti.org</url>
 
@@ -270,7 +270,8 @@
                         <Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
                         <Webapp-Context>activiti-explorer</Webapp-Context>
                         <Bundle-Name>${project.name}</Bundle-Name>
-                        <Import-Package>org.activiti.osgi*;resolution:=optional, ${activiti.osgi.import}</Import-Package>
+                        <Import-Package>org.activiti.osgi*;resolution:=optional, ${activiti.osgi.import}
+                        </Import-Package>
                         <DynamicImport-Package>${activiti.osgi.dynamic}</DynamicImport-Package>
                         <Include-Resource>${activiti.osgi.include.resource}</Include-Resource>
                     </instructions>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/pom.xml
----------------------------------------------------------------------
diff --git a/api/pom.xml b/api/pom.xml
index f8e62d8..2bd7763 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -17,13 +17,13 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <parent>
-        <groupId>com.axemblr.provisionr</groupId>
+        <groupId>org.apache.provisionr</groupId>
         <artifactId>provisionr-parent</artifactId>
         <version>0.4.0-SNAPSHOT</version>
         <relativePath>../parent</relativePath>
     </parent>
 
-    <name>Axemblr Provisionr :: API</name>
+    <name>Apache Provisionr :: API</name>
     <artifactId>provisionr-api</artifactId>
     <packaging>bundle</packaging>
 
@@ -53,7 +53,7 @@
                     <outputDirectory>${basedir}/target/classes</outputDirectory>
                     <instructions>
                         <Fragment-Host>org.activiti.engine</Fragment-Host>
-                        <Export-Package>com.axemblr.provisionr.api*</Export-Package>
+                        <Export-Package>org.apache.provisionr.api*</Export-Package>
                         <Private-Package>!*</Private-Package>
                     </instructions>
                 </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/Provisionr.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/Provisionr.java b/api/src/main/java/com/axemblr/provisionr/api/Provisionr.java
deleted file mode 100644
index 2b4c483..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/Provisionr.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api;
-
-import com.axemblr.provisionr.api.pool.Machine;
-import com.axemblr.provisionr.api.pool.Pool;
-import com.axemblr.provisionr.api.provider.Provider;
-import com.google.common.base.Optional;
-import java.util.List;
-
-public interface Provisionr {
-
-    /**
-     * Get unique ID for this provisionr
-     */
-    public String getId();
-
-
-    /**
-     * Return the default provider configured for this bundle using the
-     * Blueprint configuration mechanism or something else
-     *
-     * @see Provider
-     */
-    public Optional<Provider> getDefaultProvider();
-
-    /**
-     * Start a provisioning process based on the pool description
-     * <p/>
-     * This process will run until the pool is destroyed
-     *
-     * @param businessKey external process ID (e.g. job ID, business key)
-     * @param pool        pool description
-     * @return internal process ID
-     */
-    String startPoolManagementProcess(String businessKey, Pool pool);
-
-
-    /**
-     * Retrieve the list of machines for a pool or an empty list
-     *
-     * @param businessKey external pool ID (e.g. job ID)
-     * @return list of running machines or empty
-     */
-    List<Machine> getMachines(String businessKey);
-
-    /**
-     * Get current pool status
-     *
-     * @param businessKey external process ID (e.g. job ID)
-     * @return internal status information
-     */
-    String getStatus(String businessKey);
-
-    /**
-     * Destroy all the machines from the pool with that id
-     *
-     * @param businessKey external pool ID (e.g. job ID, business key)
-     */
-    void destroyPool(String businessKey);
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccess.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccess.java b/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccess.java
deleted file mode 100644
index f17f473..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccess.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.access;
-
-import com.google.common.base.Objects;
-import static com.google.common.base.Preconditions.checkNotNull;
-import java.io.Serializable;
-
-/**
- * Describe the only user allowed to access machine from the pool over SSH
- * <p/>
- * This user will support only key-based SSH authentication have
- * password-less sudo access
- */
-public class AdminAccess implements Serializable {
-
-    public static AdminAccessBuilder builder() {
-        return new AdminAccessBuilder();
-    }
-
-    private final String username;
-    private final String publicKey;
-    private final String privateKey;
-
-    AdminAccess(String username, String publicKey, String privateKey) {
-        this.username = checkNotNull(username, "username is null");
-        this.publicKey = checkNotNull(publicKey, "publicKey is null");
-        this.privateKey = checkNotNull(privateKey, "privateKey is null");
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public String getPublicKey() {
-        return publicKey;
-    }
-
-    public String getPrivateKey() {
-        return privateKey;
-    }
-
-    public AdminAccessBuilder toBuilder() {
-        return builder().username(username)
-            .publicKey(publicKey).privateKey(privateKey);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(username, publicKey, privateKey);
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final AdminAccess other = (AdminAccess) obj;
-        return Objects.equal(this.username, other.username)
-            && Objects.equal(this.publicKey, other.publicKey)
-            && Objects.equal(this.privateKey, other.privateKey);
-    }
-
-    @Override
-    public String toString() {
-        return "AdminAccess{" +
-            "username='" + username + '\'' +
-            ", publicKey='" + publicKey + '\'' +
-            '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccessBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccessBuilder.java b/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccessBuilder.java
deleted file mode 100644
index 69f03bc..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/access/AdminAccessBuilder.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.access;
-
-import com.google.common.base.Charsets;
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.Throwables;
-import com.google.common.io.Files;
-import java.io.File;
-
-public class AdminAccessBuilder {
-
-    private String username;
-    private String publicKey;
-    private String privateKey;
-
-    public AdminAccessBuilder username(String username) {
-        this.username = checkNotNull(username, "username is null");
-        return this;
-    }
-
-    public AdminAccessBuilder publicKey(String publicKey) {
-        checkArgument(publicKey.startsWith("ssh-rsa "), "The key does not start with ssh-rsa as expected");
-        this.publicKey = checkNotNull(publicKey, "publicKey is null");
-        return this;
-    }
-
-    public AdminAccessBuilder privateKey(String privateKey) {
-        checkArgument(privateKey.startsWith("-----BEGIN RSA PRIVATE KEY-----"),
-            "The key does not start with -----BEGIN RSA PRIVATE KEY----- as expected");
-        this.privateKey = checkNotNull(privateKey, "privateKey is null");
-        return this;
-    }
-
-    public AdminAccessBuilder asCurrentUser() {
-        String userHome = System.getProperty("user.home");
-
-        try {
-            String publicKey = Files.toString(new File(userHome, ".ssh/id_rsa.pub"), Charsets.UTF_8);
-            String privateKey = Files.toString(new File(userHome, ".ssh/id_rsa"), Charsets.UTF_8);
-
-            return username(System.getProperty("user.name")).publicKey(publicKey).privateKey(privateKey);
-
-        } catch (Exception e) {
-            throw Throwables.propagate(e);
-        }
-    }
-
-    public AdminAccess createAdminAccess() {
-        return new AdminAccess(username, publicKey, privateKey);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDevice.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDevice.java b/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDevice.java
deleted file mode 100644
index ed72ebd..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDevice.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*    http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package com.axemblr.provisionr.api.hardware;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import com.axemblr.provisionr.api.util.WithOptions;
-import com.google.common.base.Objects;
-
-import java.util.Map;
-
-public class BlockDevice extends WithOptions {
-
-    private int size;
-    private String name;
-
-    public static BlockDeviceBuilder builder() {
-        return new BlockDeviceBuilder();
-    }
-
-    BlockDevice(int size, String name, Map<String, String> options) {
-        super(options);
-        checkArgument(size > 0, "the block device size should be a positive integer");
-        this.size = size;
-        this.name = name;
-    }
-
-    public int getSize() {
-        return size;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(size, name, getOptions());
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final BlockDevice other = (BlockDevice) obj;
-        return Objects.equal(this.size, other.size)
-            && Objects.equal(this.name, this.name)
-            && Objects.equal(this.getOptions(), other.getOptions());
-    }
-
-    @Override
-    public String toString() {
-        return "BlockDevice {" +
-            "size=" + size +
-            "name=" + name +
-            ", options=" + getOptions() + "}";
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDeviceBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDeviceBuilder.java b/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDeviceBuilder.java
deleted file mode 100644
index 7353a84..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/hardware/BlockDeviceBuilder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.axemblr.provisionr.api.hardware;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import com.axemblr.provisionr.api.util.BuilderWithOptions;
-
-public class BlockDeviceBuilder extends BuilderWithOptions<BlockDeviceBuilder> {
-
-    private Integer size;
-    private String name;
-
-    @Override
-    protected BlockDeviceBuilder getThis() {
-        return this;
-    }
-
-    public BlockDeviceBuilder size(int size) {
-        checkArgument(size > 0, "The block device size must be a positive integer");
-        this.size = size;
-        return this;
-    }
-
-    public BlockDeviceBuilder name(String mapping) {
-        this.name = checkNotNull(mapping, "The block device must have a name - the OS path on which it is mapped");
-        return this;
-    }
-
-    public BlockDevice createBlockDevice() {
-        checkNotNull(size, "The size was not specified");
-        return new BlockDevice(size, name, buildOptions());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/hardware/Hardware.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/hardware/Hardware.java b/api/src/main/java/com/axemblr/provisionr/api/hardware/Hardware.java
deleted file mode 100644
index 55ae6cf..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/hardware/Hardware.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.hardware;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import com.axemblr.provisionr.api.util.WithOptions;
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-import java.util.List;
-import java.util.Map;
-
-public class Hardware extends WithOptions {
-
-    public static HardwareBuilder builder() {
-        return new HardwareBuilder();
-    }
-
-    private final String type;
-    private List<BlockDevice> blockDevices;
-
-    Hardware(String type, List<BlockDevice> blockDevices, Map<String, String> options) {
-        super(options);
-        this.type = checkNotNull(type, "type is null");
-        this.blockDevices = ImmutableList.copyOf(blockDevices);
-    }
-
-    public String getType() {
-        return type;
-    }
-
-    public List<BlockDevice> getBlockDevices() {
-        return blockDevices;
-    }
-
-    public HardwareBuilder toBuilder() {
-        return builder().type(type).blockDevices(blockDevices).options(getOptions());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(type, getOptions(), getBlockDevices());
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final Hardware other = (Hardware) obj;
-        return Objects.equal(this.type, other.type)
-            && Objects.equal(this.getOptions(), other.getOptions())
-            && Objects.equal(this.getBlockDevices(), other.getBlockDevices());
-    }
-
-    @Override
-    public String toString() {
-        return "Hardware{" +
-            "type='" + type + '\'' +
-            ", blockDevices=" + getBlockDevices() + 
-            ", options=" + getOptions() +
-            '}';
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/hardware/HardwareBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/hardware/HardwareBuilder.java b/api/src/main/java/com/axemblr/provisionr/api/hardware/HardwareBuilder.java
deleted file mode 100644
index 0904546..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/hardware/HardwareBuilder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.hardware;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import com.axemblr.provisionr.api.util.BuilderWithOptions;
-import com.google.common.collect.Lists;
-
-import java.util.List;
-
-public class HardwareBuilder extends BuilderWithOptions<HardwareBuilder> {
-
-    private String type = "default";
-    private List<BlockDevice> blockDevices = Lists.newArrayList();
-
-    @Override
-    protected HardwareBuilder getThis() {
-        return this;
-    }
-
-    /**
-     * This is similar to <a href="http://aws.amazon.com/ec2/instance-types/">'instance type'</a> on Amazon
-     * or <a href="http://docs.cloudstack.org/Glossary">'service offering'</a> on CloudStack
-     *
-     * @param type
-     * @return
-     */
-    public HardwareBuilder type(String type) {
-        this.type = checkNotNull(type, "type is null");
-        return this;
-    }
-
-    public HardwareBuilder blockDevices(List<BlockDevice> blockDevices) {
-        this.blockDevices = checkNotNull(blockDevices, "the list of block devices is null");
-        return this;
-    }
-
-    public Hardware createHardware() {
-        return new Hardware(type, blockDevices, buildOptions());
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/network/Network.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/network/Network.java b/api/src/main/java/com/axemblr/provisionr/api/network/Network.java
deleted file mode 100644
index b47721a..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/network/Network.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.network;
-
-import com.axemblr.provisionr.api.util.WithOptions;
-import com.google.common.base.Objects;
-import com.google.common.base.Optional;
-import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableSet;
-import java.io.Serializable;
-import java.util.Map;
-import java.util.Set;
-
-public class Network extends WithOptions {
-
-    public static NetworkBuilder builder() {
-        return new NetworkBuilder();
-    }
-
-    private final String type;
-    private final Set<Rule> ingress;
-
-    Network(String type, Set<Rule> ingress, Map<String, String> options) {
-        super(options);
-        this.type = checkNotNull(type, "type is null");
-        this.ingress = ImmutableSet.copyOf(ingress);
-    }
-
-    /**
-     * Implementation specific network type information
-     */
-    public String getType() {
-        return type;
-    }
-
-    /**
-     * Set of rules for incoming packages
-     */
-    public Set<Rule> getIngress() {
-        return ingress;
-    }
-
-    public NetworkBuilder toBuilder() {
-        return builder().type(type).ingress(ingress).options(getOptions());
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hashCode(type, ingress, getOptions());
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        final Network other = (Network) obj;
-        return Objects.equal(this.type, other.type)
-            && Objects.equal(this.ingress, other.ingress)
-            && Objects.equal(this.getOptions(), other.getOptions());
-    }
-
-    @Override
-    public String toString() {
-        return Objects.toStringHelper(this).omitNullValues()
-            .add("type", type).add("ingress", ingress)
-            .add("options", getOptions()).toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/network/NetworkBuilder.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/network/NetworkBuilder.java b/api/src/main/java/com/axemblr/provisionr/api/network/NetworkBuilder.java
deleted file mode 100644
index 06c25d5..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/network/NetworkBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.network;
-
-import com.axemblr.provisionr.api.util.BuilderWithOptions;
-import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Lists;
-import java.util.Set;
-
-public class NetworkBuilder extends BuilderWithOptions<NetworkBuilder> {
-
-    private String type = "default";
-    private ImmutableSet.Builder<Rule> ingress = ImmutableSet.builder();
-
-    @Override
-    protected NetworkBuilder getThis() {
-        return this;
-    }
-
-    public NetworkBuilder type(String type) {
-        this.type = checkNotNull(type, "type is null");
-        return this;
-    }
-
-    public NetworkBuilder ingress(Set<Rule> incoming) {
-        this.ingress = ImmutableSet.<Rule>builder().addAll(incoming);
-        return this;
-    }
-
-    public NetworkBuilder addRules(Rule... rules) {
-        return addRules(Lists.newArrayList(rules));
-    }
-
-    public NetworkBuilder addRules(Iterable<Rule> rules) {
-        this.ingress.addAll(rules);
-        return this;
-    }
-
-    public Network createNetwork() {
-        return new Network(type, ingress.build(), buildOptions());
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-provisionr/blob/6ba40c4b/api/src/main/java/com/axemblr/provisionr/api/network/Protocol.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/com/axemblr/provisionr/api/network/Protocol.java b/api/src/main/java/com/axemblr/provisionr/api/network/Protocol.java
deleted file mode 100644
index ec9ba05..0000000
--- a/api/src/main/java/com/axemblr/provisionr/api/network/Protocol.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2012 S.C. Axemblr Software Solutions S.R.L
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.axemblr.provisionr.api.network;
-
-public enum Protocol {
-    TCP,
-    UDP,
-    ICMP
-}


Mime
View raw message