@@ -0,0 +1,1343 @@
+package rhogenwizard.sdk.task.rhohub;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport rhogenwizard.rhohub.IRhoHubSetting;%0Aimport rhogenwizard.sdk.task.RubyCodeExecTask;%0A%0Apublic class CreateAppTask extends RubyCodeExecTask%0A%7B%0A    private static String getAppParams(String appName)%0A    %7B%0A        try%0A        %7B%0A            JSONObject createOptions = new JSONObject();%0A            createOptions.put(%22name%22, appName);%0A            %0A            JSONObject wrapObject = new JSONObject();%0A            wrapObject.put(%22app%22, createOptions);%0A            %0A            return %22%5C%22%22 + wrapObject.toString().replaceAll(%22%5C%5C%5C%22%22, %22%5C%5C%5C%5C%5C%22%22) + %22%5C%22%22;%0A        %7D%0A        catch (JSONException e)%0A        %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        return null;%0A    %7D%0A    %0A    public CreateAppTask(IRhoHubSetting setting, String appName)%0A    %7B%0A        super(%22require 'rhohub'%22, %0A              %22Rhohub.token = %5C%22%22 + setting.getToken() + %22%5C%22%22, %0A              %22Rhohub.url = %5C%22%22 + setting.getServerUrl() + %22%5C%22%22, %0A              %22puts Rhohub::App.create(%22 + getAppParams(appName) + %22)%22);%0A    %7D%0A%0A    public JSONObject getOutputAsJSON() throws JSONException%0A    %7B%0A        String listOfApps = this.getOutput();%0A        %0A        listOfApps = listOfApps.replaceAll(%22%5C%5Cp%7BCntrl%7D%22, %22 %22);%0A               %0A        return new JSONObject(listOfApps);%0A    %7D%0A%7D%0A

add create app task