refactored task mgt component

ios-user-enrollment
Amalka Subasinghe 2 years ago
parent 721de62362
commit baf7661e9d

@ -103,7 +103,7 @@
org.wso2.carbon.ndatasource.core, org.wso2.carbon.ndatasource.core,
org.wso2.carbon.ntask.core.*, org.wso2.carbon.ntask.core.*,
org.wso2.carbon.ntask.common, org.wso2.carbon.ntask.common,
io.entgra.task.mgt.common.*, io.entgra.device.mgt.core.task.mgt.common.*,
org.apache.commons.collections;version="${commons-collections.version.range}", org.apache.commons.collections;version="${commons-collections.version.range}",
org.wso2.carbon.email.sender.*, org.wso2.carbon.email.sender.*,
io.swagger.annotations.*;resolution:=optional, io.swagger.annotations.*;resolution:=optional,
@ -352,7 +352,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>

@ -19,7 +19,7 @@
package org.wso2.carbon.device.mgt.core.task.impl; package org.wso2.carbon.device.mgt.core.task.impl;
import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException; import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
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.DynamicTaskContext; import org.wso2.carbon.device.mgt.common.DynamicTaskContext;

@ -25,7 +25,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>Entgra IoT - Task Management Common</name> <name>Entgra IoT - Task Management Common</name>
<description>Entgra IoT - Task Management Common</description> <description>Entgra IoT - Task Management Common</description>
@ -44,7 +44,7 @@
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version> <Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Task Management Common Bundle</Bundle-Description> <Bundle-Description>Task Management Common Bundle</Bundle-Description>
<Export-Package> <Export-Package>
io.entgra.task.mgt.common.* io.entgra.device.mgt.core.task.mgt.common.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.bean; package io.entgra.device.mgt.core.task.mgt.common.bean;
import java.util.Map; import java.util.Map;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.constant; package io.entgra.device.mgt.core.task.mgt.common.constant;
public class TaskMgtConstants { public class TaskMgtConstants {
public static final class DataSourceProperties { public static final class DataSourceProperties {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
public class IllegalTransactionStateException extends RuntimeException { public class IllegalTransactionStateException extends RuntimeException {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
public class TaskManagementDAOException extends Exception { public class TaskManagementDAOException extends Exception {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
public class TaskManagementException extends Exception { public class TaskManagementException extends Exception {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
/** /**
* Represents the exception thrown during validating the request. * Represents the exception thrown during validating the request.

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
public class TransactionManagementException extends Exception { public class TransactionManagementException extends Exception {

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.exception; package io.entgra.device.mgt.core.task.mgt.common.exception;
/** /**
* This runtime exception will be thrown if the server has configured with unsupported DB engine. * This runtime exception will be thrown if the server has configured with unsupported DB engine.

@ -15,11 +15,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.common.spi; package io.entgra.device.mgt.core.task.mgt.common.spi;
import io.entgra.task.mgt.common.exception.TaskNotFoundException; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import io.entgra.task.mgt.common.exception.TaskManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskNotFoundException;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementException;
import java.util.List; import java.util.List;

@ -26,7 +26,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.task.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.core</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>Entgra IoT - Task manager Core</name> <name>Entgra IoT - Task manager Core</name>
<description>Entgra IoT - Task manager Core</description> <description>Entgra IoT - Task manager Core</description>
@ -48,7 +48,7 @@
<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>Task Management Core Bundle</Bundle-Description> <Bundle-Description>Task Management Core Bundle</Bundle-Description>
<Private-Package>io.entgra.task.mgt.core.internal</Private-Package> <Private-Package>io.entgra.device.mgt.core.task.mgt.core.internal</Private-Package>
<Import-Package> <Import-Package>
org.osgi.framework.*;version="${imp.package.version.osgi.framework}", org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}", org.osgi.service.*;version="${imp.package.version.osgi.service}",
@ -59,7 +59,7 @@
javax.xml.bind, javax.xml.bind,
javax.sql, javax.sql,
javax.naming, javax.naming,
io.entgra.task.mgt.common.*, io.entgra.device.mgt.core.task.mgt.common.*,
org.wso2.carbon.utils.*, org.wso2.carbon.utils.*,
org.wso2.carbon.ntask.core.*, org.wso2.carbon.ntask.core.*,
org.wso2.carbon.ntask.common, org.wso2.carbon.ntask.common,
@ -72,8 +72,8 @@
io.entgra.server.bootup.heartbeat.beacon.service, io.entgra.server.bootup.heartbeat.beacon.service,
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
!io.entgra.task.mgt.core.internal, !io.entgra.device.mgt.core.task.mgt.core.internal,
io.entgra.task.mgt.core.* io.entgra.device.mgt.core.task.mgt.core.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>
@ -99,7 +99,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

@ -15,11 +15,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.config; package io.entgra.device.mgt.core.task.mgt.core.config;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.core.util.TaskManagementUtil;
import io.entgra.task.mgt.common.exception.TaskManagementException; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.core.util.TaskManagementUtil; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementException;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.utils.CarbonUtils; import org.wso2.carbon.utils.CarbonUtils;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.config; package io.entgra.device.mgt.core.task.mgt.core.config;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.config; package io.entgra.device.mgt.core.task.mgt.core.config;
import io.entgra.task.mgt.core.config.datasource.DataSourceConfig; import io.entgra.device.mgt.core.task.mgt.core.config.datasource.DataSourceConfig;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;

@ -15,7 +15,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.config.datasource; package io.entgra.device.mgt.core.task.mgt.core.config.datasource;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
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.task.mgt.core.config.datasource; package io.entgra.device.mgt.core.task.mgt.core.config.datasource;
import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.*;
import java.util.List; import java.util.List;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao; package io.entgra.device.mgt.core.task.mgt.core.dao;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import io.entgra.task.mgt.common.exception.TaskManagementDAOException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementDAOException;
import java.util.List; import java.util.List;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao; package io.entgra.device.mgt.core.task.mgt.core.dao;
import io.entgra.task.mgt.common.exception.TaskManagementDAOException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementDAOException;
import java.util.Map; import java.util.Map;

@ -15,19 +15,19 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao.common; package io.entgra.device.mgt.core.task.mgt.core.dao.common;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskPropDAO;
import io.entgra.task.mgt.common.exception.IllegalTransactionStateException; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.common.exception.TransactionManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.IllegalTransactionStateException;
import io.entgra.task.mgt.common.exception.UnsupportedDatabaseEngineException; import io.entgra.device.mgt.core.task.mgt.common.exception.TransactionManagementException;
import io.entgra.task.mgt.core.config.datasource.DataSourceConfig; import io.entgra.device.mgt.core.task.mgt.common.exception.UnsupportedDatabaseEngineException;
import io.entgra.task.mgt.core.config.datasource.JNDILookupDefinition; import io.entgra.device.mgt.core.task.mgt.core.config.datasource.DataSourceConfig;
import io.entgra.task.mgt.core.dao.DynamicTaskDAO; import io.entgra.device.mgt.core.task.mgt.core.config.datasource.JNDILookupDefinition;
import io.entgra.task.mgt.core.dao.DynamicTaskPropDAO; import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskDAO;
import io.entgra.task.mgt.core.dao.impl.DynamicTaskDAOImpl; import io.entgra.device.mgt.core.task.mgt.core.dao.impl.DynamicTaskDAOImpl;
import io.entgra.task.mgt.core.dao.impl.DynamicTaskPropDAOImpl; import io.entgra.device.mgt.core.task.mgt.core.dao.impl.DynamicTaskPropDAOImpl;
import io.entgra.task.mgt.core.dao.util.TaskManagementDAOUtil; import io.entgra.device.mgt.core.task.mgt.core.dao.util.TaskManagementDAOUtil;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@ -183,7 +183,7 @@ public class TaskManagementDAOFactory {
"Device Management Repository data source configuration " + "is null and " + "Device Management Repository data source configuration " + "is null and " +
"thus, is not initialized"); "thus, is not initialized");
} }
io.entgra.task.mgt.core.config.datasource.JNDILookupDefinition jndiConfig = config.getJndiLookupDefinition(); JNDILookupDefinition jndiConfig = config.getJndiLookupDefinition();
if (jndiConfig != null) { if (jndiConfig != null) {
if (log.isDebugEnabled()) { if (log.isDebugEnabled()) {
log.debug("Initializing Device Management Repository data source using the JNDI " + log.debug("Initializing Device Management Repository data source using the JNDI " +

@ -15,13 +15,13 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao.impl; package io.entgra.device.mgt.core.task.mgt.core.dao.impl;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.core.dao.common.TaskManagementDAOFactory;
import io.entgra.task.mgt.common.exception.TaskManagementDAOException; import io.entgra.device.mgt.core.task.mgt.core.dao.util.TaskManagementDAOUtil;
import io.entgra.task.mgt.core.dao.DynamicTaskDAO; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import io.entgra.task.mgt.core.dao.common.TaskManagementDAOFactory; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementDAOException;
import io.entgra.task.mgt.core.dao.util.TaskManagementDAOUtil; import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskDAO;
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.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;

@ -15,13 +15,13 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao.impl; package io.entgra.device.mgt.core.task.mgt.core.dao.impl;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskPropDAO;
import io.entgra.task.mgt.common.exception.TaskManagementDAOException; import io.entgra.device.mgt.core.task.mgt.core.dao.common.TaskManagementDAOFactory;
import io.entgra.task.mgt.core.dao.DynamicTaskPropDAO; import io.entgra.device.mgt.core.task.mgt.core.dao.util.TaskManagementDAOUtil;
import io.entgra.task.mgt.core.dao.common.TaskManagementDAOFactory; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.core.dao.util.TaskManagementDAOUtil; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementDAOException;
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.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;

@ -15,9 +15,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.dao.util; package io.entgra.device.mgt.core.task.mgt.core.dao.util;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.internal; package io.entgra.device.mgt.core.task.mgt.core.internal;
import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService;
import io.entgra.task.mgt.common.spi.TaskManagementService; import io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService;
import org.wso2.carbon.ntask.core.service.TaskService; import org.wso2.carbon.ntask.core.service.TaskService;
public class TaskManagerDataHolder { public class TaskManagerDataHolder {

@ -15,15 +15,15 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.internal; package io.entgra.device.mgt.core.task.mgt.core.internal;
import io.entgra.device.mgt.core.task.mgt.core.dao.common.TaskManagementDAOFactory;
import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService;
import io.entgra.task.mgt.core.config.TaskManagementConfig; import io.entgra.device.mgt.core.task.mgt.core.config.TaskManagementConfig;
import io.entgra.task.mgt.core.config.datasource.DataSourceConfig; import io.entgra.device.mgt.core.task.mgt.core.config.datasource.DataSourceConfig;
import io.entgra.task.mgt.common.spi.TaskManagementService; import io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService;
import io.entgra.task.mgt.core.config.TaskConfigurationManager; import io.entgra.device.mgt.core.task.mgt.core.config.TaskConfigurationManager;
import io.entgra.task.mgt.core.dao.common.TaskManagementDAOFactory; import io.entgra.device.mgt.core.task.mgt.core.service.TaskManagementServiceImpl;
import io.entgra.task.mgt.core.service.TaskManagementServiceImpl;
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.framework.BundleContext; import org.osgi.framework.BundleContext;

@ -15,21 +15,21 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.service; package io.entgra.device.mgt.core.task.mgt.core.service;
import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskPropDAO;
import io.entgra.device.mgt.core.task.mgt.core.dao.common.TaskManagementDAOFactory;
import io.entgra.device.mgt.core.task.mgt.core.internal.TaskManagerDataHolder;
import io.entgra.device.mgt.core.task.mgt.core.util.TaskManagementUtil;
import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException; import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.common.exception.TaskManagementDAOException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementDAOException;
import io.entgra.task.mgt.common.exception.TaskManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementException;
import io.entgra.task.mgt.common.exception.TaskNotFoundException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskNotFoundException;
import io.entgra.task.mgt.common.exception.TransactionManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.TransactionManagementException;
import io.entgra.task.mgt.common.spi.TaskManagementService; import io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService;
import io.entgra.task.mgt.core.dao.DynamicTaskDAO; import io.entgra.device.mgt.core.task.mgt.core.dao.DynamicTaskDAO;
import io.entgra.task.mgt.core.dao.DynamicTaskPropDAO;
import io.entgra.task.mgt.core.dao.common.TaskManagementDAOFactory;
import io.entgra.task.mgt.core.internal.TaskManagerDataHolder;
import io.entgra.task.mgt.core.util.TaskManagementUtil;
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;

@ -15,13 +15,13 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.core.util; package io.entgra.device.mgt.core.task.mgt.core.util;
import com.google.gson.Gson; import com.google.gson.Gson;
import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException; import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.common.exception.TaskManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementException;
import io.entgra.task.mgt.core.internal.TaskManagerDataHolder; import io.entgra.device.mgt.core.task.mgt.core.internal.TaskManagerDataHolder;
import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

@ -32,8 +32,8 @@
<url>http://entgra.io</url> <url>http://entgra.io</url>
<modules> <modules>
<module>io.entgra.task.mgt.core</module> <module>io.entgra.device.mgt.core.task.mgt.core</module>
<module>io.entgra.task.mgt.common</module> <module>io.entgra.device.mgt.core.task.mgt.common</module>
</modules> </modules>
</project> </project>

@ -26,7 +26,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.task.mgt.watcher</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.watcher</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>Entgra IoT - Task Watcher </name> <name>Entgra IoT - Task Watcher </name>
<description>Entgra IoT - Task Watcher</description> <description>Entgra IoT - Task Watcher</description>
@ -48,11 +48,11 @@
<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>Task Watcher Bundle</Bundle-Description> <Bundle-Description>Task Watcher Bundle</Bundle-Description>
<Private-Package>io.entgra.task.mgt.watcher.internal</Private-Package> <Private-Package>io.entgra.device.mgt.core.task.mgt.watcher.internal</Private-Package>
<Import-Package> <Import-Package>
io.entgra.server.bootup.heartbeat.beacon.*, io.entgra.server.bootup.heartbeat.beacon.*,
io.entgra.task.mgt.common.*, io.entgra.device.mgt.core.task.mgt.common.*,
io.entgra.task.mgt.core.*, io.entgra.device.mgt.core.task.mgt.core.*,
org.apache.commons.logging, org.apache.commons.logging,
org.osgi.framework.*;version="${imp.package.version.osgi.framework}", org.osgi.framework.*;version="${imp.package.version.osgi.framework}",
org.osgi.service.*;version="${imp.package.version.osgi.service}", org.osgi.service.*;version="${imp.package.version.osgi.service}",
@ -64,7 +64,7 @@
org.wso2.carbon.user.core.*, org.wso2.carbon.user.core.*,
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
io.entgra.task.mgt.watcher.* io.entgra.device.mgt.core.task.mgt.watcher.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>
@ -90,12 +90,12 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.core</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -133,6 +133,12 @@
<artifactId>org.wso2.carbon.utils</artifactId> <artifactId>org.wso2.carbon.utils</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!--nTask dependencies-->
<dependency>
<groupId>org.wso2.carbon.commons</groupId>
<artifactId>org.wso2.carbon.ntask.core</artifactId>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

@ -16,14 +16,14 @@
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.watcher; package io.entgra.device.mgt.core.task.mgt.watcher;
import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException; import io.entgra.server.bootup.heartbeat.beacon.exception.HeartBeatManagementException;
import io.entgra.task.mgt.common.bean.DynamicTask; import io.entgra.device.mgt.core.task.mgt.common.bean.DynamicTask;
import io.entgra.task.mgt.common.constant.TaskMgtConstants; import io.entgra.device.mgt.core.task.mgt.common.constant.TaskMgtConstants;
import io.entgra.task.mgt.common.exception.TaskManagementException; import io.entgra.device.mgt.core.task.mgt.common.exception.TaskManagementException;
import io.entgra.task.mgt.core.util.TaskManagementUtil; import io.entgra.device.mgt.core.task.mgt.core.util.TaskManagementUtil;
import io.entgra.task.mgt.watcher.internal.TaskWatcherDataHolder; import io.entgra.device.mgt.core.task.mgt.watcher.internal.TaskWatcherDataHolder;
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.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;

@ -15,10 +15,10 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.watcher.internal; package io.entgra.device.mgt.core.task.mgt.watcher.internal;
import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService;
import io.entgra.task.mgt.common.spi.TaskManagementService; import io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService;
import org.wso2.carbon.ntask.core.service.TaskService; import org.wso2.carbon.ntask.core.service.TaskService;
import org.wso2.carbon.user.core.service.RealmService; import org.wso2.carbon.user.core.service.RealmService;

@ -15,13 +15,13 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.task.mgt.watcher.internal; package io.entgra.device.mgt.core.task.mgt.watcher.internal;
import io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService;
import io.entgra.device.mgt.core.task.mgt.core.config.TaskConfigurationManager;
import io.entgra.device.mgt.core.task.mgt.core.config.TaskManagementConfig;
import io.entgra.device.mgt.core.task.mgt.watcher.IoTSStartupHandler;
import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService; import io.entgra.server.bootup.heartbeat.beacon.service.HeartBeatManagementService;
import io.entgra.task.mgt.common.spi.TaskManagementService;
import io.entgra.task.mgt.core.config.TaskConfigurationManager;
import io.entgra.task.mgt.core.config.TaskManagementConfig;
import io.entgra.task.mgt.watcher.IoTSStartupHandler;
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.framework.BundleContext; import org.osgi.framework.BundleContext;
@ -32,7 +32,7 @@ import org.wso2.carbon.user.core.service.RealmService;
/** /**
* @scr.component * @scr.component
* name="io.entgra.task.mgt.watcher" immediate="true" * name="io.entgra.device.mgt.core.task.mgt.watcher" immediate="true"
* @scr.reference name="app.mgt.ntask.component" * @scr.reference name="app.mgt.ntask.component"
* interface="org.wso2.carbon.ntask.core.service.TaskService" * interface="org.wso2.carbon.ntask.core.service.TaskService"
* cardinality="1..1" * cardinality="1..1"
@ -40,7 +40,7 @@ import org.wso2.carbon.user.core.service.RealmService;
* bind="setTaskService" * bind="setTaskService"
* unbind="unsetTaskService" * unbind="unsetTaskService"
* @scr.reference name="io.entgra.task.mgt.service" * @scr.reference name="io.entgra.task.mgt.service"
* interface="io.entgra.task.mgt.common.spi.TaskManagementService" * interface="io.entgra.device.mgt.core.task.mgt.common.spi.TaskManagementService"
* cardinality="1..1" * cardinality="1..1"
* policy="dynamic" * policy="dynamic"
* bind="setTaskMgtService" * bind="setTaskMgtService"

@ -32,7 +32,7 @@
<url>http://entgra.io</url> <url>http://entgra.io</url>
<modules> <modules>
<module>io.entgra.task.mgt.watcher</module> <module>io.entgra.device.mgt.core.task.mgt.watcher</module>
</modules> </modules>
</project> </project>

@ -34,11 +34,11 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
@ -91,13 +91,13 @@
</adviceFile> </adviceFile>
<bundles> <bundles>
<bundleDef> <bundleDef>
io.entgra.device.mgt.core:io.entgra.task.mgt.core:${carbon.device.mgt.version} io.entgra.device.mgt.core:io.entgra.device.mgt.core.task.mgt.core:${carbon.device.mgt.version}
</bundleDef> </bundleDef>
<bundleDef> <bundleDef>
io.entgra.device.mgt.core:io.entgra.task.mgt.common:${carbon.device.mgt.version} io.entgra.device.mgt.core:io.entgra.device.mgt.core.task.mgt.common:${carbon.device.mgt.version}
</bundleDef> </bundleDef>
<bundleDef> <bundleDef>
io.entgra.device.mgt.core:io.entgra.task.mgt.watcher:${carbon.device.mgt.version} io.entgra.device.mgt.core:io.entgra.device.mgt.core.task.mgt.watcher:${carbon.device.mgt.version}
</bundleDef> </bundleDef>
</bundles> </bundles>
</configuration> </configuration>

@ -47,7 +47,7 @@
<!-- <module>components/analytics-mgt</module>--> <!-- <module>components/analytics-mgt</module>-->
<!-- <module>components/webapp-authenticator-framework</module>--> <!-- <module>components/webapp-authenticator-framework</module>-->
<!-- <module>components/logger</module>--> <!-- <module>components/logger</module>-->
<!-- <module>components/task-mgt</module>--> <module>components/task-mgt</module>
<module>components/subtype-mgt</module> <module>components/subtype-mgt</module>
<module>components/tenant-mgt</module> <module>components/tenant-mgt</module>
<module>components/operation-template-mgt</module> <module>components/operation-template-mgt</module>
@ -64,7 +64,7 @@
<!-- <module>features/analytics-mgt</module>--> <!-- <module>features/analytics-mgt</module>-->
<!-- <module>features/webapp-authenticator-framework</module>--> <!-- <module>features/webapp-authenticator-framework</module>-->
<!-- <module>features/logger</module>--> <!-- <module>features/logger</module>-->
<!-- <module>features/task-mgt</module>--> <module>features/task-mgt</module>
<module>features/subtype-mgt</module> <module>features/subtype-mgt</module>
<module>features/tenant-mgt</module> <module>features/tenant-mgt</module>
<module>features/operation-template-mgt-plugin-feature</module> <module>features/operation-template-mgt-plugin-feature</module>
@ -367,17 +367,17 @@
<!-- Task Management dependencies --> <!-- Task Management dependencies -->
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.common</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.core</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.task.mgt.watcher</artifactId> <artifactId>io.entgra.device.mgt.core.task.mgt.watcher</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>

Loading…
Cancel
Save