From 28a00cd21cb7591cde247afecd586f64bfc0a6a7 Mon Sep 17 00:00:00 2001 From: manoj Date: Fri, 20 Mar 2015 16:17:51 +0530 Subject: [PATCH] Email functionality --- .../core/config/EnrolmentNotifications.java | 47 +++++++++++++++++++ .../config/NotificationMessagesConfig.java | 38 +++++++++++++++ .../resources/conf/notification-messages.xml | 26 ++++++++++ 3 files changed, 111 insertions(+) create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/EnrolmentNotifications.java create mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/NotificationMessagesConfig.java create mode 100644 features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/EnrolmentNotifications.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/EnrolmentNotifications.java new file mode 100644 index 0000000000..70244ecd5d --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/EnrolmentNotifications.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.core.config; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "EnrolmentNotifications") +public class EnrolmentNotifications { + + private String message; + private String subject; + + @XmlElement(name = "message", required = true) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @XmlElement(name = "subject", required = true) + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } +} diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/NotificationMessagesConfig.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/NotificationMessagesConfig.java new file mode 100644 index 0000000000..0cd4b67c53 --- /dev/null +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/config/NotificationMessagesConfig.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. + * + * WSO2 Inc. licenses this file to you under the Apache License, + * Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.wso2.carbon.device.mgt.core.config; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement(name = "Notifications") +public class NotificationMessagesConfig { + + private EnrolmentNotifications enrolmentNotifications; + + @XmlElement(name = "EnrolmentNotifications", required = true) + public EnrolmentNotifications getEnrolmentNotifications() { + return enrolmentNotifications; + } + + public void setEnrolmentNotifications(EnrolmentNotifications enrolmentNotifications) { + this.enrolmentNotifications = enrolmentNotifications; + } + +} diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml new file mode 100644 index 0000000000..922e115333 --- /dev/null +++ b/features/device-mgt/org.wso2.carbon.device.mgt.server.feature/src/main/resources/conf/notification-messages.xml @@ -0,0 +1,26 @@ + + + + + + + Please enroll your device + Enroll your device + + \ No newline at end of file