diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/ApplicationOperationsImpl.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/ApplicationOperationsImpl.java
index 766698c9c7..607570bd05 100644
--- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/ApplicationOperationsImpl.java
+++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/ApplicationOperationsImpl.java
@@ -73,8 +73,12 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
getDevicesOfUser(userName);
for (org.wso2.carbon.device.mgt.common.Device device : deviceList) {
- if(applicationOperationAction.getApp().getPlatform().equalsIgnoreCase(device.getType())){
- deviceIdentifiers.add(getDeviceIdentifierByDevice(device));
+ if(MDMAppConstants.WEBAPP.equals(applicationOperationAction.getApp().getPlatform()) ||
+ applicationOperationAction.getApp().getPlatform().equalsIgnoreCase(device.getType())){
+ if (MDMAppConstants.ACTIVE.equalsIgnoreCase(device.getEnrolmentInfo().
+ getStatus().toString())) {
+ deviceIdentifiers.add(getDeviceIdentifierByDevice(device));
+ }
}
}
}
@@ -95,7 +99,9 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
getAllDevicesOfRole(userRole);
for (org.wso2.carbon.device.mgt.common.Device device : deviceList) {
- deviceIdentifiers.add(getDeviceIdentifierByDevice(device));
+ if (MDMAppConstants.ACTIVE.equalsIgnoreCase(device.getEnrolmentInfo().getStatus().toString())) {
+ deviceIdentifiers.add(getDeviceIdentifierByDevice(device));
+ }
}
}
} catch (DeviceManagementException devMgtEx) {
@@ -176,8 +182,11 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
operation =
IOSApplicationOperationUtil.createInstallAppOperation(mobileApp);
} else {
- operation =
- IOSApplicationOperationUtil.createAppUninstallOperation(mobileApp);
+ if (MDMAppConstants.WEBAPP.equals(app.getPlatform())) {
+ operation = IOSApplicationOperationUtil.createWebClipUninstallOperation(mobileApp);
+ } else {
+ operation = IOSApplicationOperationUtil.createAppUninstallOperation(mobileApp);
+ }
}
}
activity = MDMServiceAPIUtils.getAppManagementService(applicationOperationAction.getTenantId())
@@ -225,11 +234,21 @@ public class ApplicationOperationsImpl implements ApplicationOperations {
throws MobileApplicationException {
List devices;
+ List deviceList = null;
try {
- List deviceList = MDMServiceAPIUtils
- .getDeviceManagementService(applicationOperationDevice.getTenantId()).
- getDevicesOfUser(
- applicationOperationDevice.getCurrentUser().getUsername());
+ if(MDMAppConstants.WEBAPP.equals
+ (applicationOperationDevice.getPlatform())) {
+ deviceList = MDMServiceAPIUtils
+ .getDeviceManagementService(applicationOperationDevice.getTenantId()).
+ getDevicesOfUser(
+ applicationOperationDevice.getCurrentUser().getUsername());
+ } else {
+ deviceList = MDMServiceAPIUtils
+ .getDeviceManagementService(applicationOperationDevice.getTenantId()).
+ getDevicesOfUser(
+ applicationOperationDevice.getCurrentUser().getUsername(),
+ applicationOperationDevice.getPlatform());
+ }
devices = new ArrayList<>(deviceList.size());
if(log.isDebugEnabled()){
log.debug("device list got from mdm "+ deviceList.toString());
diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/beans/ios/RemoveApplication.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/beans/ios/RemoveApplication.java
index 22c7963def..d5ae921705 100644
--- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/beans/ios/RemoveApplication.java
+++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/beans/ios/RemoveApplication.java
@@ -23,6 +23,15 @@ import java.io.Serializable;
public class RemoveApplication implements Serializable {
private String bundleId;
+ private String url;
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
public String getBundleId() {
return bundleId;
diff --git a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java
index 5b2dec4eb9..6adb9fe09d 100644
--- a/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java
+++ b/components/extensions/appm-connector/org.wso2.carbon.appmgt.mdm.osgiconnector/src/main/java/org/wso2/carbon/appmgt/mdm/osgiconnector/mdmmgt/util/IOSApplicationOperationUtil.java
@@ -111,4 +111,21 @@ public class IOSApplicationOperationUtil {
return operation;
}
+ /**
+ * Create uninstall operations for webclip.
+ *
+ * @param application
+ * @return Uninstall operation
+ * @throws DeviceApplicationException
+ */
+ public static Operation createWebClipUninstallOperation(MobileApp application) throws
+ DeviceApplicationException {
+ ProfileOperation operation = new ProfileOperation();
+ operation.setCode(MDMAppConstants.IOSConstants.OPCODE_REMOVE_APPLICATION);
+ operation.setType(Operation.Type.PROFILE);
+ RemoveApplication removeApplication = new RemoveApplication();
+ removeApplication.setUrl(application.getIdentifier());
+ operation.setPayLoad(removeApplication.toJSON());
+ return operation;
+ }
}
diff --git a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
index d64a77b0b4..0b98069627 100644
--- a/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
+++ b/components/extensions/mb-extensions/org.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization/src/main/java/org/wso2/carbon/andes/extensions/device/mgt/mqtt/authorization/DeviceAccessBasedMQTTAuthorizer.java
@@ -64,12 +64,10 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
private static final String CACHE_MANAGER_NAME = "mqttAuthorizationCacheManager";
private static final String CACHE_NAME = "mqttAuthorizationCache";
private static DeviceAccessAuthorizationAdminService deviceAccessAuthorizationAdminService;
- private static Cache cache;
public DeviceAccessBasedMQTTAuthorizer() {
this.MQTTAuthorizationConfiguration = AuthorizationConfigurationManager.getInstance();
- createCache();
deviceAccessAuthorizationAdminService = Feign.builder()
.requestInterceptor(new OAuthRequestInterceptor())
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
@@ -92,6 +90,7 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
if (!tenantDomainFromTopic.equals(authorizationSubject.getTenantDomain())) {
return false;
}
+ Cache cache = getCache();
if (topics.length < 3) {
AuthorizationCacheKey authorizationCacheKey = new AuthorizationCacheKey(tenantDomainFromTopic
, authorizationSubject.getUsername(), "", "");
@@ -207,16 +206,15 @@ public class DeviceAccessBasedMQTTAuthorizer implements IAuthorizer {
* This method is used to create the Caches.
* @return Cachemanager
*/
- private void createCache() {
+ private synchronized Cache getCache() {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(
MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true);
try {
- CacheManager cacheManager = Caching.getCacheManagerFactory().getCacheManager(CACHE_MANAGER_NAME);
if (MQTTAuthorizationConfiguration.getCacheDuration() == 0) {
- cache = cacheManager.getCache(CACHE_NAME);
+ return Caching.getCacheManagerFactory().getCacheManager(CACHE_MANAGER_NAME).getCache(CACHE_NAME);
} else {
- cache = cacheManager.createCacheBuilder(CACHE_NAME).
+ return Caching.getCacheManagerFactory().getCacheManager(CACHE_MANAGER_NAME).createCacheBuilder(CACHE_NAME).
setExpiry(CacheConfiguration.ExpiryType.MODIFIED, new CacheConfiguration.Duration(
TimeUnit.SECONDS, MQTTAuthorizationConfiguration.getCacheDuration())).
setStoreByValue(false).build();
diff --git a/components/extensions/pom.xml b/components/extensions/pom.xml
index 5a994a1614..15dc85a5ae 100644
--- a/components/extensions/pom.xml
+++ b/components/extensions/pom.xml
@@ -36,6 +36,7 @@
appm-connectorcdmf-transport-adaptersmb-extensions
+ siddhi-extensions
@@ -44,7 +45,7 @@
org.apache.felixmaven-scr-plugin
- 1.7.2
+ ${maven.scr.version}generate-scr-scrdescriptor
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
new file mode 100644
index 0000000000..b1671cc446
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/pom.xml
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ siddhi-extensions
+ 3.0.3-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ org.wso2.extension.siddhi.execution.json
+ bundle
+ WSO2 Siddhi Execution Extension - Json
+ http://wso2.org
+
+
+
+ org.wso2.siddhi
+ siddhi-core
+
+
+ org.wso2.siddhi
+ siddhi-query-api
+
+
+ log4j
+ log4j
+
+
+ org.json.wso2
+ json
+ ${analytics.json.version}
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ ${wso2.maven.compiler.target}
+
+
+
+ org.apache.felix
+ maven-bundle-plugin
+ true
+
+
+ ${project.artifactId}
+ ${project.artifactId}
+
+ org.wso2.extension.siddhi.execution.json,
+ org.wso2.extension.siddhi.execution.json.*
+
+
+ org.json,
+ org.wso2.siddhi.core.*,
+ org.wso2.siddhi.query.api.*,
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionExtension.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionExtension.java
new file mode 100644
index 0000000000..8f68577a60
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionExtension.java
@@ -0,0 +1,112 @@
+/*
+ * 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.extension.siddhi.execution.json;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.wso2.siddhi.core.config.ExecutionPlanContext;
+import org.wso2.siddhi.core.exception.ExecutionPlanRuntimeException;
+import org.wso2.siddhi.core.executor.ExpressionExecutor;
+import org.wso2.siddhi.core.executor.function.FunctionExecutor;
+import org.wso2.siddhi.query.api.definition.Attribute;
+import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
+
+/**
+ * getProperty(json , propertyName)
+ * Returns the vale of the property from the given json json
+ * Accept Type(s): (STRING, STRING)
+ * Return Type(s): (STRING|INT|DOUBLE|FLOAT|OBJECT)
+ */
+public class getPropertyFunctionExtension extends FunctionExecutor {
+
+ Attribute.Type returnType = Attribute.Type.STRING;
+
+ @Override
+ protected void init(ExpressionExecutor[] attributeExpressionExecutors,
+ ExecutionPlanContext executionPlanContext) {
+ if (attributeExpressionExecutors.length != 2) {
+ throw new ExecutionPlanValidationException(
+ "Invalid no of arguments passed to json:getProperty() function," + " required 2, but found "
+ + attributeExpressionExecutors.length);
+ }
+ if (attributeExpressionExecutors[0].getReturnType() != Attribute.Type.STRING) {
+ throw new ExecutionPlanValidationException(
+ "Invalid parameter type found for the first argument of json:getProperty() function, " + "required "
+ + Attribute.Type.STRING + ", but found " + attributeExpressionExecutors[0].getReturnType()
+ .toString());
+ }
+ if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
+ throw new ExecutionPlanValidationException(
+ "Invalid parameter type found for the second argument of json:getProperty() function, " + "required "
+ + Attribute.Type.STRING + ", but found " + attributeExpressionExecutors[1].getReturnType()
+ .toString());
+ }
+ }
+
+ @Override
+ protected Object execute(Object[] data) {
+ if (data[0] == null) {
+ throw new ExecutionPlanRuntimeException("Invalid input given to json:getProperty() function. First argument cannot be null");
+ }
+ if (data[1] == null) {
+ throw new ExecutionPlanRuntimeException("Invalid input given to json:getProperty() function. Second argument cannot be null");
+ }
+ String jsonString = (String) data[0];
+ String property = (String) data[1];
+ JSONObject jsonObject = null;
+ try {
+ jsonObject = new JSONObject(jsonString);
+ return jsonObject.get(property).toString();
+ } catch (JSONException e) {
+ throw new ExecutionPlanRuntimeException("Cannot parse JSON String in json:getPeroperty() function. " + e);
+ }
+ }
+
+ @Override
+ protected Object execute(Object data) {
+ return null; //Since the getProperty function takes in 2 parameters, this method does not get called. Hence,not implemented.
+ }
+
+ @Override
+ public void start() {
+ //Nothing to start
+ }
+
+ @Override
+ public void stop() {
+ //Nothing to stop
+ }
+
+ @Override
+ public Attribute.Type getReturnType() {
+ return returnType;
+ }
+
+ @Override
+ public Object[] currentState() {
+ return null; //No need to maintain a state.
+ }
+
+ @Override
+ public void restoreState(Object[] state) {
+ //Since there's no need to maintain a state, nothing needs to be done here.
+ }
+}
+
+
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext
new file mode 100644
index 0000000000..f1886dd63e
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/main/resources/json.siddhiext
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+getProperty=org.wso2.extension.siddhi.execution.json.getPropertyFunctionExtension
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java
new file mode 100644
index 0000000000..7bc66478c2
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/getPropertyFunctionTestCase.java
@@ -0,0 +1,88 @@
+/*
+ * 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.extension.siddhi.execution.json;
+
+import junit.framework.Assert;
+import org.apache.log4j.Logger;
+import org.junit.Before;
+import org.junit.Test;
+import org.wso2.siddhi.core.ExecutionPlanRuntime;
+import org.wso2.siddhi.core.SiddhiManager;
+import org.wso2.siddhi.core.event.Event;
+import org.wso2.siddhi.core.query.output.callback.QueryCallback;
+import org.wso2.siddhi.core.stream.input.InputHandler;
+import org.wso2.siddhi.core.util.EventPrinter;
+import org.wso2.extension.siddhi.execution.json.test.util.SiddhiTestHelper;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class getPropertyFunctionTestCase {
+ static final Logger log = Logger.getLogger(getPropertyFunctionTestCase.class);
+ private AtomicInteger count = new AtomicInteger(0);
+ private volatile boolean eventArrived;
+
+ @Before
+ public void init() {
+ count.set(0);
+ eventArrived = false;
+ }
+
+ @Test
+ public void testGetPropertyFunctionExtension() throws InterruptedException {
+ log.info("getPropertyFunctionExtension TestCase");
+ SiddhiManager siddhiManager = new SiddhiManager();
+
+ String inStreamDefinition = "define stream inputStream (payload string, id string, volume long);";
+ String query = ("@info(name = 'query1') from inputStream select id, json:getProperty(payload, 'latitude') "
+ + "as latitude insert into outputStream;");
+ ExecutionPlanRuntime executionPlanRuntime = siddhiManager.createExecutionPlanRuntime(inStreamDefinition + query);
+
+ executionPlanRuntime.addCallback("query1", new QueryCallback() {
+ @Override
+ public void receive(long timeStamp, Event[] inEvents, Event[] removeEvents) {
+ EventPrinter.print(timeStamp, inEvents, removeEvents);
+ for (Event event : inEvents) {
+ count.incrementAndGet();
+ if (count.get() == 1) {
+ Assert.assertEquals("1.5", event.getData(1));
+ eventArrived = true;
+ }
+ if (count.get() == 2) {
+ Assert.assertEquals("67.5", event.getData(1));
+ eventArrived = true;
+ }
+ if (count.get() == 3) {
+ Assert.assertEquals("7.5", event.getData(1));
+ eventArrived = true;
+ }
+ }
+ }
+ });
+
+ InputHandler inputHandler = executionPlanRuntime.getInputHandler("inputStream");
+ executionPlanRuntime.start();
+ inputHandler.send(new Object[]{"{'latitude' : 1.5, 'longitude' : 78.5}","IBM",100l});
+ inputHandler.send(new Object[]{"{'latitude' : 67.5, 'longitude' : 34.9}","WSO2", 200l});
+ inputHandler.send(new Object[]{"{'latitude' : 7.5, 'longitude' : 44.9}", "XYZ", 200l});
+ SiddhiTestHelper.waitForEvents(100, 3, count, 60000);
+ Assert.assertEquals(3, count.get());
+ Assert.assertTrue(eventArrived);
+ executionPlanRuntime.shutdown();
+ }
+}
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/test/util/SiddhiTestHelper.java b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/test/util/SiddhiTestHelper.java
new file mode 100644
index 0000000000..9cfd6c307d
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/java/org/wso2/extension/siddhi/execution/json/test/util/SiddhiTestHelper.java
@@ -0,0 +1,32 @@
+/*
+ * 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.extension.siddhi.execution.json.test.util;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+public class SiddhiTestHelper {
+ public static void waitForEvents(long sleepTime, int expectedCount, AtomicInteger actualCount, long timeout) throws InterruptedException {
+ long currentWaitTime = 0;
+ long startTime = System.currentTimeMillis();
+ while ((actualCount.get() < expectedCount) && (currentWaitTime <= timeout)) {
+ Thread.sleep(sleepTime);
+ currentWaitTime = System.currentTimeMillis() - startTime;
+ }
+ }
+}
diff --git a/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/log4j.properties b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/log4j.properties
new file mode 100644
index 0000000000..96c79e9449
--- /dev/null
+++ b/components/extensions/siddhi-extensions/org.wso2.extension.siddhi.execution.json/src/test/resources/log4j.properties
@@ -0,0 +1,36 @@
+#
+# Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
+#
+# WSO2 Inc. licenses this file to you under the Apache License,
+# Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+
+# For the general syntax of property based configuration files see the
+# documenation of org.apache.log4j.PropertyConfigurator.
+
+# The root category uses the appender called A1. Since no priority is
+# specified, the root category assumes the default priority for root
+# which is DEBUG in log4j. The root category is the only category that
+# has a default priority. All other categories need not be assigned a
+# priority in which case they inherit their priority from the
+# hierarchy.
+
+#log4j.rootLogger=DEBUG, stdout
+log4j.rootLogger=INFO, stdout
+
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%m%n
+#log4j.appender.stdout.layout.ConversionPattern=[%t] %-5p %c %x - %m%n
diff --git a/components/extensions/siddhi-extensions/pom.xml b/components/extensions/siddhi-extensions/pom.xml
new file mode 100644
index 0000000000..39b9741fe3
--- /dev/null
+++ b/components/extensions/siddhi-extensions/pom.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ extensions
+ 3.0.3-SNAPSHOT
+ ../pom.xml
+
+
+ 4.0.0
+ siddhi-extensions
+ pom
+ WSO2 Carbon - Siddhi Extension
+ http://wso2.org
+
+
+ org.wso2.extension.siddhi.execution.json
+
+
+
+
+
+
+ org.apache.felix
+ maven-scr-plugin
+ ${maven.scr.version}
+
+
+ generate-scr-scrdescriptor
+
+ scr
+
+
+
+
+
+
+
+
diff --git a/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs
new file mode 100644
index 0000000000..8cfcbeed35
--- /dev/null
+++ b/components/iot-plugins/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.device-view/device-view.hbs
@@ -0,0 +1,85 @@
+{{!
+ 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.
+}}
+{{#zone "topCss"}}
+
+{{/zone}}
+
+{{#zone "device-thumbnail"}}
+
+{{/zone}}
+
+{{#zone "device-opetations"}}
+
End User License Agreement ( EULA )
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js
index a179701e58..ec2af96395 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.platform.configuration/public/js/platform-configuration.js
@@ -124,8 +124,6 @@ $(document).ready(function () {
$("input#android-config-notifier-frequency").val(config.value / 1000);
} else if (config.name == configParams["GCM_API_KEY"]) {
$("input#android-config-gcm-api-key").val(config.value);
- } else if (config.name == configParams["GCM_SENDER_ID"]) {
- $("input#android-config-gcm-sender-id").val(config.value);
} else if (config.name == configParams["ANDROID_EULA"]) {
$("#android-eula").val(config.value);
}
@@ -159,7 +157,7 @@ $(document).ready(function () {
var notifierType = $("#android-config-notifier").find("option:selected").attr("value");
var notifierFrequency = $("input#android-config-notifier-frequency").val();
var gcmAPIKey = $("input#android-config-gcm-api-key").val();
- var gcmSenderId = $("input#android-config-gcm-sender-id").val();
+ var gcmSenderId = "sender_id";
var androidLicense = tinyMCE.activeEditor.getContent();
var errorMsgWrapper = "#android-config-error-msg";
var errorMsg = "#android-config-error-msg span";
@@ -170,10 +168,7 @@ $(document).ready(function () {
$(errorMsg).text("Provided notifier frequency is invalid. ");
$(errorMsgWrapper).removeClass("hidden");
} else if (notifierType == notifierTypeConstants["GCM"] && !gcmAPIKey) {
- $(errorMsg).text("GCM API Key is a required field. It cannot be empty.");
- $(errorMsgWrapper).removeClass("hidden");
- } else if (notifierType == notifierTypeConstants["GCM"] && !gcmSenderId) {
- $(errorMsg).text("GCM Sender ID is a required field. It cannot be empty.");
+ $(errorMsg).text("FCM API Key is a required field. It cannot be empty.");
$(errorMsgWrapper).removeClass("hidden");
} else {
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/js/android-policy-edit.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/js/android-policy-edit.js
index d673b6d6a9..78b6e8054e 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/js/android-policy-edit.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-edit/public/js/android-policy-edit.js
@@ -15,6 +15,9 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+var configuredOperations = [];
+
// Constants to define Android Operation Constants
var androidOperationConstants = {
"PASSCODE_POLICY_OPERATION": "passcode-policy",
@@ -60,21 +63,56 @@ var updateGroupedInputVisibility = function (domElement) {
*
* This method will be invoked from the relevant cdmf unit when the edit page gets loaded.
*
- * @param configuredOperations selected configurations.
+ * @param profileFeatureList saved feature list
*/
-var polulateProfileOperations = function (configuredOperations) {
+var polulateProfileOperations = function (profileFeatureList) {
+ var selectedOperations = androidOperationModule.populateProfile(profileFeatureList);
$(".wr-advance-operations li.grouped-input").each(function () {
updateGroupedInputVisibility(this);
});
- for (var i = 0; i < configuredOperations.length; ++i) {
- var configuredOperation = configuredOperations[i];
- $(".operation-data").filterByData("operation-code", configuredOperation)
+ for (var i = 0; i < selectedOperations.length; ++i) {
+ var selectedOperation = selectedOperations[i];
+ $(".operation-data").filterByData("operation-code", selectedOperation)
.find(".panel-title .wr-input-control.switch input[type=checkbox]").each(function () {
$(this).click();
});
}
};
+/**
+ * Generates policy profile feature list which will be saved with the profile.
+ *
+ * This function will be invoked from the relevant cdmf unit at the time of policy creation.
+ *
+ * @returns {Array} profile payloads
+ */
+var generateProfileFeaturesList = function () {
+ var profilePayloads = [];
+ var key;
+ for (key in policy["profile"]) {
+ if (policy["profile"].hasOwnProperty(key)) {
+ profilePayloads.push({
+ "featureCode": key,
+ "deviceType": policy["platform"],
+ "content": policy["profile"][key]
+ });
+ }
+ }
+
+ return profilePayloads;
+};
+
+/**
+ * Generates policy profile object which will be saved with the profile.
+ *
+ * This function will be invoked from the relevant cdmf unit at the time of policy creation.
+ *
+ * @returns {object} generated profile.
+ */
+var generatePolicyProfile = function () {
+ return androidOperationModule.generateProfile(configuredOperations);
+};
+
/**
* Checks if provided number is valid against a range.
*
@@ -542,30 +580,6 @@ var validatePolicyProfile = function () {
return wizardIsToBeContinued;
};
-/**
- * Generates policy profile object which will be saved with the profile.
- *
- * This function will be invoked from the relevant cdmf unit at the time of policy creation.
- *
- * @returns {Array} profile payloads
- */
-var generatePolicyProfile = function () {
- var profilePayloads = [];
- // traverses key by key in policy["profile"]
- var key;
- for (key in policy["profile"]) {
- if (policy["profile"].hasOwnProperty(key)) {
- profilePayloads.push({
- "featureCode": key,
- "deviceType": policy["platform"],
- "content": policy["profile"][key]
- });
- }
- }
-
- return profilePayloads;
-};
-
// Start of HTML embedded invoke methods
var showAdvanceOperation = function (operation, button) {
$(button).addClass('selected');
@@ -685,6 +699,22 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
);
}
};
+
+var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) {
+ var selectedValueOnChange = selectElement.value;
+ var slideDownVotes = 0;
+ for (var i = 0; i < valueSet.length; i++) {
+ if (selectedValueOnChange == valueSet[i]) {
+ slideDownVotes++;
+ }
+ }
+ var paneSelector = "#" + paneID;
+ if (slideDownVotes > 0) {
+ $(paneSelector).removeClass("hidden");
+ } else {
+ $(paneSelector).addClass("hidden");
+ }
+};
// End of HTML embedded invoke methods
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/policy-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/policy-view.hbs
index 12cffe6bd7..c0c748f334 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/policy-view.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/policy-view.hbs
@@ -1 +1 @@
-{{unit "mdm.unit.policy.view"}}
\ No newline at end of file
+{{unit "cdmf.unit.policy.view"}}
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js
new file mode 100644
index 0000000000..ab45604880
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/js/android-policy-view.js
@@ -0,0 +1,217 @@
+/*
+ * 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.
+ */
+
+/**
+ * Method to update the visibility (i.e. disabled or enabled view)
+ * of grouped input according to the values
+ * that they currently possess.
+ * @param domElement HTML grouped-input element with class name "grouped-input"
+ */
+var updateGroupedInputVisibility = function (domElement) {
+ if ($(".parent-input:first", domElement).is(":checked")) {
+ if ($(".grouped-child-input:first", domElement).hasClass("disabled")) {
+ $(".grouped-child-input:first", domElement).removeClass("disabled");
+ }
+ $(".child-input", domElement).each(function () {
+ $(this).prop('disabled', false);
+ });
+ } else {
+ if (!$(".grouped-child-input:first", domElement).hasClass("disabled")) {
+ $(".grouped-child-input:first", domElement).addClass("disabled");
+ }
+ $(".child-input", domElement).each(function () {
+ $(this).prop('disabled', true);
+ });
+ }
+};
+
+/**
+ * Populates policy configuration to the ui elements.
+ *
+ * This method will be invoked from the relevant cdmf unit when the edit page gets loaded.
+ *
+ * @param profileFeatureList selected configurations.
+ */
+var polulateProfileOperations = function (profileFeatureList) {
+ var selectedConfigurations = androidOperationModule.populateProfile(profileFeatureList);
+ $(".wr-advance-operations li.grouped-input").each(function () {
+ updateGroupedInputVisibility(this);
+ });
+ // enabling previously configured options of last update
+ for (var i = 0; i < selectedConfigurations.length; ++i) {
+ var selectedOperation = selectedConfigurations[i];
+ $(".operation-data").filterByData("operation-code", selectedOperation)
+ .find(".panel-title .wr-input-control.switch input[type=checkbox]").each(function () {
+ $(this).click();
+ });
+ }
+};
+
+// Start of HTML embedded invoke methods
+var showAdvanceOperation = function (operation, button) {
+ $(button).addClass('selected');
+ $(button).siblings().removeClass('selected');
+ var hiddenOperation = ".wr-hidden-operations-content > div";
+ $(hiddenOperation + '[data-operation="' + operation + '"]').show();
+ $(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
+};
+
+/**
+ * Method to slide down a provided pane upon provided value set.
+ *
+ * @param selectElement Select HTML Element to consider
+ * @param paneID HTML ID of div element to slide down
+ * @param valueSet Applicable Value Set
+ */
+var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
+ var selectedValueOnChange = $(selectElement).find("option:selected").val();
+ if ($(selectElement).is("input:checkbox")) {
+ selectedValueOnChange = $(selectElement).is(":checked").toString();
+ }
+
+ var i, slideDownVotes = 0;
+ for (i = 0; i < valueSet.length; i++) {
+ if (selectedValueOnChange == valueSet[i]) {
+ slideDownVotes++;
+ }
+ }
+ var paneSelector = "#" + paneID;
+ if (slideDownVotes > 0) {
+ if (!$(paneSelector).hasClass("expanded")) {
+ $(paneSelector).addClass("expanded");
+ }
+ $(paneSelector).slideDown();
+ } else {
+ if ($(paneSelector).hasClass("expanded")) {
+ $(paneSelector).removeClass("expanded");
+ }
+ $(paneSelector).slideUp();
+ /* now follows the code to reinitialize all inputs of the slidable pane.
+ reinitializing input fields into the defaults.*/
+ $(paneSelector + " input").each(
+ function () {
+ if ($(this).is("input:text")) {
+ $(this).val($(this).data("default"));
+ } else if ($(this).is("input:password")) {
+ $(this).val("");
+ } else if ($(this).is("input:checkbox")) {
+ $(this).prop("checked", $(this).data("default"));
+ // if this checkbox is the parent input of a grouped-input
+ if ($(this).hasClass("parent-input")) {
+ var groupedInput = $(this).parent().parent().parent();
+ updateGroupedInputVisibility(groupedInput);
+ }
+ }
+ }
+ );
+ // reinitializing select fields into the defaults
+ $(paneSelector + " select").each(
+ function () {
+ var defaultOption = $(this).data("default");
+ $("option:eq(" + defaultOption + ")", this).prop("selected", "selected");
+ }
+ );
+ // collapsing expanded-panes (upon the selection of html-select-options) if any
+ $(paneSelector + " .expanded").each(
+ function () {
+ if ($(this).hasClass("expanded")) {
+ $(this).removeClass("expanded");
+ }
+ $(this).slideUp();
+ }
+ );
+ // removing all entries of grid-input elements if exist
+ $(paneSelector + " .grouped-array-input").each(
+ function () {
+ var gridInputs = $(this).find("[data-add-form-clone]");
+ if (gridInputs.length > 0) {
+ gridInputs.remove();
+ }
+ var helpTexts = $(this).find("[data-help-text=add-form]");
+ if (helpTexts.length > 0) {
+ helpTexts.show();
+ }
+ }
+ );
+ }
+};
+
+var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) {
+ var selectedValueOnChange = selectElement.value;
+ var slideDownVotes = 0;
+ for (var i = 0; i < valueSet.length; i++) {
+ if (selectedValueOnChange == valueSet[i]) {
+ slideDownVotes++;
+ }
+ }
+ var paneSelector = "#" + paneID;
+ if (slideDownVotes > 0) {
+ $(paneSelector).removeClass("hidden");
+ } else {
+ $(paneSelector).addClass("hidden");
+ }
+};
+// End of HTML embedded invoke methods
+
+/**
+ * This method will display appropriate fields based on wifi type
+ * @param {object} wifi type select object
+ */
+var changeAndroidWifiPolicy = function (select) {
+ slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['wep', 'wpa', '802eap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-eap', ['802eap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['802eap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['802eap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['802eap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['802eap']);
+};
+
+/**
+ * This method will display appropriate fields based on wifi EAP type
+ * @param {object} wifi eap select object
+ * @param {object} wifi type select object
+ */
+var changeAndroidWifiPolicyEAP = function (select, superSelect) {
+ slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['peap', 'ttls', 'pwd', 'fast', 'leap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['peap', 'ttls', 'fast']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-provisioning', ['fast']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['peap', 'tls', 'ttls', 'pwd', 'fast', 'leap']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['peap', 'ttls']);
+ slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['peap', 'tls', 'ttls']);
+ if (superSelect.value != '802eap') {
+ changeAndroidWifiPolicy(superSelect);
+ }
+};
+
+$(document).ready(function () {
+ var advanceOperations = ".wr-advance-operations";
+ $(advanceOperations).on("click", ".wr-input-control.switch", function (event) {
+ var operation = $(this).parents(".operation-data").data("operation");
+ // prevents event bubbling by figuring out what element it's being called from.
+ if (event.target.tagName == "INPUT") {
+ var featureConfiguredIcon;
+ if ($("input[type='checkbox']", this).is(":checked")) {
+ // add configured-state-icon to the feature
+ featureConfiguredIcon = "#" + operation + "-configured";
+ if ($(featureConfiguredIcon).hasClass("hidden")) {
+ $(featureConfiguredIcon).removeClass("hidden");
+ }
+ }
+ }
+ });
+});
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs
new file mode 100644
index 0000000000..3cca932a87
--- /dev/null
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-view/public/templates/android-policy-view.hbs
@@ -0,0 +1,1576 @@
+
+ This configuration can be used to set a passcode policy to an Android Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restrictions
+
+
+
+ This configurations can be used to restrict certain settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bellow restrictions will be applied on devices with Android version 5.0 Lollipop onwards only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Bellow restrictions will be applied on devices with Android version 6.0 Marshmallow onwards
+ only.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encryption Settings
+
+
+
+ This configuration can be used to encrypt data on an Android device, when the device is locked
+ and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a
+ device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you do not need the device to be encrypted.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Wi-Fi Settings
+
+
+
+ This configurations can be used to configure Wi-Fi access on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+ This configurations can be used to configure VPN settings on an Android device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+ Please note that * sign represents required fields of data.
+
+
+
+ The configurations below can be applied to the devices where the agent is running in Android
+ Work-Profile.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ System Update Policy (COSU)
+
+
+
+ This configuration can be used to set system update policy to an Android Device in COSU.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
+ This configuration can be used to whitelist applications in lock task mode of an Android
+ Device in COSU.
+ Once this configuration profile is installed on a device, corresponding users will not be
+ able
+ to modify these settings on their devices.
+
\ No newline at end of file
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
index 22bf73250f..b6e08e785e 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.policy-wizard/public/js/android-policy-operations.js
@@ -16,6 +16,8 @@
* under the License.
*/
+var configuredOperations = [];
+
var androidOperationConstants = {
"PASSCODE_POLICY_OPERATION": "passcode-policy",
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
@@ -523,13 +525,13 @@ var validatePolicyProfile = function () {
};
/**
- * Generates policy profile object which will be saved with the profile.
+ * Generates policy profile feature list which will be saved with the profile.
*
* This function will be invoked from the relevant cdmf unit at the time of policy creation.
*
* @returns {Array} profile payloads
*/
-var generatePolicyProfile = function () {
+var generateProfileFeaturesList = function () {
var profilePayloads = [];
// traverses key by key in policy["profile"]
var key;
@@ -546,6 +548,24 @@ var generatePolicyProfile = function () {
return profilePayloads;
};
+/**
+ * Generates policy profile object which will be saved with the profile.
+ *
+ * This function will be invoked from the relevant cdmf unit at the time of policy creation.
+ *
+ * @returns {object} generated profile.
+ */
+var generatePolicyProfile = function () {
+ return androidOperationModule.generateProfile(configuredOperations);
+};
+
+/**
+ * Resets policy profile configurations.
+ */
+var resetPolicyProfile = function () {
+ configuredOperations = [];
+};
+
// Start of HTML embedded invoke methods
var showAdvanceOperation = function (operation, button) {
$(button).addClass('selected');
@@ -665,6 +685,23 @@ var slideDownPaneAgainstValueSet = function (selectElement, paneID, valueSet) {
);
}
};
+
+var slideDownPaneAgainstValueSetForRadioButtons = function (selectElement, paneID, valueSet) {
+ var selectedValueOnChange = selectElement.value;
+ var slideDownVotes = 0;
+ for (var i = 0; i < valueSet.length; i++) {
+ if (selectedValueOnChange == valueSet[i]) {
+ slideDownVotes++;
+ }
+ }
+ var paneSelector = "#" + paneID;
+ if (slideDownVotes > 0) {
+ $(paneSelector).removeClass("hidden");
+ } else {
+ $(paneSelector).addClass("hidden");
+ }
+};
+
// End of HTML embedded invoke methods
diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
index fa6eaefca6..81ddcd0af0 100644
--- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
+++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.type-view/type-view.hbs
@@ -21,42 +21,22 @@
STEP 01 Android
- Mobile.
+ Mobile.
STEP 02 Go ahead
- and click [Enroll Device].
+ and click [Enroll Device].
STEP 03 Proceed
- to the [Prepare] section.
+ to the [Prepare] section.
+ This configuration can be used to set a passcode policy to an Windows Device.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Restrictions on Camera
+
+
+
+ This configuration can be used to restrict the usage of camera on an Windows device together
+ with all the applications using the camera.
+ Once this configuration profile is installed on a device, corresponding users will not be able
+ to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable camera.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Encryption Settings
+
+
+
+ This configuration can be used to encrypt data on an Windows device, when the device is locked
+ and
+ make it readable when the passcode is entered. Once this configuration profile is installed on a
+ device,
+ corresponding users will not be able to modify these settings on their devices.
+
+
+
+
+
+
+
+ Un-check following checkbox in case you need to disable storage-encryption.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Application Restriction Settings
+
+
+
+ This configuration can be used to create a black list or white list of applications.
+
\ No newline at end of file
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-wizard/public/js/windows-policy-operations.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-wizard/public/js/windows-policy-operations.js
index 3a149ee88e..4f8c121d03 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-wizard/public/js/windows-policy-operations.js
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.windows.policy-wizard/public/js/windows-policy-operations.js
@@ -16,6 +16,8 @@
* under the License.
*/
+var configuredOperations = [];
+
var windowsOperationConstants = {
"PASSCODE_POLICY_OPERATION": "passcode-policy",
"PASSCODE_POLICY_OPERATION_CODE": "PASSCODE_POLICY",
@@ -237,21 +239,21 @@ var validatePolicyProfile = function () {
};
/**
- * Generates policy profile object which will be saved with the profile.
+ * Generates policy profile feature list which will be saved with the profile.
*
* This function will be invoked from the relevant cdmf unit at the time of policy creation.
*
* @returns {Array} profile payloads
*/
-var generatePolicyProfile = function () {
+var generateProfileFeaturesList = function () {
var profilePayloads = [];
// traverses key by key in policy["profile"]
var key;
for (key in policy["profile"]) {
- if (key == windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]) {
- policy["profile"][key].enablePassword = true;
- }
if (policy["profile"].hasOwnProperty(key)) {
+ if (key == windowsOperationConstants["PASSCODE_POLICY_OPERATION_CODE"]) {
+ policy["profile"][key].enablePassword = true;
+ }
profilePayloads.push({
"featureCode": key,
"deviceType": policy["platform"],
@@ -259,10 +261,27 @@ var generatePolicyProfile = function () {
});
}
}
-
return profilePayloads;
};
+/**
+ * Generates policy profile object which will be saved with the profile.
+ *
+ * This function will be invoked from the relevant cdmf unit at the time of policy creation.
+ *
+ * @returns {object} generated profile.
+ */
+var generatePolicyProfile = function () {
+ return windowsOperationModule.generateProfile(configuredOperations);
+};
+
+/**
+ * Resets policy profile configurations.
+ */
+var resetPolicyProfile = function () {
+ configuredOperations = [];
+};
+
// Start of HTML embedded invoke methods
var showAdvanceOperation = function (operation, button) {
$(button).addClass('selected');
@@ -272,37 +291,6 @@ var showAdvanceOperation = function (operation, button) {
$(hiddenOperation + '[data-operation="' + operation + '"]').siblings().hide();
};
-
-/**
- * This method will display appropriate fields based on wifi type
- * @param select
- */
-var changeAndroidWifiPolicy = function (select) {
- slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['wep', 'wpa', '802eap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-eap', ['802eap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['802eap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['802eap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['802eap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['802eap']);
-};
-
-/**
- * This method will display appropriate fields based on wifi EAP type
- * @param select
- * @param superSelect
- */
-var changeAndroidWifiPolicyEAP = function (select, superSelect) {
- slideDownPaneAgainstValueSet(select, 'control-wifi-password', ['peap', 'ttls', 'pwd', 'fast', 'leap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-phase2', ['peap', 'ttls', 'fast']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-provisioning', ['fast']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-identity', ['peap', 'tls', 'ttls', 'pwd', 'fast', 'leap']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-anoidentity', ['peap', 'ttls']);
- slideDownPaneAgainstValueSet(select, 'control-wifi-cacert', ['peap', 'tls', 'ttls']);
- if (superSelect.value != '802eap') {
- changeAndroidWifiPolicy(superSelect);
- }
-};
-
/**
* Method to slide down a provided pane upon provided value set.
*
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json
index ce3efe795a..d02ddd7404 100755
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/conf/config.json
@@ -34,7 +34,7 @@
}
},
"androidAgentApp" : "android-agent.apk",
- "windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/services/federated/bst/authentication",
+ "windowsConfigRoot" : "%http.ip%/api/device-mgt/windows/v1.0/federated/bst/authentication",
"ssoConfiguration" : {
"enabled" : false,
"issuer" : "mdm",
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/business-controllers/device.js b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/business-controllers/device.js
index 3dce168f4b..c0c1903845 100755
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/business-controllers/device.js
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows.ui/src/main/resources/jaggeryapps/windows-web-agent/app/modules/business-controllers/device.js
@@ -312,7 +312,7 @@ deviceModule = function () {
var url;
var license;
if (deviceType == "windows") {
- url = devicemgtProps["httpURL"] + "/api/device-mgt/windows/v1.0/services/configuration/license";
+ url = devicemgtProps["httpURL"] + "/api/device-mgt/windows/v1.0/configuration/license";
} else if (deviceType == "ios") {
url = devicemgtProps["httpsURL"] + "/ios-enrollment/license/";
}
diff --git a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java
index 5a21c05396..365468f7c8 100644
--- a/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java
+++ b/components/mobile-plugins/windows-plugin/org.wso2.carbon.device.mgt.mobile.windows/src/main/java/org/wso2/carbon/device/mgt/mobile/windows/impl/WindowsDeviceManagementService.java
@@ -20,14 +20,12 @@ package org.wso2.carbon.device.mgt.mobile.windows.impl;
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.TaskOperation;
import org.wso2.carbon.device.mgt.common.app.mgt.ApplicationManager;
import org.wso2.carbon.device.mgt.common.push.notification.PushNotificationConfig;
import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService;
-import java.util.List;
-
/**
* This represents the Windows implementation of DeviceManagerService.
*/
@@ -43,7 +41,7 @@ public class WindowsDeviceManagementService implements DeviceManagementService {
}
@Override
- public List getTasksForPlatform() {
+ public OperationMonitoringTaskConfig getOperationMonitoringConfig() {
return null;
}
diff --git a/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml
new file mode 100644
index 0000000000..09380ecf42
--- /dev/null
+++ b/features/extensions-feature/org.wso2.extension.siddhi.execution.json.feature/pom.xml
@@ -0,0 +1,75 @@
+
+
+
+ 4.0.0
+
+
+ org.wso2.carbon.devicemgt-plugins
+ extensions-feature
+ 3.0.3-SNAPSHOT
+ ../pom.xml
+
+
+ org.wso2.extension.siddhi.execution.json.feature
+ pom
+ 3.0.3-SNAPSHOT
+ WSO2 Siddhi Execution Extension - Json Feature
+ http://wso2.org
+ This feature contains Siddhi extension feature for changing a json string to individual properties.
+
+
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.extension.siddhi.execution.json
+
+
+
+
+
+
+ org.wso2.maven
+ carbon-p2-plugin
+ ${carbon.p2.plugin.version}
+
+
+ p2-feature-generation
+ package
+
+ p2-feature-gen
+
+
+ org.wso2.extension.siddhi.execution.json
+ ../../etc/feature.properties
+
+
+ org.wso2.carbon.p2.category.type:server
+ org.eclipse.equinox.p2.type.group:true
+
+
+
+
+ org.wso2.carbon.devicemgt-plugins:org.wso2.extension.siddhi.execution.json:${carbon.devicemgt.plugins.version}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/features/extensions-feature/pom.xml b/features/extensions-feature/pom.xml
index b6afa7982e..3df8280605 100644
--- a/features/extensions-feature/pom.xml
+++ b/features/extensions-feature/pom.xml
@@ -37,6 +37,7 @@
org.wso2.carbon.appmgt.mdm.osgiconnector.featureorg.wso2.carbon.device.mgt.adapter.featureorg.wso2.carbon.andes.extensions.device.mgt.mqtt.authorization.feature
+ org.wso2.extension.siddhi.execution.json.feature
diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
index 5b79edefde..97b1674501 100644
--- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
+++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/pom.xml
@@ -117,6 +117,18 @@
**/*
+
+ org.wso2.carbon.devicemgt-plugins
+ org.wso2.carbon.device.mgt.mobile.android.analytics
+
+ ${project.version}
+ zip
+ true
+
+ ${project.build.directory}/maven-shared-archive-resources/carbonapps
+
+ **/*
+
diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/devicetypes/android.xml b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/devicetypes/android.xml
index 7c1571afc2..271dcd78b1 100644
--- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/devicetypes/android.xml
+++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/devicetypes/android.xml
@@ -24,7 +24,12 @@
en_US1.0.0
- This is license text
+ This End User License Agreement ("Agreement") is a legal agreement between you ("You") and WSO2, Inc., regarding the enrollment of Your personal mobile device ("Device") in SoR's mobile device management program, and the loading to and removal from Your Device and Your use of certain applications and any associated software and user documentation, whether provided in "online" or electronic format, used in connection with the operation of or provision of services to WSO2, Inc., BY SELECTING "I ACCEPT" DURING INSTALLATION, YOU ARE ENROLLING YOUR DEVICE, AND THEREBY AUTHORIZING SOR OR ITS AGENTS TO INSTALL, UPDATE AND REMOVE THE APPS FROM YOUR DEVICE AS DESCRIBED IN THIS AGREEMENT. YOU ARE ALSO EXPLICITLY ACKNOWLEDGING AND AGREEING THAT (1) THIS IS A BINDING CONTRACT AND (2) YOU HAVE READ AND AGREE TO THE TERMS OF THIS AGREEMENT.
+
+ IF YOU DO NOT ACCEPT THESE TERMS, DO NOT ENROLL YOUR DEVICE AND DO NOT PROCEED ANY FURTHER.
+
+ You agree that: (1) You understand and agree to be bound by the terms and conditions contained in this Agreement, and (2) You are at least 21 years old and have the legal capacity to enter into this Agreement as defined by the laws of Your jurisdiction. SoR shall have the right, without prior notice, to terminate or suspend (i) this Agreement, (ii) the enrollment of Your Device, or (iii) the functioning of the Apps in the event of a violation of this Agreement or the cessation of Your relationship with SoR (including termination of Your employment if You are an employee or expiration or termination of Your applicable franchise or supply agreement if You are a franchisee of or supplier to the WSO2 WSO2, Inc., system). SoR expressly reserves all rights not expressly granted herein.
+
@@ -32,10 +37,10 @@
-
- jdbc/MobileAndroidDM_DS
-
-
+
+ jdbc/MobileAndroidDM_DS
+
+
DEVICE_ID
@@ -54,7 +59,7 @@
OS_BUILD_DATE
-
+
@@ -310,6 +315,8 @@
+ true
+ 60000DEVICE_INFO
diff --git a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf
index 2b8eaf5dd0..3ef1823484 100644
--- a/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf
+++ b/features/mobile-plugins-feature/android-plugin-feature/org.wso2.carbon.device.mgt.mobile.android.feature/src/main/resources/p2.inf
@@ -1,5 +1,7 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/webapps/api#device-mgt#android#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#device-mgt#android#v1.0.war,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/carbonapps/);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/carbonapps/,target:${installFolder}/../../deployment/server/carbonapps/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/jaggeryapps/devicemgt,target:${installFolder}/../../deployment/server/jaggeryapps/devicemgt,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/jaggeryapps/android-web-agent,target:${installFolder}/../../deployment/server/jaggeryapps/android-web-agent,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.mobile.android_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\
@@ -28,4 +30,5 @@ org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../dep
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../../dbscripts/cdm/plugins/android);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../database/WSO2MobileAndroid_DB.h2.db);\
+org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/carbonapps/android_agent_analytics-1.0.0.car);\
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../deployment/server/devicetypes/android.xml);\
\ No newline at end of file
diff --git a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
index e2f3bd3e72..6d2d772d19 100644
--- a/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
+++ b/features/mobile-plugins-feature/windows-plugin-feature/org.wso2.carbon.device.mgt.mobile.windows.feature/src/main/resources/devicetypes/windows.xml
@@ -24,7 +24,12 @@
en_US1.0.0
- This is license text
+ This End User License Agreement ("Agreement") is a legal agreement between you ("You") and WSO2, Inc., regarding the enrollment of Your personal mobile device ("Device") in SoR's mobile device management program, and the loading to and removal from Your Device and Your use of certain applications and any associated software and user documentation, whether provided in "online" or electronic format, used in connection with the operation of or provision of services to WSO2, Inc., BY SELECTING "I ACCEPT" DURING INSTALLATION, YOU ARE ENROLLING YOUR DEVICE, AND THEREBY AUTHORIZING SOR OR ITS AGENTS TO INSTALL, UPDATE AND REMOVE THE APPS FROM YOUR DEVICE AS DESCRIBED IN THIS AGREEMENT. YOU ARE ALSO EXPLICITLY ACKNOWLEDGING AND AGREEING THAT (1) THIS IS A BINDING CONTRACT AND (2) YOU HAVE READ AND AGREE TO THE TERMS OF THIS AGREEMENT.
+
+ IF YOU DO NOT ACCEPT THESE TERMS, DO NOT ENROLL YOUR DEVICE AND DO NOT PROCEED ANY FURTHER.
+
+ You agree that: (1) You understand and agree to be bound by the terms and conditions contained in this Agreement, and (2) You are at least 21 years old and have the legal capacity to enter into this Agreement as defined by the laws of Your jurisdiction. SoR shall have the right, without prior notice, to terminate or suspend (i) this Agreement, (ii) the enrollment of Your Device, or (iii) the functioning of the Apps in the event of a violation of this Agreement or the cessation of Your relationship with SoR (including termination of Your employment if You are an employee or expiration or termination of Your applicable franchise or supply agreement if You are a franchisee of or supplier to the WSO2 WSO2, Inc., system). SoR expressly reserves all rights not expressly granted herein.
+
@@ -32,10 +37,10 @@
-
- jdbc/MobileWindowsDM_DS
-
-
+
+ jdbc/MobileWindowsDM_DS
+
+