mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Change the structure from sms-mgt to sms-handler to have within transport-mgt
This commit is contained in:
parent
2896a77163
commit
2aa751de23
22
components/transport-mgt/pom.xml
Normal file
22
components/transport-mgt/pom.xml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>carbon-devicemgt</artifactId>
|
||||||
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>transport-mgt</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Entgra IoT - Transport Component</name>
|
||||||
|
<url>http://entgra.io</url>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>sms-handler</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>sms-mgt</artifactId>
|
<artifactId>sms-handler</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>io.entgra.sms.mgt.api</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.api</artifactId>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>Entgra IoT - SMS Management Core</name>
|
<name>Entgra IoT - SMS Management Core</name>
|
||||||
<description>Entgra IoT - SMS Management API</description>
|
<description>Entgra IoT - SMS Management API</description>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<configuration>
|
<configuration>
|
||||||
<packagingExcludes>WEB-INF/lib/*cxf*.jar</packagingExcludes>
|
<packagingExcludes>WEB-INF/lib/*cxf*.jar</packagingExcludes>
|
||||||
<warName>api#sms-mgt#v1.0</warName>
|
<warName>api#sms-handler#v1.0</warName>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
<tasks>
|
<tasks>
|
||||||
<copy todir="${basedir}/../../../repository/deployment/server/webapps" overwrite="true">
|
<copy todir="${basedir}/../../../repository/deployment/server/webapps" overwrite="true">
|
||||||
<fileset dir="${basedir}/target">
|
<fileset dir="${basedir}/target">
|
||||||
<include name="api#sms-mgt#v1.0.war" />
|
<include name="api#sms-handler#v1.0.war" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
</tasks>
|
</tasks>
|
||||||
@ -211,12 +211,12 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.core</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.core</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.common</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.common</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -16,9 +16,9 @@
|
|||||||
* under the License.
|
* 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.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiResponse;
|
import io.swagger.annotations.ApiResponse;
|
||||||
@ -46,12 +46,12 @@ import javax.ws.rs.core.Response;
|
|||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = "name", value = "ConfigurationManagementService"),
|
@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 = {
|
tags = {
|
||||||
@Tag(name = "sms_management", description = "")
|
@Tag(name = "transport_management", description = "")
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@Path("/configuration")
|
@Path("/configuration")
|
||||||
@ -63,8 +63,8 @@ import javax.ws.rs.core.Response;
|
|||||||
@Scope(
|
@Scope(
|
||||||
name = "View configurations",
|
name = "View configurations",
|
||||||
description = "",
|
description = "",
|
||||||
key = "perm:sms-mgt:view-configuration",
|
key = "perm:sms-handler:view-configuration",
|
||||||
permissions = {"/sms-mgt/platform-configurations/view"}
|
permissions = {"/sms-handler/platform-configurations/view"}
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
public interface ConfigurationManagementService {
|
public interface ConfigurationManagementService {
|
||||||
@ -74,11 +74,11 @@ public interface ConfigurationManagementService {
|
|||||||
produces = MediaType.APPLICATION_JSON,
|
produces = MediaType.APPLICATION_JSON,
|
||||||
httpMethod = "GET",
|
httpMethod = "GET",
|
||||||
value = "Reload SMS Configuration",
|
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",
|
tags = "SMS Configuration Management",
|
||||||
extensions = {
|
extensions = {
|
||||||
@Extension(properties = {
|
@Extension(properties = {
|
||||||
@ExtensionProperty(name = SMSMgtConstants.SCOPE, value = "perm:sms-mgt:view-configuration")
|
@ExtensionProperty(name = SMSHandlerConstants.SCOPE, value = "perm:sms-handler:view-configuration")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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.Filter;
|
||||||
import javax.servlet.FilterChain;
|
import javax.servlet.FilterChain;
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
@ -16,10 +16,10 @@
|
|||||||
* under the License.
|
* 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.transport.mgt.sms.handler.api.service.ConfigurationManagementService;
|
||||||
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.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.exceptions.DeviceManagementException;
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<property name="scan" value="true"/>
|
<property name="scan" value="true"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="configurationManagementService" class="io.entgra.sms.mgt.api.service.impl.ConfigurationManagementServiceImpl"/>
|
<bean id="configurationManagementService" class="io.entgra.transport.mgt.sms.handler.api.service.impl.ConfigurationManagementServiceImpl"/>
|
||||||
<bean id="jsonProvider" class="io.entgra.sms.mgt.api.service.addons.GsonMessageBodyHandler"/>
|
<bean id="jsonProvider" class="io.entgra.transport.mgt.sms.handler.api.service.addons.GsonMessageBodyHandler"/>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
@ -77,7 +77,7 @@
|
|||||||
|
|
||||||
<filter>
|
<filter>
|
||||||
<filter-name>ApiOriginFilter</filter-name>
|
<filter-name>ApiOriginFilter</filter-name>
|
||||||
<filter-class>io.entgra.sms.mgt.api.service.addons.ApiOriginFilter</filter-class>
|
<filter-class>io.entgra.transport.mgt.sms.handler.api.service.addons.ApiOriginFilter</filter-class>
|
||||||
</filter>
|
</filter>
|
||||||
|
|
||||||
<filter-mapping>
|
<filter-mapping>
|
||||||
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>sms-mgt</artifactId>
|
<artifactId>sms-handler</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>io.entgra.sms.mgt.common</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.common</artifactId>
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
<name>Entgra IoT - SMS Management Common</name>
|
<name>Entgra IoT - SMS Management Common</name>
|
||||||
<description>Entgra IoT - SMS Management Common</description>
|
<description>Entgra IoT - SMS Management Common</description>
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
||||||
<Bundle-Description>SMS Management Common Bundle</Bundle-Description>
|
<Bundle-Description>SMS Management Common Bundle</Bundle-Description>
|
||||||
<Export-Package>
|
<Export-Package>
|
||||||
io.entgra.sms.mgt.common.*
|
io.entgra.transport.mgt.sms.handler.common.*
|
||||||
</Export-Package>
|
</Export-Package>
|
||||||
<Import-Package>
|
<Import-Package>
|
||||||
io.swagger.annotations; version="${swagger.annotations.version}"; resolution:=optional,
|
io.swagger.annotations; version="${swagger.annotations.version}"; resolution:=optional,
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package io.entgra.sms.mgt.common;
|
package io.entgra.transport.mgt.sms.handler.common;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class holds SMS Management Constants
|
* This class holds SMS Management Constants
|
||||||
*/
|
*/
|
||||||
public final class SMSMgtConstants {
|
public final class SMSHandlerConstants {
|
||||||
|
|
||||||
public static final String SCOPE = "scope";
|
public static final String SCOPE = "scope";
|
||||||
public static final String SMS_CONFIG_XML_NAME = "sms-config.xml";
|
public static final String SMS_CONFIG_XML_NAME = "sms-config.xml";
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.entgra.sms.mgt.common.bean;
|
package io.entgra.transport.mgt.sms.handler.common.bean;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
@ -16,7 +16,7 @@
|
|||||||
* under the License.
|
* 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
|
* Exception that will be thrown during SMS Sender Management
|
||||||
@ -16,10 +16,10 @@
|
|||||||
* under the License.
|
* 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.transport.mgt.sms.handler.common.bean.SMSMessage;
|
||||||
import io.entgra.sms.mgt.common.exception.SMSSenderException;
|
import io.entgra.transport.mgt.sms.handler.common.exception.SMSSenderException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages the sending of SMS.
|
* Manages the sending of SMS.
|
||||||
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>sms-mgt</artifactId>
|
<artifactId>sms-handler</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>io.entgra.sms.mgt.core</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.core</artifactId>
|
||||||
<packaging>bundle</packaging>
|
<packaging>bundle</packaging>
|
||||||
<name>Entgra IoT - SMS Management Core</name>
|
<name>Entgra IoT - SMS Management Core</name>
|
||||||
<description>Entgra IoT - SMS Management Core</description>
|
<description>Entgra IoT - SMS Management Core</description>
|
||||||
@ -77,9 +77,9 @@
|
|||||||
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
||||||
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
||||||
<Bundle-Description>SMS Management Core Bundle</Bundle-Description>
|
<Bundle-Description>SMS Management Core Bundle</Bundle-Description>
|
||||||
<Private-Package>io.entgra.sms.mgt.core.internal</Private-Package>
|
<Private-Package>io.entgra.transport.mgt.sms.handler.core.internal</Private-Package>
|
||||||
<Import-Package>
|
<Import-Package>
|
||||||
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.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
|
||||||
javax.xml.bind.annotation,
|
javax.xml.bind.annotation,
|
||||||
javax.xml.bind,
|
javax.xml.bind,
|
||||||
@ -89,8 +89,8 @@
|
|||||||
org.wso2.carbon.device.mgt.core.*
|
org.wso2.carbon.device.mgt.core.*
|
||||||
</Import-Package>
|
</Import-Package>
|
||||||
<Export-Package>
|
<Export-Package>
|
||||||
!io.entgra.sms.mgt.core.internal,
|
!io.entgra.transport.mgt.sms.handler.core.internal,
|
||||||
io.entgra.sms.mgt.core.*
|
io.entgra.transport.mgt.sms.handler.core.*
|
||||||
</Export-Package>
|
</Export-Package>
|
||||||
<DynamicImport-Package>*</DynamicImport-Package>
|
<DynamicImport-Package>*</DynamicImport-Package>
|
||||||
</instructions>
|
</instructions>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.common</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.common</artifactId>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -16,11 +16,11 @@
|
|||||||
* under the License.
|
* 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.transport.mgt.sms.handler.common.config.SMSGateway;
|
||||||
import io.entgra.sms.mgt.common.spi.SMSSender;
|
import io.entgra.transport.mgt.sms.handler.common.spi.SMSSender;
|
||||||
import io.entgra.sms.mgt.core.config.SMSConfigurationManager;
|
import io.entgra.transport.mgt.sms.handler.core.config.SMSConfigurationManager;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@ -16,10 +16,10 @@
|
|||||||
* under the License.
|
* 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.transport.mgt.sms.handler.common.SMSHandlerConstants;
|
||||||
import io.entgra.sms.mgt.common.config.SMSConfiguration;
|
import io.entgra.transport.mgt.sms.handler.common.config.SMSConfiguration;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
@ -41,7 +41,7 @@ public class SMSConfigurationManager {
|
|||||||
private static SMSConfigurationManager smsConfigurationManager;
|
private static SMSConfigurationManager smsConfigurationManager;
|
||||||
private SMSConfiguration smsConfiguration;
|
private SMSConfiguration smsConfiguration;
|
||||||
private static final String SMS_CONFIG_PATH = CarbonUtils.getCarbonConfigDirPath() + File.separator
|
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}
|
* Retrieve an instance of {@link SMSConfigurationManager}
|
||||||
@ -16,13 +16,13 @@
|
|||||||
* under the License.
|
* 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.transport.mgt.sms.handler.common.bean.SMSMessage;
|
||||||
import io.entgra.sms.mgt.common.config.SMSGateway;
|
import io.entgra.transport.mgt.sms.handler.common.config.SMSGateway;
|
||||||
import io.entgra.sms.mgt.common.exception.SMSSenderException;
|
import io.entgra.transport.mgt.sms.handler.common.exception.SMSSenderException;
|
||||||
import io.entgra.sms.mgt.common.spi.SMSSender;
|
import io.entgra.transport.mgt.sms.handler.common.spi.SMSSender;
|
||||||
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.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
@ -16,40 +16,40 @@
|
|||||||
* under the License.
|
* 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.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.osgi.service.component.ComponentContext;
|
import org.osgi.service.component.ComponentContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @scr.component
|
* @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) {
|
protected void activate(ComponentContext ctx) {
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Activating SMS Management Service Component");
|
log.debug("Activating SMS Handler Service Component");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
SMSConfigurationManager.getInstance().initConfig();
|
SMSConfigurationManager.getInstance().initConfig();
|
||||||
|
|
||||||
if (log.isDebugEnabled()) {
|
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) {
|
} 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) {
|
protected void deactivate(ComponentContext ctx) {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("De-activating SMS Management Service Component");
|
log.debug("De-activating SMS Handler Service Component");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -23,22 +23,22 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>carbon-devicemgt</artifactId>
|
<artifactId>transport-mgt</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>sms-mgt</artifactId>
|
<artifactId>sms-handler</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Entgra IoT - SMS Management Component</name>
|
<name>Entgra IoT - SMS Management Component</name>
|
||||||
<url>http://entgra.io</url>
|
<url>http://entgra.io</url>
|
||||||
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>io.entgra.sms.mgt.core</module>
|
<module>io.entgra.transport.mgt.sms.handler.core</module>
|
||||||
<module>io.entgra.sms.mgt.common</module>
|
<module>io.entgra.transport.mgt.sms.handler.common</module>
|
||||||
<module>io.entgra.sms.mgt.api</module>
|
<module>io.entgra.transport.mgt.sms.handler.api</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -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);\
|
|
||||||
@ -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 = \
|
|
||||||
21
features/transport-mgt/pom.xml
Normal file
21
features/transport-mgt/pom.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>carbon-devicemgt</artifactId>
|
||||||
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>transport-mgt-feature</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<name>Entgra IoT - Transport Feature</name>
|
||||||
|
<url>http://entgra.io</url>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>sms-handler</module>
|
||||||
|
</modules>
|
||||||
|
</project>
|
||||||
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>sms-mgt-feature</artifactId>
|
<artifactId>sms-handler-feature</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>io.entgra.sms.mgt.api.feature</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.api.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<name>Entgra IoT - SMS Management API Feature</name>
|
<name>Entgra IoT - SMS Management API Feature</name>
|
||||||
@ -52,14 +52,14 @@
|
|||||||
<artifactItems>
|
<artifactItems>
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.api</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
<type>war</type>
|
<type>war</type>
|
||||||
<overWrite>true</overWrite>
|
<overWrite>true</overWrite>
|
||||||
<outputDirectory>
|
<outputDirectory>
|
||||||
${project.build.directory}/maven-shared-archive-resources/webapps
|
${project.build.directory}/maven-shared-archive-resources/webapps
|
||||||
</outputDirectory>
|
</outputDirectory>
|
||||||
<destFileName>api#sms-mgt#v1.0.war</destFileName>
|
<destFileName>api#sms-handler#v1.0.war</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
</artifactItems>
|
</artifactItems>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -102,8 +102,8 @@
|
|||||||
<goal>p2-feature-gen</goal>
|
<goal>p2-feature-gen</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<id>io.entgra.sms.mgt.api</id>
|
<id>io.entgra.transport.mgt.sms.handler.api</id>
|
||||||
<propertiesFile>../../../features/etc/feature.properties
|
<propertiesFile>../../../etc/feature.properties
|
||||||
</propertiesFile>
|
</propertiesFile>
|
||||||
<adviceFile>
|
<adviceFile>
|
||||||
<properties>
|
<properties>
|
||||||
@ -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);\
|
||||||
@ -23,13 +23,13 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>sms-mgt-feature</artifactId>
|
<artifactId>sms-handler-feature</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>io.entgra.sms.mgt.server.feature</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.server.feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<name>Entgra IoT - SMS Management Server Feature</name>
|
<name>Entgra IoT - SMS Management Server Feature</name>
|
||||||
@ -40,11 +40,11 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.core</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.common</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@ -87,8 +87,8 @@
|
|||||||
<goal>p2-feature-gen</goal>
|
<goal>p2-feature-gen</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<id>io.entgra.sms.mgt.server</id>
|
<id>io.entgra.transport.mgt.sms.handler.server</id>
|
||||||
<propertiesFile>../../../features/etc/feature.properties</propertiesFile>
|
<propertiesFile>../../../etc/feature.properties</propertiesFile>
|
||||||
<adviceFile>
|
<adviceFile>
|
||||||
<properties>
|
<properties>
|
||||||
<propertyDef>org.wso2.carbon.p2.category.type:server</propertyDef>
|
<propertyDef>org.wso2.carbon.p2.category.type:server</propertyDef>
|
||||||
@ -97,10 +97,10 @@
|
|||||||
</adviceFile>
|
</adviceFile>
|
||||||
<bundles>
|
<bundles>
|
||||||
<bundleDef>
|
<bundleDef>
|
||||||
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}
|
||||||
</bundleDef>
|
</bundleDef>
|
||||||
<bundleDef>
|
<bundleDef>
|
||||||
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}
|
||||||
</bundleDef>
|
</bundleDef>
|
||||||
</bundles>
|
</bundles>
|
||||||
<importBundles>
|
<importBundles>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<Gateways>
|
<Gateways>
|
||||||
<!-- multiple gateways can be listed and the gateway having the isDefault=true is picked up or gateway
|
<!-- multiple gateways can be listed and the gateway having the isDefault=true is picked up or gateway
|
||||||
extensionClass can be passed and relevant impl can be used-->
|
extensionClass can be passed and relevant impl can be used-->
|
||||||
<Gateway name="sample" extensionClass="io.entgra.sms.mgt.core.impl.SampleSenderImpl" isDefault="true">
|
<Gateway name="sample" extensionClass="io.entgra.transport.mgt.sms.handler.core.impl.SampleSenderImpl" isDefault="true">
|
||||||
<!-- properties can be listed and can be picked up in the relevant implementation class as required-->
|
<!-- properties can be listed and can be picked up in the relevant implementation class as required-->
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="sample-property">sample</Property>
|
<Property name="sample-property">sample</Property>
|
||||||
@ -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 = \
|
||||||
@ -23,19 +23,20 @@
|
|||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>carbon-devicemgt</artifactId>
|
<artifactId>transport-mgt-feature</artifactId>
|
||||||
<version>4.1.12-SNAPSHOT</version>
|
<version>4.1.12-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>sms-mgt-feature</artifactId>
|
<artifactId>sms-handler-feature</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Entgra IoT - SMS Management Feature</name>
|
<name>Entgra IoT - SMS Management Feature</name>
|
||||||
<url>http://entgra.io</url>
|
<url>http://entgra.io</url>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>io.entgra.sms.mgt.server.feature</module>
|
<module>io.entgra.transport.mgt.sms.handler.server.feature</module>
|
||||||
<module>io.entgra.sms.mgt.api.feature</module>
|
<module>io.entgra.transport.mgt.sms.handler.api.feature</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
8
pom.xml
8
pom.xml
@ -46,7 +46,7 @@
|
|||||||
<module>components/webapp-authenticator-framework</module>
|
<module>components/webapp-authenticator-framework</module>
|
||||||
<module>components/email-sender</module>
|
<module>components/email-sender</module>
|
||||||
<module>components/ui-request-interceptor</module>
|
<module>components/ui-request-interceptor</module>
|
||||||
<module>components/sms-mgt</module>
|
<module>components/transport-mgt</module>
|
||||||
<module>features/device-mgt</module>
|
<module>features/device-mgt</module>
|
||||||
<module>features/apimgt-extensions</module>
|
<module>features/apimgt-extensions</module>
|
||||||
<module>features/application-mgt</module>
|
<module>features/application-mgt</module>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
<module>features/ui-request-interceptor</module>
|
<module>features/ui-request-interceptor</module>
|
||||||
<module>features/jwt-client</module>
|
<module>features/jwt-client</module>
|
||||||
<module>features/device-mgt-extensions</module>
|
<module>features/device-mgt-extensions</module>
|
||||||
<module>features/sms-mgt</module>
|
<module>features/transport-mgt</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@ -387,12 +387,12 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.core</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.core</artifactId>
|
||||||
<version>${carbon.device.mgt.version}</version>
|
<version>${carbon.device.mgt.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.wso2.carbon.devicemgt</groupId>
|
<groupId>org.wso2.carbon.devicemgt</groupId>
|
||||||
<artifactId>io.entgra.sms.mgt.common</artifactId>
|
<artifactId>io.entgra.transport.mgt.sms.handler.common</artifactId>
|
||||||
<version>${carbon.device.mgt.version}</version>
|
<version>${carbon.device.mgt.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Device Management dependencies -->
|
<!-- Device Management dependencies -->
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user