From 34ad4a63a238e8c7a845c2f232292fbe03f6609b Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 20 Mar 2015 12:27:45 +0530 Subject: [PATCH] Email management --- .../org.wso2.carbon.device.mgt.core/pom.xml | 18 +++++ .../core/service/DeviceManagementService.java | 1 + .../service/DeviceManagementServiceImpl.java | 78 +++++++++---------- .../pom.xml | 35 ++++----- .../DeviceMgtUserServiceComponent.java | 2 +- .../pom.xml | 7 ++ 6 files changed, 82 insertions(+), 59 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index 7dde13ebe5..393d5aa2ed 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -54,6 +54,7 @@ org.wso2.carbon.device.mgt.core.internal org.apache.axis2.*;version="${axis2.osgi.version.range}", + org.apache.axiom.*; version="${axiom.osgi.version.range}", org.osgi.framework, org.osgi.service.component, org.apache.commons.logging, @@ -159,6 +160,23 @@ org.wso2.carbon.governance org.wso2.carbon.governance.api + + org.apache.axis2.transport + axis2-transport-mail + + + + org.apache.ws.commons.axiom + axiom-api + + + org.apache.ws.commons.axiom + axiom-impl + + + org.apache.ws.commons.axiom.wso2 + axiom + diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementService.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementService.java index b024829c55..26ea5ef8fb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementService.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementService.java @@ -19,6 +19,7 @@ package org.wso2.carbon.device.mgt.core.service; import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.DeviceManagementException; +import org.wso2.carbon.device.mgt.common.EmailMessageProperties; import org.wso2.carbon.device.mgt.common.spi.DeviceManager; import org.wso2.carbon.device.mgt.common.license.mgt.LicenseManager; import org.wso2.carbon.device.mgt.common.operation.mgt.OperationManager; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java index c7b6937031..c1574b95fb 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/service/DeviceManagementServiceImpl.java @@ -39,34 +39,34 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } @Override - public boolean enrollDevice(Device device) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().enrollDevice(device); - } + public boolean enrollDevice(Device device) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().enrollDevice(device); + } - @Override - public boolean modifyEnrollment(Device device) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().modifyEnrollment(device); - } + @Override + public boolean modifyEnrollment(Device device) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().modifyEnrollment(device); + } - @Override - public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().disenrollDevice(deviceId); - } + @Override + public boolean disenrollDevice(DeviceIdentifier deviceId) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().disenrollDevice(deviceId); + } - @Override - public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isEnrolled(deviceId); - } + @Override + public boolean isEnrolled(DeviceIdentifier deviceId) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isEnrolled(deviceId); + } - @Override - public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isActive(deviceId); - } + @Override + public boolean isActive(DeviceIdentifier deviceId) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().isActive(deviceId); + } - @Override - public boolean setActive(DeviceIdentifier deviceId, boolean status) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setActive(deviceId, status); - } + @Override + public boolean setActive(DeviceIdentifier deviceId, boolean status) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setActive(deviceId, status); + } @Override public List getAllDevices() throws DeviceManagementException { @@ -74,31 +74,31 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { } @Override - public List getAllDevices(String type) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getAllDevices(type); - } + public List getAllDevices(String type) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getAllDevices(type); + } @Override - public List getDeviceListOfUser(String username) throws DeviceManagementException{ + public List getDeviceListOfUser(String username) throws DeviceManagementException { return null; } @Override - public org.wso2.carbon.device.mgt.common.Device getDevice(DeviceIdentifier deviceId) - throws DeviceManagementException { + public org.wso2.carbon.device.mgt.common.Device getDevice(DeviceIdentifier deviceId) + throws DeviceManagementException { return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().getDevice(deviceId); - } + } - @Override - public boolean updateDeviceInfo(Device device) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().updateDeviceInfo(device); - } + @Override + public boolean updateDeviceInfo(Device device) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().updateDeviceInfo(device); + } - @Override - public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException { - return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setOwnership(deviceId, + @Override + public boolean setOwnership(DeviceIdentifier deviceId, String ownershipType) throws DeviceManagementException { + return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().setOwnership(deviceId, ownershipType); - } + } @Override public License getLicense(String deviceType, String languageCode) throws LicenseManagementException { @@ -113,7 +113,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { @Override public boolean addOperation(Operation operation, - List devices) throws OperationManagementException { + List devices) throws OperationManagementException { return DeviceManagementDataHolder.getInstance().getDeviceManagementProvider().addOperation(operation, devices); } diff --git a/components/user-mgt/org.wso2.carbon.device.mgt.user.common/pom.xml b/components/user-mgt/org.wso2.carbon.device.mgt.user.common/pom.xml index 25ee050fe3..1bd80d2e0c 100644 --- a/components/user-mgt/org.wso2.carbon.device.mgt.user.common/pom.xml +++ b/components/user-mgt/org.wso2.carbon.device.mgt.user.common/pom.xml @@ -1,24 +1,21 @@ +~ 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. +--> org.wso2.carbon.devicemgt org.wso2.carbon.device.mgt.common + + org.wso2.carbon.commons + org.wso2.carbon.email.verification + @@ -98,6 +102,9 @@ org.wso2.carbon.devicemgt:org.wso2.carbon.device.mgt.common:${carbon.device.mgt.version} + + org.wso2.carbon.commons:org.wso2.carbon.email.verification + org.wso2.carbon.core.server:${carbon.kernel.version}