Merge remote-tracking branch 'wso2/application-mgt' into wso2-application-mgt

# Conflicts:
#	components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/PlatformDAO.java
#	components/application-mgt/org.wso2.carbon.device.application.mgt.core/src/main/java/org/wso2/carbon/device/application/mgt/core/dao/impl/platform/GenericPlatformDAOImpl.java
feature/appm-store/pbac
sinthuja 8 years ago
commit fe3325ebf2

@ -83,8 +83,6 @@ public class Platform {
} }
private boolean published;
public int getId() { public int getId() {
return id; return id;
} }
@ -141,14 +139,6 @@ public class Platform {
this.tags = tags; this.tags = tags;
} }
public boolean isPublished() {
return published;
}
public void setPublished(boolean published) {
this.published = published;
}
public boolean isFileBased() { public boolean isFileBased() {
return fileBased; return fileBased;
} }

@ -1,3 +1,12 @@
-- MySQL Script generated by MySQL Workbench
-- 2017-06-14 12:46:43 +0530
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Schema WSO2DM_APPM_DB -- Schema WSO2DM_APPM_DB
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -10,9 +19,7 @@ CREATE TABLE IF NOT EXISTS `APPM_PLATFORM` (
`NAME` VARCHAR(100) NOT NULL, `NAME` VARCHAR(100) NOT NULL,
`DESCRIPTION` TEXT NULL, `DESCRIPTION` TEXT NULL,
`IDENTIFIER` VARCHAR(100) NOT NULL, `IDENTIFIER` VARCHAR(100) NOT NULL,
`ICON_NAME` VARCHAR(100) NULL,
`DESCRIPTOR` LONGTEXT NOT NULL, `DESCRIPTOR` LONGTEXT NOT NULL,
`PUBLISHED` TINYINT(1) NULL,
PRIMARY KEY (`ID`), PRIMARY KEY (`ID`),
UNIQUE INDEX `IDENTIFIER_UNIQUE` (`IDENTIFIER` ASC)) UNIQUE INDEX `IDENTIFIER_UNIQUE` (`IDENTIFIER` ASC))
ENGINE = InnoDB ENGINE = InnoDB
@ -32,24 +39,6 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_CATEGORY` (
COMMENT = 'This table contains the data related to the application category'; COMMENT = 'This table contains the data related to the application category';
-- -----------------------------------------------------
-- Table `APPM_PLATFORM_APPLICATION_MAPPING`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `APPM_PLATFORM_APPLICATION_MAPPING` (
`ID` INT NOT NULL AUTO_INCREMENT,
`PLATFORM_ID` INT NOT NULL,
`TENANT_ID` INT NOT NULL,
PRIMARY KEY (`ID`, `PLATFORM_ID`),
INDEX `FK_PLATFROM_APPLICATION_MAPPING_PLATFORM` (`PLATFORM_ID` ASC),
CONSTRAINT `fk_APPM_PLATFORM_TENANT_MAPPING_APPM_SUPPORTED_PLATFORM1`
FOREIGN KEY (`PLATFORM_ID`)
REFERENCES `APPM_PLATFORM` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'This table contains the data related relationship between application platofrm and appication mappings';
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `APPM_LIFECYCLE_STATE` -- Table `APPM_LIFECYCLE_STATE`
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -84,28 +73,29 @@ CREATE TABLE IF NOT EXISTS `APPM_APPLICATION` (
`PAYMENT_CURRENCY` VARCHAR(45) NULL, `PAYMENT_CURRENCY` VARCHAR(45) NULL,
`PAYMENT_PRICE` DECIMAL(10,2) NULL, `PAYMENT_PRICE` DECIMAL(10,2) NULL,
`APPLICATION_CATEGORY_ID` INT NOT NULL, `APPLICATION_CATEGORY_ID` INT NOT NULL,
`PLATFORM_APPLICATION_MAPPING_ID` INT NOT NULL, `LIFECYCLE_STATE_ID` INT NOT NULL,
`APPM_LIFECYCLE_STATE_ID` INT NOT NULL, `LIFECYCLE_STATE_MODIFIED_BY` VARCHAR(255) NULL,
`LIECYCLE_STATE_MODIFIED_BY` VARCHAR(255) NULL,
`LIFECYCLE_STATE_MODIFIED_AT` DATETIME NULL, `LIFECYCLE_STATE_MODIFIED_AT` DATETIME NULL,
PRIMARY KEY (`ID`, `APPLICATION_CATEGORY_ID`, `PLATFORM_APPLICATION_MAPPING_ID`, `APPM_LIFECYCLE_STATE_ID`), `TENANT_ID` INT NULL,
`PLATFORM_ID` INT NOT NULL,
PRIMARY KEY (`ID`, `APPLICATION_CATEGORY_ID`, `LIFECYCLE_STATE_ID`, `PLATFORM_ID`),
UNIQUE INDEX `UUID_UNIQUE` (`UUID` ASC), UNIQUE INDEX `UUID_UNIQUE` (`UUID` ASC),
INDEX `FK_APPLICATION_APPLICATION_CATEGORY` (`APPLICATION_CATEGORY_ID` ASC), INDEX `FK_APPLICATION_APPLICATION_CATEGORY` (`APPLICATION_CATEGORY_ID` ASC),
INDEX `FK_APPLICATION_PLATFORM_APPLICATION_MAPPING` (`PLATFORM_APPLICATION_MAPPING_ID` ASC), INDEX `FK_APPLICATION_LIFECYCLE_STATE` (`LIFECYCLE_STATE_ID` ASC),
INDEX `FK_APPLICATION_LIFECYCLE_STATE` (`APPM_LIFECYCLE_STATE_ID` ASC), INDEX `FK_APPM_APPLICATION_APPM_PLATFORM` (`PLATFORM_ID` ASC),
CONSTRAINT `FK_APPLICATION_APPLICATION_CATEGORY` CONSTRAINT `FK_APPLICATION_APPLICATION_CATEGORY`
FOREIGN KEY (`APPLICATION_CATEGORY_ID`) FOREIGN KEY (`APPLICATION_CATEGORY_ID`)
REFERENCES `APPM_APPLICATION_CATEGORY` (`ID`) REFERENCES `APPM_APPLICATION_CATEGORY` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION, ON UPDATE NO ACTION,
CONSTRAINT `fk_APPM_APPLICATION_APPM_PLATFORM_APPLICATION_MAPPING1`
FOREIGN KEY (`PLATFORM_APPLICATION_MAPPING_ID`)
REFERENCES `APPM_PLATFORM_APPLICATION_MAPPING` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_APPM_APPLICATION_APPM_LIFECYCLE_STATE1` CONSTRAINT `fk_APPM_APPLICATION_APPM_LIFECYCLE_STATE1`
FOREIGN KEY (`APPM_LIFECYCLE_STATE_ID`) FOREIGN KEY (`LIFECYCLE_STATE_ID`)
REFERENCES `APPM_LIFECYCLE_STATE` (`ID`) REFERENCES `APPM_LIFECYCLE_STATE` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_APPM_APPLICATION_APPM_PLATFORM1`
FOREIGN KEY (`PLATFORM_ID`)
REFERENCES `APPM_PLATFORM` (`ID`)
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB ENGINE = InnoDB
@ -242,6 +232,24 @@ CREATE TABLE IF NOT EXISTS `APPM_COMMENT` (
COMMENT = 'This table contains the data related to the application comments'; COMMENT = 'This table contains the data related to the application comments';
-- -----------------------------------------------------
-- Table `APPM_PLATFORM_TENENT_MAPPING`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `APPM_PLATFORM_TENENT_MAPPING` (
`ID` INT NOT NULL AUTO_INCREMENT,
`PLATFORM_ID` INT NOT NULL,
`TENANT_ID` INT NOT NULL,
PRIMARY KEY (`ID`, `PLATFORM_ID`),
INDEX `FK_PLATFROM_TENANT_MAPPING_PLATFORM` (`PLATFORM_ID` ASC),
CONSTRAINT `fk_APPM_PLATFORM_TENANT_MAPPING_APPM_SUPPORTED_PLATFORM1`
FOREIGN KEY (`PLATFORM_ID`)
REFERENCES `APPM_PLATFORM` (`ID`)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB
COMMENT = 'This table contains the data related relationship between application platofrm and appication mappings';
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `APPM_PLATFORM_TAG` -- Table `APPM_PLATFORM_TAG`
-- ----------------------------------------------------- -- -----------------------------------------------------
@ -263,9 +271,9 @@ CREATE TABLE IF NOT EXISTS `APPM_PLATFORM_TAG` (
-- Table `APPM_APPLICATION_TAG` -- Table `APPM_APPLICATION_TAG`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_TAG` ( CREATE TABLE IF NOT EXISTS `APPM_APPLICATION_TAG` (
`name` VARCHAR(45) NOT NULL, `NAME` VARCHAR(45) NOT NULL,
`APPLICATION_ID` INT NOT NULL, `APPLICATION_ID` INT NOT NULL,
PRIMARY KEY (`APPLICATION_ID`, `name`), PRIMARY KEY (`APPLICATION_ID`, `NAME`),
INDEX `FK_APPLICATION_TAG_APPLICATION` (`APPLICATION_ID` ASC), INDEX `FK_APPLICATION_TAG_APPLICATION` (`APPLICATION_ID` ASC),
CONSTRAINT `fk_APPM_APPLICATION_TAG_APPM_APPLICATION1` CONSTRAINT `fk_APPM_APPLICATION_TAG_APPM_APPLICATION1`
FOREIGN KEY (`APPLICATION_ID`) FOREIGN KEY (`APPLICATION_ID`)
@ -322,3 +330,8 @@ CREATE TABLE IF NOT EXISTS `APPM_SUBSCRIPTION_PROPERTIES` (
ON DELETE NO ACTION ON DELETE NO ACTION
ON UPDATE NO ACTION) ON UPDATE NO ACTION)
ENGINE = InnoDB; ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

Loading…
Cancel
Save