From 97bb7ee87cb3bccd37ad119945b2d1eac3f0f49d Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:06:32 +0530 Subject: [PATCH 01/13] Add SMS management common classes --- .../sms-mgt/io.entgra.sms.mgt.common/pom.xml | 98 +++++++++++++++++++ .../sms/mgt/common/SMSMgtConstants.java | 10 ++ .../sms/mgt/common/bean/SMSMessage.java | 71 ++++++++++++++ .../sms/mgt/common/config/Property.java | 48 +++++++++ .../mgt/common/config/SMSConfiguration.java | 67 +++++++++++++ .../sms/mgt/common/config/SMSGateway.java | 85 ++++++++++++++++ .../common/exception/SMSSenderException.java | 47 +++++++++ .../entgra/sms/mgt/common/spi/SMSSender.java | 38 +++++++ components/sms-mgt/pom.xml | 44 +++++++++ 9 files changed, 508 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/pom.xml create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java create mode 100644 components/sms-mgt/pom.xml diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/pom.xml b/components/sms-mgt/io.entgra.sms.mgt.common/pom.xml new file mode 100644 index 0000000000..6595066646 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/pom.xml @@ -0,0 +1,98 @@ + + + + + + + org.wso2.carbon.devicemgt + sms-mgt + 4.1.12-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.sms.mgt.common + bundle + Entgra IoT - SMS Management Common + Entgra IoT - SMS Management Common + http://entgra.io + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.artifactId} + ${project.artifactId} + ${carbon.device.mgt.version} + SMS Management Common Bundle + + io.entgra.sms.mgt.common.* + + + io.swagger.annotations; version="${swagger.annotations.version}"; resolution:=optional, + + + + + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + + + + + + + io.swagger + swagger-annotations + provided + + + + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java new file mode 100644 index 0000000000..cbe46d742e --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java @@ -0,0 +1,10 @@ +package io.entgra.sms.mgt.common; + +/** + * This class holds SMS Management Constants + */ +public final class SMSMgtConstants { + + public static final String SCOPE = "scope"; + public static final String SMS_CONFIG_XML_NAME = "sms-config.xml"; +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java new file mode 100644 index 0000000000..23cde039b9 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.bean; + +import io.swagger.annotations.ApiModelProperty; + +/** + * This class hold the SMS Message + */ +public class SMSMessage { + + @ApiModelProperty( + name = "from", + value = "Sender's number.", + required = true + ) + private String from; + + @ApiModelProperty( + name = "to", + value = "Recipient's number." + ) + private String to; + + @ApiModelProperty( + name = "body", + value = "SMS message content.", + required = true + ) + private String body; + + public String getFrom() { + return from; + } + + public void setFrom(String from) { + this.from = from; + } + + public String getTo() { + return to; + } + + public void setTo(String to) { + this.to = to; + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java new file mode 100644 index 0000000000..de667cfd11 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.config; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlValue; + +@XmlRootElement(name = "Property") +public class Property { + + private String name; + private String value; + + @XmlAttribute(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlValue + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java new file mode 100644 index 0000000000..7992533c76 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.config; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "SMSConfiguration") +public class SMSConfiguration { + + private List smsGateways; + + @XmlElementWrapper(name = "Gateways") + @XmlElement(name = "Gateway") + public List getSMSGateways() { + return smsGateways; + } + + public void setSMSGateways(List smsGateways) { + this.smsGateways = smsGateways; + } + + /** + * Retrieve the default SMS Gateway as defined in the SMS configuration. + * @return default {@link SMSGateway} + */ + public SMSGateway getDefaultSMSGateway() { + for (SMSGateway smsGateway : smsGateways) { + if (smsGateway.isDefault()) { + return smsGateway; + } + } + return null; + } + + /** + * Retrieve SMS Gateway by the provided Gateway Name + * @param gatewayName has the name of the Gateway to be retrieved + * @return retrieved {@link SMSGateway} + */ + public SMSGateway getSMSGateway(String gatewayName) { + for (SMSGateway smsGateway : smsGateways) { + if (gatewayName.equals(smsGateway.getName())) { + return smsGateway; + } + } + return null; + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java new file mode 100644 index 0000000000..988faca8e5 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.config; + +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlRootElement(name = "Gateway") +public class SMSGateway { + + private String name; + private String extensionClass; + private boolean isDefault; + private List properties; + + @XmlAttribute(name = "name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @XmlAttribute(name = "extensionClass") + public String getExtensionClass() { + return extensionClass; + } + + public void setExtensionClass(String extensionClass) { + this.extensionClass = extensionClass; + } + + @XmlAttribute(name = "isDefault") + public boolean isDefault() { + return isDefault; + } + + public void setDefault(boolean aDefault) { + isDefault = aDefault; + } + + @XmlElementWrapper(name = "Properties") + @XmlElement(name = "Property") + public List getProperties() { + return properties; + } + + public void setProperties(List properties) { + this.properties = properties; + } + + /** + * Retrives the Property based on the provided property name + * @param propertyName has the name of the Property to be retrieved + * @return retrieved {@link Property} + */ + public Property getPropertyByName(String propertyName) { + for (Property property : properties) { + if (propertyName.equals(property.getName())) { + return property; + } + } + return null; + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java new file mode 100644 index 0000000000..8a86a0c406 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.exception; + +/** + * Exception that will be thrown during SMS Sender Management + */ +public class SMSSenderException extends Exception { + + private static final long serialVersionUID = 3570365211845277909L; + + public SMSSenderException(String msg, Exception nestedEx) { + super(msg, nestedEx); + } + + public SMSSenderException(String message, Throwable cause) { + super(message, cause); + } + + public SMSSenderException(String msg) { + super(msg); + } + + public SMSSenderException() { + super(); + } + + public SMSSenderException(Throwable cause) { + super(cause); + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java new file mode 100644 index 0000000000..34b283384f --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.common.spi; + +import io.entgra.sms.mgt.common.bean.SMSMessage; +import io.entgra.sms.mgt.common.exception.SMSSenderException; + +/** + * Manages the sending of SMS. + * This interface can be implemented by SMS Senders and specific implementation can be done + * depending on the SMS Sender. + */ +public interface SMSSender { + + /** + * Responsible for sending SMS. + * This method can be implemented by the relevant SMS Senders for specific sender related implementation. + * @param smsMessage which has data on the SMS to be send + * @throws SMSSenderException catches all other exception and {@link SMSSenderException} is thrown + */ + void sendSMS(SMSMessage smsMessage) throws SMSSenderException; +} diff --git a/components/sms-mgt/pom.xml b/components/sms-mgt/pom.xml new file mode 100644 index 0000000000..4a0d9a4e8f --- /dev/null +++ b/components/sms-mgt/pom.xml @@ -0,0 +1,44 @@ + + + + + + + org.wso2.carbon.devicemgt + carbon-devicemgt + 4.1.12-SNAPSHOT + ../../pom.xml + + + 4.0.0 + sms-mgt + pom + Entgra IoT - SMS Management Component + http://entgra.io + + + + io.entgra.sms.mgt.core + io.entgra.sms.mgt.common + io.entgra.sms.mgt.api + + + From d4f5188f3d0d841f24bce2bc798dfde08e60d8ea Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:07:39 +0530 Subject: [PATCH 02/13] Implement SMS configuration file loading and initialization --- .../core/config/SMSConfigurationManager.java | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java new file mode 100644 index 0000000000..bf90872d9b --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.core.config; + +import io.entgra.sms.mgt.common.SMSMgtConstants; +import io.entgra.sms.mgt.common.config.SMSConfiguration; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.w3c.dom.Document; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; +import org.wso2.carbon.device.mgt.core.util.DeviceManagerUtil; +import org.wso2.carbon.utils.CarbonUtils; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.File; + +/** + * Responsible for the SMS configuration initialization. + */ +public class SMSConfigurationManager { + + private static final Log log = LogFactory.getLog(SMSConfigurationManager.class); + private static SMSConfigurationManager smsConfigurationManager; + private SMSConfiguration smsConfiguration; + private static final String SMS_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator + + SMSMgtConstants.SMS_CONFIG_XML_NAME; + + /** + * Retrieve an instance of {@link SMSConfigurationManager} + * @return an instance of {@link SMSConfigurationManager} + */ + public static SMSConfigurationManager getInstance() { + if (smsConfigurationManager == null) { + synchronized (SMSConfigurationManager.class) { + if (smsConfigurationManager == null) { + smsConfigurationManager = new SMSConfigurationManager(); + } + } + } + return smsConfigurationManager; + } + + /** + * Initialize the SMS Configuration through the provided configuration location + * @param configLocation has the path of the SMS configuration file + * @throws DeviceManagementException throws when there are any errors during the initialization of + * SMS configuration + */ + public synchronized void initConfig(String configLocation) throws DeviceManagementException { + try { + File smsConfig = new File(configLocation); + Document doc = DeviceManagerUtil.convertToDocument(smsConfig); + + /* Un-marshaling SMS configuration */ + JAXBContext smsContext = JAXBContext.newInstance(SMSConfiguration.class); + Unmarshaller unmarshaller = smsContext.createUnmarshaller(); + this.smsConfiguration = (SMSConfiguration) unmarshaller.unmarshal(doc); + } catch (JAXBException e) { + String msg = "Error occurred while initializing SMS config '" + configLocation + "'"; + log.error(msg, e); + throw new DeviceManagementException(msg, e); + } + } + + /** + * Initialize the SMS Configuration through the sms-config.xml file in the SMS_CONFIG_PATH + * @throws DeviceManagementException throws when there are any errors during the initialization of + * SMS configuration + */ + public void initConfig() throws DeviceManagementException { + this.initConfig(SMS_CONFIG_PATH); + } + + /** + * Retrieves the initialized {@link SMSConfiguration} + * @return the initialized {@link SMSConfiguration} + */ + public SMSConfiguration getSMSConfig() { + return smsConfiguration; + } +} From 8b98b7e9deecc098afde73051c60c5b34051e2d1 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:08:41 +0530 Subject: [PATCH 03/13] Initialize sms-config.xml file during service activation --- .../sms-mgt/io.entgra.sms.mgt.core/pom.xml | 132 ++++++++++++++++++ .../core/internal/SMSMgtServiceComponent.java | 55 ++++++++ 2 files changed, 187 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.core/pom.xml create mode 100644 components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/pom.xml b/components/sms-mgt/io.entgra.sms.mgt.core/pom.xml new file mode 100644 index 0000000000..09cc5826cb --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.core/pom.xml @@ -0,0 +1,132 @@ + + + + + + + org.wso2.carbon.devicemgt + sms-mgt + 4.1.12-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.sms.mgt.core + bundle + Entgra IoT - SMS Management Core + Entgra IoT - SMS Management Core + http://entgra.io + + + + + org.apache.felix + maven-scr-plugin + + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.artifactId} + ${project.artifactId} + ${carbon.device.mgt.version} + SMS Management Core Bundle + io.entgra.sms.mgt.core.internal + + io.entgra.sms.mgt.common.*, + javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, + javax.xml.bind.annotation, + javax.xml.bind, + org.apache.commons.lang, + org.wso2.carbon, + org.wso2.carbon.device.mgt.common.*, + org.wso2.carbon.device.mgt.core.* + + + !io.entgra.sms.mgt.core.internal, + io.entgra.sms.mgt.core.* + + * + + + + + + + + + org.wso2.carbon + org.wso2.carbon.logging + provided + + + org.wso2.carbon + org.wso2.carbon.core + provided + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.common + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.core + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + provided + + + + + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java new file mode 100644 index 0000000000..849a76d59c --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.core.internal; + +import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.osgi.service.component.ComponentContext; + +/** + * @scr.component + * name="io.entgra.sms.mgt.core.internal.SMSMgtServiceComponent" immediate="true" + */ +public class SMSMgtServiceComponent { + + private static final Log log = LogFactory.getLog(SMSMgtServiceComponent.class); + + protected void activate(ComponentContext ctx) { + + if (log.isDebugEnabled()) { + log.debug("Activating SMS Management Service Component"); + } + try { + SMSConfigurationManager.getInstance().initConfig(); + + if (log.isDebugEnabled()) { + log.debug("SMS Management Service Component has been successfully activated"); + } + } catch (Throwable e) { + log.error("Error occurred while activating SMS Management Service Component", e); + } + } + + protected void deactivate(ComponentContext ctx) { + if (log.isDebugEnabled()) { + log.debug("De-activating SMS Management Service Component"); + } + } +} From bbfb0584d0e73cc595d44e8b737aa484478e5793 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:09:10 +0530 Subject: [PATCH 04/13] Implement SMS sender factory to retrieve instance of SMS sender --- .../entgra/sms/mgt/core/SMSSenderFactory.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java new file mode 100644 index 0000000000..dd451075d6 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.core; + +import io.entgra.sms.mgt.common.config.SMSGateway; +import io.entgra.sms.mgt.common.spi.SMSSender; +import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Factory class to retrieve the relevant SMSSender based on SMS Configuration. + * There can be multiple SMSSender Implementation and an instance of that specific SMSSender can be + * created and retrieved via this factory class. + */ +public class SMSSenderFactory { + + private static final Log log = LogFactory.getLog(SMSSenderFactory.class); + + /** + * Retrieve the SMSSender based on the default SMS Gateway in SMS configuration. + * @return an instance of {@link SMSSender} + */ + public static SMSSender getSMSSender() { + SMSGateway smsGateway = SMSConfigurationManager.getInstance().getSMSConfig().getDefaultSMSGateway(); + if (smsGateway != null) { + return getSMSSender(smsGateway.getExtensionClass()); + } + return null; + } + + /** + * Retrieve the SMSSender based on the provided extension class name. + * @param extensionClass has the class name of the implemented SMSSender using which + * an instance of SMSSender is created + * @return an instance of {@link SMSSender} + */ + public static SMSSender getSMSSender(String extensionClass) { + if (StringUtils.isNotBlank(extensionClass)) { + try { + Class clz = Class.forName(extensionClass); + return (SMSSender) clz.newInstance(); + } catch (ClassNotFoundException e) { + log.error("Extension class '" + extensionClass + "' cannot be located", e); + } catch (IllegalAccessException e) { + log.error("Can't access the class '" + extensionClass + + "' or its nullary constructor is not accessible", e); + } catch (InstantiationException e) { + log.error("Extension class '" + extensionClass + "' instantiation is failed", e); + } + } + return null; + } +} From cb2221693e7ad673a9b1e26b62fea89671de0f3e Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:09:30 +0530 Subject: [PATCH 05/13] Add sample SMS Sender implementation --- .../sms/mgt/core/impl/SampleSenderImpl.java | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java new file mode 100644 index 0000000000..c223ad92cd --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.core.impl; + +import io.entgra.sms.mgt.common.bean.SMSMessage; +import io.entgra.sms.mgt.common.config.SMSGateway; +import io.entgra.sms.mgt.common.exception.SMSSenderException; +import io.entgra.sms.mgt.common.spi.SMSSender; +import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * Sample sender class on how to implement the SMSSender + */ +public class SampleSenderImpl implements SMSSender { + + private static final Log log = LogFactory.getLog(SampleSenderImpl.class); + + @Override + public void sendSMS(SMSMessage smsMessage) throws SMSSenderException { + + //Retrieve the default (isDefault=true) SMS Gateway in the SMS configuration in sms-config.xml + SMSGateway smsGateway = SMSConfigurationManager.getInstance().getSMSConfig().getDefaultSMSGateway(); + + //Retrieve the SMS Gateway by passing the Gateway name + smsGateway = SMSConfigurationManager.getInstance().getSMSConfig().getSMSGateway("sample"); + + //Retrieve the properties in the SMS Gateway by passing the property name + String sampleProperty = smsGateway.getPropertyByName("sample-property").getValue(); + + if (log.isDebugEnabled()) { + log.debug("This is a Sample Sender Implementation and the property value retrieved is '" + + sampleProperty + "'"); + } + + //If any exception is catched, wrap and throw as SMSSenderException + } +} From 1f25e7af91379448f1a7fa536043a95b936149af Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:11:05 +0530 Subject: [PATCH 06/13] Implement SMS configuration API to update changes of the sms-config file --- .../sms-mgt/io.entgra.sms.mgt.api/pom.xml | 224 ++++++++++++++++++ .../ConfigurationManagementService.java | 118 +++++++++ .../api/service/addons/ApiOriginFilter.java | 48 ++++ .../addons/GsonMessageBodyHandler.java | 85 +++++++ .../ConfigurationManagementServiceImpl.java | 52 ++++ .../webapp/META-INF/webapp-classloading.xml | 35 +++ .../src/main/webapp/WEB-INF/cxf-servlet.xml | 55 +++++ .../src/main/webapp/WEB-INF/web.xml | 88 +++++++ 8 files changed, 705 insertions(+) create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/pom.xml create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml create mode 100644 components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml b/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml new file mode 100644 index 0000000000..587153c06d --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml @@ -0,0 +1,224 @@ + + + + + + + org.wso2.carbon.devicemgt + sms-mgt + 4.1.12-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.sms.mgt.api + war + Entgra IoT - SMS Management Core + Entgra IoT - SMS Management API + http://entgra.io + + + + + maven-compiler-plugin + + 1.8 + 1.8 + + + + maven-war-plugin + + WEB-INF/lib/*cxf*.jar + api#sms-mgt#v1.0 + + + + org.jacoco + jacoco-maven-plugin + + ${basedir}/target/coverage-reports/jacoco-unit.exec + + + + jacoco-initialize + + prepare-agent + + + + jacoco-site + test + + report + + + ${basedir}/target/coverage-reports/jacoco-unit.exec + ${basedir}/target/coverage-reports/site + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + file:src/test/resources/log4j.properties + + + src/test/resources/testng.xml + + + + + + + + + deploy + + compile + + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + compile + + run + + + + + + + + + + + + + + + + + + client + + test + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + + test + + java + + + + + + + + + + + + org.apache.cxf + cxf-rt-frontend-jaxws + provided + + + org.apache.cxf + cxf-rt-frontend-jaxrs + provided + + + org.apache.cxf + cxf-rt-transports-http + provided + + + javax.servlet + javax.servlet-api + provided + + + javax.ws.rs + javax.ws.rs-api + provided + + + io.swagger + swagger-annotations + + + io.swagger + swagger-jaxrs + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + + + org.slf4j + slf4j-api + + + org.wso2.orbit.com.fasterxml.jackson.core + jackson-core + + + + + org.wso2.carbon.devicemgt + org.wso2.carbon.apimgt.annotations + provided + + + org.wso2.carbon + org.wso2.carbon.logging + provided + + + org.wso2.carbon.devicemgt + org.wso2.carbon.device.mgt.common + provided + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.core + provided + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.common + provided + + + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java new file mode 100644 index 0000000000..d987b8149c --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.api.service; + +import io.entgra.sms.mgt.common.SMSMgtConstants; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; +import io.swagger.annotations.Extension; +import io.swagger.annotations.ExtensionProperty; +import io.swagger.annotations.Info; +import io.swagger.annotations.ResponseHeader; +import io.swagger.annotations.SwaggerDefinition; +import io.swagger.annotations.Tag; +import org.wso2.carbon.apimgt.annotations.api.Scope; +import org.wso2.carbon.apimgt.annotations.api.Scopes; + +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@SwaggerDefinition( + info = @Info( + version = "1.0.0", + title = "", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = "name", value = "ConfigurationManagementService"), + @ExtensionProperty(name = "context", value = "/api/sms-mgt/v1.0/configuration"), + }) + } + ), + tags = { + @Tag(name = "sms_management", description = "") + } +) +@Path("/configuration") +@Api(value = "Configuration Management", description = "The general SMS configuration management capabilities " + + "are exposed through this API.") +@Produces(MediaType.APPLICATION_JSON) +@Consumes(MediaType.APPLICATION_JSON) +@Scopes(scopes = { + @Scope( + name = "View configurations", + description = "", + key = "perm:sms-mgt:view-configuration", + permissions = {"/sms-mgt/platform-configurations/view"} + ) +}) +public interface ConfigurationManagementService { + + @GET + @ApiOperation( + produces = MediaType.APPLICATION_JSON, + httpMethod = "GET", + value = "Reload SMS Configuration", + notes = "Reload SMS Configuration in sms-mgt.xml file", + tags = "SMS Configuration Management", + extensions = { + @Extension(properties = { + @ExtensionProperty(name = SMSMgtConstants.SCOPE, value = "perm:sms-mgt:view-configuration") + }) + } + ) + @ApiResponses( + value = { + @ApiResponse( + code = 200, + message = "OK. \n Successfully reloaded SMS configurations.", + responseContainer = "List", + 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. \n Empty body because the client already has the latest " + + "version of the requested resource."), + @ApiResponse( + code = 406, + message = "Not Acceptable.\n The requested media type is not supported."), + @ApiResponse( + code = 500, + message = "Internal Server Error. \n Server error occurred while fetching the general " + + "platform configurations.") + }) + Response reloadConfiguration(); +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java new file mode 100644 index 0000000000..461a1574ef --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.api.service.addons; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiOriginFilter implements Filter { + + public void doFilter(ServletRequest request, ServletResponse response, + FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + res.addHeader("Access-Control-Allow-Origin", "*"); + res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); + res.addHeader("Access-Control-Allow-Headers", "Content-Type"); + chain.doFilter(request, response); + } + + public void destroy() { + //do nothing + } + + public void init(FilterConfig filterConfig) throws ServletException { + //do nothing + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java new file mode 100644 index 0000000000..6a6a640b36 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.api.service.addons; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +import javax.ws.rs.WebApplicationException; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.MultivaluedMap; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; + +public class GsonMessageBodyHandler { + + public static final String DATE_FORMAT = "EEE, d MMM yyyy HH:mm:ss Z"; + private Gson gson; + private static final String UTF_8 = "UTF-8"; + + public boolean isReadable(Class aClass, Type type, Annotation[] annotations, MediaType mediaType) { + return true; + } + + private Gson getGson() { + if (gson == null) { + final GsonBuilder gsonBuilder = new GsonBuilder(); + gson = gsonBuilder.setDateFormat(DATE_FORMAT).create(); + } + return gson; + } + + public Object readFrom(Class objectClass, Type type, Annotation[] annotations, MediaType mediaType, + MultivaluedMap stringStringMultivaluedMap, InputStream entityStream) + throws IOException, WebApplicationException { + + InputStreamReader reader = new InputStreamReader(entityStream, "UTF-8"); + + try { + return getGson().fromJson(reader, type); + } finally { + reader.close(); + } + } + + public boolean isWriteable(Class aClass, Type type, Annotation[] annotations, MediaType mediaType) { + return true; + } + + public long getSize(Object o, Class aClass, Type type, Annotation[] annotations, MediaType mediaType) { + return -1; + } + + public void writeTo(Object object, Class aClass, Type type, Annotation[] annotations, MediaType mediaType, + MultivaluedMap stringObjectMultivaluedMap, OutputStream entityStream) + throws IOException, WebApplicationException { + + OutputStreamWriter writer = new OutputStreamWriter(entityStream, UTF_8); + try { + getGson().toJson(object, type, writer); + } finally { + writer.close(); + } + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java new file mode 100644 index 0000000000..38b46fba87 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2021, Entgra (Pvt) Ltd. (http://www.entgra.io) All Rights Reserved. + * + * Entgra (Pvt) Ltd. 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 io.entgra.sms.mgt.api.service.impl; + +import io.entgra.sms.mgt.api.service.ConfigurationManagementService; +import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.core.Response; + +@Path("/configuration") +public class ConfigurationManagementServiceImpl implements ConfigurationManagementService { + + private static final Log log = LogFactory.getLog(ConfigurationManagementServiceImpl.class); + + @Path("/reload") + @GET + @Override + public Response reloadConfiguration() { + if (log.isDebugEnabled()) { + log.debug("Reloading SMS Configuration in file sms-config.xml"); + } + try { + SMSConfigurationManager.getInstance().initConfig(); + } catch (DeviceManagementException e) { + String msg = "Error occurred while reloading SMS Configuration"; + log.error(msg, e); + return Response.serverError().entity(msg).build(); + } + return Response.ok().entity("Successfully reloaded SMS Configuration in file sms-config.xml ").build(); + } +} diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml new file mode 100644 index 0000000000..d0d7a01621 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml @@ -0,0 +1,35 @@ + + + + + + + + + false + + + CXF,Carbon + diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml new file mode 100644 index 0000000000..5fb71d8484 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..dda9411ac4 --- /dev/null +++ b/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,88 @@ + + + + Admin-Webapp + + JAX-WS/JAX-RS Device Management Endpoint + JAX-WS/JAX-RS Servlet + CXFServlet + + org.apache.cxf.transport.servlet.CXFServlet + + + + swagger.security.filter + ApiAuthorizationFilterImpl + + 1 + + + CXFServlet + /* + + + 60 + + + + doAuthentication + true + + + + nonSecuredEndPoints + + + + + + managed-api-enabled + true + + + managed-api-owner + admin + + + isSharedWithAllTenants + true + + + + + + SMSMgt-Admin + /* + + + CONFIDENTIAL + + + + + ApiOriginFilter + io.entgra.sms.mgt.api.service.addons.ApiOriginFilter + + + + ApiOriginFilter + /* + + + From 442d7411402a0ec9f550535b9225f6b5a1341430 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:11:53 +0530 Subject: [PATCH 07/13] Add SMS mgt servicer feature --- .../io.entgra.sms.mgt.server.feature/pom.xml | 116 ++++++++++++++++++ .../src/main/resources/conf/sms-config.xml | 34 +++++ .../src/main/resources/p2.inf | 4 + features/sms-mgt/pom.xml | 41 +++++++ 4 files changed, 195 insertions(+) create mode 100644 features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml create mode 100644 features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml create mode 100644 features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf create mode 100644 features/sms-mgt/pom.xml diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml b/features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml new file mode 100644 index 0000000000..f53e6de8f2 --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml @@ -0,0 +1,116 @@ + + + + + + + org.wso2.carbon.devicemgt + sms-mgt-feature + 4.1.12-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.sms.mgt.server.feature + pom + 4.1.12-SNAPSHOT + Entgra IoT - SMS Management Server Feature + https://entgra.io + This feature contains the core bundles required for Back-end SMS Management functionality + + + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.core + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.common + + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + ${carbon.p2.plugin.version} + + + p2-feature-generation + package + + p2-feature-gen + + + io.entgra.sms.mgt.server + ../../../features/etc/feature.properties + + + org.wso2.carbon.p2.category.type:server + org.eclipse.equinox.p2.type.group:false + + + + + org.wso2.carbon.devicemgt:io.entgra.sms.mgt.core:${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt:io.entgra.sms.mgt.common:${carbon.device.mgt.version} + + + + + + + + + + + + + diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml b/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml new file mode 100644 index 0000000000..ddf2e86567 --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + sample + +94 + 160 + + + + diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf b/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..d5943e7fda --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf @@ -0,0 +1,4 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.sms.mgt.server_${feature.version}/conf/sms-config.xml,target:${installFolder}/../../conf/sms-config.xml,overwrite:true);\ + +instructions.unconfigure = \ diff --git a/features/sms-mgt/pom.xml b/features/sms-mgt/pom.xml new file mode 100644 index 0000000000..63f0b6dbfc --- /dev/null +++ b/features/sms-mgt/pom.xml @@ -0,0 +1,41 @@ + + + + + + + org.wso2.carbon.devicemgt + carbon-devicemgt + 4.1.12-SNAPSHOT + ../../pom.xml + + + 4.0.0 + sms-mgt-feature + pom + Entgra IoT - SMS Management Feature + http://entgra.io + + io.entgra.sms.mgt.server.feature + io.entgra.sms.mgt.api.feature + + + From 5539a8d6799772e648cfb5a948346827a0b309ba Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:12:09 +0530 Subject: [PATCH 08/13] Add SMS mgt API feature --- .../io.entgra.sms.mgt.api.feature/pom.xml | 123 ++++++++++++++++++ .../src/main/resources/build.properties | 1 + .../src/main/resources/p2.inf | 3 + 3 files changed, 127 insertions(+) create mode 100644 features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml create mode 100644 features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties create mode 100644 features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml b/features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml new file mode 100644 index 0000000000..976b42937c --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml @@ -0,0 +1,123 @@ + + + + + + + org.wso2.carbon.devicemgt + sms-mgt-feature + 4.1.12-SNAPSHOT + ../pom.xml + + + 4.0.0 + io.entgra.sms.mgt.api.feature + pom + 4.1.12-SNAPSHOT + Entgra IoT - SMS Management API Feature + https://entgra.io + This feature contains the APIs required for SMS Management + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + sms-mgt-copy + package + + copy + + + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.api + ${project.version} + war + true + + ${project.build.directory}/maven-shared-archive-resources/webapps + + api#sms-mgt#v1.0.war + + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-resources + generate-resources + + copy-resources + + + src/main/resources + + + resources + + build.properties + p2.inf + + + + + + + + + org.wso2.maven + carbon-p2-plugin + + + p2-feature-generation + package + + p2-feature-gen + + + io.entgra.sms.mgt.api + ../../../features/etc/feature.properties + + + + org.wso2.carbon.p2.category.type:server + + org.eclipse.equinox.p2.type.group:false + + + + + + + + + + + diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties b/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties new file mode 100644 index 0000000000..9c86577d76 --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties @@ -0,0 +1 @@ +custom = true diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf b/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..8ed8daa469 --- /dev/null +++ b/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.sms.mgt.api_${feature.version}/webapps/api#sms-mgt#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#sms-mgt#v1.0.war,overwrite:true);\ From b3919ae4e9c3295b77fb02cc2b83ac5e0d5a3d1a Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:12:34 +0530 Subject: [PATCH 09/13] Add sms_management tag to allowed tag list for application register --- .../carbon/apimgt/application/extension/api/util/APIUtil.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java index fdd2e5bb2d..da763043ea 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java @@ -47,6 +47,7 @@ public class APIUtil { private static final String DEFAULT_APP_MGT_REVIEW_MGT_TAG = "review_management"; private static final String DEFAULT_APP_MGT_SUB_MGT_TAG = "subscription_management"; private static final String DEFAULT_ANALYTICS_ARTIFACT_TAG = "analytics_artifacts_management"; + private static final String DEFAULT_SMS_MGT_TAG = "sms_management"; public static final String PERMISSION_PROPERTY_NAME = "name"; @@ -116,6 +117,7 @@ public class APIUtil { allowedApisTags.add(DEFAULT_APP_MGT_REVIEW_MGT_TAG); allowedApisTags.add(DEFAULT_APP_MGT_SUB_MGT_TAG); allowedApisTags.add(DEFAULT_ANALYTICS_ARTIFACT_TAG); + allowedApisTags.add(DEFAULT_SMS_MGT_TAG); return allowedApisTags; } From 2896a771636c0ae53d5d3db5fb148106bc5f5930 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Mon, 15 Feb 2021 22:13:11 +0530 Subject: [PATCH 10/13] Add SMS mgt component and feature to root pom --- pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pom.xml b/pom.xml index 129faec6fe..9276f0c579 100644 --- a/pom.xml +++ b/pom.xml @@ -46,6 +46,7 @@ components/webapp-authenticator-framework components/email-sender components/ui-request-interceptor + components/sms-mgt features/device-mgt features/apimgt-extensions features/application-mgt @@ -58,6 +59,7 @@ features/ui-request-interceptor features/jwt-client features/device-mgt-extensions + features/sms-mgt @@ -383,6 +385,16 @@ io.entgra.server.bootup.heartbeat.beacon ${carbon.device.mgt.version} + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.core + ${carbon.device.mgt.version} + + + org.wso2.carbon.devicemgt + io.entgra.sms.mgt.common + ${carbon.device.mgt.version} + From 2aa751de23ba703be22873f0181d17027a3b5811 Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Tue, 16 Feb 2021 18:58:00 +0530 Subject: [PATCH 11/13] Change the structure from sms-mgt to sms-handler to have within transport-mgt --- components/transport-mgt/pom.xml | 22 +++++++++++++++++++ .../pom.xml | 12 +++++----- .../ConfigurationManagementService.java | 16 +++++++------- .../api/service/addons/ApiOriginFilter.java | 2 +- .../addons/GsonMessageBodyHandler.java | 2 +- .../ConfigurationManagementServiceImpl.java | 6 ++--- .../webapp/META-INF/webapp-classloading.xml | 0 .../src/main/webapp/WEB-INF/cxf-servlet.xml | 4 ++-- .../src/main/webapp/WEB-INF/web.xml | 2 +- .../pom.xml | 6 ++--- .../handler/common/SMSHandlerConstants.java} | 4 ++-- .../sms/handler}/common/bean/SMSMessage.java | 2 +- .../sms/handler}/common/config/Property.java | 2 +- .../common/config/SMSConfiguration.java | 2 +- .../handler}/common/config/SMSGateway.java | 2 +- .../common/exception/SMSSenderException.java | 2 +- .../sms/handler}/common/spi/SMSSender.java | 6 ++--- .../pom.xml | 14 ++++++------ .../sms/handler}/core/SMSSenderFactory.java | 8 +++---- .../core/config/SMSConfigurationManager.java | 8 +++---- .../handler}/core/impl/SampleSenderImpl.java | 12 +++++----- .../internal/SMSHandlerServiceComponent.java} | 18 +++++++-------- .../sms-handler}/pom.xml | 12 +++++----- .../src/main/resources/p2.inf | 3 --- .../src/main/resources/p2.inf | 4 ---- features/transport-mgt/pom.xml | 21 ++++++++++++++++++ .../pom.xml | 12 +++++----- .../src/main/resources/build.properties | 0 .../src/main/resources/p2.inf | 3 +++ .../pom.xml | 16 +++++++------- .../src/main/resources/conf/sms-config.xml | 2 +- .../src/main/resources/p2.inf | 4 ++++ .../sms-handler}/pom.xml | 11 +++++----- pom.xml | 8 +++---- 34 files changed, 146 insertions(+), 102 deletions(-) create mode 100644 components/transport-mgt/pom.xml rename components/{sms-mgt/io.entgra.sms.mgt.api => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api}/pom.xml (95%) rename components/{sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler}/api/service/ConfigurationManagementService.java (88%) rename components/{sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler}/api/service/addons/ApiOriginFilter.java (96%) rename components/{sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler}/api/service/addons/GsonMessageBodyHandler.java (97%) rename components/{sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler}/api/service/impl/ConfigurationManagementServiceImpl.java (88%) rename components/{sms-mgt/io.entgra.sms.mgt.api => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api}/src/main/webapp/META-INF/webapp-classloading.xml (100%) rename components/{sms-mgt/io.entgra.sms.mgt.api => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api}/src/main/webapp/WEB-INF/cxf-servlet.xml (90%) rename components/{sms-mgt/io.entgra.sms.mgt.api => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api}/src/main/webapp/WEB-INF/web.xml (96%) rename components/{sms-mgt/io.entgra.sms.mgt.common => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common}/pom.xml (95%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/SMSHandlerConstants.java} (65%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/bean/SMSMessage.java (96%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/config/Property.java (95%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/config/SMSConfiguration.java (97%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/config/SMSGateway.java (97%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/exception/SMSSenderException.java (95%) rename components/{sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler}/common/spi/SMSSender.java (86%) rename components/{sms-mgt/io.entgra.sms.mgt.core => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core}/pom.xml (90%) rename components/{sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler}/core/SMSSenderFactory.java (91%) rename components/{sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler}/core/config/SMSConfigurationManager.java (93%) rename components/{sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler}/core/impl/SampleSenderImpl.java (81%) rename components/{sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/internal/SMSHandlerServiceComponent.java} (64%) rename components/{sms-mgt => transport-mgt/sms-handler}/pom.xml (79%) delete mode 100644 features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf delete mode 100644 features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf create mode 100644 features/transport-mgt/pom.xml rename features/{sms-mgt/io.entgra.sms.mgt.api.feature => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature}/pom.xml (91%) rename features/{sms-mgt/io.entgra.sms.mgt.api.feature => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature}/src/main/resources/build.properties (100%) create mode 100644 features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/p2.inf rename features/{sms-mgt/io.entgra.sms.mgt.server.feature => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature}/pom.xml (87%) rename features/{sms-mgt/io.entgra.sms.mgt.server.feature => transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature}/src/main/resources/conf/sms-config.xml (91%) create mode 100644 features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf rename features/{sms-mgt => transport-mgt/sms-handler}/pom.xml (80%) diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml new file mode 100644 index 0000000000..9794bb77ca --- /dev/null +++ b/components/transport-mgt/pom.xml @@ -0,0 +1,22 @@ + + + + carbon-devicemgt + org.wso2.carbon.devicemgt + 4.1.12-SNAPSHOT + ../../pom.xml + + + 4.0.0 + transport-mgt + pom + Entgra IoT - Transport Component + http://entgra.io + + + sms-handler + + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml similarity index 95% rename from components/sms-mgt/io.entgra.sms.mgt.api/pom.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml index 587153c06d..2804324cc5 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt - sms-mgt + sms-handler 4.1.12-SNAPSHOT ../pom.xml 4.0.0 - io.entgra.sms.mgt.api + io.entgra.transport.mgt.sms.handler.api war Entgra IoT - SMS Management Core Entgra IoT - SMS Management API @@ -48,7 +48,7 @@ maven-war-plugin WEB-INF/lib/*cxf*.jar - api#sms-mgt#v1.0 + api#sms-handler#v1.0 @@ -112,7 +112,7 @@ - + @@ -211,12 +211,12 @@ org.wso2.carbon.devicemgt - io.entgra.sms.mgt.core + io.entgra.transport.mgt.sms.handler.core provided org.wso2.carbon.devicemgt - io.entgra.sms.mgt.common + io.entgra.transport.mgt.sms.handler.common provided diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java similarity index 88% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java index d987b8149c..3a771222c7 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/ConfigurationManagementService.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/ConfigurationManagementService.java @@ -16,9 +16,9 @@ * under the License. */ -package io.entgra.sms.mgt.api.service; +package io.entgra.transport.mgt.sms.handler.api.service; -import io.entgra.sms.mgt.common.SMSMgtConstants; +import io.entgra.transport.mgt.sms.handler.common.SMSHandlerConstants; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; @@ -46,12 +46,12 @@ import javax.ws.rs.core.Response; extensions = { @Extension(properties = { @ExtensionProperty(name = "name", value = "ConfigurationManagementService"), - @ExtensionProperty(name = "context", value = "/api/sms-mgt/v1.0/configuration"), + @ExtensionProperty(name = "context", value = "/api/sms-handler/v1.0/configuration"), }) } ), tags = { - @Tag(name = "sms_management", description = "") + @Tag(name = "transport_management", description = "") } ) @Path("/configuration") @@ -63,8 +63,8 @@ import javax.ws.rs.core.Response; @Scope( name = "View configurations", description = "", - key = "perm:sms-mgt:view-configuration", - permissions = {"/sms-mgt/platform-configurations/view"} + key = "perm:sms-handler:view-configuration", + permissions = {"/sms-handler/platform-configurations/view"} ) }) public interface ConfigurationManagementService { @@ -74,11 +74,11 @@ public interface ConfigurationManagementService { produces = MediaType.APPLICATION_JSON, httpMethod = "GET", value = "Reload SMS Configuration", - notes = "Reload SMS Configuration in sms-mgt.xml file", + notes = "Reload SMS Configuration in sms-config.xml file", tags = "SMS Configuration Management", extensions = { @Extension(properties = { - @ExtensionProperty(name = SMSMgtConstants.SCOPE, value = "perm:sms-mgt:view-configuration") + @ExtensionProperty(name = SMSHandlerConstants.SCOPE, value = "perm:sms-handler:view-configuration") }) } ) diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/ApiOriginFilter.java similarity index 96% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/ApiOriginFilter.java index 461a1574ef..867636638b 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/ApiOriginFilter.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/ApiOriginFilter.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.api.service.addons; +package io.entgra.transport.mgt.sms.handler.api.service.addons; import javax.servlet.Filter; import javax.servlet.FilterChain; diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/GsonMessageBodyHandler.java similarity index 97% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/GsonMessageBodyHandler.java index 6a6a640b36..9917fc119b 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/addons/GsonMessageBodyHandler.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/addons/GsonMessageBodyHandler.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.api.service.addons; +package io.entgra.transport.mgt.sms.handler.api.service.addons; import com.google.gson.Gson; import com.google.gson.GsonBuilder; diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/impl/ConfigurationManagementServiceImpl.java similarity index 88% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/impl/ConfigurationManagementServiceImpl.java index 38b46fba87..f849161df7 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/java/io/entgra/sms/mgt/api/service/impl/ConfigurationManagementServiceImpl.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/java/io/entgra/transport/mgt/sms/handler/api/service/impl/ConfigurationManagementServiceImpl.java @@ -16,10 +16,10 @@ * under the License. */ -package io.entgra.sms.mgt.api.service.impl; +package io.entgra.transport.mgt.sms.handler.api.service.impl; -import io.entgra.sms.mgt.api.service.ConfigurationManagementService; -import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import io.entgra.transport.mgt.sms.handler.api.service.ConfigurationManagementService; +import io.entgra.transport.mgt.sms.handler.core.config.SMSConfigurationManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException; diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml similarity index 100% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/META-INF/webapp-classloading.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/META-INF/webapp-classloading.xml diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/cxf-servlet.xml similarity index 90% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/cxf-servlet.xml index 5fb71d8484..8c3cefe9e4 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/cxf-servlet.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/cxf-servlet.xml @@ -49,7 +49,7 @@ - - + + diff --git a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/web.xml similarity index 96% rename from components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/web.xml index dda9411ac4..e2e3f78aac 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.api/src/main/webapp/WEB-INF/web.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api/src/main/webapp/WEB-INF/web.xml @@ -77,7 +77,7 @@ ApiOriginFilter - io.entgra.sms.mgt.api.service.addons.ApiOriginFilter + io.entgra.transport.mgt.sms.handler.api.service.addons.ApiOriginFilter diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml similarity index 95% rename from components/sms-mgt/io.entgra.sms.mgt.common/pom.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml index 6595066646..328b0425c7 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt - sms-mgt + sms-handler 4.1.12-SNAPSHOT ../pom.xml 4.0.0 - io.entgra.sms.mgt.common + io.entgra.transport.mgt.sms.handler.common bundle Entgra IoT - SMS Management Common Entgra IoT - SMS Management Common @@ -48,7 +48,7 @@ ${carbon.device.mgt.version} SMS Management Common Bundle - io.entgra.sms.mgt.common.* + io.entgra.transport.mgt.sms.handler.common.* io.swagger.annotations; version="${swagger.annotations.version}"; resolution:=optional, diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/SMSHandlerConstants.java similarity index 65% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/SMSHandlerConstants.java index cbe46d742e..c5b5e62066 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/SMSMgtConstants.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/SMSHandlerConstants.java @@ -1,9 +1,9 @@ -package io.entgra.sms.mgt.common; +package io.entgra.transport.mgt.sms.handler.common; /** * This class holds SMS Management Constants */ -public final class SMSMgtConstants { +public final class SMSHandlerConstants { public static final String SCOPE = "scope"; public static final String SMS_CONFIG_XML_NAME = "sms-config.xml"; diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/bean/SMSMessage.java similarity index 96% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/bean/SMSMessage.java index 23cde039b9..f7e33116bb 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/bean/SMSMessage.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/bean/SMSMessage.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.common.bean; +package io.entgra.transport.mgt.sms.handler.common.bean; import io.swagger.annotations.ApiModelProperty; diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/Property.java similarity index 95% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/Property.java index de667cfd11..f5a3195ae1 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/Property.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/Property.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.common.config; +package io.entgra.transport.mgt.sms.handler.common.config; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSConfiguration.java similarity index 97% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSConfiguration.java index 7992533c76..ffc6952db6 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSConfiguration.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSConfiguration.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.common.config; +package io.entgra.transport.mgt.sms.handler.common.config; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSGateway.java similarity index 97% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSGateway.java index 988faca8e5..a1e031328b 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/config/SMSGateway.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/config/SMSGateway.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.common.config; +package io.entgra.transport.mgt.sms.handler.common.config; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/exception/SMSSenderException.java similarity index 95% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/exception/SMSSenderException.java index 8a86a0c406..06a3b4cde4 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/exception/SMSSenderException.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/exception/SMSSenderException.java @@ -16,7 +16,7 @@ * under the License. */ -package io.entgra.sms.mgt.common.exception; +package io.entgra.transport.mgt.sms.handler.common.exception; /** * Exception that will be thrown during SMS Sender Management diff --git a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/spi/SMSSender.java similarity index 86% rename from components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/spi/SMSSender.java index 34b283384f..25fa4210fe 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.common/src/main/java/io/entgra/sms/mgt/common/spi/SMSSender.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.common/src/main/java/io/entgra/transport/mgt/sms/handler/common/spi/SMSSender.java @@ -16,10 +16,10 @@ * under the License. */ -package io.entgra.sms.mgt.common.spi; +package io.entgra.transport.mgt.sms.handler.common.spi; -import io.entgra.sms.mgt.common.bean.SMSMessage; -import io.entgra.sms.mgt.common.exception.SMSSenderException; +import io.entgra.transport.mgt.sms.handler.common.bean.SMSMessage; +import io.entgra.transport.mgt.sms.handler.common.exception.SMSSenderException; /** * Manages the sending of SMS. diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/pom.xml b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml similarity index 90% rename from components/sms-mgt/io.entgra.sms.mgt.core/pom.xml rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml index 09cc5826cb..d512053fec 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.core/pom.xml +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt - sms-mgt + sms-handler 4.1.12-SNAPSHOT ../pom.xml 4.0.0 - io.entgra.sms.mgt.core + io.entgra.transport.mgt.sms.handler.core bundle Entgra IoT - SMS Management Core Entgra IoT - SMS Management Core @@ -77,9 +77,9 @@ ${project.artifactId} ${carbon.device.mgt.version} SMS Management Core Bundle - io.entgra.sms.mgt.core.internal + io.entgra.transport.mgt.sms.handler.core.internal - io.entgra.sms.mgt.common.*, + io.entgra.transport.mgt.sms.handler.common.*, javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional, javax.xml.bind.annotation, javax.xml.bind, @@ -89,8 +89,8 @@ org.wso2.carbon.device.mgt.core.* - !io.entgra.sms.mgt.core.internal, - io.entgra.sms.mgt.core.* + !io.entgra.transport.mgt.sms.handler.core.internal, + io.entgra.transport.mgt.sms.handler.core.* * @@ -112,7 +112,7 @@ org.wso2.carbon.devicemgt - io.entgra.sms.mgt.common + io.entgra.transport.mgt.sms.handler.common provided diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/SMSSenderFactory.java similarity index 91% rename from components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/SMSSenderFactory.java index dd451075d6..27e7bc6802 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/SMSSenderFactory.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/SMSSenderFactory.java @@ -16,11 +16,11 @@ * under the License. */ -package io.entgra.sms.mgt.core; +package io.entgra.transport.mgt.sms.handler.core; -import io.entgra.sms.mgt.common.config.SMSGateway; -import io.entgra.sms.mgt.common.spi.SMSSender; -import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import io.entgra.transport.mgt.sms.handler.common.config.SMSGateway; +import io.entgra.transport.mgt.sms.handler.common.spi.SMSSender; +import io.entgra.transport.mgt.sms.handler.core.config.SMSConfigurationManager; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/config/SMSConfigurationManager.java similarity index 93% rename from components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/config/SMSConfigurationManager.java index bf90872d9b..aa1d64dde8 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/config/SMSConfigurationManager.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/config/SMSConfigurationManager.java @@ -16,10 +16,10 @@ * under the License. */ -package io.entgra.sms.mgt.core.config; +package io.entgra.transport.mgt.sms.handler.core.config; -import io.entgra.sms.mgt.common.SMSMgtConstants; -import io.entgra.sms.mgt.common.config.SMSConfiguration; +import io.entgra.transport.mgt.sms.handler.common.SMSHandlerConstants; +import io.entgra.transport.mgt.sms.handler.common.config.SMSConfiguration; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Document; @@ -41,7 +41,7 @@ public class SMSConfigurationManager { private static SMSConfigurationManager smsConfigurationManager; private SMSConfiguration smsConfiguration; private static final String SMS_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator - + SMSMgtConstants.SMS_CONFIG_XML_NAME; + + SMSHandlerConstants.SMS_CONFIG_XML_NAME; /** * Retrieve an instance of {@link SMSConfigurationManager} diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/impl/SampleSenderImpl.java similarity index 81% rename from components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/impl/SampleSenderImpl.java index c223ad92cd..a585433b95 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/impl/SampleSenderImpl.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/impl/SampleSenderImpl.java @@ -16,13 +16,13 @@ * under the License. */ -package io.entgra.sms.mgt.core.impl; +package io.entgra.transport.mgt.sms.handler.core.impl; -import io.entgra.sms.mgt.common.bean.SMSMessage; -import io.entgra.sms.mgt.common.config.SMSGateway; -import io.entgra.sms.mgt.common.exception.SMSSenderException; -import io.entgra.sms.mgt.common.spi.SMSSender; -import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import io.entgra.transport.mgt.sms.handler.common.bean.SMSMessage; +import io.entgra.transport.mgt.sms.handler.common.config.SMSGateway; +import io.entgra.transport.mgt.sms.handler.common.exception.SMSSenderException; +import io.entgra.transport.mgt.sms.handler.common.spi.SMSSender; +import io.entgra.transport.mgt.sms.handler.core.config.SMSConfigurationManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/internal/SMSHandlerServiceComponent.java similarity index 64% rename from components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java rename to components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/internal/SMSHandlerServiceComponent.java index 849a76d59c..abaafee2b5 100644 --- a/components/sms-mgt/io.entgra.sms.mgt.core/src/main/java/io/entgra/sms/mgt/core/internal/SMSMgtServiceComponent.java +++ b/components/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.core/src/main/java/io/entgra/transport/mgt/sms/handler/core/internal/SMSHandlerServiceComponent.java @@ -16,40 +16,40 @@ * under the License. */ -package io.entgra.sms.mgt.core.internal; +package io.entgra.transport.mgt.sms.handler.core.internal; -import io.entgra.sms.mgt.core.config.SMSConfigurationManager; +import io.entgra.transport.mgt.sms.handler.core.config.SMSConfigurationManager; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.osgi.service.component.ComponentContext; /** * @scr.component - * name="io.entgra.sms.mgt.core.internal.SMSMgtServiceComponent" immediate="true" + * name="io.entgra.transport.mgt.sms.handler.core.internal.SMSHandlerServiceComponent" immediate="true" */ -public class SMSMgtServiceComponent { +public class SMSHandlerServiceComponent { - private static final Log log = LogFactory.getLog(SMSMgtServiceComponent.class); + private static final Log log = LogFactory.getLog(SMSHandlerServiceComponent.class); protected void activate(ComponentContext ctx) { if (log.isDebugEnabled()) { - log.debug("Activating SMS Management Service Component"); + log.debug("Activating SMS Handler Service Component"); } try { SMSConfigurationManager.getInstance().initConfig(); if (log.isDebugEnabled()) { - log.debug("SMS Management Service Component has been successfully activated"); + log.debug("SMS Handler Service Component has been successfully activated"); } } catch (Throwable e) { - log.error("Error occurred while activating SMS Management Service Component", e); + log.error("Error occurred while activating SMS Handler Service Component", e); } } protected void deactivate(ComponentContext ctx) { if (log.isDebugEnabled()) { - log.debug("De-activating SMS Management Service Component"); + log.debug("De-activating SMS Handler Service Component"); } } } diff --git a/components/sms-mgt/pom.xml b/components/transport-mgt/sms-handler/pom.xml similarity index 79% rename from components/sms-mgt/pom.xml rename to components/transport-mgt/sms-handler/pom.xml index 4a0d9a4e8f..04710ad6d8 100644 --- a/components/sms-mgt/pom.xml +++ b/components/transport-mgt/sms-handler/pom.xml @@ -23,22 +23,22 @@ org.wso2.carbon.devicemgt - carbon-devicemgt + transport-mgt 4.1.12-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 - sms-mgt + sms-handler pom Entgra IoT - SMS Management Component http://entgra.io - io.entgra.sms.mgt.core - io.entgra.sms.mgt.common - io.entgra.sms.mgt.api + io.entgra.transport.mgt.sms.handler.core + io.entgra.transport.mgt.sms.handler.common + io.entgra.transport.mgt.sms.handler.api diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf b/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf deleted file mode 100644 index 8ed8daa469..0000000000 --- a/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,3 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.sms.mgt.api_${feature.version}/webapps/api#sms-mgt#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#sms-mgt#v1.0.war,overwrite:true);\ diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf b/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf deleted file mode 100644 index d5943e7fda..0000000000 --- a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/p2.inf +++ /dev/null @@ -1,4 +0,0 @@ -instructions.configure = \ -org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.sms.mgt.server_${feature.version}/conf/sms-config.xml,target:${installFolder}/../../conf/sms-config.xml,overwrite:true);\ - -instructions.unconfigure = \ diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml new file mode 100644 index 0000000000..d49c085590 --- /dev/null +++ b/features/transport-mgt/pom.xml @@ -0,0 +1,21 @@ + + + + carbon-devicemgt + org.wso2.carbon.devicemgt + 4.1.12-SNAPSHOT + ../../pom.xml + + + 4.0.0 + transport-mgt-feature + pom + Entgra IoT - Transport Feature + http://entgra.io + + + sms-handler + + diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml similarity index 91% rename from features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml rename to features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml index 976b42937c..5cc5414343 100644 --- a/features/sms-mgt/io.entgra.sms.mgt.api.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt - sms-mgt-feature + sms-handler-feature 4.1.12-SNAPSHOT ../pom.xml 4.0.0 - io.entgra.sms.mgt.api.feature + io.entgra.transport.mgt.sms.handler.api.feature pom 4.1.12-SNAPSHOT Entgra IoT - SMS Management API Feature @@ -52,14 +52,14 @@ org.wso2.carbon.devicemgt - io.entgra.sms.mgt.api + io.entgra.transport.mgt.sms.handler.api ${project.version} war true ${project.build.directory}/maven-shared-archive-resources/webapps - api#sms-mgt#v1.0.war + api#sms-handler#v1.0.war @@ -102,8 +102,8 @@ p2-feature-gen - io.entgra.sms.mgt.api - ../../../features/etc/feature.properties + io.entgra.transport.mgt.sms.handler.api + ../../../etc/feature.properties diff --git a/features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/build.properties similarity index 100% rename from features/sms-mgt/io.entgra.sms.mgt.api.feature/src/main/resources/build.properties rename to features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/build.properties diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/p2.inf b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..ee42576e14 --- /dev/null +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.api.feature/src/main/resources/p2.inf @@ -0,0 +1,3 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../deployment/server/webapps/);\ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.api_${feature.version}/webapps/api#sms-handler#v1.0.war,target:${installFolder}/../../deployment/server/webapps/api#sms-handler#v1.0.war,overwrite:true);\ diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml similarity index 87% rename from features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml rename to features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml index f53e6de8f2..cf28c0b803 100644 --- a/features/sms-mgt/io.entgra.sms.mgt.server.feature/pom.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/pom.xml @@ -23,13 +23,13 @@ org.wso2.carbon.devicemgt - sms-mgt-feature + sms-handler-feature 4.1.12-SNAPSHOT ../pom.xml 4.0.0 - io.entgra.sms.mgt.server.feature + io.entgra.transport.mgt.sms.handler.server.feature pom 4.1.12-SNAPSHOT Entgra IoT - SMS Management Server Feature @@ -40,11 +40,11 @@ org.wso2.carbon.devicemgt - io.entgra.sms.mgt.core + io.entgra.transport.mgt.sms.handler.core org.wso2.carbon.devicemgt - io.entgra.sms.mgt.common + io.entgra.transport.mgt.sms.handler.common @@ -87,8 +87,8 @@ p2-feature-gen - io.entgra.sms.mgt.server - ../../../features/etc/feature.properties + io.entgra.transport.mgt.sms.handler.server + ../../../etc/feature.properties org.wso2.carbon.p2.category.type:server @@ -97,10 +97,10 @@ - org.wso2.carbon.devicemgt:io.entgra.sms.mgt.core:${carbon.device.mgt.version} + org.wso2.carbon.devicemgt:io.entgra.transport.mgt.sms.handler.core:${carbon.device.mgt.version} - org.wso2.carbon.devicemgt:io.entgra.sms.mgt.common:${carbon.device.mgt.version} + org.wso2.carbon.devicemgt:io.entgra.transport.mgt.sms.handler.common:${carbon.device.mgt.version} diff --git a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf/sms-config.xml similarity index 91% rename from features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml rename to features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf/sms-config.xml index ddf2e86567..d225f912ec 100644 --- a/features/sms-mgt/io.entgra.sms.mgt.server.feature/src/main/resources/conf/sms-config.xml +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf/sms-config.xml @@ -22,7 +22,7 @@ - + sample diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf new file mode 100644 index 0000000000..af486db59b --- /dev/null +++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf @@ -0,0 +1,4 @@ +instructions.configure = \ +org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.server_${feature.version}/conf/sms-config.xml,target:${installFolder}/../../conf/sms-config.xml,overwrite:true);\ + +instructions.unconfigure = \ diff --git a/features/sms-mgt/pom.xml b/features/transport-mgt/sms-handler/pom.xml similarity index 80% rename from features/sms-mgt/pom.xml rename to features/transport-mgt/sms-handler/pom.xml index 63f0b6dbfc..c0c005f32c 100644 --- a/features/sms-mgt/pom.xml +++ b/features/transport-mgt/sms-handler/pom.xml @@ -23,19 +23,20 @@ org.wso2.carbon.devicemgt - carbon-devicemgt + transport-mgt-feature 4.1.12-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 - sms-mgt-feature + sms-handler-feature pom Entgra IoT - SMS Management Feature http://entgra.io + - io.entgra.sms.mgt.server.feature - io.entgra.sms.mgt.api.feature + io.entgra.transport.mgt.sms.handler.server.feature + io.entgra.transport.mgt.sms.handler.api.feature diff --git a/pom.xml b/pom.xml index 9276f0c579..7bb19f9f1f 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ components/webapp-authenticator-framework components/email-sender components/ui-request-interceptor - components/sms-mgt + components/transport-mgt features/device-mgt features/apimgt-extensions features/application-mgt @@ -59,7 +59,7 @@ features/ui-request-interceptor features/jwt-client features/device-mgt-extensions - features/sms-mgt + features/transport-mgt @@ -387,12 +387,12 @@ org.wso2.carbon.devicemgt - io.entgra.sms.mgt.core + io.entgra.transport.mgt.sms.handler.core ${carbon.device.mgt.version} org.wso2.carbon.devicemgt - io.entgra.sms.mgt.common + io.entgra.transport.mgt.sms.handler.common ${carbon.device.mgt.version} From 0ad203e72091081e577f51d9b624740ec0e6552a Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Tue, 16 Feb 2021 19:00:00 +0530 Subject: [PATCH 12/13] Add transport_management tag --- .../carbon/apimgt/application/extension/api/util/APIUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java index da763043ea..43490e0c83 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.application.extension.api/src/main/java/org/wso2/carbon/apimgt/application/extension/api/util/APIUtil.java @@ -47,7 +47,7 @@ public class APIUtil { private static final String DEFAULT_APP_MGT_REVIEW_MGT_TAG = "review_management"; private static final String DEFAULT_APP_MGT_SUB_MGT_TAG = "subscription_management"; private static final String DEFAULT_ANALYTICS_ARTIFACT_TAG = "analytics_artifacts_management"; - private static final String DEFAULT_SMS_MGT_TAG = "sms_management"; + private static final String DEFAULT_TRANSPORT_MGT_TAG = "transport_management"; public static final String PERMISSION_PROPERTY_NAME = "name"; @@ -117,7 +117,7 @@ public class APIUtil { allowedApisTags.add(DEFAULT_APP_MGT_REVIEW_MGT_TAG); allowedApisTags.add(DEFAULT_APP_MGT_SUB_MGT_TAG); allowedApisTags.add(DEFAULT_ANALYTICS_ARTIFACT_TAG); - allowedApisTags.add(DEFAULT_SMS_MGT_TAG); + allowedApisTags.add(DEFAULT_TRANSPORT_MGT_TAG); return allowedApisTags; } From 789ee553e6275af6f777279135f88f3d4e077d8d Mon Sep 17 00:00:00 2001 From: Saad Sahibjan Date: Tue, 16 Feb 2021 19:12:57 +0530 Subject: [PATCH 13/13] Move email-sender component to tranport-mgt --- .../email-sender/org.wso2.carbon.email.sender.core/pom.xml | 0 .../sender/core/ContentProcessingInterruptedException.java | 0 .../wso2/carbon/email/sender/core/ContentProviderInfo.java | 0 .../wso2/carbon/email/sender/core/EmailContentProvider.java | 0 .../carbon/email/sender/core/EmailContentProviderFactory.java | 0 .../java/org/wso2/carbon/email/sender/core/EmailContext.java | 0 .../java/org/wso2/carbon/email/sender/core/EmailData.java | 0 .../org/wso2/carbon/email/sender/core/EmailSenderConfig.java | 0 .../sender/core/EmailSenderConfigurationFailedException.java | 0 .../org/wso2/carbon/email/sender/core/EmailSenderUtil.java | 0 .../carbon/email/sender/core/EmailSendingFailedException.java | 0 .../sender/core/EmailTransportNotConfiguredException.java | 0 .../email/sender/core/InvalidConfigurationStateException.java | 0 .../carbon/email/sender/core/RegistryBasedResourceLoader.java | 0 .../java/org/wso2/carbon/email/sender/core/TypedValue.java | 0 .../email/sender/core/VelocityBasedEmailContentProvider.java | 0 .../core/internal/EmailSenderAxis2ConfigContextObserver.java | 0 .../email/sender/core/internal/EmailSenderDataHolder.java | 0 .../sender/core/internal/EmailSenderServiceComponent.java | 0 .../wso2/carbon/email/sender/core/internal/EmailUtils.java | 0 .../carbon/email/sender/core/service/EmailSenderService.java | 0 .../email/sender/core/service/EmailSenderServiceImpl.java | 0 .../src/test/resources/log4j.properties | 0 .../src/test/resources/testng.xml | 0 .../org.wso2.carbon.email.sender.core/velocity.log | 0 components/{ => transport-mgt}/email-sender/pom.xml | 4 ++-- components/transport-mgt/pom.xml | 1 + .../email-sender/org.wso2.carbon.email.sender.feature/pom.xml | 2 +- .../src/main/resources/build.properties | 0 .../src/main/resources/conf/email-sender-config.xml | 0 .../email/templates/default-enrollment-invitation.vm | 0 .../src/main/resources/email/templates/default.vm | 0 .../resources/email/templates/policy-violating-notifier.vm | 0 .../src/main/resources/email/templates/user-enrollment.vm | 0 .../src/main/resources/email/templates/user-registration.vm | 0 .../src/main/resources/email/templates/user-verify.vm | 0 .../src/main/resources/email/templates/user-welcome.vm | 0 .../src/main/resources/p2.inf | 0 features/{ => transport-mgt}/email-sender/pom.xml | 4 ++-- features/transport-mgt/pom.xml | 1 + pom.xml | 2 -- 41 files changed, 7 insertions(+), 7 deletions(-) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/pom.xml (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProcessingInterruptedException.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProviderInfo.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProvider.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProviderFactory.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContext.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailData.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfig.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfigurationFailedException.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderUtil.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSendingFailedException.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailTransportNotConfiguredException.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/InvalidConfigurationStateException.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/RegistryBasedResourceLoader.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/TypedValue.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/VelocityBasedEmailContentProvider.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderAxis2ConfigContextObserver.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderDataHolder.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailUtils.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderService.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderServiceImpl.java (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/log4j.properties (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/testng.xml (100%) rename components/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.core/velocity.log (100%) rename components/{ => transport-mgt}/email-sender/pom.xml (92%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/pom.xml (97%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/build.properties (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf/email-sender-config.xml (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/policy-violating-notifier.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-verify.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-welcome.vm (100%) rename features/{ => transport-mgt}/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf (100%) rename features/{ => transport-mgt}/email-sender/pom.xml (93%) diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/pom.xml b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/pom.xml rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/pom.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProcessingInterruptedException.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProcessingInterruptedException.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProcessingInterruptedException.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProcessingInterruptedException.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProviderInfo.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProviderInfo.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProviderInfo.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/ContentProviderInfo.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProvider.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProvider.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProvider.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProvider.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProviderFactory.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProviderFactory.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProviderFactory.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContentProviderFactory.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContext.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContext.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContext.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailContext.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailData.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailData.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailData.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailData.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfig.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfig.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfig.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfig.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfigurationFailedException.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfigurationFailedException.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfigurationFailedException.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderConfigurationFailedException.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderUtil.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderUtil.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderUtil.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSenderUtil.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSendingFailedException.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSendingFailedException.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSendingFailedException.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailSendingFailedException.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailTransportNotConfiguredException.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailTransportNotConfiguredException.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailTransportNotConfiguredException.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/EmailTransportNotConfiguredException.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/InvalidConfigurationStateException.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/InvalidConfigurationStateException.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/InvalidConfigurationStateException.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/InvalidConfigurationStateException.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/RegistryBasedResourceLoader.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/RegistryBasedResourceLoader.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/RegistryBasedResourceLoader.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/RegistryBasedResourceLoader.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/TypedValue.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/TypedValue.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/TypedValue.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/TypedValue.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/VelocityBasedEmailContentProvider.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/VelocityBasedEmailContentProvider.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/VelocityBasedEmailContentProvider.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/VelocityBasedEmailContentProvider.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderAxis2ConfigContextObserver.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderAxis2ConfigContextObserver.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderAxis2ConfigContextObserver.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderAxis2ConfigContextObserver.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderDataHolder.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderDataHolder.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderDataHolder.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderDataHolder.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailSenderServiceComponent.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailUtils.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailUtils.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailUtils.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/internal/EmailUtils.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderService.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderService.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderService.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderService.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderServiceImpl.java b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderServiceImpl.java similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderServiceImpl.java rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/main/java/org/wso2/carbon/email/sender/core/service/EmailSenderServiceImpl.java diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/log4j.properties b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/log4j.properties similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/log4j.properties rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/log4j.properties diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/testng.xml b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/testng.xml similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/testng.xml rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/src/test/resources/testng.xml diff --git a/components/email-sender/org.wso2.carbon.email.sender.core/velocity.log b/components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/velocity.log similarity index 100% rename from components/email-sender/org.wso2.carbon.email.sender.core/velocity.log rename to components/transport-mgt/email-sender/org.wso2.carbon.email.sender.core/velocity.log diff --git a/components/email-sender/pom.xml b/components/transport-mgt/email-sender/pom.xml similarity index 92% rename from components/email-sender/pom.xml rename to components/transport-mgt/email-sender/pom.xml index 23b09390c0..33817efa23 100644 --- a/components/email-sender/pom.xml +++ b/components/transport-mgt/email-sender/pom.xml @@ -21,9 +21,9 @@ org.wso2.carbon.devicemgt - carbon-devicemgt + transport-mgt 4.1.12-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 diff --git a/components/transport-mgt/pom.xml b/components/transport-mgt/pom.xml index 9794bb77ca..2fa7c65c0c 100644 --- a/components/transport-mgt/pom.xml +++ b/components/transport-mgt/pom.xml @@ -17,6 +17,7 @@ sms-handler + email-sender diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml similarity index 97% rename from features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml index 5f14e97427..58bc8c8593 100644 --- a/features/email-sender/org.wso2.carbon.email.sender.feature/pom.xml +++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/pom.xml @@ -87,7 +87,7 @@ org.wso2.carbon.email.sender - ../../../features/etc/feature.properties + ../../../etc/feature.properties org.wso2.carbon.p2.category.type:server diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/build.properties b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/build.properties similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/build.properties rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/build.properties diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf/email-sender-config.xml b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf/email-sender-config.xml similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf/email-sender-config.xml rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf/email-sender-config.xml diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default-enrollment-invitation.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/default.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/policy-violating-notifier.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/policy-violating-notifier.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/policy-violating-notifier.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/policy-violating-notifier.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-enrollment.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-registration.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-verify.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-verify.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-verify.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-verify.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-welcome.vm b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-welcome.vm similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-welcome.vm rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/email/templates/user-welcome.vm diff --git a/features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf similarity index 100% rename from features/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf rename to features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf diff --git a/features/email-sender/pom.xml b/features/transport-mgt/email-sender/pom.xml similarity index 93% rename from features/email-sender/pom.xml rename to features/transport-mgt/email-sender/pom.xml index 7c4f49db26..ea751866fe 100644 --- a/features/email-sender/pom.xml +++ b/features/transport-mgt/email-sender/pom.xml @@ -21,9 +21,9 @@ org.wso2.carbon.devicemgt - carbon-devicemgt + transport-mgt-feature 4.1.12-SNAPSHOT - ../../pom.xml + ../pom.xml 4.0.0 diff --git a/features/transport-mgt/pom.xml b/features/transport-mgt/pom.xml index d49c085590..84148ff7ed 100644 --- a/features/transport-mgt/pom.xml +++ b/features/transport-mgt/pom.xml @@ -17,5 +17,6 @@ sms-handler + email-sender diff --git a/pom.xml b/pom.xml index 7bb19f9f1f..ba74a95be3 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,6 @@ components/policy-mgt components/certificate-mgt components/webapp-authenticator-framework - components/email-sender components/ui-request-interceptor components/transport-mgt features/device-mgt @@ -54,7 +53,6 @@ features/webapp-authenticator-framework features/certificate-mgt features/oauth-extensions - features/email-sender features/heartbeat-management features/ui-request-interceptor features/jwt-client