Merge branch 'master' into cloud-3.1.0

revert-70aa11f8
Amal Gunatilake 8 years ago committed by GitHub
commit e9c2f3e72d

@ -1,5 +1,7 @@
# carbon-device-mgt
<a href='https://wso2.org/jenkins/job/platform-builds/job/carbon-device-mgt/'><img src='https://wso2.org/jenkins/job/platform-builds/job/carbon-device-mgt/badge/icon'></a>
WSO2 CONNECTED DEVICE MANAGEMENT COMPONENTS
WSO2 Connected Device Manager (WSO2 CDM) is a comprehensive platform that helps solve mobile computing challenges enterprises face today when dealing with both corporate owned, personally enabled (COPE) devices and employee owned devices as part of a bring your own device (BYOD) program.

@ -22,13 +22,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.annotations</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Annotations</name>
<description>WSO2 Carbon - API Management Custom Annotation Module</description>

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

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

@ -21,13 +21,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handlers</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Security Handler Component</name>
<description>WSO2 Carbon - API Management Security Handler Module</description>

@ -8,19 +8,18 @@
License for the ~ specific language governing permissions and limitations
~ under the License. -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Client</name>
<description>WSO2 Carbon - API Management Integration Client</description>

@ -8,21 +8,20 @@
License for the ~ specific language governing permissions and limitations
~ under the License. -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.generated.client</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Integration Client</name>
<name>WSO2 Carbon - API Management Integration Generated Client</name>
<description>WSO2 Carbon - API Management Integration Client</description>
<url>http://wso2.org</url>
@ -201,5 +200,7 @@
<artifactId>jackson-datatype-joda</artifactId>
</dependency>
</dependencies>
<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
</project>

@ -22,13 +22,13 @@
<parent>
<artifactId>apimgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - API Management Webapp Publisher</name>
<description>WSO2 Carbon - API Management Webapp Publisher</description>

@ -218,7 +218,7 @@ public class APIPublisherUtil {
JsonObject httpVerb = new JsonObject();
httpVerb.add("responses", response);
httpVerb.addProperty("x-auth-type", "Application%20%26%20Application%20User");
httpVerb.addProperty("x-auth-type", uriTemplate.getAuthType());
httpVerb.addProperty("x-throttling-tier", "Unlimited");
if (uriTemplate.getScope() != null) {
httpVerb.addProperty("x-scope", uriTemplate.getScope().getKey());
@ -289,5 +289,6 @@ public class APIPublisherUtil {
}
}
}
apiConfig.setUriTemplates(templates);
}
}

@ -53,7 +53,7 @@ public class AnnotationProcessor {
private static final Log log = LogFactory.getLog(AnnotationProcessor.class);
private static final String AUTH_TYPE = "Any";
private static final String AUTH_TYPE = "Application & Application User";
private static final String STRING_ARR = "string_arr";
private static final String STRING = "string";
private static final String PACKAGE_ORG_APACHE = "org.apache";

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

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

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

@ -21,13 +21,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>certificate-mgt</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.certificate.mgt.core</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Certificate Management Core</name>
<description>WSO2 Carbon - Certificate Management Core</description>

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

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

@ -0,0 +1,104 @@
/*
* Copyright (c) 2017, 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.extensions.device.type.deployer.config;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for DeviceDetails complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="DeviceDetails">
* &lt;simpleContent>
* &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
* &lt;attribute name="table-id" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;/extension>
* &lt;/simpleContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Claimable", propOrder = {
"value"
})
public class Claimable {
@XmlValue
protected String value;
@XmlAttribute(name = "enabled")
protected boolean enabled;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the enabled property.
*
* @return
* possible object is
* {@link String }
*
*/
public boolean isEnabled() {
return enabled;
}
/**
* Sets the value of the enabled property.
*
* @param enabled
* allowed object is
* {@link String }
*
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}

@ -18,11 +18,8 @@
*/
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.*;
import java.util.List;
/**
@ -56,6 +53,8 @@ public class DeviceTypeConfiguration {
@XmlElement(name = "DeviceDetails", required = true)
protected DeviceDetails deviceDetails;
@XmlElement(name = "Claimable", required = true)
protected Claimable claimable;
@XmlElement(name = "Features", required = true)
protected Features features;
@XmlElement(name = "ProvisioningConfig", required = true)
@ -74,6 +73,21 @@ public class DeviceTypeConfiguration {
protected String name;
@XmlElement(name = "PolicyMonitoring", required = true)
protected PolicyMonitoring policyMonitoring;
@XmlElementWrapper(name = "InitialOperationConfig")
@XmlElement(name = "Operation", required = true)
protected List<String> operations;
public List<String> getOperations() {
return operations;
}
public void setOperations(List<String> operations) {
this.operations = operations;
}
/**
* Gets the value of the taskConfiguration property.
@ -119,6 +133,27 @@ public class DeviceTypeConfiguration {
this.deviceDetails = value;
}
/**
* Gets the value of the Claimable property.
*
* @return possible object is
* {@link DeviceDetails }
*/
public Claimable getClaimable() {
return claimable;
}
/**
* Sets the value of the deviceDetails property.
*
* @param value allowed object is
* {@link DeviceDetails }
*/
public void setClaimable(Claimable value) {
this.claimable = value;
}
/**
* Gets the value of the policyMonitoring property.
*

@ -0,0 +1,39 @@
package org.wso2.carbon.device.mgt.extensions.device.type.deployer.config;
import javax.xml.bind.annotation.*;
import java.util.List;
/**
* <p>Java class for InitialOperationConfig complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="InitialOperationConfig">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="Operations" type="{http://www.w3.org/2001/XMLSchema}list"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlRootElement(name = "InitialOperationConfig")
public class InitialOperationConfig {
private List<String> operations;
@XmlElementWrapper(name = "Operations", required = true)
@XmlElement(name = "Operation", required = true)
public List<String> getOperations() {
return operations;
}
public void setOperationsll(List<String> operations) {
this.operations = operations;
}
}

@ -65,6 +65,7 @@ public class DeviceTypeManager implements DeviceManager {
private LicenseManager licenseManager;
private boolean propertiesExist;
private boolean requiredDeviceTypeAuthorization;
private boolean claimable;
private FeatureManager featureManager;
@ -101,8 +102,13 @@ public class DeviceTypeManager implements DeviceManager {
String msg = "Error occurred while adding default license for " + deviceType + " devices";
throw new DeviceTypeDeployerFileException(msg, e);
}
claimable = false;
if (deviceTypeConfiguration.getClaimable() != null ) {
claimable = deviceTypeConfiguration.getClaimable().isEnabled();
}
DeviceDetails deviceDetails = deviceTypeConfiguration.getDeviceDetails();
if (deviceDetails != null) {
//Check whether device dao definition exist.
@ -341,7 +347,7 @@ public class DeviceTypeManager implements DeviceManager {
@Override
public boolean isClaimable(DeviceIdentifier deviceIdentifier) throws DeviceManagementException {
return false;
return claimable;
}
@Override

@ -20,11 +20,7 @@ package org.wso2.carbon.device.mgt.extensions.device.type.deployer.template;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager;
import org.wso2.carbon.device.mgt.common.MonitoringOperation;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
@ -57,6 +53,8 @@ public class DeviceTypeManagerService implements DeviceManagementService {
private OperationMonitoringTaskConfig operationMonitoringConfigs;
private List<MonitoringOperation> monitoringOperations;
private PolicyMonitoringManager policyMonitoringManager;
private InitialOperationConfig initialOperationConfig;
private List<String> operations;
public DeviceTypeManagerService(DeviceTypeConfigIdentifier deviceTypeConfigIdentifier,
DeviceTypeConfiguration deviceTypeConfiguration) {
@ -66,6 +64,7 @@ public class DeviceTypeManagerService implements DeviceManagementService {
this.populatePushNotificationConfig(deviceTypeConfiguration.getPushNotificationProvider());
this.operationMonitoringConfigs = new OperationMonitoringTaskConfig();
this.setOperationMonitoringConfig(deviceTypeConfiguration);
this.setInitialOperationConfig(deviceTypeConfiguration);
if (deviceTypeConfiguration.getPolicyMonitoring() != null && deviceTypeConfiguration.getPolicyMonitoring()
.isEnabled()) {
this.policyMonitoringManager = new DefaultPolicyMonitoringManager();
@ -157,6 +156,11 @@ public class DeviceTypeManagerService implements DeviceManagementService {
return policyMonitoringManager;
}
@Override
public InitialOperationConfig getInitialOperationConfig() {
return initialOperationConfig;
}
private void setProvisioningConfig(String tenantDomain, DeviceTypeConfiguration deviceTypeConfiguration) {
if (deviceTypeConfiguration.getProvisioningConfig() != null) {
boolean sharedWithAllTenants = deviceTypeConfiguration.getProvisioningConfig().isSharedWithAllTenants();
@ -166,6 +170,15 @@ public class DeviceTypeManagerService implements DeviceManagementService {
}
}
protected void setInitialOperationConfig(DeviceTypeConfiguration deviceTypeConfiguration) {
if (deviceTypeConfiguration.getOperations() != null) {
List<String> ops = deviceTypeConfiguration.getOperations();
if (ops != null && !ops.isEmpty()) {
initialOperationConfig.setOperations(ops);
}
}
}
private void setType(String type) {
this.type = type;
}

@ -36,6 +36,8 @@
</Feature>
</Features>
<Claimable enabled="true"/>
<Sensors table-id="SAMPLE_DEVICE_2">
<Sensor code="CPU_Temperature">
<Name>temperature sensor fitted</Name>

@ -22,15 +22,15 @@
<parent>
<artifactId>device-mgt-extensions</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm</artifactId>
<artifactId>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm</artifactId>
<packaging>bundle</packaging>
<name>WSO2 Carbon - GCM Based Push Notification Provider Implementation</name>
<description>WSO2 Carbon - GCM Based Push Notification Provider Implementation</description>
<name>WSO2 Carbon - FCM Based Push Notification Provider Implementation</name>
<description>WSO2 Carbon - FCM Based Push Notification Provider Implementation</description>
<url>http://wso2.org</url>
<dependencies>
@ -128,10 +128,10 @@
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>GCM Based Push Notification Provider Bundle</Bundle-Description>
<Bundle-Description>FCM Based Push Notification Provider Bundle</Bundle-Description>
<Export-Package>
!org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal,
org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.*
!org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal,
org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.*
</Export-Package>
<Import-Package>
com.google.gson,

@ -16,24 +16,24 @@
* under the License.
*
*/
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm;
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm;
import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationProvider;
public class GCMBasedPushNotificationProvider implements PushNotificationProvider {
public class FCMBasedPushNotificationProvider implements PushNotificationProvider {
private static final String PS_PROVIDER_GCM = "GCM";
private static final String PS_PROVIDER_FCM = "FCM";
@Override
public String getType() {
return PS_PROVIDER_GCM;
return PS_PROVIDER_FCM;
}
@Override
public NotificationStrategy getNotificationStrategy(PushNotificationConfig config) {
return new GCMNotificationStrategy(config);
return new FCMNotificationStrategy(config);
}
}

@ -16,7 +16,7 @@
* under the License.
*
*/
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm;
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
@ -27,7 +27,7 @@ import org.wso2.carbon.device.mgt.common.push.notification.NotificationContext;
import org.wso2.carbon.device.mgt.common.push.notification.NotificationStrategy;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationExecutionFailedException;
import org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal.GCMDataHolder;
import org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal.FCMDataHolder;
import java.io.IOException;
import java.io.OutputStream;
@ -35,16 +35,16 @@ import java.net.HttpURLConnection;
import java.net.URL;
import java.util.List;
public class GCMNotificationStrategy implements NotificationStrategy {
public class FCMNotificationStrategy implements NotificationStrategy {
private static final String GCM_TOKEN = "GCM_TOKEN";
private final static String GCM_ENDPOINT = "https://fcm.googleapis.com/fcm/send";
private static final String GCM_API_KEY = "gcmAPIKey";
private static final String FCM_TOKEN = "FCM_TOKEN";
private static final String FCM_ENDPOINT = "https://fcm.googleapis.com/fcm/send";
private static final String FCM_API_KEY = "fcmAPIKey";
private static final int TIME_TO_LIVE = 60;
private static final int HTTP_STATUS_CODE_OK = 200;
private PushNotificationConfig config;
public GCMNotificationStrategy(PushNotificationConfig config) {
public FCMNotificationStrategy(PushNotificationConfig config) {
this.config = config;
}
@ -57,7 +57,7 @@ public class GCMNotificationStrategy implements NotificationStrategy {
public void execute(NotificationContext ctx) throws PushNotificationExecutionFailedException {
try {
Device device =
GCMDataHolder.getInstance().getDeviceManagementProviderService().getDevice(ctx.getDeviceId());
FCMDataHolder.getInstance().getDeviceManagementProviderService().getDevice(ctx.getDeviceId());
this.sendWakeUpCall(ctx.getOperation().getCode(), device);
} catch (DeviceManagementException e) {
throw new PushNotificationExecutionFailedException("Error occurred while retrieving device information", e);
@ -79,13 +79,13 @@ public class GCMNotificationStrategy implements NotificationStrategy {
private void sendWakeUpCall(String message,
Device device) throws IOException, PushNotificationExecutionFailedException {
OutputStream os = null;
byte[] bytes = getGCMRequest(message, getGCMToken(device.getProperties())).getBytes();
byte[] bytes = getFCMRequest(message, getFCMToken(device.getProperties())).getBytes();
HttpURLConnection conn = null;
try {
conn = (HttpURLConnection) new URL(GCM_ENDPOINT).openConnection();
conn = (HttpURLConnection) new URL(FCM_ENDPOINT).openConnection();
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("Authorization", "key=" + config.getProperty(GCM_API_KEY));
conn.setRequestProperty("Authorization", "key=" + config.getProperty(FCM_API_KEY));
conn.setRequestMethod("POST");
conn.setDoOutput(true);
os = conn.getOutputStream();
@ -102,35 +102,35 @@ public class GCMNotificationStrategy implements NotificationStrategy {
}
}
private static String getGCMRequest(String message, String registrationId) {
JsonObject gcmRequest = new JsonObject();
gcmRequest.addProperty("delay_while_idle", false);
gcmRequest.addProperty("time_to_live", TIME_TO_LIVE);
private static String getFCMRequest(String message, String registrationId) {
JsonObject fcmRequest = new JsonObject();
fcmRequest.addProperty("delay_while_idle", false);
fcmRequest.addProperty("time_to_live", TIME_TO_LIVE);
//Add message to GCM request
//Add message to FCM request
JsonObject data = new JsonObject();
if (message != null && !message.isEmpty()) {
data.addProperty("data", message);
gcmRequest.add("data", data);
fcmRequest.add("data", data);
}
//Set device reg-id
JsonArray regIds = new JsonArray();
regIds.add(new JsonPrimitive(registrationId));
gcmRequest.add("registration_ids", regIds);
return gcmRequest.toString();
fcmRequest.add("registration_ids", regIds);
return fcmRequest.toString();
}
private static String getGCMToken(List<Device.Property> properties) {
String gcmToken = null;
private static String getFCMToken(List<Device.Property> properties) {
String fcmToken = null;
for (Device.Property property : properties) {
if (GCM_TOKEN.equals(property.getName())) {
gcmToken = property.getValue();
if (FCM_TOKEN.equals(property.getName())) {
fcmToken = property.getValue();
break;
}
}
return gcmToken;
return fcmToken;
}
}

@ -16,16 +16,16 @@
* under the License.
*
*/
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal;
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
public class GCMDataHolder {
public class FCMDataHolder {
private DeviceManagementProviderService deviceManagementProviderService;
private static GCMDataHolder thisInstance = new GCMDataHolder();
private static FCMDataHolder thisInstance = new FCMDataHolder();
public static GCMDataHolder getInstance() {
public static FCMDataHolder getInstance() {
return thisInstance;
}

@ -16,7 +16,7 @@
* under the License.
*
*/
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal;
package org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -24,7 +24,7 @@ import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
/**
* @scr.component name="org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal.GCMPushNotificationServiceComponent" immediate="true"
* @scr.component name="org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal.FCMPushNotificationServiceComponent" immediate="true"
* @scr.reference name="carbon.device.mgt.provider"
* interface="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService"
* cardinality="1..1"
@ -32,23 +32,20 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
* bind="setDeviceManagementProviderService"
* unbind="unsetDeviceManagementProviderService"
*/
public class GCMPushNotificationServiceComponent {
public class FCMPushNotificationServiceComponent {
private static final Log log = LogFactory.getLog(GCMPushNotificationServiceComponent.class);
private static final Log log = LogFactory.getLog(FCMPushNotificationServiceComponent.class);
@SuppressWarnings("unused")
protected void activate(ComponentContext componentContext) {
try {
if (log.isDebugEnabled()) {
log.debug("Initializing GCM based push notification provider implementation bundle");
}
//Do nothing
if (log.isDebugEnabled()) {
log.debug("GCM based push notification provider implementation bundle has been successfully " +
log.debug("FCM based push notification provider implementation bundle has been successfully " +
"initialized");
}
} catch (Throwable e) {
log.error("Error occurred while initializing GCM based push notification provider " +
log.error("Error occurred while initializing FCM based push notification provider " +
"implementation bundle", e);
}
}
@ -59,12 +56,12 @@ public class GCMPushNotificationServiceComponent {
protected void setDeviceManagementProviderService(
DeviceManagementProviderService deviceManagementProviderService) {
GCMDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService);
FCMDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService);
}
protected void unsetDeviceManagementProviderService(
DeviceManagementProviderService deviceManagementProviderService) {
GCMDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService);
FCMDataHolder.getInstance().setDeviceManagementProviderService(deviceManagementProviderService);
}
}

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

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

@ -25,7 +25,7 @@ import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterService;
/**
* @scr.component name="org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm.internal.XMPPPushNotificationServiceComponent" immediate="true"
* @scr.component name="org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.internal.XMPPPushNotificationServiceComponent" immediate="true"
* @scr.reference name="carbon.device.mgt.provider"
* interface="org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService"
* cardinality="1..1"

@ -22,7 +22,7 @@
<parent>
<artifactId>carbon-devicemgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@ -34,7 +34,7 @@
<url>http://wso2.org</url>
<modules>
<module>org.wso2.carbon.device.mgt.extensions.push.notification.provider.gcm</module>
<module>org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm</module>
<module>org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt</module>
<module>org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp</module>
<module>org.wso2.carbon.device.mgt.extensions.device.type.deployer</module>

@ -3,7 +3,7 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>device-mgt</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

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

@ -22,7 +22,7 @@
<parent>
<artifactId>device-mgt</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -291,6 +291,13 @@
<artifactId>org.wso2.carbon.identity.jwt.client.extension</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.user.store.count</artifactId>
<version>${carbon.identity.framework.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

@ -30,13 +30,13 @@ public class BasePaginatedResult {
value = "Number of total resources.",
example = "1")
@JsonProperty("count")
private int count;
private long count;
public int getCount() {
public long getCount() {
return count;
}
public void setCount(int count) {
public void setCount(long count) {
this.count = count;
}
}

@ -32,6 +32,7 @@ import io.swagger.annotations.Tag;
import org.wso2.carbon.apimgt.annotations.api.Scope;
import org.wso2.carbon.apimgt.annotations.api.Scopes;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.operation.mgt.Operation;
@ -48,6 +49,7 @@ import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
@ -134,7 +136,13 @@ import javax.ws.rs.core.Response;
description = "Getting Policy Compliance Details of a Device",
key = "perm:devices:compliance-data",
permissions = {"/device-mgt/devices/owning-device/view"}
)
),
@Scope(
name = "Change device status.",
description = "Change device status.",
key = "perm:devices:change-status",
permissions = {"/device-mgt/devices/change-status"}
),
}
)
@Path("/devices")
@ -1150,4 +1158,79 @@ public interface DeviceManagementService {
@PathParam("id")
@Size(max = 45)
String id);
@PUT
@Path("/{type}/{id}/changestatus")
@ApiOperation(
produces = MediaType.APPLICATION_JSON,
consumes = MediaType.APPLICATION_JSON,
httpMethod = "PUT",
value = "Change device status by device id.",
notes = "Returns the status of the changed device operation.",
tags = "Device Management",
extensions = {
@Extension(properties = {
@ExtensionProperty(name = Constants.SCOPE, value = "perm:devices:change-status")
})
}
)
@ApiResponses(
value = {
@ApiResponse(
code = 200,
message = "OK. \n Successfully changed the device status.",
response = Device.class,
responseHeaders = {
@ResponseHeader(
name = "Content-Type",
description = "The content type of the body"),
@ResponseHeader(
name = "ETag",
description = "Entity Tag of the response resource.\n" +
"Used by caches, or in conditional requests."),
@ResponseHeader(
name = "Last-Modified",
description = "Date and time the resource has been modified the last time.\n" +
"Used by caches, or in conditional requests."),
}),
@ApiResponse(
code = 304,
message = "Not Modified. Empty body because the client already has the latest " +
"version of the requested resource."),
@ApiResponse(
code = 400,
message = "Bad Request. \n Invalid request or validation error.",
response = ErrorResponse.class),
@ApiResponse(
code = 404,
message = "Not Found. \n No device is found under the provided type and id.",
response = ErrorResponse.class),
@ApiResponse(
code = 500,
message = "Internal Server Error. \n " +
"Server error occurred while retrieving information requested device.",
response = ErrorResponse.class)
})
Response changeDeviceStatus(
@ApiParam(
name = "type",
value = "The device type, such as ios, android or windows.",
required = true)
@PathParam("type")
@Size(max = 45)
String type,
@ApiParam(
name = "id",
value = "Device id",
required = true)
@PathParam("id")
@Size(max = 45)
String id,
@ApiParam(
name = "newStatus",
value = "New status of the device.",
required = true)
@QueryParam("newStatus")
EnrolmentInfo.Status newStatus);
}

@ -23,7 +23,14 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.Feature;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManagementException;
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationException;
@ -53,7 +60,16 @@ import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import javax.validation.constraints.Size;
import javax.ws.rs.*;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
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.Response;
import java.text.ParseException;
@ -553,4 +569,36 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
}
}
/**
* Change device status.
*
* @param type Device type
* @param id Device id
* @param newsStatus Device new status
* @return {@link Response} object
*/
@PUT
@Path("/{type}/{id}/changestatus")
public Response changeDeviceStatus(@PathParam("type") @Size(max = 45) String type,
@PathParam("id") @Size(max = 45) String id,
@QueryParam("newStatus") EnrolmentInfo.Status newsStatus) {
RequestValidationUtil.validateDeviceIdentifier(type, id);
DeviceManagementProviderService deviceManagementProviderService =
DeviceMgtAPIUtils.getDeviceManagementService();
try {
DeviceIdentifier deviceIdentifier = new DeviceIdentifier(id, type);
Device persistedDevice = deviceManagementProviderService.getDevice(deviceIdentifier);
if (persistedDevice == null) {
return Response.status(Response.Status.NOT_FOUND).build();
}
boolean response = deviceManagementProviderService.changeDeviceStatus(deviceIdentifier, newsStatus);
return Response.status(Response.Status.OK).entity(response).build();
} catch (DeviceManagementException e) {
String msg = "Error occurred while changing device status of type : " + type + " and " +
"device id : " + id;
log.error(msg);
return Response.status(Response.Status.BAD_REQUEST).entity(
new ErrorResponse.ErrorResponseBuilder().setMessage(msg).build()).build();
}
}
}

@ -38,6 +38,8 @@ import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.RequestValidationUtil;
import org.wso2.carbon.device.mgt.jaxrs.util.Constants;
import org.wso2.carbon.device.mgt.jaxrs.util.CredentialManagementResponseBuilder;
import org.wso2.carbon.device.mgt.jaxrs.util.DeviceMgtAPIUtils;
import org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever;
import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.utils.CarbonUtils;
@ -395,6 +397,30 @@ public class UserManagementServiceImpl implements UserManagementService {
@Path("/count")
@Override
public Response getUserCount() {
try {
UserStoreCountRetriever userStoreCountRetrieverService = DeviceMgtAPIUtils.getUserStoreCountRetrieverService();
if (userStoreCountRetrieverService != null) {
long count = userStoreCountRetrieverService.countUsers("");
if (count != -1) {
BasicUserInfoList result = new BasicUserInfoList();
result.setCount(count);
return Response.status(Response.Status.OK).entity(result).build();
}
}
} catch (UserStoreCounterException e) {
String msg =
"Error occurred while retrieving the count of users that exist within the current tenant";
log.error(msg, e);
}
return getUserCountViaUserStoreManager();
}
/**
* This method returns the count of users using UserStoreManager.
*
* @return user count
*/
private Response getUserCountViaUserStoreManager() {
if (log.isDebugEnabled()) {
log.debug("Getting the user count");
}

@ -37,14 +37,21 @@ import org.wso2.carbon.device.mgt.core.service.GroupManagementProviderService;
import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse;
import org.wso2.carbon.device.mgt.jaxrs.service.impl.util.InputValidationException;
import org.wso2.carbon.identity.jwt.client.extension.service.JWTClientManagerService;
import org.wso2.carbon.identity.user.store.count.AbstractCountRetrieverFactory;
import org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever;
import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException;
import org.wso2.carbon.identity.user.store.count.jdbc.JDBCCountRetrieverFactory;
import org.wso2.carbon.identity.user.store.count.jdbc.internal.InternalCountRetrieverFactory;
import org.wso2.carbon.policy.mgt.common.PolicyMonitoringTaskException;
import org.wso2.carbon.policy.mgt.core.PolicyManagerService;
import org.wso2.carbon.policy.mgt.core.task.TaskScheduleService;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.user.api.AuthorizationManager;
import org.wso2.carbon.user.api.RealmConfiguration;
import org.wso2.carbon.user.api.UserRealm;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.api.UserStoreManager;
import org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager;
import org.wso2.carbon.user.core.service.RealmService;
import javax.ws.rs.core.MediaType;
@ -106,6 +113,32 @@ public class DeviceMgtAPIUtils {
return deviceManagementProviderService;
}
public static UserStoreCountRetriever getUserStoreCountRetrieverService()
throws UserStoreCounterException {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
List<Object> countRetrieverFactories = ctx.getOSGiServices(AbstractCountRetrieverFactory.class, null);
RealmService realmService = (RealmService) ctx.getOSGiService(RealmService.class, null);
RealmConfiguration realmConfiguration = realmService.getBootstrapRealmConfiguration();
String userStoreType;
//Ignoring Sonar warning as getUserStoreClass() returning string name of the class. So cannot use 'instanceof'.
if (JDBCUserStoreManager.class.getName().equals(realmConfiguration.getUserStoreClass())) {
userStoreType = JDBCCountRetrieverFactory.JDBC;
} else {
userStoreType = InternalCountRetrieverFactory.INTERNAL;
}
AbstractCountRetrieverFactory countRetrieverFactory = null;
for (Object countRetrieverFactoryObj : countRetrieverFactories) {
countRetrieverFactory = (AbstractCountRetrieverFactory) countRetrieverFactoryObj;
if (userStoreType.equals(countRetrieverFactory.getCounterType())) {
break;
}
}
if (countRetrieverFactory == null) {
return null;
}
return countRetrieverFactory.buildCountRetriever(realmConfiguration);
}
public static DeviceAccessAuthorizationService getDeviceAccessAuthorizationService() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
DeviceAccessAuthorizationService deviceAccessAuthorizationService =

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

@ -0,0 +1,36 @@
/*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.mgt.common;
import java.util.List;
public class InitialOperationConfig {
private List<String> operations;
public List<String> getOperations() {
return operations;
}
public void setOperations(List<String> operations) {
this.operations = operations;
}
}

@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "Condition", description = "Contains the advance search parameters.")
public class Condition {
@ApiModelProperty(name = "conditions", value = "Provide the operation code. You can assign the following operation " +
@ApiModelProperty(name = "key", value = "Provide the operation code. You can assign the following operation " +
"codes:\n" +
"DEVICE_MODEL : The model of the device.\n" +
"VENDOR : The name of the device vendor.\n" +

@ -18,10 +18,7 @@
*/
package org.wso2.carbon.device.mgt.common.spi;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
@ -48,4 +45,8 @@ public interface DeviceManagementService {
PolicyMonitoringManager getPolicyMonitoringManager();
InitialOperationConfig getInitialOperationConfig();
}

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

@ -420,12 +420,5 @@ public interface DeviceDAO {
*/
List<EnrolmentInfo> getEnrolmentsByStatus(List<DeviceIdentifier> deviceIds, Status status,
int tenantId) throws DeviceManagementDAOException;
/**
* Retrieving the tenants which are have device enrolled.
* @return
* @throws DeviceManagementDAOException
*/
List<Integer> getDeviceEnrolledTenants() throws DeviceManagementDAOException;
}

@ -1063,26 +1063,4 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
return devices;
}
public List<Integer> getDeviceEnrolledTenants() throws DeviceManagementDAOException {
Connection conn;
PreparedStatement stmt = null;
ResultSet rs = null;
List<Integer> tenants = new ArrayList<>();
try {
conn = this.getConnection();
String sql = "SELECT distinct(TENANT_ID) FROM DM_DEVICE";
stmt = conn.prepareStatement(sql);
rs = stmt.executeQuery();
while (rs.next()) {
tenants.add(rs.getInt("TENANT_ID"));
}
} catch (SQLException e) {
throw new DeviceManagementDAOException("Error occurred while retrieving tenants which have " +
"device registered.", e);
} finally {
DeviceManagementDAOUtil.cleanupResources(stmt, rs);
}
return tenants;
}
}

@ -62,11 +62,6 @@ public class DeviceManagementDataHolder {
private Map<String, OperationMonitoringTaskConfig> map = new HashMap<>();
public void addToMap(OperationMonitoringTaskConfig taskConfig) {
this.map.put("aa", taskConfig);
}
public Map<String, OperationMonitoringTaskConfig> getMap(){
return this.map;
}

@ -307,6 +307,14 @@ public interface DeviceManagementProviderService {
PolicyMonitoringManager getPolicyMonitoringManager(String deviceType);
List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException;
/**
* Change device status.
*
* @param deviceIdentifier {@link DeviceIdentifier} object
* @param newStatus New status of the device
* @return Whether status is changed or not
* @throws DeviceManagementException on errors while trying to change device status
*/
boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
throws DeviceManagementException;
}

@ -23,20 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager;
import org.wso2.carbon.device.mgt.common.DeviceNotFoundException;
import org.wso2.carbon.device.mgt.common.DeviceTypeIdentifier;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.FeatureManager;
import org.wso2.carbon.device.mgt.common.InvalidDeviceException;
import org.wso2.carbon.device.mgt.common.MonitoringOperation;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.PaginationRequest;
import org.wso2.carbon.device.mgt.common.PaginationResult;
import org.wso2.carbon.device.mgt.common.TransactionManagementException;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.Application;
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
import org.wso2.carbon.device.mgt.common.device.details.DeviceInfo;
@ -66,6 +53,7 @@ import org.wso2.carbon.device.mgt.core.dto.DeviceType;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementServiceComponent;
import org.wso2.carbon.device.mgt.core.internal.PluginInitializationListener;
import org.wso2.carbon.device.mgt.core.operation.mgt.CommandOperation;
import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil;
import org.wso2.carbon.email.sender.core.ContentProviderInfo;
import org.wso2.carbon.email.sender.core.EmailContext;
@ -257,6 +245,8 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
if (status) {
addDeviceToGroups(deviceIdentifier, device.getEnrolmentInfo().getOwnership());
addInitialOperations(deviceIdentifier, device.getType());
}
return status;
}
@ -1279,21 +1269,6 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
return dms.getPolicyMonitoringManager();
}
@Override
public List<Integer> getDeviceEnrolledTenants() throws DeviceManagementException {
try {
DeviceManagementDAOFactory.openConnection();
return deviceDAO.getDeviceEnrolledTenants();
} catch (DeviceManagementDAOException e) {
throw new DeviceManagementException("Error occurred while retrieving the tenants " +
"which have device enrolled.", e);
} catch (SQLException e) {
throw new DeviceManagementException("Error occurred while opening a connection to the data source", e);
} finally {
DeviceManagementDAOFactory.closeConnection();
}
}
@Override
public List<Device> getDevicesOfUser(String username) throws DeviceManagementException {
List<Device> devices = new ArrayList<>();
@ -1981,6 +1956,68 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
return false;
}
/**
* Change device status.
*
* @param deviceIdentifier {@link DeviceIdentifier} object
* @param newStatus New status of the device
* @return Whether status is changed or not
* @throws DeviceManagementException on errors while trying to change device status
*/
@Override
public boolean changeDeviceStatus(DeviceIdentifier deviceIdentifier, EnrolmentInfo.Status newStatus)
throws DeviceManagementException {
boolean isDeviceUpdated = false;
Device device = getDevice(deviceIdentifier);
int deviceId = device.getId();
EnrolmentInfo enrolmentInfo = device.getEnrolmentInfo();
enrolmentInfo.setStatus(newStatus);
int tenantId = this.getTenantId();
switch (newStatus) {
case ACTIVE:
isDeviceUpdated = updateEnrollment(deviceId, enrolmentInfo, tenantId);
break;
case INACTIVE:
isDeviceUpdated = updateEnrollment(deviceId, enrolmentInfo, tenantId);
break;
case REMOVED:
isDeviceUpdated = disenrollDevice(deviceIdentifier);
break;
default:
throw new DeviceManagementException("Invalid status retrieved. Status : " + newStatus);
}
return isDeviceUpdated;
}
private boolean updateEnrollment(int deviceId, EnrolmentInfo enrolmentInfo, int tenantId)
throws DeviceManagementException {
boolean isUpdatedEnrollment = false;
boolean isAutoCommit = true;
try {
DeviceManagementDAOFactory.openConnection();
isAutoCommit = DeviceManagementDAOFactory.getConnection().getAutoCommit();
DeviceManagementDAOFactory.getConnection().setAutoCommit(true);
int updatedRows = enrollmentDAO.updateEnrollment(deviceId, enrolmentInfo, tenantId);
if (updatedRows > 0) {
isUpdatedEnrollment = true;
}
} catch (SQLException e) {
throw new DeviceManagementException("Error occurred while opening a connection to the data source", e);
} catch (DeviceManagementDAOException e) {
throw new DeviceManagementException("Error occurred while updating the enrollment information device for" +
"id '" + deviceId + "' ." , e);
} finally {
try {
DeviceManagementDAOFactory.getConnection().setAutoCommit(isAutoCommit);
} catch (SQLException e) {
log.error("Exception occurred while setting auto commit.");
}
DeviceManagementDAOFactory.closeConnection();
}
return isUpdatedEnrollment;
}
private int getTenantId() {
return CarbonContext.getThreadLocalCarbonContext().getTenantId();
}
@ -2037,6 +2074,37 @@ public class DeviceManagementProviderServiceImpl implements DeviceManagementProv
}
}
private void addInitialOperations(DeviceIdentifier deviceIdentifier, String deviceType) throws DeviceManagementException {
DeviceManagementProviderService deviceManagementProviderService = DeviceManagementDataHolder.getInstance().
getDeviceManagementProvider();
DeviceManagementService deviceManagementService =
pluginRepository.getDeviceManagementService(deviceType, this.getTenantId());
InitialOperationConfig init = deviceManagementService.getInitialOperationConfig();
List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>();
deviceIdentifiers.add(deviceIdentifier);
if (init != null) {
List<String> initialOperations = init.getOperations();
for (String str : initialOperations) {
CommandOperation operation = new CommandOperation();
operation.setEnabled(true);
operation.setType(Operation.Type.COMMAND);
operation.setCode(str);
try {
deviceManagementProviderService.
addOperation(deviceType,
operation, deviceIdentifiers);
} catch (OperationManagementException e) {
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
e);
} catch (InvalidDeviceException e) {
throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(),
e);
}
}
}
}
/**
* Checks for the default group existence and create group based on device ownership
*

@ -22,25 +22,17 @@ package org.wso2.carbon.device.mgt.core.task.impl;
import com.google.gson.Gson;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.core.internal.DeviceManagementDataHolder;
import org.wso2.carbon.device.mgt.core.task.DeviceMgtTaskException;
import org.wso2.carbon.device.mgt.core.task.DeviceTaskManager;
import org.wso2.carbon.ntask.core.Task;
import org.wso2.carbon.user.api.Tenant;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import java.util.List;
import java.util.List;
import java.util.Map;
public class DeviceDetailsRetrieverTask implements Task {
private static Log log = LogFactory.getLog(DeviceDetailsRetrieverTask.class);
// private DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl();
// private DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl();
private String deviceType;
private String oppConfig;
private OperationMonitoringTaskConfig operationMonitoringTaskConfig;
@ -65,41 +57,18 @@ public class DeviceDetailsRetrieverTask implements Task {
if (log.isDebugEnabled()) {
log.debug("Device details retrieving task started to run.");
}
try {
// Tenant tenants[] = DeviceManagementDataHolder.getInstance().
// getRealmService().getTenantManager().getAllTenants();
List<Integer> tenants = DeviceManagementDataHolder.getInstance().
getDeviceManagementProvider().getDeviceEnrolledTenants();
for (Integer tenant : tenants) {
String tenantDomain = DeviceManagementDataHolder.getInstance().
getRealmService().getTenantManager().getDomain(tenant);
try {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenant);
DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType,
operationMonitoringTaskConfig);
//pass the configurations also from here, monitoring tasks
try {
deviceTaskManager.addOperations();
} catch (DeviceMgtTaskException e) {
log.error("Error occurred while trying to add the operations to " +
"device to retrieve device details.", e);
}
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
}
} catch (UserStoreException e) {
log.error("Error occurred while trying to get the available tenants", e);
} catch (DeviceManagementException e) {
log.error("Error occurred while trying to get the available tenants " +
"from device manager provider service.", e);
DeviceTaskManager deviceTaskManager = new DeviceTaskManagerImpl(deviceType,
operationMonitoringTaskConfig);
//pass the configurations also from here, monitoring tasks
try {
deviceTaskManager.addOperations();
} catch (DeviceMgtTaskException e) {
log.error(
"Error occurred while trying to add the operations to device to retrieve device details.",
e);
}
}
}

@ -17,10 +17,7 @@
*/
package org.wso2.carbon.device.mgt.core;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.common.DeviceManager;
import org.wso2.carbon.device.mgt.common.OperationMonitoringTaskConfig;
import org.wso2.carbon.device.mgt.common.ProvisioningConfig;
import org.wso2.carbon.device.mgt.common.*;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
@ -75,4 +72,9 @@ public class TestDeviceManagementService implements DeviceManagementService {
return null;
}
@Override
public InitialOperationConfig getInitialOperationConfig() {
return null;
}
}

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

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

@ -1,6 +1,6 @@
{
"appContext": "/devicemgt/",
"isCloud": true,
"isCloud": false,
"httpsURL": "https://%iot.gateway.host%:%iot.gateway.https.port%",
"httpURL": "http://%iot.gateway.host%:%iot.gateway.http.port",
"wssURL": "https://%iot.analytics.host%:%iot.analytics.https.port%",
@ -182,4 +182,4 @@
"backendRestEndpoints": {
"deviceMgt": "/api/device-mgt/v1.0"
}
}
}

@ -81,21 +81,11 @@ var operationModule = function () {
publicMethods.getControlOperations = function (deviceType) {
var operations = privateMethods.getOperationsFromFeatures(deviceType, "operation");
var features = utility.getDeviceTypeConfig(deviceType).deviceType.features;
for (var op in operations) {
var iconIdentifier = operations[op].operation;
if (features && features[iconIdentifier]) {
var icon = features[iconIdentifier].icon;
if (icon) {
operations[op]["iconFont"] = icon;
} else if (iconPath) {
var iconPath = utility.getOperationIcon(deviceType, iconIdentifier);
operations[op]["icon"] = iconPath;
}
var formParams = features[iconIdentifier].formParams;
if (formParams) {
operations[op]["uiParams"] = formParams;
}
var icon = utility.getOperationIcon(deviceType, iconIdentifier);
if (icon) {
operations[op]["icon"] = icon;
}
}
return operations;

@ -174,7 +174,7 @@ var userModule = function () {
}
try {
utility.startTenantFlow(carbonUser);
var url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/users?offset=0&limit=1";
var url = devicemgtProps["httpsURL"] + devicemgtProps["backendRestEndpoints"]["deviceMgt"] + "/users/count";
return serviceInvokers.XMLHttp.get(
url, function (responsePayload) {
return parse(responsePayload["responseText"])["count"];
@ -609,6 +609,9 @@ var userModule = function () {
if (publicMethods.isAuthorized("/permission/admin/device-mgt/platform-configs/view")) {
permissions["TENANT_CONFIGURATION"] = true;
}
if (publicMethods.isAuthorized("/permission/admin/device-mgt/devices/change-status")) {
permissions["CHANGE_DEVICE_STATUS"] = true;
}
return permissions;
};

@ -33,12 +33,14 @@ var permissions = {
"/permission/admin/device-mgt/device/api/subscribe": ["ui.execute"],
"/permission/admin/device-mgt/devices/enroll": ["ui.execute"],
"/permission/admin/device-mgt/devices/disenroll": ["ui.execute"],
"/permission/admin/device-mgt/devices/owning-device/view": ["ui.execute"]
"/permission/admin/device-mgt/devices/owning-device/view": ["ui.execute"],
"/permission/admin/manage/portal": ["ui.execute"]
};
var adminPermissions = {
"/permission/admin/device-mgt": ["ui.execute"],
"/permission/admin/manage/api": ["ui.execute"]
"/permission/admin/manage/api": ["ui.execute"],
"/permission/admin/manage/portal": ["ui.execute"]
};
//On Startup, admin user will get both roles: devicemgt-admin and devicemgt-user

@ -40,7 +40,7 @@ var handlers = function () {
"as input - setupTokenPairByPasswordGrantType(x, y)");
} else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
//privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair by " +
@ -84,7 +84,7 @@ var handlers = function () {
"as input - setupTokenPairBySamlGrantType(x, y)");
} else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
//privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " +
@ -129,7 +129,7 @@ var handlers = function () {
"as input - setupTokenPairBySamlGrantType(x, y)");
} else {
privateMethods.setUpEncodedTenantBasedClientAppCredentials(username);
//privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
privateMethods.setUpEncodedTenantBasedWebSocketClientAppCredentials(username);
var encodedClientAppCredentials = session.get(constants["ENCODED_TENANT_BASED_CLIENT_APP_CREDENTIALS"]);
if (!encodedClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up access token pair " +
@ -158,13 +158,13 @@ var handlers = function () {
// setting up access token pair into session context as a string
session.put(constants["TOKEN_PAIR"], stringify(tokenPair));
var scopes = tokenData.scopes.split(" ");
// adding allowed scopes to the session
session.put(constants["ALLOWED_SCOPES"], scopes);
}
}
}
};
var scopes = tokenData.scopes.split(" ");
// adding allowed scopes to the session
session.put(constants["ALLOWED_SCOPES"], scopes);
}
}
}
};
publicMethods["refreshTokenPair"] = function () {
var currentTokenPair = parse(session.get(constants["TOKEN_PAIR"]));
@ -224,44 +224,44 @@ var handlers = function () {
}
};
// privateMethods["setUpEncodedTenantBasedWebSocketClientAppCredentials"] = function (username) {
// if (!username) {
// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
// "client credentials to session context. No username of logged in user is found as " +
// "input - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
// } else {
// if (devicemgtProps["gatewayEnabled"]) {
// var tenantBasedWebSocketClientAppCredentials
// = tokenUtil.getTenantBasedWebSocketClientAppCredentials(username);
// if (!tenantBasedWebSocketClientAppCredentials) {
// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " +
// "based client credentials to session context as the server is unable " +
// "to obtain such credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
// } else {
// var encodedTenantBasedWebSocketClientAppCredentials =
// tokenUtil.encode(tenantBasedWebSocketClientAppCredentials["clientId"] + ":" +
// tenantBasedWebSocketClientAppCredentials["clientSecret"]);
// // setting up encoded tenant based client credentials to session context.
// session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
// encodedTenantBasedWebSocketClientAppCredentials);
// }
// } else {
// var dynamicClientAppCredentials = tokenUtil.getDynamicClientAppCredentials();
// if (!dynamicClientAppCredentials) {
// throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
// "client credentials to session context as the server is unable to obtain " +
// "dynamic client credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
// }
// var encodedTenantBasedWebSocketClientAppCredentials =
// tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" +
// dynamicClientAppCredentials["clientSecret"]);
// // setting up encoded tenant based client credentials to session context.
// session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
// encodedTenantBasedWebSocketClientAppCredentials);
// }
privateMethods["setUpEncodedTenantBasedWebSocketClientAppCredentials"] = function (username) {
if (!username) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
"client credentials to session context. No username of logged in user is found as " +
"input - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
} else {
if (devicemgtProps["gatewayEnabled"]) {
var tenantBasedWebSocketClientAppCredentials
= tokenUtil.getTenantBasedWebSocketClientAppCredentials(username);
if (!tenantBasedWebSocketClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant " +
"based client credentials to session context as the server is unable " +
"to obtain such credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
} else {
var encodedTenantBasedWebSocketClientAppCredentials =
tokenUtil.encode(tenantBasedWebSocketClientAppCredentials["clientId"] + ":" +
tenantBasedWebSocketClientAppCredentials["clientSecret"]);
// setting up encoded tenant based client credentials to session context.
session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
encodedTenantBasedWebSocketClientAppCredentials);
}
} else {
var dynamicClientAppCredentials = tokenUtil.getDynamicClientAppCredentials();
if (!dynamicClientAppCredentials) {
throw new Error("{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based " +
"client credentials to session context as the server is unable to obtain " +
"dynamic client credentials - setUpEncodedTenantBasedWebSocketClientAppCredentials(x)");
}
var encodedTenantBasedWebSocketClientAppCredentials =
tokenUtil.encode(dynamicClientAppCredentials["clientId"] + ":" +
dynamicClientAppCredentials["clientSecret"]);
// setting up encoded tenant based client credentials to session context.
session.put(constants["ENCODED_TENANT_BASED_WEB_SOCKET_CLIENT_CREDENTIALS"],
encodedTenantBasedWebSocketClientAppCredentials);
}
// }
// };
}
};
return publicMethods;
}();

@ -44,7 +44,7 @@ var dynamicForm = '<div class="dynamic-search-param row"><div class="row"><a cla
'<select class="state no-tag form-control select2-custom"><option>AND</option><option>OR</option></select></div><div ' +
'class="form-group wr-input-control col-md-4"><label class="wr-input-label ">Key</label><select class=' +
'"txt-key form-control select2-custom"><option value = "deviceModel">Device Model' +
'</option><option value = "vendor">Vendor</option><option value = "osVersion">OS Version' +
'</option><option value = "PhoneNumber">Phone Number</option><option value = "vendor">Vendor</option><option value = "osVersion">OS Version' +
'</option><option value = "batteryLevel">Battery Level</option><option value =' +
' "internalTotalMemory">Internal Total Memory</option> <option value ="internalAvailableMemory">' +
'Internal Available Memory</option> <option value = "externalTotalMemory">External Total Memory</option>' +
@ -221,4 +221,4 @@ $(document).ready(function () {
});
}
});
});
});

@ -74,7 +74,7 @@
<br>Please click <b>"Add Another Group"</b>, if you wish to add another group or click
<b>"View Group List"</b> to complete the process and go back to the group list.
<hr/>
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/groups'">View User List
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/groups'">View Group List
</button>
<a href="{{@app.context}}/group/add" class="cu-btn-inner">
<span class="fw-stack">
@ -90,4 +90,4 @@
{{/zone}}
{{#zone "bottomJs"}}
{{js "js/group-add.js"}}
{{/zone}}
{{/zone}}

@ -50,12 +50,41 @@
<tr role="row" class="even">
<td class="sorting_1" style="padding:10px 15px;">Status</td>
<td style="padding:10px 15px;">
{{#equal device.status "ACTIVE"}}<span><i
class="fw fw-success icon-success"></i> Active</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i> Inactive</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i class="fw fw-remove icon-danger"></i> Blocked</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i class="fw fw-delete icon-danger"></i> Removed</span>{{/equal}}
{{#if permissions.CHANGE_DEVICE_STATUS}}
{{#equal device.status "ACTIVE"}}<span><i id="statusIcon"
class="fw fw-success icon-success"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Active"></a>
</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i id="statusIcon"
class="fw fw-warning icon-warning"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Inactive"></a>
</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i id="statusIcon"
class="fw fw-remove icon-danger"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Blocked"></a>
</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i id="statusIcon"
class="fw fw-delete icon-danger"></i>
<a href="#" id="status" data-type="select" data-pk="1"
data-title="Select status"
selectedValue="Removed"></a>
</span>{{/equal}}
{{else}}
{{#equal device.status "ACTIVE"}}<span><i
class="fw fw-success icon-success"></i> Active</span>{{/equal}}
{{#equal device.status "INACTIVE"}}<span><i
class="fw fw-warning icon-warning"></i> Inactive</span>{{/equal}}
{{#equal device.status "BLOCKED"}}<span><i
class="fw fw-remove icon-danger"></i> Blocked</span>{{/equal}}
{{#equal device.status "REMOVED"}}<span><i
class="fw fw-delete icon-danger"></i> Removed</span>{{/equal}}
{{/if}}
</td>
</tr>
</tbody>

@ -15,6 +15,7 @@
specific language governing permissions and limitations
under the License.
}}
{{unit "cdmf.unit.lib.editable"}}
{{#zone "content"}}
{{#if deviceFound}}
{{#if isAuthorized}}

@ -0,0 +1,8 @@
{{#zone "topCss"}}
{{css "css/editable.css"}}
{{/zone}}
{{#zone "bottomJs"}}
{{js "js/editable.js"}}
{{js "js/editable.min.js"}}
{{/zone}}

@ -0,0 +1,663 @@
/*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
.editableform {
margin-bottom: 0; /* overwrites bootstrap margin */
}
.editableform .control-group {
margin-bottom: 0; /* overwrites bootstrap margin */
white-space: nowrap; /* prevent wrapping buttons on new line */
line-height: 20px; /* overwriting bootstrap line-height. See #133 */
}
/*
BS3 width:1005 for inputs breaks editable form in popup
See: https://github.com/vitalets/x-editable/issues/393
*/
.editableform .form-control {
width: auto;
}
.editable-buttons {
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
vertical-align: top;
margin-left: 7px;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons.editable-buttons-bottom {
display: block;
margin-top: 7px;
margin-left: 0;
}
.editable-input {
vertical-align: top;
display: inline-block; /* should be inline to take effect of parent's white-space: nowrap */
width: auto; /* bootstrap-responsive has width: 100% that breakes layout */
white-space: normal; /* reset white-space decalred in parent*/
/* display-inline emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-buttons .editable-cancel {
margin-left: 7px;
}
/*for jquery-ui buttons need set height to look more pretty*/
.editable-buttons button.ui-button-icon-only {
height: 24px;
width: 30px;
}
.editableform-loading {
background: url('../img/loading.gif') center center no-repeat;
height: 25px;
width: auto;
min-width: 25px;
}
.editable-inline .editableform-loading {
background-position: left 5px;
}
.editable-error-block {
max-width: 300px;
margin: 5px 0 0 0;
width: auto;
white-space: normal;
}
/*add padding for jquery ui*/
.editable-error-block.ui-state-error {
padding: 3px;
}
.editable-error {
color: red;
}
/* ---- For specific types ---- */
.editableform .editable-date {
padding: 0;
margin: 0;
float: left;
}
/* move datepicker icon to center of add-on button. See https://github.com/vitalets/x-editable/issues/183 */
.editable-inline .add-on .icon-th {
margin-top: 3px;
margin-left: 1px;
}
/* checklist vertical alignment */
.editable-checklist label input[type="checkbox"],
.editable-checklist label span {
vertical-align: middle;
margin: 0;
}
.editable-checklist label {
white-space: nowrap;
}
/* set exact width of textarea to fit buttons toolbar */
.editable-wysihtml5 {
width: 566px;
height: 250px;
}
/* clear button shown as link in date inputs */
.editable-clear {
clear: both;
font-size: 0.9em;
text-decoration: none;
text-align: right;
}
/* IOS-style clear button for text inputs */
.editable-clear-x {
background: url('../img/clear.png') center center no-repeat;
display: block;
width: 13px;
height: 13px;
position: absolute;
opacity: 0.6;
z-index: 100;
top: 50%;
right: 6px;
margin-top: -6px;
}
.editable-clear-x:hover {
opacity: 1;
}
.editable-pre-wrapped {
white-space: pre-wrap;
}
.editable-container.editable-popup {
max-width: none !important; /* without this rule poshytip/tooltip does not stretch */
}
.editable-container.popover {
width: auto; /* without this rule popover does not stretch */
}
.editable-container.editable-inline {
display: inline-block;
vertical-align: middle;
width: auto;
/* inline-block emulation for IE7*/
zoom: 1;
*display: inline;
}
.editable-container.ui-widget {
font-size: inherit; /* jqueryui widget font 1.1em too big, overwrite it */
z-index: 9990; /* should be less than select2 dropdown z-index to close dropdown first when click */
}
.editable-click,
a.editable-click,
a.editable-click:hover {
text-decoration: none;
border-bottom: dashed 1px #0088cc;
}
.editable-click.editable-disabled,
a.editable-click.editable-disabled,
a.editable-click.editable-disabled:hover {
color: #585858;
cursor: default;
border-bottom: none;
}
.editable-empty, .editable-empty:hover, .editable-empty:focus{
font-style: italic;
color: #DD1144;
/* border-bottom: none; */
text-decoration: none;
}
.editable-unsaved {
font-weight: bold;
}
.editable-unsaved:after {
/* content: '*'*/
}
.editable-bg-transition {
-webkit-transition: background-color 1400ms ease-out;
-moz-transition: background-color 1400ms ease-out;
-o-transition: background-color 1400ms ease-out;
-ms-transition: background-color 1400ms ease-out;
transition: background-color 1400ms ease-out;
}
/*see https://github.com/vitalets/x-editable/issues/139 */
.form-horizontal .editable
{
padding-top: 5px;
display:inline-block;
}
/*!
* Datepicker for Bootstrap
*
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
.datepicker {
padding: 4px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
direction: ltr;
/*.dow {
border-top: 1px solid #ddd !important;
}*/
}
.datepicker-inline {
width: 220px;
}
.datepicker.datepicker-rtl {
direction: rtl;
}
.datepicker.datepicker-rtl table tr td span {
float: right;
}
.datepicker-dropdown {
top: 0;
left: 0;
}
.datepicker-dropdown:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 6px;
}
.datepicker-dropdown:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 7px;
}
.datepicker > div {
display: none;
}
.datepicker.days div.datepicker-days {
display: block;
}
.datepicker.months div.datepicker-months {
display: block;
}
.datepicker.years div.datepicker-years {
display: block;
}
.datepicker table {
margin: 0;
}
.datepicker td,
.datepicker th {
text-align: center;
width: 20px;
height: 20px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: none;
}
.table-striped .datepicker table tr td,
.table-striped .datepicker table tr th {
background-color: transparent;
}
.datepicker table tr td.day:hover {
background: #eeeeee;
cursor: pointer;
}
.datepicker table tr td.old,
.datepicker table tr td.new {
color: #999999;
}
.datepicker table tr td.disabled,
.datepicker table tr td.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td.today,
.datepicker table tr td.today:hover,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today.disabled:hover {
background-color: #fde19a;
background-image: -moz-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -ms-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fdd49a), to(#fdf59a));
background-image: -webkit-linear-gradient(top, #fdd49a, #fdf59a);
background-image: -o-linear-gradient(top, #fdd49a, #fdf59a);
background-image: linear-gradient(top, #fdd49a, #fdf59a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fdd49a', endColorstr='#fdf59a', GradientType=0);
border-color: #fdf59a #fdf59a #fbed50;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #000;
}
.datepicker table tr td.today:hover,
.datepicker table tr td.today:hover:hover,
.datepicker table tr td.today.disabled:hover,
.datepicker table tr td.today.disabled:hover:hover,
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active,
.datepicker table tr td.today.disabled,
.datepicker table tr td.today:hover.disabled,
.datepicker table tr td.today.disabled.disabled,
.datepicker table tr td.today.disabled:hover.disabled,
.datepicker table tr td.today[disabled],
.datepicker table tr td.today:hover[disabled],
.datepicker table tr td.today.disabled[disabled],
.datepicker table tr td.today.disabled:hover[disabled] {
background-color: #fdf59a;
}
.datepicker table tr td.today:active,
.datepicker table tr td.today:hover:active,
.datepicker table tr td.today.disabled:active,
.datepicker table tr td.today.disabled:hover:active,
.datepicker table tr td.today.active,
.datepicker table tr td.today:hover.active,
.datepicker table tr td.today.disabled.active,
.datepicker table tr td.today.disabled:hover.active {
background-color: #fbf069 \9;
}
.datepicker table tr td.today:hover:hover {
color: #000;
}
.datepicker table tr td.today.active:hover {
color: #fff;
}
.datepicker table tr td.range,
.datepicker table tr td.range:hover,
.datepicker table tr td.range.disabled,
.datepicker table tr td.range.disabled:hover {
background: #eeeeee;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today,
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today.disabled:hover {
background-color: #f3d17a;
background-image: -moz-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -ms-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f3c17a), to(#f3e97a));
background-image: -webkit-linear-gradient(top, #f3c17a, #f3e97a);
background-image: -o-linear-gradient(top, #f3c17a, #f3e97a);
background-image: linear-gradient(top, #f3c17a, #f3e97a);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f3c17a', endColorstr='#f3e97a', GradientType=0);
border-color: #f3e97a #f3e97a #edde34;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.datepicker table tr td.range.today:hover,
.datepicker table tr td.range.today:hover:hover,
.datepicker table tr td.range.today.disabled:hover,
.datepicker table tr td.range.today.disabled:hover:hover,
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active,
.datepicker table tr td.range.today.disabled,
.datepicker table tr td.range.today:hover.disabled,
.datepicker table tr td.range.today.disabled.disabled,
.datepicker table tr td.range.today.disabled:hover.disabled,
.datepicker table tr td.range.today[disabled],
.datepicker table tr td.range.today:hover[disabled],
.datepicker table tr td.range.today.disabled[disabled],
.datepicker table tr td.range.today.disabled:hover[disabled] {
background-color: #f3e97a;
}
.datepicker table tr td.range.today:active,
.datepicker table tr td.range.today:hover:active,
.datepicker table tr td.range.today.disabled:active,
.datepicker table tr td.range.today.disabled:hover:active,
.datepicker table tr td.range.today.active,
.datepicker table tr td.range.today:hover.active,
.datepicker table tr td.range.today.disabled.active,
.datepicker table tr td.range.today.disabled:hover.active {
background-color: #efe24b \9;
}
.datepicker table tr td.selected,
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected.disabled:hover {
background-color: #9e9e9e;
background-image: -moz-linear-gradient(top, #b3b3b3, #808080);
background-image: -ms-linear-gradient(top, #b3b3b3, #808080);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b3b3b3), to(#808080));
background-image: -webkit-linear-gradient(top, #b3b3b3, #808080);
background-image: -o-linear-gradient(top, #b3b3b3, #808080);
background-image: linear-gradient(top, #b3b3b3, #808080);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b3b3b3', endColorstr='#808080', GradientType=0);
border-color: #808080 #808080 #595959;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.selected:hover,
.datepicker table tr td.selected:hover:hover,
.datepicker table tr td.selected.disabled:hover,
.datepicker table tr td.selected.disabled:hover:hover,
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active,
.datepicker table tr td.selected.disabled,
.datepicker table tr td.selected:hover.disabled,
.datepicker table tr td.selected.disabled.disabled,
.datepicker table tr td.selected.disabled:hover.disabled,
.datepicker table tr td.selected[disabled],
.datepicker table tr td.selected:hover[disabled],
.datepicker table tr td.selected.disabled[disabled],
.datepicker table tr td.selected.disabled:hover[disabled] {
background-color: #808080;
}
.datepicker table tr td.selected:active,
.datepicker table tr td.selected:hover:active,
.datepicker table tr td.selected.disabled:active,
.datepicker table tr td.selected.disabled:hover:active,
.datepicker table tr td.selected.active,
.datepicker table tr td.selected:hover.active,
.datepicker table tr td.selected.disabled.active,
.datepicker table tr td.selected.disabled:hover.active {
background-color: #666666 \9;
}
.datepicker table tr td.active,
.datepicker table tr td.active:hover,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td.active:hover,
.datepicker table tr td.active:hover:hover,
.datepicker table tr td.active.disabled:hover,
.datepicker table tr td.active.disabled:hover:hover,
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active,
.datepicker table tr td.active.disabled,
.datepicker table tr td.active:hover.disabled,
.datepicker table tr td.active.disabled.disabled,
.datepicker table tr td.active.disabled:hover.disabled,
.datepicker table tr td.active[disabled],
.datepicker table tr td.active:hover[disabled],
.datepicker table tr td.active.disabled[disabled],
.datepicker table tr td.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td.active:active,
.datepicker table tr td.active:hover:active,
.datepicker table tr td.active.disabled:active,
.datepicker table tr td.active.disabled:hover:active,
.datepicker table tr td.active.active,
.datepicker table tr td.active:hover.active,
.datepicker table tr td.active.disabled.active,
.datepicker table tr td.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span {
display: block;
width: 23%;
height: 54px;
line-height: 54px;
float: left;
margin: 1%;
cursor: pointer;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.datepicker table tr td span:hover {
background: #eeeeee;
}
.datepicker table tr td span.disabled,
.datepicker table tr td span.disabled:hover {
background: none;
color: #999999;
cursor: default;
}
.datepicker table tr td span.active,
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active.disabled:hover {
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(top, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.datepicker table tr td span.active:hover,
.datepicker table tr td span.active:hover:hover,
.datepicker table tr td span.active.disabled:hover,
.datepicker table tr td span.active.disabled:hover:hover,
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active,
.datepicker table tr td span.active.disabled,
.datepicker table tr td span.active:hover.disabled,
.datepicker table tr td span.active.disabled.disabled,
.datepicker table tr td span.active.disabled:hover.disabled,
.datepicker table tr td span.active[disabled],
.datepicker table tr td span.active:hover[disabled],
.datepicker table tr td span.active.disabled[disabled],
.datepicker table tr td span.active.disabled:hover[disabled] {
background-color: #0044cc;
}
.datepicker table tr td span.active:active,
.datepicker table tr td span.active:hover:active,
.datepicker table tr td span.active.disabled:active,
.datepicker table tr td span.active.disabled:hover:active,
.datepicker table tr td span.active.active,
.datepicker table tr td span.active:hover.active,
.datepicker table tr td span.active.disabled.active,
.datepicker table tr td span.active.disabled:hover.active {
background-color: #003399 \9;
}
.datepicker table tr td span.old,
.datepicker table tr td span.new {
color: #999999;
}
.datepicker th.datepicker-switch {
width: 145px;
}
.datepicker thead tr:first-child th,
.datepicker tfoot tr th {
cursor: pointer;
}
.datepicker thead tr:first-child th:hover,
.datepicker tfoot tr th:hover {
background: #eeeeee;
}
.datepicker .cw {
font-size: 10px;
width: 12px;
padding: 0 2px 0 5px;
vertical-align: middle;
}
.datepicker thead tr:first-child th.cw {
cursor: default;
background-color: transparent;
}
.input-append.date .add-on i,
.input-prepend.date .add-on i {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.input-daterange input {
text-align: center;
}
.input-daterange input:first-child {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.input-daterange input:last-child {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.input-daterange .add-on {
display: inline-block;
width: auto;
min-width: 16px;
height: 18px;
padding: 4px 5px;
font-weight: normal;
line-height: 18px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
vertical-align: middle;
background-color: #eeeeee;
border: 1px solid #ccc;
margin-left: -5px;
margin-right: -5px;
}

@ -86,6 +86,7 @@ $(document).ready(function () {
$("#change-password-success-link").click(function () {
hidePopup();
});
window.location.href = "/devicemgt/logout";
}
}, function (jqXHR) {
if (jqXHR.status == 400) {

@ -49,7 +49,7 @@
<i class="fw fw-edit fw-stack-1x fw-inverse"></i>
</span>
</span>
Change password is not a option
Change Password
</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
class="fw fw-cancel"></i></button>
@ -70,10 +70,10 @@
<br><br>
<div>
<input id="new-password" type="password" autocomplete="off" class="form-control modal-input"
placeholder="[ Password should be in minimum 5 characters long and should not include any whitespaces ]"/>
placeholder="[ Your password should be 5 characters or more and should not include any white spaces ]"/>
</div>
<br><br>
Reconfirm your new password *
Confirm your new password *
<br><br>
<div>
<input id="retyped-new-password" type="password" autocomplete="off" class="form-control modal-input"/>
@ -109,7 +109,7 @@
</div>
<div class="modal-footer">
<div class="buttons">
<a href="#" id="change-password-success-link" class="btn-operations">Ok</a>
<a href="{{@app.context}}/uuf/logout" id="change-password-success-link" class="btn-operations">Ok</a>
</div>
</div>
</div>

@ -6610,4 +6610,11 @@ header.header-default {
.tooltip-overflow-fix{
overflow: visible !important;
.editable-input select{
height: 35px !important;
}
.editable-submit, .editable-cancel{
padding: 8px 15px !important;
line-height: 0px !important;
}

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

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

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

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

@ -21,7 +21,7 @@
<parent>
<artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,7 +21,7 @@
<parent>
<artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

@ -21,13 +21,13 @@
<parent>
<artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.registration</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client registration service</name>
<description>WSO2 Carbon - Dynamic Client Registration Service</description>

@ -21,13 +21,13 @@
<parent>
<artifactId>dynamic-client-registration</artifactId>
<groupId>org.wso2.carbon.devicemgt</groupId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.dynamic.client.web.app.registration</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Dynamic client web app registration</name>
<description>WSO2 Carbon - Dynamic Client Web-app Registration Service</description>

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

@ -22,13 +22,13 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>identity-extensions</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.mgt.oauth.extensions</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - OAuth Extensions</name>
<url>http://wso2.org</url>

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

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

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

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

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

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

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

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

@ -21,18 +21,16 @@ package org.wso2.carbon.policy.mgt.core.task;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.EnrolmentInfo;
import org.wso2.carbon.device.mgt.common.policy.mgt.PolicyMonitoringManager;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.policy.PolicyConfiguration;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
import org.wso2.carbon.ntask.core.Task;
import org.wso2.carbon.device.mgt.common.policy.mgt.monitor.PolicyComplianceException;
import org.wso2.carbon.policy.mgt.core.internal.PolicyManagementDataHolder;
import org.wso2.carbon.policy.mgt.core.mgt.MonitoringManager;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderServiceImpl;
import java.util.ArrayList;
import java.util.List;
@ -61,94 +59,69 @@ public class MonitoringTask implements Task {
log.debug("Monitoring task started to run.");
}
MonitoringManager monitoringManager = PolicyManagementDataHolder.getInstance().getMonitoringManager();
List<String> deviceTypes = new ArrayList<>();
List<String> configDeviceTypes = new ArrayList<>();
try {
PolicyManagementDataHolder.getInstance().
getRealmService().getTenantManager().getAllTenants();
DeviceManagementProviderService deviceManagementService = new DeviceManagementProviderServiceImpl();
List<Integer> tenants = deviceManagementService.getDeviceEnrolledTenants();
for (Integer tenant : tenants) {
String tenantDomain = PolicyManagementDataHolder.getInstance().
getRealmService().getTenantManager().getDomain(tenant);
try {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantId(tenant);
MonitoringManager monitoringManager = PolicyManagementDataHolder.getInstance().getMonitoringManager();
List<String> deviceTypes = new ArrayList<>();
List<String> configDeviceTypes = new ArrayList<>();
try {
deviceTypes = monitoringManager.getDeviceTypes();
for (String deviceType : deviceTypes) {
if (isPlatformExist(deviceType)) {
configDeviceTypes.add(deviceType);
}
}
} catch (PolicyComplianceException e) {
log.error("Error occurred while getting the device types.");
deviceTypes = monitoringManager.getDeviceTypes();
for (String deviceType : deviceTypes) {
if (isPlatformExist(deviceType)) {
configDeviceTypes.add(deviceType);
}
}
} catch (PolicyComplianceException e) {
log.error("Error occurred while getting the device types.");
}
if (!deviceTypes.isEmpty()) {
try {
DeviceManagementProviderService deviceManagementProviderService =
PolicyManagementDataHolder.getInstance().getDeviceManagementService();
for (String deviceType : configDeviceTypes) {
if (log.isDebugEnabled()) {
log.debug("Running task for device type : " + deviceType);
}
if (!deviceTypes.isEmpty()) {
try {
DeviceManagementProviderService deviceManagementProviderService =
PolicyManagementDataHolder.getInstance().getDeviceManagementService();
for (String deviceType : configDeviceTypes) {
if (log.isDebugEnabled()) {
log.debug("Running task for device type : " + deviceType);
}
PolicyMonitoringManager monitoringService =
PolicyManagementDataHolder.getInstance().getDeviceManagementService()
.getPolicyMonitoringManager(deviceType);
List<Device> devices = deviceManagementProviderService.getAllDevices(deviceType);
if (monitoringService != null && !devices.isEmpty()) {
List<Device> notifiableDevices = new ArrayList<>();
if (log.isDebugEnabled()) {
log.debug("Removing inactive and blocked devices from the list for the device type : " +
deviceType);
}
for (Device device : devices) {
EnrolmentInfo.Status status = device.getEnrolmentInfo().getStatus();
if (status.equals(EnrolmentInfo.Status.BLOCKED) ||
status.equals(EnrolmentInfo.Status.REMOVED) ||
status.equals(EnrolmentInfo.Status.UNCLAIMED) ||
status.equals(EnrolmentInfo.Status.DISENROLLMENT_REQUESTED) ||
status.equals(EnrolmentInfo.Status.SUSPENDED)) {
continue;
} else {
notifiableDevices.add(device);
}
}
if (log.isDebugEnabled()) {
log.debug("Following devices selected to send the notification for " + deviceType);
for (Device device : notifiableDevices) {
log.debug(device.getDeviceIdentifier());
}
}
if (!notifiableDevices.isEmpty()) {
monitoringManager.addMonitoringOperation(notifiableDevices);
}
}
PolicyMonitoringManager monitoringService =
PolicyManagementDataHolder.getInstance().getDeviceManagementService()
.getPolicyMonitoringManager(deviceType);
List<Device> devices = deviceManagementProviderService.getAllDevices(deviceType);
if (monitoringService != null && !devices.isEmpty()) {
List<Device> notifiableDevices = new ArrayList<>();
if (log.isDebugEnabled()) {
log.debug("Removing inactive and blocked devices from the list for the device type : " +
deviceType);
}
for (Device device : devices) {
EnrolmentInfo.Status status = device.getEnrolmentInfo().getStatus();
if (status.equals(EnrolmentInfo.Status.BLOCKED) ||
status.equals(EnrolmentInfo.Status.REMOVED) ||
status.equals(EnrolmentInfo.Status.UNCLAIMED) ||
status.equals(EnrolmentInfo.Status.DISENROLLMENT_REQUESTED) ||
status.equals(EnrolmentInfo.Status.SUSPENDED)) {
continue;
} else {
notifiableDevices.add(device);
}
if (log.isDebugEnabled()) {
log.debug("Monitoring task running completed.");
}
if (log.isDebugEnabled()) {
log.debug("Following devices selected to send the notification for " + deviceType);
for (Device device : notifiableDevices) {
log.debug(device.getDeviceIdentifier());
}
} catch (Exception e) {
log.error("Error occurred while trying to run a task.", e);
}
} else {
log.info("No device types registered currently. So did not run the monitoring task.");
if (!notifiableDevices.isEmpty()) {
monitoringManager.addMonitoringOperation(notifiableDevices);
}
}
} finally {
PrivilegedCarbonContext.endTenantFlow();
}
if (log.isDebugEnabled()) {
log.debug("Monitoring task running completed.");
}
} catch (Exception e) {
log.error("Error occurred while trying to run a task.", e);
}
} catch (UserStoreException e) {
log.error("Error occurred while trying to get the available tenants", e);
} catch (DeviceManagementException e) {
log.error("Error occurred while trying to get the available tenants from device manager service ", e);
} else {
log.info("No device types registered currently. So did not run the monitoring task.");
}
}

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

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>webapp-authenticator-framework</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.webapp.authenticator.framework</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Web Application Authenticator Framework Bundle</name>
<description>WSO2 Carbon - Web Application Authenticator Framework Bundle</description>

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

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.application.extension.feature</artifactId>
<packaging>pom</packaging>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Application Extension Feature</name>
<url>http://wso2.org</url>
<description>This feature contains an implementation of a api application registration, which takes care of subscription

@ -22,14 +22,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.handler.server.feature</artifactId>
<packaging>pom</packaging>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<name>WSO2 Carbon - Device Management - APIM handler Server Feature</name>
<url>http://wso2.org</url>
<description>This feature contains the handler for the api authentications

@ -17,18 +17,17 @@
~ under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.integration.client.feature</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<packaging>pom</packaging>
<name>WSO2 Carbon - APIM Integration Client Feature</name>
<url>http://wso2.org</url>

@ -21,14 +21,14 @@
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>apimgt-extensions-feature</artifactId>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.apimgt.webapp.publisher.feature</artifactId>
<packaging>pom</packaging>
<version>2.0.16-SNAPSHOT</version>
<version>2.0.36-SNAPSHOT</version>
<name>WSO2 Carbon - API Management Webapp Publisher Feature</name>
<url>http://wso2.org</url>
<description>This feature contains an implementation of a Tomcat lifecycle listener, which takes care of publishing

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

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

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

Loading…
Cancel
Save