revert-70aa11f8
charitha 7 years ago
commit ad3f7928f2

@ -22,13 +22,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.annotations</artifactId> <artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Annotations</name> <name>WSO2 Carbon - API Management Annotations</name>
<description>WSO2 Carbon - API Management Custom Annotation Module</description> <description>WSO2 Carbon - API Management Custom Annotation Module</description>

@ -21,12 +21,12 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension.api</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension.api</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>WSO2 Carbon - API Application Management API</name> <name>WSO2 Carbon - API Application Management API</name>

@ -22,12 +22,12 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<artifactId>org.wso2.carbon.apimgt.application.extension</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Application Management</name> <name>WSO2 Carbon - API Application Management</name>

@ -21,13 +21,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.handlers</artifactId> <artifactId>org.wso2.carbon.apimgt.handlers</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Security Handler Component</name> <name>WSO2 Carbon - API Security Handler Component</name>
<description>WSO2 Carbon - API Management Security Handler Module</description> <description>WSO2 Carbon - API Management Security Handler Module</description>

@ -13,13 +13,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.integration.client</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.client</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Client</name> <name>WSO2 Carbon - API Management Integration Client</name>
<description>WSO2 Carbon - API Management Integration Client</description> <description>WSO2 Carbon - API Management Integration Client</description>

@ -13,13 +13,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.integration.generated.client</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.generated.client</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Generated Client</name> <name>WSO2 Carbon - API Management Integration Generated Client</name>
<description>WSO2 Carbon - API Management Integration Client</description> <description>WSO2 Carbon - API Management Integration Client</description>

@ -22,13 +22,13 @@
<parent> <parent>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>apimgt-extensions</artifactId> <artifactId>apimgt-extensions</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -24,7 +24,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -21,13 +21,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -24,7 +24,7 @@
<parent> <parent>
<artifactId>certificate-mgt</artifactId> <artifactId>certificate-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt-extensions</artifactId> <artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -156,7 +156,7 @@ public interface GeoLocationBasedService {
* Get data to show device locations in a map * Get data to show device locations in a map
*/ */
@GET @GET
@Path("stats/deviceLocations") @Path("stats/device-locations")
@ApiOperation( @ApiOperation(
consumes = "application/json", consumes = "application/json",
produces = "application/json", produces = "application/json",

@ -18,17 +18,17 @@
*/ */
package org.wso2.carbon.device.mgt.jaxrs.service.api; package org.wso2.carbon.device.mgt.jaxrs.service.api;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Info;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Extension;
import io.swagger.annotations.Tag;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Extension;
import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Info;
import io.swagger.annotations.ResponseHeader; import io.swagger.annotations.ResponseHeader;
import io.swagger.annotations.SwaggerDefinition;
import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope; import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes; import org.wso2.carbon.apimgt.annotations.api.Scopes;
import org.wso2.carbon.device.mgt.common.notification.mgt.Notification; import org.wso2.carbon.device.mgt.common.notification.mgt.Notification;
@ -36,9 +36,15 @@ import org.wso2.carbon.device.mgt.jaxrs.NotificationList;
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.util.Constants; import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
import javax.validation.constraints.Max;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import javax.ws.rs.*; import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
@ -91,9 +97,9 @@ public interface NotificationManagementService {
notes = "Get the details of all the notifications that were pushed to the devices registered with WSO2 EMM using this REST API.", notes = "Get the details of all the notifications that were pushed to the devices registered with WSO2 EMM using this REST API.",
tags = "Device Notification Management", tags = "Device Notification Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:notifications:view") @ExtensionProperty(name = Constants.SCOPE, value = "perm:notifications:view")
}) })
} }
) )
@ApiResponses( @ApiResponses(
@ -180,9 +186,9 @@ public interface NotificationManagementService {
+ "change from NEW to CHECKED. This API is used to update device notification status.", + "change from NEW to CHECKED. This API is used to update device notification status.",
tags = "Device Notification Management", tags = "Device Notification Management",
extensions = { extensions = {
@Extension(properties = { @Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:notifications:mark-checked") @ExtensionProperty(name = Constants.SCOPE, value = "perm:notifications:mark-checked")
}) })
} }
) )
@ApiResponses( @ApiResponses(
@ -207,8 +213,7 @@ public interface NotificationManagementService {
value = "The notification ID.", value = "The notification ID.",
required = true, required = true,
defaultValue = "1") defaultValue = "1")
@PathParam("id") @Max(45) @PathParam("id") int id);
int id);
@PUT @PUT

@ -120,7 +120,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
} }
} }
@Path("stats/deviceLocations") @Path("stats/device-locations")
@GET @GET
@Consumes("application/json") @Consumes("application/json")
@Produces("application/json") @Produces("application/json")

@ -81,7 +81,7 @@ public class NotificationManagementServiceImpl implements NotificationManagement
@PUT @PUT
@Path("/{id}/mark-checked") @Path("/{id}/mark-checked")
public Response updateNotificationStatus(@PathParam("id") @Max(45)int id) { public Response updateNotificationStatus(@PathParam("id") int id) {
String msg; String msg;
Notification.Status status = Notification.Status.CHECKED; Notification.Status status = Notification.Status.CHECKED;
Notification notification; Notification notification;

@ -151,6 +151,7 @@ public class UserManagementServiceImpl implements UserManagementService {
String recipient = userInfo.getEmailAddress(); String recipient = userInfo.getEmailAddress();
Properties props = new Properties(); Properties props = new Properties();
props.setProperty("first-name", userInfo.getFirstname()); props.setProperty("first-name", userInfo.getFirstname());
props.setProperty("last-name", userInfo.getLastname());
props.setProperty("username", username); props.setProperty("username", username);
props.setProperty("password", initialUserPassword); props.setProperty("password", initialUserPassword);
@ -609,10 +610,15 @@ public class UserManagementServiceImpl implements UserManagementService {
Properties props = new Properties(); Properties props = new Properties();
String username = DeviceMgtAPIUtils.getAuthenticatedUser(); String username = DeviceMgtAPIUtils.getAuthenticatedUser();
String firstName = getClaimValue(username, Constants.USER_CLAIM_FIRST_NAME); String firstName = getClaimValue(username, Constants.USER_CLAIM_FIRST_NAME);
String lastName = getClaimValue(username, Constants.USER_CLAIM_LAST_NAME);
if (firstName == null) { if (firstName == null) {
firstName = username; firstName = username;
} }
if (lastName == null) {
lastName = "";
}
props.setProperty("first-name", firstName); props.setProperty("first-name", firstName);
props.setProperty("last-name", lastName);
props.setProperty("device-type", enrollmentInvitation.getDeviceType()); props.setProperty("device-type", enrollmentInvitation.getDeviceType());
EmailMetaInfo metaInfo = new EmailMetaInfo(recipients, props); EmailMetaInfo metaInfo = new EmailMetaInfo(recipients, props);
dms.sendEnrolmentInvitation(getEnrollmentTemplateName(enrollmentInvitation.getDeviceType()), metaInfo); dms.sendEnrolmentInvitation(getEnrollmentTemplateName(enrollmentInvitation.getDeviceType()), metaInfo);

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig; import org.wso2.carbon.device.mgt.common.DeviceStatusTaskPluginConfig;
import org.wso2.carbon.device.mgt.common.InvalidConfigurationException;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig; import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig; import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager;
@ -71,6 +72,9 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
String deviceType = provider.getType(); String deviceType = provider.getType();
ProvisioningConfig provisioningConfig = provider.getProvisioningConfig(); ProvisioningConfig provisioningConfig = provider.getProvisioningConfig();
String tenantDomain = provisioningConfig.getProviderTenantDomain(); String tenantDomain = provisioningConfig.getProviderTenantDomain();
if (log.isDebugEnabled()) {
log.debug(deviceType + " device type is added for tenant : " + tenantDomain);
}
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().getDeviceManagementConfig(); DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance().getDeviceManagementConfig();
boolean isSharedWithAllTenants = provisioningConfig.isSharedWithAllTenants(); boolean isSharedWithAllTenants = provisioningConfig.isSharedWithAllTenants();
int tenantId = DeviceManagerUtil.getTenantId(tenantDomain); int tenantId = DeviceManagerUtil.getTenantId(tenantDomain);
@ -125,6 +129,9 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
public void removeDeviceManagementProvider(DeviceManagementService provider) public void removeDeviceManagementProvider(DeviceManagementService provider)
throws DeviceManagementException { throws DeviceManagementException {
String deviceTypeName = provider.getType(); String deviceTypeName = provider.getType();
if (log.isDebugEnabled()) {
log.debug(deviceTypeName + " device type is removed.");
}
DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance() DeviceManagementConfig deviceManagementConfig = DeviceConfigurationManager.getInstance()
.getDeviceManagementConfig(); .getDeviceManagementConfig();
DeviceTypeServiceIdentifier deviceTypeIdentifier; DeviceTypeServiceIdentifier deviceTypeIdentifier;
@ -152,10 +159,22 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
private void unregisterPushNotificationStrategy(DeviceTypeServiceIdentifier deviceTypeIdentifier) { private void unregisterPushNotificationStrategy(DeviceTypeServiceIdentifier deviceTypeIdentifier) {
OperationManager operationManager = operationManagerRepository.getOperationManager( OperationManager operationManager = operationManagerRepository.getOperationManager(
deviceTypeIdentifier); deviceTypeIdentifier);
if (log.isDebugEnabled()) {
log.debug(deviceTypeIdentifier.getDeviceType() + " device type management service is " +
"retrieved for tenant id: " + deviceTypeIdentifier.getTenantId());
for (Map.Entry<DeviceTypeServiceIdentifier, DeviceManagementServiceHolder> entry : providers.entrySet()) {
log.debug("Device Type : " + entry.getKey().getDeviceType() + " Tenant Id : " +
entry.getKey().getTenantId());
}
}
if (operationManager != null) { if (operationManager != null) {
NotificationStrategy notificationStrategy = operationManager.getNotificationStrategy(); try {
if (notificationStrategy != null) { NotificationStrategy notificationStrategy = operationManager.getNotificationStrategy();
notificationStrategy.undeploy(); if (notificationStrategy != null) {
notificationStrategy.undeploy();
}
} catch (InvalidConfigurationException ignore) {
//error occurred while undeploying strategy, ignore error
} }
operationManagerRepository.removeOperationManager(deviceTypeIdentifier); operationManagerRepository.removeOperationManager(deviceTypeIdentifier);
} }
@ -165,6 +184,13 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
//Priority need to be given to the tenant before public. //Priority need to be given to the tenant before public.
DeviceTypeServiceIdentifier deviceTypeIdentifier = new DeviceTypeServiceIdentifier(type, tenantId); DeviceTypeServiceIdentifier deviceTypeIdentifier = new DeviceTypeServiceIdentifier(type, tenantId);
DeviceManagementServiceHolder provider = providers.get(deviceTypeIdentifier); DeviceManagementServiceHolder provider = providers.get(deviceTypeIdentifier);
if (log.isDebugEnabled()) {
log.debug(type + " device type management service is retrieved for tenant id: " + tenantId);
for (Map.Entry<DeviceTypeServiceIdentifier, DeviceManagementServiceHolder> entry : providers.entrySet()) {
log.debug("Device Type : " + entry.getKey().getDeviceType() + " Tenant Id : " +
entry.getKey().getTenantId());
}
}
if (provider == null) { if (provider == null) {
deviceTypeIdentifier = new DeviceTypeServiceIdentifier(type); deviceTypeIdentifier = new DeviceTypeServiceIdentifier(type);
provider = providers.get(deviceTypeIdentifier); provider = providers.get(deviceTypeIdentifier);
@ -310,6 +336,9 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
DeviceTaskManagerService deviceTaskManagerService = DeviceManagementDataHolder.getInstance(). DeviceTaskManagerService deviceTaskManagerService = DeviceManagementDataHolder.getInstance().
getDeviceTaskManagerService(); getDeviceTaskManagerService();
DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig = deviceManagementService.getDeviceStatusTaskPluginConfig(); DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig = deviceManagementService.getDeviceStatusTaskPluginConfig();
if (log.isDebugEnabled()) {
log.debug(deviceType + " device type status monitoring task is registered.");
}
if (deviceStatusTaskPluginConfig != null && deviceStatusTaskPluginConfig.isRequireStatusMonitoring()) { if (deviceStatusTaskPluginConfig != null && deviceStatusTaskPluginConfig.isRequireStatusMonitoring()) {
if (deviceTaskManagerService == null) { if (deviceTaskManagerService == null) {
DeviceManagementDataHolder.getInstance().addDeviceStatusTaskPluginConfig(deviceType, DeviceManagementDataHolder.getInstance().addDeviceStatusTaskPluginConfig(deviceType,
@ -330,6 +359,9 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
DeviceStatusTaskManagerService deviceStatusTaskManagerService = DeviceManagementDataHolder.getInstance(). DeviceStatusTaskManagerService deviceStatusTaskManagerService = DeviceManagementDataHolder.getInstance().
getDeviceStatusTaskManagerService(); getDeviceStatusTaskManagerService();
DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig = deviceManagementService.getDeviceStatusTaskPluginConfig(); DeviceStatusTaskPluginConfig deviceStatusTaskPluginConfig = deviceManagementService.getDeviceStatusTaskPluginConfig();
if (log.isDebugEnabled()) {
log.debug(deviceType + " device type status monitoring task is unregistered.");
}
if (deviceStatusTaskPluginConfig != null && deviceStatusTaskPluginConfig.isRequireStatusMonitoring()) { if (deviceStatusTaskPluginConfig != null && deviceStatusTaskPluginConfig.isRequireStatusMonitoring()) {
try { try {
DeviceManagementDataHolder.getInstance().removeDeviceStatusTaskPluginConfig(deviceType); DeviceManagementDataHolder.getInstance().removeDeviceStatusTaskPluginConfig(deviceType);
@ -346,6 +378,9 @@ public class DeviceManagementPluginRepository implements DeviceManagerStartupLis
public OperationManager getOperationManager(String deviceType, int tenantId) { public OperationManager getOperationManager(String deviceType, int tenantId) {
//Priority need to be given to the tenant before public. //Priority need to be given to the tenant before public.
DeviceTypeServiceIdentifier deviceTypeIdentifier = new DeviceTypeServiceIdentifier(deviceType, tenantId); DeviceTypeServiceIdentifier deviceTypeIdentifier = new DeviceTypeServiceIdentifier(deviceType, tenantId);
if (log.isDebugEnabled()) {
log.debug(deviceType + " device type operation manager is retrieved for tenant: ." + tenantId);
}
if (getDeviceManagementService(deviceType, tenantId) == null) { if (getDeviceManagementService(deviceType, tenantId) == null) {
return null; return null;
} }

@ -111,6 +111,12 @@ public class ArchivalServiceImpl implements ArchivalService {
} }
archivalDAO.moveProfileOperations(); archivalDAO.moveProfileOperations();
//Purge the config operation table, DM_CONFIG_OPERATION
if (log.isDebugEnabled()) {
log.debug("## Purging config operations");
}
archivalDAO.moveConfigOperations();
//Purge the enrolment mappings table, DM_ENROLMENT_OP_MAPPING //Purge the enrolment mappings table, DM_ENROLMENT_OP_MAPPING
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("## Purging enrolment mappings"); log.debug("## Purging enrolment mappings");

@ -41,6 +41,8 @@ public interface ArchivalDAO {
void moveProfileOperations() throws ArchivalDAOException; void moveProfileOperations() throws ArchivalDAOException;
void moveConfigOperations() throws ArchivalDAOException;
void moveEnrolmentMappings() throws ArchivalDAOException; void moveEnrolmentMappings() throws ArchivalDAOException;
void moveOperations() throws ArchivalDAOException; void moveOperations() throws ArchivalDAOException;

@ -56,8 +56,8 @@ public class ArchivalDAOImpl implements ArchivalDAO {
try { try {
Connection conn = ArchivalSourceDAOFactory.getConnection(); Connection conn = ArchivalSourceDAOFactory.getConnection();
String sql = "SELECT DISTINCT OPERATION_ID FROM DM_ENROLMENT_OP_MAPPING " + String sql = "SELECT DISTINCT OPERATION_ID FROM DM_ENROLMENT_OP_MAPPING " +
"WHERE CREATED_TIMESTAMP BETWEEN DATE_SUB(NOW(), INTERVAL " + "WHERE CREATED_TIMESTAMP BETWEEN DATE(TIMESTAMPADD(DAY, " +
this.retentionPeriod + " DAY) AND NOW()"; this.retentionPeriod + ", NOW())) AND NOW()";
stmt = this.createMemoryEfficientStatement(conn); stmt = this.createMemoryEfficientStatement(conn);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
while (rs.next()) { while (rs.next()) {
@ -83,7 +83,8 @@ public class ArchivalDAOImpl implements ArchivalDAO {
Connection conn = ArchivalSourceDAOFactory.getConnection(); Connection conn = ArchivalSourceDAOFactory.getConnection();
String sql = "SELECT DISTINCT OPERATION_ID " + String sql = "SELECT DISTINCT OPERATION_ID " +
" FROM DM_ENROLMENT_OP_MAPPING WHERE STATUS IN('PENDING', 'IN_PROGRESS') " + " FROM DM_ENROLMENT_OP_MAPPING WHERE STATUS IN('PENDING', 'IN_PROGRESS') " +
" AND CREATED_TIMESTAMP BETWEEN DATE_SUB(NOW(), INTERVAL " + this.retentionPeriod +" DAY) AND NOW()"; " AND CREATED_TIMESTAMP BETWEEN DATE(TIMESTAMPADD(DAY, " + this.retentionPeriod +", NOW())) " +
"AND NOW()";
stmt = this.createMemoryEfficientStatement(conn); stmt = this.createMemoryEfficientStatement(conn);
rs = stmt.executeQuery(sql); rs = stmt.executeQuery(sql);
while (rs.next()) { while (rs.next()) {
@ -337,6 +338,56 @@ public class ArchivalDAOImpl implements ArchivalDAO {
} }
} }
@Override
public void moveConfigOperations() throws ArchivalDAOException {
Statement stmt = null;
PreparedStatement stmt2 = null;
Statement stmt3 = null;
ResultSet rs = null;
try {
Connection conn = ArchivalSourceDAOFactory.getConnection();
String sql = "SELECT * FROM DM_CONFIG_OPERATION WHERE OPERATION_ID IN " +
"(SELECT ID FROM DM_ARCHIVED_OPERATIONS)";
stmt = this.createMemoryEfficientStatement(conn);
rs = stmt.executeQuery(sql);
Connection conn2 = ArchivalDestinationDAOFactory.getConnection();
sql = "INSERT INTO DM_CONFIG_OPERATION_ARCH VALUES(?, ?, ?, ?)";
stmt2 = conn2.prepareStatement(sql);
int count = 0;
while (rs.next()) {
stmt2.setInt(1, rs.getInt("OPERATION_ID"));
stmt2.setBytes(2, rs.getBytes("OPERATION_CONFIG"));
stmt2.setInt(3, rs.getInt("ENABLED"));
stmt2.setTimestamp(4,this.currentTimestamp );
stmt2.addBatch();
if (++count % batchSize == 0) {
stmt2.executeBatch();
}
}
stmt2.executeBatch();
if (log.isDebugEnabled()) {
log.debug(count + " [CONFIG_OPERATION] Records copied to the archival table. Starting deletion");
}
sql = "DELETE FROM DM_CONFIG_OPERATION" +
" WHERE OPERATION_ID IN (SELECT ID FROM DM_ARCHIVED_OPERATIONS)";
stmt3 = conn.createStatement();
int affected = stmt3.executeUpdate(sql);
if (log.isDebugEnabled()) {
log.debug(affected + " Rows deleted");
}
} catch (SQLException e) {
throw new ArchivalDAOException("Error occurred while moving config operations", e);
} finally {
ArchivalDAOUtil.cleanupResources(stmt, rs);
ArchivalDAOUtil.cleanupResources(stmt2);
ArchivalDAOUtil.cleanupResources(stmt3);
}
}
@Override @Override
public void moveEnrolmentMappings() throws ArchivalDAOException { public void moveEnrolmentMappings() throws ArchivalDAOException {
Statement stmt = null; Statement stmt = null;

@ -29,6 +29,7 @@ public class ArchivalTaskConfiguration {
private int retentionPeriod; private int retentionPeriod;
private int batchSize; private int batchSize;
private PurgingTaskConfiguration purgingTaskConfiguration; private PurgingTaskConfiguration purgingTaskConfiguration;
private final int MULTIPLIER = -1;
@XmlElement(name = "Enabled", required = true) @XmlElement(name = "Enabled", required = true)
public boolean isEnabled() { public boolean isEnabled() {
@ -59,7 +60,8 @@ public class ArchivalTaskConfiguration {
@XmlElement(name = "RetentionPeriod", required = true) @XmlElement(name = "RetentionPeriod", required = true)
public int getRetentionPeriod() { public int getRetentionPeriod() {
return retentionPeriod; // multiply by -1 to get the diff
return retentionPeriod * MULTIPLIER;
} }
public void setRetentionPeriod(int retentionPeriod) { public void setRetentionPeriod(int retentionPeriod) {

@ -26,10 +26,12 @@ import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.UnsupportedDatabaseEngineException; 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.ApplicationDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.AbstractApplicationDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.ApplicationMappingDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.ApplicationMappingDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.DeviceTypeDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.DeviceTypeDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.EnrollmentDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.EnrollmentDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.GenericApplicationDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.PostgreSQLApplicationDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.device.GenericDeviceDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.device.GenericDeviceDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.device.OracleDeviceDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.device.OracleDeviceDAOImpl;
import org.wso2.carbon.device.mgt.core.dao.impl.device.PostgreSQLDeviceDAOImpl; import org.wso2.carbon.device.mgt.core.dao.impl.device.PostgreSQLDeviceDAOImpl;
@ -125,7 +127,20 @@ public class DeviceManagementDAOFactory {
} }
public static ApplicationDAO getApplicationDAO() { public static ApplicationDAO getApplicationDAO() {
return new ApplicationDAOImpl(); if (databaseEngine != null) {
switch (databaseEngine) {
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_POSTGRESQL:
return new PostgreSQLApplicationDAOImpl();
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_ORACLE:
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MSSQL:
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2:
case DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL:
return new GenericApplicationDAOImpl();
default:
throw new UnsupportedDatabaseEngineException("Unsupported database engine : " + databaseEngine);
}
}
throw new IllegalStateException("Database engine has not initialized properly.");
} }
public static ApplicationMappingDAO getApplicationMappingDAO() { public static ApplicationMappingDAO getApplicationMappingDAO() {

@ -40,9 +40,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
public class ApplicationDAOImpl implements ApplicationDAO { public abstract class AbstractApplicationDAOImpl implements ApplicationDAO {
private static final Log log = LogFactory.getLog(ApplicationDAOImpl.class); private static final Log log = LogFactory.getLog(AbstractApplicationDAOImpl.class);
@Override @Override
public int addApplication(Application application, int tenantId) throws DeviceManagementDAOException { public int addApplication(Application application, int tenantId) throws DeviceManagementDAOException {
@ -106,55 +106,6 @@ public class ApplicationDAOImpl implements ApplicationDAO {
} }
} }
@Override
public List<Integer> addApplications(List<Application> applications,
int tenantId) throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs;
List<Integer> applicationIds = new ArrayList<>();
try {
conn = this.getConnection();
stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, CATEGORY, " +
"VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new String[]{"id"});
for (Application application : applications) {
stmt.setString(1, application.getName());
stmt.setString(2, application.getPlatform());
stmt.setString(3, application.getCategory());
stmt.setString(4, application.getVersion());
stmt.setString(5, application.getType());
stmt.setString(6, application.getLocationUrl());
stmt.setString(7, application.getImageUrl());
stmt.setInt(8, tenantId);
// Removing the application properties saving from the application table.
stmt.setBigDecimal(9, null);
stmt.setString(10, application.getApplicationIdentifier());
// Removing the application memory
stmt.setInt(11, 0);
stmt.setBoolean(12, true);
stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
applicationIds.add(rs.getInt(1));
}
}
return applicationIds;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding bulk application list", e);
} finally {
DeviceManagementDAOUtil.cleanupResources(stmt, null);
}
}
@Override @Override
public List<Integer> removeApplications(List<Application> apps, int tenantId) throws DeviceManagementDAOException { public List<Integer> removeApplications(List<Application> apps, int tenantId) throws DeviceManagementDAOException {
Connection conn = null; Connection conn = null;

@ -0,0 +1,91 @@
/*
* Copyright (c) 2018 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.core.dao.impl;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* Generic DAO implementation for Application Management Operations
*/
public class GenericApplicationDAOImpl extends AbstractApplicationDAOImpl{
@Override
public List<Integer> addApplications(List<Application> applications,
int tenantId) throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs;
List<Integer> applicationIds = new ArrayList<>();
try {
conn = this.getConnection();
stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, " +
"CATEGORY, VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, " +
"APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new String[]{"id"});
for (Application application : applications) {
stmt.setString(1, application.getName());
stmt.setString(2, application.getPlatform());
stmt.setString(3, application.getCategory());
stmt.setString(4, application.getVersion());
stmt.setString(5, application.getType());
stmt.setString(6, application.getLocationUrl());
stmt.setString(7, application.getImageUrl());
stmt.setInt(8, tenantId);
// Removing the application properties saving from the application table.
stmt.setBigDecimal(9, null);
stmt.setString(10, application.getApplicationIdentifier());
// Removing the application memory
stmt.setInt(11, 0);
stmt.setBoolean(12, true);
stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
applicationIds.add(rs.getInt(1));
}
}
return applicationIds;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding bulk application list", e);
} finally {
DeviceManagementDAOUtil.cleanupResources(stmt, null);
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}
}

@ -0,0 +1,90 @@
/*
* Copyright (c) 2018 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.core.dao.impl;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOException;
import org.wso2.carbon.device.mgt.core.dao.DeviceManagementDAOFactory;
import org.wso2.carbon.device.mgt.core.dao.util.DeviceManagementDAOUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* PosgreSQL specific DAO implementation for Application Management Operations
*/
public class PostgreSQLApplicationDAOImpl extends AbstractApplicationDAOImpl{
@Override
public List<Integer> addApplications(List<Application> applications,
int tenantId) throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs;
List<Integer> applicationIds = new ArrayList<>();
try {
conn = this.getConnection();
stmt = conn.prepareStatement("INSERT INTO DM_APPLICATION (NAME, PLATFORM, " +
"CATEGORY, VERSION, TYPE, LOCATION_URL, IMAGE_URL, TENANT_ID,APP_PROPERTIES, " +
"APP_IDENTIFIER, MEMORY_USAGE, IS_ACTIVE) " +
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new String[]{"id"});
for (Application application : applications) {
stmt.setString(1, application.getName());
stmt.setString(2, application.getPlatform());
stmt.setString(3, application.getCategory());
stmt.setString(4, application.getVersion());
stmt.setString(5, application.getType());
stmt.setString(6, application.getLocationUrl());
stmt.setString(7, application.getImageUrl());
stmt.setInt(8, tenantId);
// Removing the application properties saving from the application table.
stmt.setBytes(9, null);
stmt.setString(10, application.getApplicationIdentifier());
// Removing the application memory
stmt.setInt(11, 0);
stmt.setBoolean(12, true);
stmt.executeUpdate();
rs = stmt.getGeneratedKeys();
if (rs.next()) {
applicationIds.add(rs.getInt(1));
}
}
return applicationIds;
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while adding bulk application list", e);
} finally {
DeviceManagementDAOUtil.cleanupResources(stmt, null);
}
}
private Connection getConnection() throws SQLException {
return DeviceManagementDAOFactory.getConnection();
}
}

@ -2535,11 +2535,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
* of the given device list. * of the given device list.
*/ */
private List<Device> getAllDeviceInfo(List<Device> allDevices) throws DeviceManagementException { private List<Device> getAllDeviceInfo(List<Device> allDevices) throws DeviceManagementException {
if (allDevices.size() == 0) {
String msg = "Received empty device list for getAllDeviceInfo";
log.error(msg);
throw new DeviceManagementException(msg);
}
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Get all device info of devices, num of devices: " + allDevices.size()); log.debug("Get all device info of devices, num of devices: " + allDevices.size());
} }

@ -32,7 +32,7 @@ import java.sql.SQLException;
public class ApplicationPersistenceTests extends BaseDeviceManagementTest { public class ApplicationPersistenceTests extends BaseDeviceManagementTest {
private static final Log log = LogFactory.getLog(ApplicationPersistenceTests.class); private static final Log log = LogFactory.getLog(ApplicationPersistenceTests.class);
private ApplicationDAO applicationDAO = DeviceManagementDAOFactory.getApplicationDAO(); private ApplicationDAO applicationDAO = null;
@Test @Test
public void testAddApplication() { public void testAddApplication() {
@ -79,6 +79,7 @@ public class ApplicationPersistenceTests extends BaseDeviceManagementTest {
@Override @Override
public void init() throws Exception { public void init() throws Exception {
this.initDataSource(); this.initDataSource();
applicationDAO = DeviceManagementDAOFactory.getApplicationDAO();
} }
} }

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -25,6 +25,11 @@ var uriMatcher = new URIMatcher(String(uri));
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"]; var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
var serviceInvokers = require("/app/modules/oauth/token-protected-service-invokers.js")["invokers"]; var serviceInvokers = require("/app/modules/oauth/token-protected-service-invokers.js")["invokers"];
var utility = require("/app/modules/utility.js")["utility"]; var utility = require("/app/modules/utility.js")["utility"];
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var EnrolmentInfo = Packages.org.wso2.carbon.device.mgt.common.EnrolmentInfo;
var DTYPE_CONF_DEVICE_TYPE_KEY = "deviceType";
var DTYPE_CONF_DEVICE_TYPE_LABEL_KEY = "label";
function appendQueryParam (url, queryParam , value) { function appendQueryParam (url, queryParam , value) {
if (url.indexOf("?") > 0) { if (url.indexOf("?") > 0) {
@ -33,7 +38,46 @@ function appendQueryParam (url, queryParam , value) {
return url + "?" + queryParam + "=" + value; return url + "?" + queryParam + "=" + value;
} }
if (uriMatcher.match("/{context}/api/data-tables/invoker")) { if (uriMatcher.match("/{context}/api/data-tables/invoker/filters")) {
var result = {};
var i;
//Fetching Status types
var status = EnrolmentInfo.Status.values();
var statusArr = [];
for(i = 0; i < status.length; i++){
statusArr.push(status[i].name());
}
result.status = statusArr;
//Fetching Ownership types
var ownership = EnrolmentInfo.OwnerShip.values();
var ownershipArr = [];
for(i = 0; i < ownership.length; i++){
ownershipArr.push(ownership[i].name());
}
result.ownership = ownershipArr;
//Fetching Device Types
result.deviceTypes = [];
var deviceTypesRes = deviceModule.getDeviceTypes();
if (deviceTypesRes.status === "success") {
var deviceTypes = deviceTypesRes["content"]["deviceTypes"];
for (i = 0; i < deviceTypes.length; i++) {
var deviceTypeName = deviceTypes[i];
var deviceTypeLabel = deviceTypeName;
var configs = utility.getDeviceTypeConfig(deviceTypeLabel);
if (configs) {
if (configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY]) {
deviceTypeLabel = configs[DTYPE_CONF_DEVICE_TYPE_KEY][DTYPE_CONF_DEVICE_TYPE_LABEL_KEY];
}
}
result.deviceTypes.push({"name": deviceTypeLabel, "value": deviceTypeName});
}
}
//Adding policy compliance
result.compliance = ["MONITOR", "ENFORCE", "WARN", "BLOCK"];
response["status"] = 200;
response["content"] = result;
response["contentType"] = "application/json";
} else if (uriMatcher.match("/{context}/api/data-tables/invoker")) {
var url = request.getParameter("url"); var url = request.getParameter("url");
var targetURL = devicemgtProps["httpsURL"] + request.getParameter("url"); var targetURL = devicemgtProps["httpsURL"] + request.getParameter("url");
//noinspection JSUnresolvedFunction getAllParameters //noinspection JSUnresolvedFunction getAllParameters

@ -74,13 +74,13 @@ if (!user) {
} else { } else {
result = 400; result = 400;
} }
}else if (uriMatcher.match("/{context}/api/devices/sketch/generate_link")) { } else if (uriMatcher.match("/{context}/api/devices/sketch/generate_link")) {
if (!request.getContent()){ if (!request.getContent()){
log.error("Request Payload Is Empty"); log.error("Request Payload Is Empty");
// HTTP status code 400 refers to - Bad request. // HTTP status code 400 refers to - Bad request.
result = 400; result = 400;
}else{ } else{
deviceType = request.getContent()["deviceType"]; deviceType = request.getContent()["deviceType"];
queryString = "?deviceName=" + request.getContent()["deviceName"] +"&deviceType="+ queryString = "?deviceName=" + request.getContent()["deviceName"] +"&deviceType="+
request.getContent()["deviceType"]+"&sketchType="+request.getContent()["sketchType"]; request.getContent()["deviceType"]+"&sketchType="+request.getContent()["sketchType"];

@ -51,7 +51,19 @@ policyModule = function () {
policyObjectToView["deviceTypeIcon"] = policyObjectToView["platform"]; policyObjectToView["deviceTypeIcon"] = policyObjectToView["platform"];
} }
//policyObjectToView["icon"] = utility.getDeviceThumb(policyObjectToView["platform"]); //policyObjectToView["icon"] = utility.getDeviceThumb(policyObjectToView["platform"]);
policyObjectToView["ownershipType"] = policyObjectFromRestEndpoint["ownershipType"]; var ownershipType = "None";
var deviceGroups = policyObjectFromRestEndpoint["deviceGroups"];
if (deviceGroups) {
for (var j = 0; j < deviceGroups.length; j++) {
var deviceGroup = deviceGroups[j];
if (deviceGroup.name === "COPE") {
ownershipType = (ownershipType === "BYOD") ? "BYOD & COPE" : "COPE";
} else if (deviceGroup.name === "BYOD") {
ownershipType = (ownershipType === "COPE") ? "BYOD & COPE" : "BYOD";
}
}
}
policyObjectToView["ownershipType"] = ownershipType;
var assignedRoleCount = policyObjectFromRestEndpoint["roles"].length; var assignedRoleCount = policyObjectFromRestEndpoint["roles"].length;
var assignedUserCount = policyObjectFromRestEndpoint["users"].length; var assignedUserCount = policyObjectFromRestEndpoint["users"].length;

@ -169,11 +169,11 @@
</tr> </tr>
<tr class="filter-row filter-box"> <tr class="filter-row filter-box">
<th class="no-sort"></th> <th class="no-sort"></th>
<th data-for="By Device name" class="text-filter"></th> <th data-for="By Device Name" class="text-filter"></th>
<th data-for="By Owner" class="text-filter"></th> <th data-for="By Owner" class="text-filter"></th>
<th data-for="By Status" class="select-filter"></th> <th data-for="By Status" class="select-filter data-status"></th>
<th data-for="By Platform" class="select-filter data-platform"></th> <th data-for="By Platform" class="select-filter data-platform"></th>
<th data-for="By Ownership" class="select-filter"></th> <th data-for="By Ownership" class="select-filter data-ownership"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="bulk-action-row hidden"> <tr class="bulk-action-row hidden">

@ -130,12 +130,12 @@
<tr class="filter-row filter-box"> <tr class="filter-row filter-box">
<th class="no-sort"></th> <th class="no-sort"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
<th data-for="By Platform" class="select-filter"></th> <th data-for="By Platform" class="select-filter data-platform"></th>
<th data-for="By Ownership Type" class="select-filter"></th> <th data-for="By Ownership Type" class="select-filter data-ownership"></th>
<th data-for="By Role" class="text-filter"></th> <th data-for="By Role" class="text-filter"></th>
<th data-for="By User" class="text-filter"></th> <th data-for="By User" class="text-filter"></th>
<th data-for="By Compliance Type" class="select-filter"></th> <th data-for="By Compliance Type" class="select-filter data-compliance"></th>
<th data-for="By Status" class="select-filter"></th> <th data-for="By Status" class="select-filter data-status"></th>
<th class="no-sort"></th> <th class="no-sort"></th>
</tr> </tr>
<tr class="bulk-action-row hidden"> <tr class="bulk-action-row hidden">

@ -56,7 +56,7 @@ $.fn.datatables_extended = function (settings) {
search: '' search: ''
}, },
initComplete: function () { initComplete: function () {
var cachedFilterRes;
this.api().columns().every(function () { this.api().columns().every(function () {
var column = this; var column = this;
@ -94,8 +94,47 @@ $.fn.datatables_extended = function (settings) {
} }
}); });
if (!cachedFilterRes) {
$.ajax(
{
url: context + "/api/data-tables/invoker/filters",
async:false,
success: function(data) {
cachedFilterRes = data;
}
}
);
}
$(column).each(function () { $(column).each(function () {
if ($(column.nodes()).attr('data-search')) { var i;
if (filterColumn.eq(column.index()).hasClass('data-status')) {
for(i = 0; i < cachedFilterRes.status.length; i++){
var status = cachedFilterRes.status[i];
select.append('<option value="' + status + '">' + status + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-ownership')) {
for(i = 0; i < cachedFilterRes.ownership.length; i++){
var ownership = cachedFilterRes.ownership[i];
select.append('<option value="' + ownership + '">' + ownership + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-platform')) {
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
var deviceTypes = cachedFilterRes.deviceTypes[i];
var name = deviceTypes;
var value = deviceTypes;
if (deviceTypes.name && deviceTypes.value) {
name = deviceTypes.name;
value = deviceTypes.value;
}
select.append('<option value="' + value + '">' + name + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-compliance')) {
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
var compliance = cachedFilterRes.compliance[i];
select.append('<option value="' + compliance + '">' + compliance + '</option>')
}
} else if ($(column.nodes()).attr('data-search')) {
var values = []; var values = [];
column.nodes().unique().sort().each(function (d, j) { column.nodes().unique().sort().each(function (d, j) {
var title = $(d).attr('data-display'); var title = $(d).attr('data-display');

@ -117,6 +117,7 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
console.warn('Warning : Dependency missing - Bootstrap Tooltip Library'); console.warn('Warning : Dependency missing - Bootstrap Tooltip Library');
} }
var cachedFilterRes;
this.api().columns().every(function () { this.api().columns().every(function () {
var column = this; var column = this;
@ -146,10 +147,6 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
} else { } else {
$("#operation-guide").addClass("hidden"); $("#operation-guide").addClass("hidden");
$("#operation-bar").removeClass("hidden"); $("#operation-bar").removeClass("hidden");
//noinspection JSUnresolvedFunction
if (deviceType && ownership) {
loadOperationBar(deviceType, ownership, operationBarModeConstants.BULK);
}
} }
} }
@ -161,16 +158,51 @@ $.fn.datatables_extended_serverside_paging = function (settings, url, dataFilter
} else { } else {
$("#operation-guide").addClass("hidden"); $("#operation-guide").addClass("hidden");
$("#operation-bar").removeClass("hidden"); $("#operation-bar").removeClass("hidden");
//noinspection JSUnresolvedFunction
if (deviceType && ownership) {
loadOperationBar(deviceType, ownership, operationBarModeConstants.BULK);
}
} }
} }
}); });
if(!cachedFilterRes){
$.ajax(
{
url: context + "/api/data-tables/invoker/filters",
async:false,
success: function(data){
cachedFilterRes = data;
}
}
);
}
$(column).each(function () { $(column).each(function () {
if ($(column.nodes()).attr('data-search')) { var i;
if (filterColumn.eq(column.index()).hasClass('data-status')) {
for(i = 0; i < cachedFilterRes.status.length; i++){
var status = cachedFilterRes.status[i];
select.append('<option value="' + status + '">' + status + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-ownership')) {
for(i = 0; i < cachedFilterRes.ownership.length; i++){
var ownership = cachedFilterRes.ownership[i];
select.append('<option value="' + ownership + '">' + ownership + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-platform')) {
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
var deviceTypes = cachedFilterRes.deviceTypes[i];
var name = deviceTypes;
var value = deviceTypes;
if (deviceTypes.name && deviceTypes.value) {
name = deviceTypes.name;
value = deviceTypes.value;
}
select.append('<option value="' + value + '">' + name + '</option>')
}
} else if (filterColumn.eq(column.index()).hasClass('data-compliance')) {
for(i = 0; i < cachedFilterRes.deviceTypes.length; i++){
var compliance = cachedFilterRes.compliance[i];
select.append('<option value="' + compliance + '">' + compliance + '</option>')
}
} else if ($(column.nodes()).attr('data-search')) {
var titles = []; var titles = [];
column.nodes().unique().sort().each(function (d, j) { column.nodes().unique().sort().each(function (d, j) {
var title = $(d).attr('data-display'); var title = $(d).attr('data-display');

@ -52,22 +52,21 @@ function submitForm(formId) {
uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val(); uriencodedQueryStr += prefix + input.attr("id") + "=" + input.val();
} else if (input.data("param-type") == "form") { } else if (input.data("param-type") == "form") {
var prefix = (uriencodedFormStr == "") ? "" : "&"; var prefix = (uriencodedFormStr == "") ? "" : "&";
if (input.attr("type") == "checkbox" || input.attr("type") == "radio"){ if (input.attr("type") == "checkbox" || input.attr("type") == "radio") {
if (isItemSelected == undefined) {
if (isItemSelected == undefined){
isItemSelected = false; isItemSelected = false;
} }
if (input.is(':checked')){ if (input.is(':checked')) {
isItemSelected = true; isItemSelected = true;
uriencodedFormStr += prefix + input.attr("name") + "=" + input.val(); uriencodedFormStr += prefix + input.attr("name") + "=" + input.val();
} }
}else{ } else {
uriencodedFormStr += prefix + input.attr("id") + "=" + input.val(); uriencodedFormStr += prefix + input.attr("id") + "=" + input.val();
} }
} }
}); });
if (isItemSelected === false){ if (isItemSelected === false) {
title.html("Please Select One Option"); title.html("Please Select One Option");
statusIcon.attr("class", defaultStatusClasses + " fw-error"); statusIcon.attr("class", defaultStatusClasses + " fw-error");
$(modalPopupContent).html(content.html()); $(modalPopupContent).html(content.html());

@ -43,7 +43,7 @@
<i class="fw fw-mobile fw-3x"></i> <i class="fw fw-mobile fw-3x"></i>
</h3> </h3>
<h3 class="text-muted">No device type is available to be displayed.</h3> <h3 class="text-muted">No device type is available to be displayed.</h3>
<a href="https://docs.wso2.com/display/IoTS300/Quick+Start+Guide" target="_blank" <a href="https://docs.wso2.com/display/IoTS320/Quick+Start+Guide" target="_blank"
class="btn-operations btn-default"> class="btn-operations btn-default">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-circle-outline fw-stack-2x"></i>

@ -145,7 +145,7 @@ function loadOperationsLog(update) {
$(row.child()).removeClass('log-data-row'); $(row.child()).removeClass('log-data-row');
tr.removeClass('shown'); tr.removeClass('shown');
} else { } else {
invokerUtil.get(uri,(payload) => { invokerUtil.get(uri, function (payload) {
//update the parent status //update the parent status
var payloadObject = JSON.parse(payload); var payloadObject = JSON.parse(payload);
if ( payloadObject["activityStatus"][0]["status"] != rowData["status"] ) { if ( payloadObject["activityStatus"][0]["status"] != rowData["status"] ) {
@ -157,7 +157,7 @@ function loadOperationsLog(update) {
tr.find('i.fw-down').removeClass('fw-down').addClass('fw-up'); tr.find('i.fw-down').removeClass('fw-down').addClass('fw-up');
$(row.child()).addClass('log-data-row'); $(row.child()).addClass('log-data-row');
tr.addClass('shown'); tr.addClass('shown');
},(error) => { },function(error) {
},contentType); },contentType);
} }
@ -178,19 +178,17 @@ function loadOperationsLog(update) {
responseMsg = activityStatus['0'].responses['0'].response; responseMsg = activityStatus['0'].responses['0'].response;
} }
Object.entries(activityStatus).forEach( $. each (payload.activityStatus, function (key, entry) {
([key, entry]) => { logStream += '<div class="row log-entry">' +
logStream += '<div class="row log-entry">' + '<div class="col-lg-8">' +
'<div class="col-lg-8">' + '<div class="log-status"><i class="icon fw ' + getLogStatusIcon(entry.status) + ' "></i>' +
'<div class="log-status"><i class="icon fw ' + getLogStatusIcon(entry.status) + ' "></i>' + '<span>' + entry.status + '</span></div>' +
'<span>' + ((responseMsg == null) ? entry.status : responseMsg) + '</span></div>' + '</div>' +
'</div>' + '<div class="col-lg-4">' +
'<div class="col-lg-4">' + '<div class="log-time text-right"><span>' + entry.updatedTimestamp + '</span></div>' +
'<div class="log-time text-right"><span>' + entry.updatedTimestamp + '</span></div>' + '</div>' +
'</div>' + '</div>';
'</div>'; });
}
);
logStream += '</div></div>'; logStream += '</div></div>';
return logStream; return logStream;

@ -27,19 +27,19 @@ var displayPolicy = function (policyPayloadObj) {
$("#policy-action").text(policyPayloadObj.compliance.toUpperCase()); $("#policy-action").text(policyPayloadObj.compliance.toUpperCase());
$("#policy-description").text(policyPayloadObj["description"]); $("#policy-description").text(policyPayloadObj["description"]);
var policyStatus = "Active"; var policyStatus = "Active";
if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) { if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === true) {
policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>'; policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>';
} else if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) { } else if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === false) {
policyStatus = '<i class="fw fw-success icon-success"></i> Active</span>'; policyStatus = '<i class="fw fw-success icon-success"></i> Active</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) { } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === true) {
policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>'; policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) { } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === false) {
policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>'; policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>';
} }
$("#policy-status").html(policyStatus); $("#policy-status").html(policyStatus);
if (policyPayloadObj.users == null) { if (!policyPayloadObj.users) {
$("#policy-users").text("NONE"); $("#policy-users").text("NONE");
} }
else if (policyPayloadObj.users.length > 0) { else if (policyPayloadObj.users.length > 0) {
@ -48,10 +48,9 @@ var displayPolicy = function (policyPayloadObj) {
$("#users-row").addClass("hidden"); $("#users-row").addClass("hidden");
} }
if (policyPayloadObj.deviceGroups == null) { if (!policyPayloadObj.deviceGroups) {
$("#policy-groups").text("NONE"); $("#policy-groups").text("NONE");
} else if (policyPayloadObj.deviceGroups.length > 0) { } else if (policyPayloadObj.deviceGroups.length > 0) {
debugger;
var deviceGroups = policyPayloadObj.deviceGroups; var deviceGroups = policyPayloadObj.deviceGroups;
var assignedGroups = []; var assignedGroups = [];
for (var index in deviceGroups) { for (var index in deviceGroups) {
@ -64,7 +63,7 @@ var displayPolicy = function (policyPayloadObj) {
$("#policy-groups").text("NONE"); $("#policy-groups").text("NONE");
} }
if (policyPayloadObj.roles == null) { if (!policyPayloadObj.roles) {
$("#policy-roles").text("NONE"); $("#policy-roles").text("NONE");
} }
else if (policyPayloadObj.roles.length > 0) { else if (policyPayloadObj.roles.length > 0) {
@ -131,7 +130,7 @@ $(document).ready(function () {
"/api/device-mgt/v1.0" + "/policies/effective-policy/" + getParameterByName("type") + "/" + getParameterByName("id"), "/api/device-mgt/v1.0" + "/policies/effective-policy/" + getParameterByName("type") + "/" + getParameterByName("id"),
// on success // on success
function (data, textStatus, jqXHR) { function (data, textStatus, jqXHR) {
if (jqXHR.status == 200 && data) { if (jqXHR.status === 200 && data) {
policyPayloadObj = JSON.parse(data); policyPayloadObj = JSON.parse(data);
displayPolicy(policyPayloadObj); displayPolicy(policyPayloadObj);
} }

@ -17,8 +17,8 @@
}} }}
{{#zone "footer"}} {{#zone "footer"}}
<p> <p>
<span class="hidden-xs">WSO2 IoT Server{{#unless isCloud}} 3.1.0{{/unless}}</span> <span class="hidden-xs">WSO2 IoT Server{{#unless isCloud}} 3.2.0{{/unless}}</span>
<span class="visible-xs-inline">WSO2 IoT Server{{#unless isCloud}} 3.1.0{{/unless}}</span> | &copy; <script>document.write(new Date().getFullYear());</script>, <span class="visible-xs-inline">WSO2 IoT Server{{#unless isCloud}} 3.2.0{{/unless}}</span> | &copy; <script>document.write(new Date().getFullYear());</script>,
<a href="http://wso2.com/" target="_blank"><i class="icon fw fw-wso2"></i> Inc</a>. All Rights Reserved. <a href="http://wso2.com/" target="_blank"><i class="icon fw fw-wso2"></i> Inc</a>. All Rights Reserved.
</p> </p>
{{/zone}} {{/zone}}

@ -99,7 +99,7 @@ var showMarkersOnChange=function(){
var minLat = bounds._southWest.lat; var minLat = bounds._southWest.lat;
var minLong = bounds._southWest.lng; var minLong = bounds._southWest.lng;
var zoom = map.getZoom(); var zoom = map.getZoom();
var backEndUrl = '/api/device-mgt/v1.0/geo-services/1.0.0/stats/deviceLocations'+ var backEndUrl = '/api/device-mgt/v1.0/geo-services/1.0.0/stats/device-locations'+
'?'+'&minLat='+minLat+'&maxLat='+maxLat+'&minLong='+minLong+ '?'+'&minLat='+minLat+'&maxLat='+maxLat+'&minLong='+minLong+
'&maxLong='+maxLong+'&zoom='+zoom; '&maxLong='+maxLong+'&zoom='+zoom;
markersLayer.clearLayers(); markersLayer.clearLayers();

@ -104,6 +104,7 @@
<button id="save-general-btn" class="wr-btn">Save</button> <button id="save-general-btn" class="wr-btn">Save</button>
</div> </div>
</div> </div>
{{#if geoServicesEnabled}}
<div id="general-config-heading" role="tab"> <div id="general-config-heading" role="tab">
<h2 class="sub-title panel-title"> <h2 class="sub-title panel-title">
Geo Analytics Geo Analytics
@ -116,6 +117,7 @@
</button> </button>
</div> </div>
</div> </div>
{{/if}}
</div> </div>
</div> </div>
{{/unless}} {{/unless}}

@ -18,8 +18,9 @@
function onRequest(context) { function onRequest(context) {
var utility = require("/app/modules/utility.js").utility; var utility = require("/app/modules/utility.js").utility;
var mdmProps = require("/app/modules/conf-reader/main.js")["conf"];
var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"];
var devicemgtProps = require("/app/modules/conf-reader/main.js")["conf"];
//get all device types //get all device types
var isAuthorized = false; var isAuthorized = false;
if (userModule.isAuthorized("/permission/admin/device-mgt/notifications/view")) { if (userModule.isAuthorized("/permission/admin/device-mgt/notifications/view")) {
@ -48,9 +49,10 @@ function onRequest(context) {
} }
} }
} }
var geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.isEnabled;
return { return {
"geoServicesEnabled": geoServicesEnabled,
"deviceTypes": deviceTypesArray, "deviceTypes": deviceTypesArray,
"isAuthorized": isAuthorized, "isAuthorized": isAuthorized
"isCloud": mdmProps["isCloud"]
}; };
} }

@ -283,7 +283,7 @@ stepForwardFrom["policy-criteria"] = function () {
*/ */
var inputIsValidAgainstLength = function (input, minLength, maxLength) { var inputIsValidAgainstLength = function (input, minLength, maxLength) {
var length = input.length; var length = input.length;
return (length == minLength || (length > minLength && length < maxLength) || length == maxLength); return (length === minLength || (length > minLength && length < maxLength) || length === maxLength);
}; };
/** /**
@ -298,10 +298,10 @@ validateStep["policy-criteria"] = function () {
$("input[type='radio'].select-users-radio").each(function () { $("input[type='radio'].select-users-radio").each(function () {
if ($(this).is(":checked")) { if ($(this).is(":checked")) {
if ($(this).attr("id") == "users-radio-btn") { if ($(this).attr("id") === "users-radio-btn") {
selectedAssignees = $("#users-input").val(); selectedAssignees = $("#users-input").val();
selectedField = "User(s)"; selectedField = "User(s)";
} else if ($(this).attr("id") == "user-roles-radio-btn") { } else if ($(this).attr("id") === "user-roles-radio-btn") {
selectedAssignees = $("#user-roles-input").val(); selectedAssignees = $("#user-roles-input").val();
} }
return false; return false;

@ -29,13 +29,13 @@ var displayPolicy = function (policyPayloadObj) {
$("#policy-action").text(policyPayloadObj.compliance.toUpperCase()); $("#policy-action").text(policyPayloadObj.compliance.toUpperCase());
$("#policy-description").text(policyPayloadObj["description"]); $("#policy-description").text(policyPayloadObj["description"]);
var policyStatus = "Active"; var policyStatus = "Active";
if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == true) { if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === true) {
policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>'; policyStatus = '<i class="fw fw-warning icon-success"></i> Active/Updated</span>';
} else if (policyPayloadObj["active"] == true && policyPayloadObj["updated"] == false) { } else if (policyPayloadObj["active"] === true && policyPayloadObj["updated"] === false) {
policyStatus = '<i class="fw fw-success icon-success"></i> Active</span>'; policyStatus = '<i class="fw fw-success icon-success"></i> Active</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == true) { } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === true) {
policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>'; policyStatus = '<i class="fw fw-warning icon-warning"></i> Inactive/Updated</span>';
} else if (policyPayloadObj["active"] == false && policyPayloadObj["updated"] == false) { } else if (policyPayloadObj["active"] === false && policyPayloadObj["updated"] === false) {
policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>'; policyStatus = '<i class="fw fw-error icon-danger"></i> Inactive</span>';
} }
@ -47,7 +47,6 @@ var displayPolicy = function (policyPayloadObj) {
$("#users-row").addClass("hidden"); $("#users-row").addClass("hidden");
} }
if (policyPayloadObj.deviceGroups.length > 0) { if (policyPayloadObj.deviceGroups.length > 0) {
debugger;
var deviceGroups = policyPayloadObj.deviceGroups; var deviceGroups = policyPayloadObj.deviceGroups;
var assignedGroups = []; var assignedGroups = [];
for (var index in deviceGroups) { for (var index in deviceGroups) {

@ -6152,7 +6152,7 @@ body.inverse .fade-edge:after {
.table.list-table.grid-view > thead > tr > td, .table.list-table.grid-view > thead > tr > td,
.table.list-table.grid-view > thead > tr > th { .table.list-table.grid-view > thead > tr > th {
display: inline-block; /*display: inline-block;*/
} }
.table.list-table.grid-view > thead > tr > td:not(:empty):before, .table.list-table.grid-view > thead > tr > td:not(:empty):before,
@ -6922,7 +6922,7 @@ select > option:hover {
} }
.table.list-table:not(.grid-view) { .table.list-table:not(.grid-view) {
margin: 0px !important; margin: 6px 0px 0px 0px !important;
} }
.table.list-table:not(.grid-view) > thead, .table.list-table:not(.grid-view) > tbody, .table.list-table:not(.grid-view) > tfoot { .table.list-table:not(.grid-view) > thead, .table.list-table:not(.grid-view) > tbody, .table.list-table:not(.grid-view) > tfoot {

@ -48,7 +48,7 @@
"path": "/lib/pages.jag" "path": "/lib/pages.jag"
}, },
{ {
"url": "/api/data-tables/invoker", "url": "/api/data-tables/*",
"path": "/api/data-tables-invoker-api.jag" "path": "/api/data-tables-invoker-api.jag"
}, },
{ {

@ -17,8 +17,8 @@
}} }}
{{#zone "footer"}} {{#zone "footer"}}
<p> <p>
<span class="hidden-xs">WSO2 IoT Server 3.1.0</span> <span class="hidden-xs">WSO2 IoT Server 3.2.0</span>
<span class="visible-xs-inline">WSO2 IoT Server 3.1.0</span> | © <script>document.write(new Date().getFullYear());</script>, <span class="visible-xs-inline">WSO2 IoT Server 3.2.0</span> | © <script>document.write(new Date().getFullYear());</script>,
<a href="http://wso2.com/" target="_blank"><i class="icon fw fw-wso2"></i> Inc</a>. All Rights Reserved. <a href="http://wso2.com/" target="_blank"><i class="icon fw fw-wso2"></i> Inc</a>. All Rights Reserved.
</p> </p>
{{/zone}} {{/zone}}

@ -1766,7 +1766,7 @@ input[type=number].form-control {
} }
& > thead > tr > td, & > thead > tr > td,
& > thead > tr > th { & > thead > tr > th {
display: inline-block; //display: inline-block;
} }
& > thead > tr > td:not(:empty):before, & > thead > tr > td:not(:empty):before,
& > thead > tr > th:not(:empty):before { & > thead > tr > th:not(:empty):before {

@ -23,7 +23,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<artifactId>device-mgt</artifactId> <artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -156,7 +156,7 @@ public interface GeoLocationBasedService {
* Get data to show device locations in a map * Get data to show device locations in a map
*/ */
@GET @GET
@Path("stats/deviceLocations") @Path("stats/device-locations")
@ApiOperation( @ApiOperation(
consumes = "application/json", consumes = "application/json",
produces = "application/json", produces = "application/json",

@ -120,7 +120,7 @@ public class GeoLocationBasedServiceImpl implements GeoLocationBasedService {
} }
} }
@Path("stats/deviceLocations") @Path("stats/device-locations")
@GET @GET
@Consumes("application/json") @Consumes("application/json")
@Produces("application/json") @Produces("application/json")

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>email-sender</artifactId> <artifactId>email-sender</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,13 +22,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId> <artifactId>identity-extensions</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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,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>3.0.225-SNAPSHOT</version> <version>3.0.238-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.decision.point</artifactId> <artifactId>org.wso2.carbon.policy.decision.point</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -23,13 +23,13 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>policy-mgt</artifactId> <artifactId>policy-mgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -21,7 +21,7 @@
<parent> <parent>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -21,14 +21,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -21,14 +21,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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.application.extension.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.application.extension.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Application Extension Feature</name> <name>WSO2 Carbon - API Management Application Extension Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains an implementation of a api application registration, which takes care of subscription <description>This feature contains an implementation of a api application registration, which takes care of subscription

@ -22,14 +22,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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.handler.server.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.handler.server.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - APIM handler Server Feature</name> <name>WSO2 Carbon - Device Management - APIM handler Server Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>This feature contains the handler for the api authentications <description>This feature contains the handler for the api authentications

@ -21,13 +21,13 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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.integration.client.feature</artifactId> <artifactId>org.wso2.carbon.apimgt.integration.client.feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>WSO2 Carbon - APIM Integration Client Feature</name> <name>WSO2 Carbon - APIM Integration Client Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>

@ -21,14 +21,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -22,7 +22,7 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,7 +22,7 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>3.0.225-SNAPSHOT</version> <version>3.0.238-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>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.device.type.deployer.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.device.type.deployer.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - Device Type Deployer Feature</name> <name>WSO2 Carbon - Device Type Deployer Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - Device Type Deployer Feature</description> <description>WSO2 Carbon - Device Type Deployer Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.push.notification.provider.fcm.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - FCM Based Push Notification Provider Feature</name> <name>WSO2 Carbon - FCM Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.push.notification.provider.http.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name> <name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.push.notification.provider.mqtt.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name> <name>WSO2 Carbon - MQTT Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description> <description>WSO2 Carbon - MQTT Based Push Notification Provider Feature</description>

@ -22,14 +22,14 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt-extensions-feature</artifactId> <artifactId>device-mgt-extensions-feature</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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.push.notification.provider.xmpp.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<name>WSO2 Carbon - XMPP Based Push Notification Provider Feature</name> <name>WSO2 Carbon - XMPP Based Push Notification Provider Feature</name>
<url>http://wso2.org</url> <url>http://wso2.org</url>
<description>WSO2 Carbon - XMPP Based Push Notification Provider Feature</description> <description>WSO2 Carbon - XMPP Based Push Notification Provider Feature</description>

@ -22,7 +22,7 @@
<parent> <parent>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>carbon-devicemgt</artifactId> <artifactId>carbon-devicemgt</artifactId>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>

@ -22,14 +22,14 @@
<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>3.0.225-SNAPSHOT</version> <version>3.0.238-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.analytics.data.publisher.feature</artifactId> <artifactId>org.wso2.carbon.device.mgt.analytics.data.publisher.feature</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>3.0.225-SNAPSHOT</version> <version>3.0.238-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 bundles related to device analytics data publisher</description> <description>This feature contains bundles related to device analytics data publisher</description>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save