From c89491b93ebd15e26a0713f67f6af5de01336992 Mon Sep 17 00:00:00 2001 From: Chatura Dilan Date: Mon, 29 May 2017 10:22:17 +0530 Subject: [PATCH] Changes to schema --- .../application/mgt/common/Application.java | 20 +++++++++---------- .../mgt/common/ApplicationRelease.java | 10 +++++----- .../dbscripts/cdm/application-mgt/mysql.sql | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java index 7dee927630d..1cbdb02a3f2 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/Application.java @@ -32,6 +32,8 @@ public class Application { private String uuid; + private String identifier; + private String name; private String shortDescription; @@ -62,8 +64,6 @@ public class Application { private Date modifiedAt; - private boolean published; - private LifecycleState lifecycleState; private Date lifecycleStateModifiedAt; @@ -93,6 +93,14 @@ public class Application { this.uuid = uuid; } + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + public String getName() { return name; } @@ -213,14 +221,6 @@ public class Application { this.modifiedAt = modifiedAt; } - public boolean isPublished() { - return published; - } - - public void setPublished(boolean published) { - this.published = published; - } - public LifecycleState getLifecycleState() { return lifecycleState; } diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationRelease.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationRelease.java index 299d36c0c7b..077feedb82f 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationRelease.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.common/src/main/java/org/wso2/carbon/device/application/mgt/common/ApplicationRelease.java @@ -49,7 +49,7 @@ public class ApplicationRelease { private Map properties; - private boolean published; + private boolean isDefault; public int getId() { return id; @@ -139,11 +139,11 @@ public class ApplicationRelease { this.properties = properties; } - public boolean isPublished() { - return published; + public boolean isDefault() { + return isDefault; } - public void setPublished(boolean published) { - this.published = published; + public void setDefault(boolean aDefault) { + isDefault = aDefault; } } diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql index d6df5614a6d..6799cc928b0 100644 --- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql +++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/dbscripts/cdm/application-mgt/mysql.sql @@ -142,7 +142,7 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_RELEASE` ( `RELEASE_DETAILS` TEXT NULL, `CREATED_AT` DATETIME NOT NULL, `APPM_APPLICATION_ID` INT NOT NULL, - `PUBLISHED` TINYINT(1) NULL, + `IS_DEFAULT` TINYINT(1) NULL, PRIMARY KEY (`ID`, `APPM_APPLICATION_ID`), INDEX `FK_APPLICATION_VERSION_APPLICATION` (`APPM_APPLICATION_ID` ASC), CONSTRAINT `FK_APPLICATION_VERSION_APPLICATION`