You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ga...@apache.org on 2015/09/17 17:01:51 UTC
[2/9] stratos git commit: Adding validation to addApplicationSignup
Adding validation to addApplicationSignup
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/03e62736
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/03e62736
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/03e62736
Branch: refs/heads/stratos-4.1.x
Commit: 03e62736e93c2770f11c8e609a37016ae60bbdbe
Parents: e8ebfdf
Author: anuruddhal <an...@gmail.com>
Authored: Mon Sep 14 11:35:55 2015 +0530
Committer: anuruddhal <an...@gmail.com>
Committed: Tue Sep 15 10:05:08 2015 +0530
----------------------------------------------------------------------
.../apache/stratos/rest/endpoint/api/StratosApiV41Utils.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/03e62736/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
index 81e6872..b8bab43 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
@@ -69,6 +69,7 @@ import org.apache.stratos.manager.user.management.StratosUserManagerUtils;
import org.apache.stratos.manager.user.management.exception.UserManagerException;
import org.apache.stratos.manager.utils.ApplicationManagementUtil;
import org.apache.stratos.messaging.domain.application.Application;
+import org.apache.stratos.messaging.domain.application.ApplicationStatus;
import org.apache.stratos.messaging.domain.application.ClusterDataHolder;
import org.apache.stratos.messaging.domain.application.Group;
import org.apache.stratos.messaging.domain.topology.Cluster;
@@ -107,7 +108,7 @@ public class StratosApiV41Utils {
public static final String APPLICATION_STATUS_CREATED = "Created";
public static final String APPLICATION_STATUS_UNDEPLOYING = "Undeploying";
public static final String KUBERNETES_IAAS_PROVIDER = "kubernetes";
-
+ public static final String APPLICATION_STATUS_ACTIVE = "Active";
private static final String METADATA_REG_PATH = "metadata/";
@@ -2440,8 +2441,8 @@ public class StratosApiV41Utils {
throw new RestAPIException("Application not found: [application-id] " + applicationId);
}
- if (!APPLICATION_STATUS_DEPLOYED.equals(applicationBean.getStatus())) {
- throw new RestAPIException("Application has not been deployed: [application-id] " + applicationId);
+ if (!ApplicationStatus.Active.equals(application.getStatus())) {
+ throw new RestAPIException("Application has not been activated: [application-id] " + applicationId);
}
if (!applicationBean.isMultiTenant()) {