revert-70aa11f8
hasuniea 9 years ago
commit af96991c67

@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId> <artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Webapp Publisher</name> <name>WSO2 Carbon - API Management Webapp Publisher</name>
<description>WSO2 Carbon - API Management Webapp Publisher</description> <description>WSO2 Carbon - API Management Webapp Publisher</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Component</name> <name>WSO2 Carbon - API Management Extensions Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -17,18 +17,17 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId> <artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Certificate Management Core</name> <name>WSO2 Carbon - Certificate Management Core</name>
<description>WSO2 Carbon - Certificate Management Core</description> <description>WSO2 Carbon - Certificate Management Core</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Component</name> <name>WSO2 Carbon - Certificate Management Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,13 +21,13 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.common</artifactId> <artifactId>org.wso2.carbon.device.mgt.common</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Device Management Commons</name> <name>WSO2 Carbon - Device Management Commons</name>
<description>WSO2 Carbon - Device Management Commons</description> <description>WSO2 Carbon - Device Management Commons</description>

@ -85,7 +85,7 @@ public final class DeviceManagementConstants {
} }
public static final String DB_TYPE_MYSQL = "MySQL"; public static final String DB_TYPE_MYSQL = "MySQL";
public static final String DB_TYPE_ORACLE = "Oracle"; public static final String DB_TYPE_ORACLE = "Oracle";
public static final String DB_TYPE_MSSQL = "MSSQL"; public static final String DB_TYPE_MSSQL = "Microsoft SQL Server";
public static final String DB_TYPE_DB2 = "DB2"; public static final String DB_TYPE_DB2 = "DB2";
public static final String DB_TYPE_H2 = "H2"; public static final String DB_TYPE_H2 = "H2";
public static final String DB_TYPE_POSTGRESQL = "PostgreSQL"; public static final String DB_TYPE_POSTGRESQL = "PostgreSQL";

@ -0,0 +1,61 @@
/*
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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.wso2.carbon.device.mgt.common;
/**
* This runtime exception will be thrown if the server has configured with unsupported DB engine.
*/
public class UnsupportedDatabaseEngineException extends RuntimeException {
private static final long serialVersionUID = -3151279311929070297L;
private String errorMessage;
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public UnsupportedDatabaseEngineException(String msg, Exception nestedEx) {
super(msg, nestedEx);
setErrorMessage(msg);
}
public UnsupportedDatabaseEngineException(String message, Throwable cause) {
super(message, cause);
setErrorMessage(message);
}
public UnsupportedDatabaseEngineException(String msg) {
super(msg);
setErrorMessage(msg);
}
public UnsupportedDatabaseEngineException() {
super();
}
public UnsupportedDatabaseEngineException(Throwable cause) {
super(cause);
}
}

@ -17,19 +17,18 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.core</artifactId> <artifactId>org.wso2.carbon.device.mgt.core</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Device Management Core</name> <name>WSO2 Carbon - Device Management Core</name>
<description>WSO2 Carbon - Device Management Core</description> <description>WSO2 Carbon - Device Management Core</description>

@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.IllegalTransactionStateException; import org.wso2.carbon.device.mgt.common.IllegalTransactionStateException;
import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.UnsupportedDatabaseEngineException;
import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig;
import org.wso2.carbon.device.mgt.core.config.datasource.JNDILookupDefinition; import org.wso2.carbon.device.mgt.core.config.datasource.JNDILookupDefinition;
import org.wso2.carbon.device.mgt.core.dao.impl.*; import org.wso2.carbon.device.mgt.core.dao.impl.*;
@ -91,7 +92,6 @@ public class DeviceManagementDAOFactory {
private static final Log log = LogFactory.getLog(DeviceManagementDAOFactory.class); private static final Log log = LogFactory.getLog(DeviceManagementDAOFactory.class);
private static ThreadLocal<Connection> currentConnection = new ThreadLocal<Connection>(); private static ThreadLocal<Connection> currentConnection = new ThreadLocal<Connection>();
public static DeviceDAO getDeviceDAO() { public static DeviceDAO getDeviceDAO() {
if(databaseEngine != null) { if(databaseEngine != null) {
switch (databaseEngine) { switch (databaseEngine) {
@ -103,12 +103,12 @@ public class DeviceManagementDAOFactory {
return new PostgreSQLDeviceDAOImpl(); return new PostgreSQLDeviceDAOImpl();
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2: case DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2:
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL: case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL:
default:
return new GenericDeviceDAOImpl(); return new GenericDeviceDAOImpl();
default:
throw new UnsupportedDatabaseEngineException("Unsupported database engine : " + databaseEngine);
} }
} else {
return new GenericDeviceDAOImpl();
} }
throw new RuntimeException("Database engine has not initialized properly.");
} }
public static DeviceTypeDAO getDeviceTypeDAO() { public static DeviceTypeDAO getDeviceTypeDAO() {

@ -78,6 +78,8 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
conn = this.getConnection(); conn = this.getConnection();
String sql = "INSERT INTO DM_DEVICE_APPLICATION_MAPPING (DEVICE_ID, APPLICATION_ID, " + String sql = "INSERT INTO DM_DEVICE_APPLICATION_MAPPING (DEVICE_ID, APPLICATION_ID, " +
"TENANT_ID) VALUES (?, ?, ?)"; "TENANT_ID) VALUES (?, ?, ?)";
conn.setAutoCommit(false);
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
for (int applicationId : applicationIds) { for (int applicationId : applicationIds) {
@ -87,12 +89,6 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
stmt.addBatch(); stmt.addBatch();
} }
stmt.executeBatch(); stmt.executeBatch();
// rs = stmt.getGeneratedKeys();
// while (rs.next()) {
// mappingIds.add(rs.getInt(1));
// }
// return mappingIds;
} catch (SQLException e) { } catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding device application mappings", e); throw new DeviceManagementDAOException("Error occurred while adding device application mappings", e);
} finally { } finally {
@ -106,18 +102,17 @@ public class ApplicationMappingDAOImpl implements ApplicationMappingDAO {
Connection conn; Connection conn;
PreparedStatement stmt = null; PreparedStatement stmt = null;
try { try {
conn = this.getConnection();
String sql = "DELETE DM_DEVICE_APPLICATION_MAPPING WHERE DEVICE_ID = ? AND " + String sql = "DELETE DM_DEVICE_APPLICATION_MAPPING WHERE DEVICE_ID = ? AND " +
"APPLICATION_ID = ? AND TENANT_ID = ?"; "APPLICATION_ID = ? AND TENANT_ID = ?";
stmt = conn.prepareStatement(sql);
for (Integer appId : appIdList) { conn = this.getConnection();
for (int appId : appIdList) {
stmt = conn.prepareStatement(sql);
stmt.setInt(1, deviceId); stmt.setInt(1, deviceId);
stmt.setInt(2, appId); stmt.setInt(2, appId);
stmt.setInt(3, tenantId); stmt.setInt(3, tenantId);
stmt.addBatch(); stmt.execute();
} }
stmt.executeBatch();
} catch (SQLException e) { } catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding device application mapping", e); throw new DeviceManagementDAOException("Error occurred while adding device application mapping", e);
} finally { } finally {

@ -76,7 +76,7 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " + String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " +
"DATE_OF_ENROLMENT = ?, DATE_OF_LAST_UPDATE = ? WHERE DEVICE_ID = ? AND OWNER = ? AND TENANT_ID = ?" + "DATE_OF_ENROLMENT = ?, DATE_OF_LAST_UPDATE = ? WHERE DEVICE_ID = ? AND OWNER = ? AND TENANT_ID = ?" +
" AND ID = ?"; " AND ID = ?";
stmt = conn.prepareStatement(sql, new String[] {"id"}); stmt = conn.prepareStatement(sql);
stmt.setString(1, enrolmentInfo.getOwnership().toString()); stmt.setString(1, enrolmentInfo.getOwnership().toString());
stmt.setString(2, enrolmentInfo.getStatus().toString()); stmt.setString(2, enrolmentInfo.getStatus().toString());
stmt.setTimestamp(3, new Timestamp(enrolmentInfo.getDateOfEnrolment())); stmt.setTimestamp(3, new Timestamp(enrolmentInfo.getDateOfEnrolment()));
@ -86,11 +86,6 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
stmt.setInt(7, tenantId); stmt.setInt(7, tenantId);
stmt.setInt(8, enrolmentInfo.getId()); stmt.setInt(8, enrolmentInfo.getId());
stmt.executeUpdate(); stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
status = 1;
}
return status; return status;
} catch (SQLException e) { } catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e); throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e);
@ -109,18 +104,13 @@ public class EnrollmentDAOImpl implements EnrollmentDAO {
conn = this.getConnection(); conn = this.getConnection();
String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " + String sql = "UPDATE DM_ENROLMENT SET OWNERSHIP = ?, STATUS = ?, " +
"DATE_OF_ENROLMENT = ?, DATE_OF_LAST_UPDATE = ? WHERE ID = ?"; "DATE_OF_ENROLMENT = ?, DATE_OF_LAST_UPDATE = ? WHERE ID = ?";
stmt = conn.prepareStatement(sql, new String[] {"id"}); stmt = conn.prepareStatement(sql);
stmt.setString(1, enrolmentInfo.getOwnership().toString()); stmt.setString(1, enrolmentInfo.getOwnership().toString());
stmt.setString(2, enrolmentInfo.getStatus().toString()); stmt.setString(2, enrolmentInfo.getStatus().toString());
stmt.setTimestamp(3, new Timestamp(enrolmentInfo.getDateOfEnrolment())); stmt.setTimestamp(3, new Timestamp(enrolmentInfo.getDateOfEnrolment()));
stmt.setTimestamp(4, new Timestamp(new Date().getTime())); stmt.setTimestamp(4, new Timestamp(new Date().getTime()));
stmt.setInt(5, enrolmentInfo.getId()); stmt.setInt(5, enrolmentInfo.getId());
stmt.executeUpdate(); stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
status = 1;
}
return status; return status;
} catch (SQLException e) { } catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e); throw new DeviceManagementDAOException("Error occurred while updating enrolment configuration", e);

@ -91,7 +91,7 @@ public class SQLServerDeviceDAOImpl extends AbstractDeviceDAOImpl {
isStatusProvided = true; isStatusProvided = true;
} }
sql = sql + " OFFSET ? ROWS FETCH NEXT ? ROWS ONLY"; sql = sql + " ORDER BY ENROLMENT_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
stmt.setInt(1, tenantId); stmt.setInt(1, tenantId);

@ -123,10 +123,9 @@ public class DeviceManagementServiceComponent {
DeviceManagementDAOFactory.init(dsConfig); DeviceManagementDAOFactory.init(dsConfig);
NotificationManagementDAOFactory.init(dsConfig); NotificationManagementDAOFactory.init(dsConfig);
OperationManagementDAOFactory.init(dsConfig);
/*Initialize Operation Manager*/ /*Initialize Operation Manager*/
this.initOperationsManager(); this.initOperationsManager();
OperationManagementDAOFactory.init(dsConfig);
/* If -Dsetup option enabled then create device management database schema */ /* If -Dsetup option enabled then create device management database schema */
String setupOption = String setupOption =
System.getProperty(DeviceManagementConstants.Common.PROPERTY_SETUP); System.getProperty(DeviceManagementConstants.Common.PROPERTY_SETUP);

@ -128,12 +128,10 @@ public class NotificationDAOImpl implements NotificationDAO {
try { try {
conn = NotificationManagementDAOFactory.getConnection(); conn = NotificationManagementDAOFactory.getConnection();
String sql = String sql =
"SELECT n1.NOTIFICATION_ID, n1.DEVICE_ID, n1.OPERATION_ID, n1.STATUS," + "SELECT n1.NOTIFICATION_ID, n1.DEVICE_ID, n1.OPERATION_ID, n1.STATUS, n1.DESCRIPTION," +
" n1.DESCRIPTION, d.DEVICE_IDENTIFICATION, t.NAME AS DEVICE_TYPE FROM " + " d.DEVICE_IDENTIFICATION, t.NAME AS DEVICE_TYPE FROM DM_DEVICE d, DM_DEVICE_TYPE t, (SELECT " +
"DM_DEVICE d, DM_DEVICE_TYPE t, (SELECT NOTIFICATION_ID, DEVICE_ID, " + "NOTIFICATION_ID, DEVICE_ID, OPERATION_ID, STATUS, DESCRIPTION FROM DM_NOTIFICATION WHERE " +
"OPERATION_ID, STATUS, DESCRIPTION FROM DM_NOTIFICATION WHERE " + "TENANT_ID = ?) n1 WHERE n1.DEVICE_ID = d.ID AND d.DEVICE_TYPE_ID=t.ID AND TENANT_ID = ?";
"TENANT_ID = ?) n1 WHERE n1.DEVICE_ID = d.ID AND d.DEVICE_TYPE_ID=t.ID " +
"AND TENANT_ID = ?";
stmt = conn.prepareStatement(sql); stmt = conn.prepareStatement(sql);
stmt.setInt(1, tenantId); stmt.setInt(1, tenantId);
stmt.setInt(2, tenantId); stmt.setInt(2, tenantId);
@ -144,8 +142,7 @@ public class NotificationDAOImpl implements NotificationDAO {
} }
} catch (SQLException e) { } catch (SQLException e) {
throw new NotificationManagementException( throw new NotificationManagementException(
"Error occurred while retrieving information of all " + "Error occurred while retrieving information of all notifications", e);
"notifications", e);
} finally { } finally {
NotificationDAOUtil.cleanupResources(stmt, rs); NotificationDAOUtil.cleanupResources(stmt, rs);
} }

@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants; import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
import org.wso2.carbon.device.mgt.common.IllegalTransactionStateException; import org.wso2.carbon.device.mgt.common.IllegalTransactionStateException;
import org.wso2.carbon.device.mgt.common.TransactionManagementException; import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.UnsupportedDatabaseEngineException;
import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig; import org.wso2.carbon.device.mgt.core.config.datasource.DataSourceConfig;
import org.wso2.carbon.device.mgt.core.config.datasource.JNDILookupDefinition; import org.wso2.carbon.device.mgt.core.config.datasource.JNDILookupDefinition;
import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil; import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil;
@ -75,12 +76,12 @@ public class OperationManagementDAOFactory {
return new PostgreSQLOperationDAOImpl(); return new PostgreSQLOperationDAOImpl();
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2: case DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2:
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL: case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL:
default:
return new GenericOperationDAOImpl(); return new GenericOperationDAOImpl();
default:
throw new UnsupportedDatabaseEngineException("Unsupported database engine : " + databaseEngine);
} }
} else {
return new GenericOperationDAOImpl();
} }
throw new RuntimeException("Database engine has not initialized properly.");
} }
public static void init(DataSource dtSource) { public static void init(DataSource dtSource) {

@ -50,12 +50,12 @@ public abstract class BaseDeviceManagementTest {
@BeforeSuite @BeforeSuite
public void setupDataSource() throws Exception { public void setupDataSource() throws Exception {
this.initDatSource(); this.initDataSource();
this.initSQLScript(); this.initSQLScript();
this.initializeCarbonContext(); this.initializeCarbonContext();
} }
public void initDatSource() throws Exception { public void initDataSource() throws Exception {
this.dataSource = this.getDataSource(this.readDataSourceConfig()); this.dataSource = this.getDataSource(this.readDataSourceConfig());
DeviceManagementDAOFactory.init(dataSource); DeviceManagementDAOFactory.init(dataSource);
} }

@ -77,7 +77,7 @@ public class ApplicationPersistenceTests extends BaseDeviceManagementTest {
@BeforeClass @BeforeClass
@Override @Override
public void init() throws Exception { public void init() throws Exception {
this.initDatSource(); this.initDataSource();
} }
} }

@ -36,15 +36,17 @@ import java.sql.*;
public class DevicePersistTests extends BaseDeviceManagementTest { public class DevicePersistTests extends BaseDeviceManagementTest {
DeviceDAO deviceDAO = DeviceManagementDAOFactory.getDeviceDAO(); DeviceDAO deviceDAO;
DeviceTypeDAO deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO(); DeviceTypeDAO deviceTypeDAO;
private static final Log log = LogFactory.getLog(DevicePersistTests.class); private static final Log log = LogFactory.getLog(DevicePersistTests.class);
@BeforeClass @BeforeClass
@Override @Override
public void init() throws Exception { public void init() throws Exception {
initDatSource(); initDataSource();
deviceDAO = DeviceManagementDAOFactory.getDeviceDAO();
deviceTypeDAO = DeviceManagementDAOFactory.getDeviceTypeDAO();
} }
@Test @Test

@ -83,7 +83,7 @@ public class EnrolmentPersistenceTests extends BaseDeviceManagementTest {
@BeforeClass @BeforeClass
@Override @Override
public void init() throws Exception { public void init() throws Exception {
this.initDatSource(); this.initDataSource();
} }
} }

@ -21,15 +21,9 @@ import org.testng.Assert;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.FeatureManager; import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.core.DeviceManagementPluginRepository;
import org.wso2.carbon.device.mgt.core.TestDeviceManagementService;
import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest; import org.wso2.carbon.device.mgt.core.common.BaseDeviceManagementTest;
import org.wso2.carbon.device.mgt.core.common.TestDataHolder;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTest { public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTest {
@ -42,7 +36,7 @@ public class DeviceManagementProviderServiceTest extends BaseDeviceManagementTes
@BeforeClass @BeforeClass
@Override @Override
public void init() throws Exception { public void init() throws Exception {
this.initDatSource(); this.initDataSource();
this.providerService = new DeviceManagementProviderServiceImpl(); this.providerService = new DeviceManagementProviderServiceImpl();
} }

@ -23,7 +23,7 @@
# settings will override the settings in this file. # settings will override the settings in this file.
# #
log4j.rootLogger=DEBUG, STD_OUT log4j.rootLogger=INFO, STD_OUT
# Redirect log messages to console # Redirect log messages to console
log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender

@ -1,17 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Device Management Extensions</name> <name>WSO2 Carbon - Device Management Extensions</name>
<description>WSO2 Carbon - Device Management Extensions</description> <description>WSO2 Carbon - Device Management Extensions</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Component</name> <name>WSO2 Carbon - Device Management Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -16,13 +16,11 @@
~ specific language governing permissions and limitations ~ specific language governing permissions and limitations
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<packaging>bundle</packaging> <packaging>bundle</packaging>

@ -16,21 +16,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.mdm</groupId> <groupId>org.wso2.mdm</groupId>
<artifactId>dynamic-client-web-proxy</artifactId> <artifactId>dynamic-client-web-proxy</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service</name> <name>WSO2 Carbon - Proxy endpoint of Dynamic Client Registration Web Service</name>
<description>WSO2 Carbon - Dynamic Client Registration Web Proxy</description> <description>WSO2 Carbon - Dynamic Client Registration Web Proxy</description>
<packaging>war</packaging> <packaging>war</packaging>

@ -23,7 +23,7 @@
# settings will override the settings in this file. # settings will override the settings in this file.
# #
log4j.rootLogger=DEBUG, STD_OUT log4j.rootLogger=INFO, STD_OUT
# Redirect log messages to console # Redirect log messages to console
log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender

@ -16,21 +16,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.mdm</groupId> <groupId>org.wso2.mdm</groupId>
<artifactId>dynamic-client-web</artifactId> <artifactId>dynamic-client-web</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Dynamic Client Registration Web Service</name> <name>WSO2 Carbon - Dynamic Client Registration Web Service</name>
<description>WSO2 Carbon - Dynamic Client Registration Web</description> <description>WSO2 Carbon - Dynamic Client Registration Web</description>
<packaging>war</packaging> <packaging>war</packaging>

@ -23,7 +23,7 @@
# settings will override the settings in this file. # settings will override the settings in this file.
# #
log4j.rootLogger=DEBUG, STD_OUT log4j.rootLogger=INFO, STD_OUT
# Redirect log messages to console # Redirect log messages to console
log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender

@ -17,18 +17,17 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.registration</artifactId> <artifactId>org.wso2.carbon.dynamic.client.registration</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client registration service</name> <name>WSO2 Carbon - Dynamic client registration service</name>
<description>WSO2 Carbon - Dynamic Client Registration Service</description> <description>WSO2 Carbon - Dynamic Client Registration Service</description>

@ -17,18 +17,17 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.web.app.registration</artifactId> <artifactId>org.wso2.carbon.dynamic.client.web.app.registration</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client web app registration</name> <name>WSO2 Carbon - Dynamic client web app registration</name>
<description>WSO2 Carbon - Dynamic Client Web-app Registration Service</description> <description>WSO2 Carbon - Dynamic Client Web-app Registration Service</description>

@ -23,17 +23,17 @@ import org.apache.commons.collections.iterators.IteratorEnumeration;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.dynamic.client.registration.DynamicClientRegistrationException; import org.wso2.carbon.dynamic.client.registration.DynamicClientRegistrationException;
import org.wso2.carbon.dynamic.client.registration.DynamicClientRegistrationService;
import org.wso2.carbon.dynamic.client.registration.OAuthApplicationInfo; import org.wso2.carbon.dynamic.client.registration.OAuthApplicationInfo;
import org.wso2.carbon.dynamic.client.registration.profile.RegistrationProfile; import org.wso2.carbon.dynamic.client.registration.profile.RegistrationProfile;
import org.wso2.carbon.dynamic.client.web.app.registration.dto.OAuthAppDetails;
import org.wso2.carbon.dynamic.client.web.app.registration.dto.JaggeryOAuthConfigurationSettings; import org.wso2.carbon.dynamic.client.web.app.registration.dto.JaggeryOAuthConfigurationSettings;
import org.wso2.carbon.dynamic.client.web.app.registration.internal.DynamicClientWebAppRegistrationDataHolder; import org.wso2.carbon.dynamic.client.web.app.registration.dto.OAuthAppDetails;
import org.wso2.carbon.dynamic.client.web.app.registration.util.DynamicClientWebAppRegistrationConstants; import org.wso2.carbon.dynamic.client.web.app.registration.util.DynamicClientWebAppRegistrationConstants;
import org.wso2.carbon.dynamic.client.web.app.registration.util.DynamicClientWebAppRegistrationUtil; import org.wso2.carbon.dynamic.client.web.app.registration.util.DynamicClientWebAppRegistrationUtil;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import java.util.*; import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
/** /**
* This class contains the logic to handle the OAuth application creation process. * This class contains the logic to handle the OAuth application creation process.
@ -165,12 +165,15 @@ public class DynamicClientWebAppRegistrationManager {
} }
} }
//Add client credentials to the web-context //Add client credentials to the web-context
if ((oAuthAppDetails != null && oAuthAppDetails.getClientKey() != null) && !oAuthAppDetails.getClientKey().isEmpty()) { if ((oAuthAppDetails != null && oAuthAppDetails.getClientKey() != null) &&
!oAuthAppDetails.getClientKey().isEmpty()) {
DynamicClientWebAppRegistrationUtil.addClientCredentialsToWebContext(oAuthAppDetails, DynamicClientWebAppRegistrationUtil.addClientCredentialsToWebContext(oAuthAppDetails,
servletContext); servletContext);
log.info("Added OAuth application credentials to webapp context of webapp : " + if (log.isDebugEnabled()) {
log.debug("Added OAuth application credentials to webapp context of webapp : " +
webAppName); webAppName);
} }
} }
} }
}
} }

@ -83,9 +83,10 @@ public class RemoteDCRClient {
String responseString = EntityUtils.toString(responseData, DynamicClientWebAppRegistrationConstants. String responseString = EntityUtils.toString(responseData, DynamicClientWebAppRegistrationConstants.
CharSets.CHARSET_UTF8); CharSets.CHARSET_UTF8);
if (status != 201) { if (status != 201) {
throw new DynamicClientRegistrationException( String msg = "Backend server error occurred while invoking DCR endpoint for " +
"Backend server error occurred while invoking DCR endpoint for " + "registering service-provider upon web-app : '" + clientName + "'; Server returned response '" +
"registering service-provider for web-app : " + clientName); responseString + "' with HTTP status code '" + status + "'";
throw new DynamicClientRegistrationException(msg);
} }
return getOAuthApplicationInfo(gson.fromJson(responseString, JsonElement.class)); return getOAuthApplicationInfo(gson.fromJson(responseString, JsonElement.class));
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
@ -102,9 +103,11 @@ public class RemoteDCRClient {
" registering service-provider for web-app : " + clientName, " registering service-provider for web-app : " + clientName,
e); e);
} finally { } finally {
if (httpClient != null) {
httpClient.close(); httpClient.close();
} }
} }
}
public static boolean deleteOAuthApplication(String user, String appName, String clientid, String host) public static boolean deleteOAuthApplication(String user, String appName, String clientid, String host)
throws DynamicClientRegistrationException { throws DynamicClientRegistrationException {
@ -133,8 +136,10 @@ public class RemoteDCRClient {
throw new DynamicClientRegistrationException("Exception occurred while constructing the URI for invoking " + throw new DynamicClientRegistrationException("Exception occurred while constructing the URI for invoking " +
"DCR endpoint for unregistering the web-app : " + appName, e); "DCR endpoint for unregistering the web-app : " + appName, e);
} finally { } finally {
if (httpClient != null) {
httpClient.close(); httpClient.close();
} }
}
return false; return false;
} }

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration</artifactId> <artifactId>dynamic-client-registration</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Dynamic client registration</name> <name>WSO2 Carbon - Dynamic client registration</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -17,19 +17,18 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId> <artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - OAuth Extensions</name> <name>WSO2 Carbon - OAuth Extensions</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Dynamic Client Registration Component</name> <name>WSO2 Carbon - Dynamic Client Registration Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.complex.policy.decision.point</artifactId> <artifactId>org.wso2.carbon.complex.policy.decision.point</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Decision Point</name> <name>WSO2 Carbon - Policy Decision Point</name>
<description>WSO2 Carbon - Policy Decision Point</description> <description>WSO2 Carbon - Policy Decision Point</description>

@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.information.point</artifactId> <artifactId>org.wso2.carbon.policy.information.point</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Information Point</name> <name>WSO2 Carbon - Policy Information Point</name>
<description>WSO2 Carbon - Policy Information Point</description> <description>WSO2 Carbon - Policy Information Point</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.common</artifactId> <artifactId>org.wso2.carbon.policy.mgt.common</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Common</name> <name>WSO2 Carbon - Policy Management Common</name>
<description>WSO2 Carbon - Policy Management Common</description> <description>WSO2 Carbon - Policy Management Common</description>

@ -18,19 +18,18 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.policy.mgt.core</artifactId> <artifactId>org.wso2.carbon.policy.mgt.core</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Policy Management Core</name> <name>WSO2 Carbon - Policy Management Core</name>
<description>WSO2 Carbon - Policy Management Core</description> <description>WSO2 Carbon - Policy Management Core</description>

@ -174,18 +174,18 @@ public class ComplianceDecisionPointImpl implements ComplianceDecisionPoint {
@Override @Override
public void markDeviceAsNoneCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException { public void markDeviceAsNoneCompliance(DeviceIdentifier deviceIdentifier) throws PolicyComplianceException {
try { // try {
DeviceManagementProviderService service = this.getDeviceManagementProviderService(); // DeviceManagementProviderService service = this.getDeviceManagementProviderService();
Device device = service.getDevice(deviceIdentifier); // Device device = service.getDevice(deviceIdentifier);
service.setStatus(deviceIdentifier, device.getEnrolmentInfo().getOwner(), // service.setStatus(deviceIdentifier, device.getEnrolmentInfo().getOwner(),
EnrolmentInfo.Status.BLOCKED); // EnrolmentInfo.Status.BLOCKED);
//
} catch (DeviceManagementException e) { // } catch (DeviceManagementException e) {
String msg = "Error occurred while marking device as none compliance " + deviceIdentifier.getId() + " - " + // String msg = "Error occurred while marking device as none compliance " + deviceIdentifier.getId() + " - " +
deviceIdentifier.getType(); // deviceIdentifier.getType();
log.error(msg, e); // log.error(msg, e);
throw new PolicyComplianceException(msg, e); // throw new PolicyComplianceException(msg, e);
} // }
} }
@Override @Override

@ -28,4 +28,6 @@ public interface TaskScheduleService {
void stopTask() throws PolicyMonitoringTaskException; void stopTask() throws PolicyMonitoringTaskException;
void updateTask(int monitoringFrequency) throws PolicyMonitoringTaskException; void updateTask(int monitoringFrequency) throws PolicyMonitoringTaskException;
boolean isTaskScheduled() throws PolicyMonitoringTaskException;
} }

@ -49,15 +49,13 @@ public class TaskScheduleServiceImpl implements TaskScheduleService {
@Override @Override
public void startTask(int monitoringFrequency) throws PolicyMonitoringTaskException { public void startTask(int monitoringFrequency) throws PolicyMonitoringTaskException {
int tenantId = getTenantId();
if (policyConfiguration.getMonitoringEnable()) { if (policyConfiguration.getMonitoringEnable()) {
if (monitoringFrequency <= 0) { if (monitoringFrequency <= 0) {
throw new PolicyMonitoringTaskException("Time interval cannot be 0 or less than 0."); throw new PolicyMonitoringTaskException("Time interval cannot be 0 or less than 0.");
} }
try { try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService(); TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService();
taskService.registerTaskType(PolicyManagementConstants.MONITORING_TASK_TYPE); taskService.registerTaskType(PolicyManagementConstants.MONITORING_TASK_TYPE);
@ -91,8 +89,7 @@ public class TaskScheduleServiceImpl implements TaskScheduleService {
} catch (TaskException e) { } catch (TaskException e) {
throw new PolicyMonitoringTaskException("Error occurred while creating the task for tenant " + throw new PolicyMonitoringTaskException("Error occurred while creating the task for tenant " +
PrivilegedCarbonContext. tenantId, e);
getThreadLocalCarbonContext().getTenantId(), e);
} }
} else { } else {
throw new PolicyMonitoringTaskException("Policy monitoring is not enabled in the cdm-config.xml."); throw new PolicyMonitoringTaskException("Policy monitoring is not enabled in the cdm-config.xml.");
@ -102,23 +99,22 @@ public class TaskScheduleServiceImpl implements TaskScheduleService {
@Override @Override
public void stopTask() throws PolicyMonitoringTaskException { public void stopTask() throws PolicyMonitoringTaskException {
int tenantId = getTenantId();
try { try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
String taskName = PolicyManagementConstants.MONITORING_TASK_NAME + "_" + String.valueOf(tenantId); String taskName = PolicyManagementConstants.MONITORING_TASK_NAME + "_" + String.valueOf(tenantId);
TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService(); TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService();
TaskManager taskManager = taskService.getTaskManager(PolicyManagementConstants.MONITORING_TASK_TYPE); TaskManager taskManager = taskService.getTaskManager(PolicyManagementConstants.MONITORING_TASK_TYPE);
taskManager.deleteTask(taskName); taskManager.deleteTask(taskName);
} catch (TaskException e) { } catch (TaskException e) {
throw new PolicyMonitoringTaskException("Error occurred while deleting the task for tenant " + throw new PolicyMonitoringTaskException("Error occurred while deleting the task for tenant " +
PrivilegedCarbonContext. tenantId, e);
getThreadLocalCarbonContext().getTenantId(), e);
} }
} }
@Override @Override
public void updateTask(int monitoringFrequency) throws PolicyMonitoringTaskException { public void updateTask(int monitoringFrequency) throws PolicyMonitoringTaskException {
int tenantId = getTenantId();
try { try {
int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
String taskName = PolicyManagementConstants.MONITORING_TASK_NAME + "_" + String.valueOf(tenantId); String taskName = PolicyManagementConstants.MONITORING_TASK_NAME + "_" + String.valueOf(tenantId);
TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService(); TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService();
TaskManager taskManager = taskService.getTaskManager(PolicyManagementConstants.MONITORING_TASK_TYPE); TaskManager taskManager = taskService.getTaskManager(PolicyManagementConstants.MONITORING_TASK_TYPE);
@ -144,10 +140,27 @@ public class TaskScheduleServiceImpl implements TaskScheduleService {
} }
} catch (TaskException e) { } catch (TaskException e) {
throw new PolicyMonitoringTaskException("Error occurred while updating the task for tenant " + throw new PolicyMonitoringTaskException("Error occurred while updating the task for tenant " + tenantId, e);
PrivilegedCarbonContext. }
getThreadLocalCarbonContext().getTenantId(), e);
}
@Override
public boolean isTaskScheduled() throws PolicyMonitoringTaskException {
int tenantId = getTenantId();
String taskName = PolicyManagementConstants.MONITORING_TASK_NAME + "_" + String.valueOf(tenantId);
TaskService taskService = PolicyManagementDataHolder.getInstance().getTaskService();
TaskManager taskManager;
try {
taskManager = taskService.getTaskManager(PolicyManagementConstants.MONITORING_TASK_TYPE);
return taskManager.isTaskScheduled(taskName);
} catch (TaskException e) {
throw new PolicyMonitoringTaskException("Error occurred while checking task for tenant " +
tenantId, e);
}
} }
private int getTenantId() {
return PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
} }
} }

@ -23,7 +23,7 @@
# settings will override the settings in this file. # settings will override the settings in this file.
# #
log4j.rootLogger=DEBUG, STD_OUT log4j.rootLogger=INFO, STD_OUT
# Redirect log messages to console # Redirect log messages to console
log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender

@ -3,14 +3,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.simple.policy.decision.point</artifactId> <artifactId>org.wso2.carbon.simple.policy.decision.point</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Simple Policy Decision Point</name> <name>WSO2 Carbon - Simple Policy Decision Point</name>
<description>WSO2 Carbon - Simple Policy Decision Point</description> <description>WSO2 Carbon - Simple Policy Decision Point</description>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Component</name> <name>WSO2 Carbon - Policy Management Component</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -17,19 +17,18 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId> <artifactId>webapp-authenticator-framework</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId> <artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name> <name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name>
<description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description> <description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description>

@ -94,8 +94,9 @@ public class BSTAuthenticator implements WebappAuthenticator {
@Override @Override
public boolean canHandle(Request request) { public boolean canHandle(Request request) {
String contentType = request.getContentType(); String contentType = request.getContentType();
if (contentType.contains("application/xml") || contentType.contains("application/soap+xml") || if (contentType != null && (contentType.contains("application/xml") || contentType.contains
contentType.contains("application/text")) { ("application/soap+xml") ||
contentType.contains("application/text"))) {
try { try {
return isBSTHeaderExists(request); return isBSTHeaderExists(request);
} catch (IOException | XMLStreamException e) { } catch (IOException | XMLStreamException e) {

@ -23,7 +23,7 @@
# settings will override the settings in this file. # settings will override the settings in this file.
# #
log4j.rootLogger=ERROR, STD_OUT log4j.rootLogger=INFO, STD_OUT
# Redirect log messages to console # Redirect log messages to console
log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender log4j.appender.STD_OUT=org.apache.log4j.ConsoleAppender

@ -17,21 +17,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId> <artifactId>webapp-authenticator-framework</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Webapp Authenticator Framework</name> <name>WSO2 Carbon - Webapp Authenticator Framework</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Webapp Publisher Feature</name> <name>WSO2 Carbon - API Management Webapp Publisher Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing <description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId> <artifactId>apimgt-extensions-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - API Management Extensions Feature</name> <name>WSO2 Carbon - API Management Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -17,20 +17,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.certificate.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Certificate Management Server Feature</name> <name>WSO2 Carbon - Certificate Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for back-end Certificate Management functionality <description>This feature contains the core bundles required for back-end Certificate Management functionality

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt-feature</artifactId> <artifactId>certificate-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Certificate Management Feature</name> <name>WSO2 Carbon - Certificate Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -1,19 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
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">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Extensions Feature</name> <name>WSO2 Carbon - Device Management Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains common extensions used by key device management functionalities <description>This feature contains common extensions used by key device management functionalities

@ -17,20 +17,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name> <name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality <description>This feature contains the core bundles required for Back-end Device Management functionality

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-feature</artifactId> <artifactId>device-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Device Management Feature</name> <name>WSO2 Carbon - Device Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -18,20 +18,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration-feature</artifactId> <artifactId>dynamic-client-registration-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.registration.server.feature</artifactId> <artifactId>org.wso2.carbon.dynamic.client.registration.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Dynamic Client Registration Server Feature</name> <name>WSO2 Carbon - Dynamic Client Registration Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains dynamic client registration features</description> <description>This feature contains dynamic client registration features</description>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>dynamic-client-registration-feature</artifactId> <artifactId>dynamic-client-registration-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Dynamic Client Registration Feature</name> <name>WSO2 Carbon - Dynamic Client Registration Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -18,20 +18,19 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>oauth-extensions-feature</artifactId> <artifactId>oauth-extensions-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.oauth.extensions.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Device Mgt OAuth Extensions Feature</name> <name>WSO2 Carbon - Device Mgt OAuth Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains devicemgt related OAuth extensions</description> <description>This feature contains devicemgt related OAuth extensions</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>oauth-extensions-feature</artifactId> <artifactId>oauth-extensions-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon Device Management - OAuth Extensions Feature</name> <name>WSO2 Carbon Device Management - OAuth Extensions Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt-feature</artifactId> <artifactId>policy-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.policy.mgt.server.feature</artifactId> <artifactId>org.wso2.carbon.policy.mgt.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Policy Management Server Feature</name> <name>WSO2 Carbon - Policy Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality <description>This feature contains the core bundles required for Back-end Device Management functionality

@ -23,14 +23,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>policy-mgt-feature</artifactId> <artifactId>policy-mgt-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Policy Management Feature</name> <name>WSO2 Carbon - Policy Management Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework-feature</artifactId> <artifactId>webapp-authenticator-framework-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.webapp.authenticator.framework.server.feature</artifactId> <artifactId>org.wso2.carbon.webapp.authenticator.framework.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management Server Feature</name> <name>WSO2 Carbon - Device Management Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the core bundles required for Back-end Device Management functionality <description>This feature contains the core bundles required for Back-end Device Management functionality

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework-feature</artifactId> <artifactId>webapp-authenticator-framework-feature</artifactId>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - Webapp Authenticator Framework Feature</name> <name>WSO2 Carbon - Webapp Authenticator Framework Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -17,14 +17,13 @@
~ under the License. ~ under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>0.9.2-SNAPSHOT</version> <version>1.0.2-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - Parent</name> <name>WSO2 Carbon - Device Management - Parent</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Connected Device Manager Components</description> <description>WSO2 Connected Device Manager Components</description>
@ -1536,7 +1535,7 @@
<axiom.wso2.version>1.2.11.wso2v5</axiom.wso2.version> <axiom.wso2.version>1.2.11.wso2v5</axiom.wso2.version>
<!-- Carbon Device Management --> <!-- Carbon Device Management -->
<carbon.device.mgt.version>0.9.2-SNAPSHOT</carbon.device.mgt.version> <carbon.device.mgt.version>1.0.2-SNAPSHOT</carbon.device.mgt.version>
<!-- Carbon Commons --> <!-- Carbon Commons -->
<carbon.commons.version>4.4.8</carbon.commons.version> <carbon.commons.version>4.4.8</carbon.commons.version>

Loading…
Cancel
Save