refactored application mgt component

apim420
Amalka Subasinghe 2 years ago
parent 162507ac8b
commit d98abb1ddf

@ -50,7 +50,7 @@ public class GrafanaAPIProxyServiceImpl implements GrafanaAPIProxyService {
} catch (RefererNotValid e) { } catch (RefererNotValid e) {
return GrafanaRequestHandlerUtil.constructInvalidReferer(); return GrafanaRequestHandlerUtil.constructInvalidReferer();
} catch (SQLException | IOException | DBConnectionException | } catch (SQLException | IOException | DBConnectionException |
io.entgra.application.mgt.common.exception.DBConnectionException e) { io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException e) {
log.error(e); log.error(e);
return GrafanaRequestHandlerUtil.constructInternalServerError(e, e.getMessage()); return GrafanaRequestHandlerUtil.constructInternalServerError(e, e.getMessage());
} }

@ -85,7 +85,7 @@
org.wso2.carbon, org.wso2.carbon,
org.wso2.carbon.device.mgt.common.*, org.wso2.carbon.device.mgt.common.*,
org.wso2.carbon.device.mgt.core.* org.wso2.carbon.device.mgt.core.*
io.entgra.application.mgt.core.* io.entgra.device.mgt.core.application.mgt.core.*
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
!io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal, !io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.internal,
@ -142,7 +142,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.application.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.core</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents.wso2</groupId> <groupId>org.apache.httpcomponents.wso2</groupId>

@ -29,6 +29,6 @@ public interface GrafanaQueryService {
void buildSafeQuery(JsonObject queryRequestBody, String dashboardUID, String panelId, void buildSafeQuery(JsonObject queryRequestBody, String dashboardUID, String panelId,
URI requestUri) throws IOException, SQLException, GrafanaManagementException, URI requestUri) throws IOException, SQLException, GrafanaManagementException,
DBConnectionException, io.entgra.application.mgt.common.exception.DBConnectionException; DBConnectionException, io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException;
} }

@ -51,7 +51,7 @@ public class GrafanaQueryServiceImpl implements GrafanaQueryService {
} }
public void buildSafeQuery(JsonObject queryRequestBody, String dashboardUID, String panelId, URI requestUri) public void buildSafeQuery(JsonObject queryRequestBody, String dashboardUID, String panelId, URI requestUri)
throws IOException, SQLException, GrafanaManagementException, DBConnectionException, io.entgra.application.mgt.common.exception.DBConnectionException { throws IOException, SQLException, GrafanaManagementException, DBConnectionException, io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException {
JsonArray queries = queryRequestBody.getAsJsonArray(GrafanaConstants.QUERY_BODY_QUERIES_KEY); JsonArray queries = queryRequestBody.getAsJsonArray(GrafanaConstants.QUERY_BODY_QUERIES_KEY);
for (int i = 0; i < queries.size(); i++) { for (int i = 0; i < queries.size(); i++) {
JsonObject queryObj = queries.get(i).getAsJsonObject(); JsonObject queryObj = queries.get(i).getAsJsonObject();
@ -118,7 +118,7 @@ public class GrafanaQueryServiceImpl implements GrafanaQueryService {
private void encodeQuery(JsonObject queryObj, Datasource datasource, String queryTemplate, String rawSql) private void encodeQuery(JsonObject queryObj, Datasource datasource, String queryTemplate, String rawSql)
throws SQLException, GrafanaManagementException, DBConnectionException, throws SQLException, GrafanaManagementException, DBConnectionException,
io.entgra.application.mgt.common.exception.DBConnectionException { io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException {
PreparedQuery pq = GrafanaPreparedQueryBuilder.build(queryTemplate, rawSql); PreparedQuery pq = GrafanaPreparedQueryBuilder.build(queryTemplate, rawSql);
String encodedQuery = QueryEncoderFactory.createEncoder(datasource.getType(), datasource.getName()).encode(pq); String encodedQuery = QueryEncoderFactory.createEncoder(datasource.getType(), datasource.getName()).encode(pq);
CacheManager.getInstance().getEncodedQueryCache().put(rawSql, encodedQuery); CacheManager.getInstance().getEncodedQueryCache().put(rawSql, encodedQuery);

@ -1,8 +1,8 @@
package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.connection; package io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core.sql.connection;
import io.entgra.application.mgt.core.config.Configuration; import io.entgra.device.mgt.core.application.mgt.core.config.Configuration;
import io.entgra.application.mgt.core.config.ConfigurationManager; import io.entgra.device.mgt.core.application.mgt.core.config.ConfigurationManager;
import io.entgra.application.mgt.core.util.ConnectionManagerUtil; import io.entgra.device.mgt.core.application.mgt.core.util.ConnectionManagerUtil;
import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException; import org.wso2.carbon.device.mgt.common.exceptions.DBConnectionException;
import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager; import org.wso2.carbon.device.mgt.core.config.DeviceConfigurationManager;
import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig; import org.wso2.carbon.device.mgt.core.config.DeviceManagementConfig;
@ -24,7 +24,7 @@ public class GrafanaDatasourceConnectionFactory {
private static final Configuration applicationMgtConfig = ConfigurationManager.getInstance().getConfiguration(); private static final Configuration applicationMgtConfig = ConfigurationManager.getInstance().getConfiguration();
public static Connection getConnection(String databaseName) throws SQLException, DBConnectionException, public static Connection getConnection(String databaseName) throws SQLException, DBConnectionException,
io.entgra.application.mgt.common.exception.DBConnectionException { io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException {
if(databaseName.equals(getReportManagementDatasourceName())) { if(databaseName.equals(getReportManagementDatasourceName())) {
ReportMgtConnectionManager.openDBConnection(); ReportMgtConnectionManager.openDBConnection();
return ReportMgtConnectionManager.getDBConnection(); return ReportMgtConnectionManager.getDBConnection();

@ -41,7 +41,7 @@ public class MySQLQueryEncoder implements QueryEncoder {
@Override @Override
public String encode(PreparedQuery preparedQuery) throws SQLException, DBConnectionException, public String encode(PreparedQuery preparedQuery) throws SQLException, DBConnectionException,
io.entgra.application.mgt.common.exception.DBConnectionException { io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException {
try { try {
Connection con = GrafanaDatasourceConnectionFactory.getConnection(databaseName); Connection con = GrafanaDatasourceConnectionFactory.getConnection(databaseName);
PreparedStatement stmt = con.prepareStatement(preparedQuery.getPreparedSQL()); PreparedStatement stmt = con.prepareStatement(preparedQuery.getPreparedSQL());

@ -24,6 +24,6 @@ import java.sql.SQLException;
public interface QueryEncoder { public interface QueryEncoder {
String encode(PreparedQuery preparedQuery) throws SQLException, DBConnectionException, io.entgra.application.mgt.common.exception.DBConnectionException; String encode(PreparedQuery preparedQuery) throws SQLException, DBConnectionException, io.entgra.device.mgt.core.application.mgt.common.exception.DBConnectionException;
} }

@ -25,7 +25,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.application.mgt.addons</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.addons</artifactId>
<name>Entgra - Application Management Add-Ons</name> <name>Entgra - Application Management Add-Ons</name>
<description>Entgra - Application Management Add-Ons</description> <description>Entgra - Application Management Add-Ons</description>
<url>https://entgra.io</url> <url>https://entgra.io</url>
@ -52,7 +52,7 @@
io.swagger.annotations.*;resolution:=optional io.swagger.annotations.*;resolution:=optional
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
io.entgra.application.mgt.addons.* io.entgra.device.mgt.core.application.mgt.addons.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>
@ -111,7 +111,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.application.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.common</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons; package io.entgra.device.mgt.core.application.mgt.addons;
import javax.servlet.Filter; import javax.servlet.Filter;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons; package io.entgra.device.mgt.core.application.mgt.addons;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;
@ -24,7 +24,7 @@ import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
/** /**
* io.entgra.application.mgt.addons.FileStreamingOutput to allow the user to send the files as Stream. * io.entgra.device.mgt.core.application.mgt.addons.FileStreamingOutput to allow the user to send the files as Stream.
*/ */
public class FileStreamingOutput implements StreamingOutput { public class FileStreamingOutput implements StreamingOutput {
private InputStream inputStream; private InputStream inputStream;

@ -14,11 +14,11 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons; package io.entgra.device.mgt.core.application.mgt.addons;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import io.entgra.application.mgt.addons.jaxrs.AnnotationExclusionStrategy; import io.entgra.device.mgt.core.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;

@ -14,14 +14,14 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons; package io.entgra.device.mgt.core.application.mgt.addons;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonParser; import com.google.gson.JsonParser;
import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import io.entgra.application.mgt.addons.jaxrs.AnnotationExclusionStrategy; import io.entgra.device.mgt.core.application.mgt.addons.jaxrs.AnnotationExclusionStrategy;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.WebApplicationException; import javax.ws.rs.WebApplicationException;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons; package io.entgra.device.mgt.core.application.mgt.addons;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons.jaxrs; package io.entgra.device.mgt.core.application.mgt.addons.jaxrs;
import com.google.gson.ExclusionStrategy; import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes; import com.google.gson.FieldAttributes;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.addons.jaxrs; package io.entgra.device.mgt.core.application.mgt.addons.jaxrs;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

@ -27,7 +27,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.application.mgt.api</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.api</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<name>Entgra - Application Management API</name> <name>Entgra - Application Management API</name>
<description>Entgra - Application Management API</description> <description>Entgra - Application Management API</description>
@ -154,12 +154,12 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.application.mgt.core</artifactId> <artifactId>io.entgra.device.mgt.core.application.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.application.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.common</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -218,7 +218,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.entgra.device.mgt.core</groupId> <groupId>io.entgra.device.mgt.core</groupId>
<artifactId>io.entgra.application.mgt.addons</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.addons</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.api.services; package io.entgra.device.mgt.core.application.mgt.api;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -26,8 +26,8 @@ import io.swagger.annotations.Extension;
import io.swagger.annotations.ExtensionProperty; import io.swagger.annotations.ExtensionProperty;
import io.swagger.annotations.Info; import io.swagger.annotations.Info;
import io.swagger.annotations.SwaggerDefinition; import io.swagger.annotations.SwaggerDefinition;
import io.entgra.application.mgt.common.ApplicationList; import io.entgra.device.mgt.core.application.mgt.common.ApplicationList;
import io.entgra.application.mgt.common.ErrorResponse; import io.entgra.device.mgt.core.application.mgt.common.ErrorResponse;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;

@ -15,19 +15,19 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.api.services.impl; package io.entgra.device.mgt.core.application.mgt.api.impl;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
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 io.entgra.application.mgt.api.services.ArtifactDownloadAPI; import io.entgra.device.mgt.core.application.mgt.api.ArtifactDownloadAPI;
import io.entgra.application.mgt.common.exception.ApplicationManagementException; import io.entgra.device.mgt.core.application.mgt.common.exception.ApplicationManagementException;
import io.entgra.application.mgt.common.services.ApplicationManager; import io.entgra.device.mgt.core.application.mgt.common.services.ApplicationManager;
import io.entgra.application.mgt.common.services.AppmDataHandler; import io.entgra.device.mgt.core.application.mgt.common.services.AppmDataHandler;
import io.entgra.application.mgt.core.exception.BadRequestException; import io.entgra.device.mgt.core.application.mgt.core.exception.BadRequestException;
import io.entgra.application.mgt.core.exception.NotFoundException; import io.entgra.device.mgt.core.application.mgt.core.exception.NotFoundException;
import io.entgra.application.mgt.core.util.APIUtil; import io.entgra.device.mgt.core.application.mgt.core.util.APIUtil;
import io.entgra.application.mgt.core.util.Constants; import io.entgra.device.mgt.core.application.mgt.core.util.Constants;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;

@ -36,7 +36,7 @@
</jaxrs:server> </jaxrs:server>
<bean id="swaggerConfig" class="io.swagger.jaxrs.config.BeanConfig"> <bean id="swaggerConfig" class="io.swagger.jaxrs.config.BeanConfig">
<property name="resourcePackage" value="io.entgra.application.mgt.api"/> <property name="resourcePackage" value="io.entgra.device.mgt.core.application.mgt.api"/>
<property name="version" value="1.0"/> <property name="version" value="1.0"/>
<property name="host" value="localhost:9443"/> <property name="host" value="localhost:9443"/>
<property name="schemes" value="https" /> <property name="schemes" value="https" />
@ -48,17 +48,17 @@
<property name="scan" value="true"/> <property name="scan" value="true"/>
</bean> </bean>
<bean id="io.entgra.application.mgt.addons.ValidationInterceptor" class="io.entgra.application.mgt.addons.ValidationInterceptor"/> <bean id="io.entgra.device.mgt.core.application.mgt.addons.ValidationInterceptor" class="io.entgra.device.mgt.core.application.mgt.addons.ValidationInterceptor"/>
<bean id="swaggerWriter" class="io.swagger.jaxrs.listing.SwaggerSerializers" /> <bean id="swaggerWriter" class="io.swagger.jaxrs.listing.SwaggerSerializers" />
<bean id="swaggerResource" class="io.swagger.jaxrs.listing.ApiListingResource" /> <bean id="swaggerResource" class="io.swagger.jaxrs.listing.ApiListingResource" />
<bean id="applicationMgtArtifactService" class="io.entgra.application.mgt.api.services.impl.ArtifactDownloadAPIImpl"/> <bean id="applicationMgtArtifactService" class="io.entgra.device.mgt.core.application.mgt.api.impl.ArtifactDownloadAPIImpl"/>
<bean id="jsonProvider" class="io.entgra.application.mgt.addons.JSONMessageHandler"/> <bean id="jsonProvider" class="io.entgra.device.mgt.core.application.mgt.addons.JSONMessageHandler"/>
<bean id="multipartProvider" class="io.entgra.application.mgt.addons.MultipartCustomProvider"/> <bean id="multipartProvider" class="io.entgra.device.mgt.core.application.mgt.addons.MultipartCustomProvider"/>
<cxf:bus> <cxf:bus>
<cxf:inInterceptors> <cxf:inInterceptors>
<ref bean="io.entgra.application.mgt.addons.ValidationInterceptor"/> <ref bean="io.entgra.device.mgt.core.application.mgt.addons.ValidationInterceptor"/>
</cxf:inInterceptors> </cxf:inInterceptors>
</cxf:bus> </cxf:bus>

@ -74,7 +74,7 @@
<filter> <filter>
<filter-name>ApiOriginFilter</filter-name> <filter-name>ApiOriginFilter</filter-name>
<filter-class>io.entgra.application.mgt.addons.ApiOriginFilter</filter-class> <filter-class>io.entgra.device.mgt.core.application.mgt.addons.ApiOriginFilter</filter-class>
</filter> </filter>
<filter> <filter>

@ -26,7 +26,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>io.entgra.application.mgt.common</artifactId> <artifactId>io.entgra.device.mgt.core.application.mgt.common</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
<name>Entgra - Application Management Common</name> <name>Entgra - Application Management Common</name>
<description>Entgra - Application Management Common</description> <description>Entgra - Application Management Common</description>
@ -58,7 +58,7 @@
javax.xml.bind.annotation; version="${javax.xml.bind.imp.pkg.version}", javax.xml.bind.annotation; version="${javax.xml.bind.imp.pkg.version}",
</Import-Package> </Import-Package>
<Export-Package> <Export-Package>
io.entgra.application.mgt.common.* io.entgra.device.mgt.core.application.mgt.common.*
</Export-Package> </Export-Package>
</instructions> </instructions>
</configuration> </configuration>

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**

@ -14,9 +14,9 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.entgra.application.mgt.common.dto.ApplicationDTO; import io.entgra.device.mgt.core.application.mgt.common.dto.ApplicationDTO;
public class AppOperation { public class AppOperation {

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

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public class ApplicationInstaller { public class ApplicationInstaller {

@ -14,10 +14,10 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.entgra.application.mgt.common.dto.ApplicationDTO; import io.entgra.device.mgt.core.application.mgt.common.dto.ApplicationDTO;
import io.entgra.application.mgt.common.response.Application; import io.entgra.device.mgt.core.application.mgt.common.response.Application;
import java.util.List; import java.util.List;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**
* Possible Subscription Type of the application. * Possible Subscription Type of the application.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import org.wso2.carbon.device.mgt.common.Device; import org.wso2.carbon.device.mgt.common.Device;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public enum DeviceTypes { public enum DeviceTypes {
ANDROID, IOS, WINDOWS ANDROID, IOS, WINDOWS

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public enum ExecutionStatus { public enum ExecutionStatus {
PENDING, EXECUTED, FAILED PENDING, EXECUTED, FAILED

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.io.InputStream; import java.io.InputStream;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.util.List; import java.util.List;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**
* This represents a image artifact of a application. Icon, Screen-shot or Banner. * This represents a image artifact of a application. Icon, Screen-shot or Banner.

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public class LifecycleChanger { public class LifecycleChanger {

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.sql.Timestamp; import java.sql.Timestamp;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**
* This class represents the pagination details that will be used when fetching application details from database. * This class represents the pagination details that will be used when fetching application details from database.

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**
* This class holds required parameters for a querying a paginated device response. * This class holds required parameters for a querying a paginated device response.

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.util.TreeMap; import java.util.TreeMap;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -15,10 +15,10 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import io.entgra.application.mgt.common.response.Application; import io.entgra.device.mgt.core.application.mgt.common.response.Application;
import java.util.List; import java.util.List;

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public enum SubAction { public enum SubAction {
INSTALL, UNINSTALL INSTALL, UNINSTALL

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
public enum SubscriptionType { public enum SubscriptionType {
USER, ROLE, GROUP, DEVICE USER, ROLE, GROUP, DEVICE

@ -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.application.mgt.common; package io.entgra.device.mgt.core.application.mgt.common;
/** /**
* Represents an user. * Represents an user.

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

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.config; package io.entgra.device.mgt.core.application.mgt.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;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.config; package io.entgra.device.mgt.core.application.mgt.common.config;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.config; package io.entgra.device.mgt.core.application.mgt.common.config;
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.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
public class ApiRegistrationProfile { public class ApiRegistrationProfile {

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier; import org.wso2.carbon.device.mgt.common.DeviceIdentifier;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
public class CategoryDTO { public class CategoryDTO {
int id; int id;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import java.sql.Timestamp; import java.sql.Timestamp;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import java.sql.Timestamp; import java.sql.Timestamp;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import com.google.gson.Gson; import com.google.gson.Gson;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import java.sql.Timestamp; import java.sql.Timestamp;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import java.sql.Timestamp; import java.sql.Timestamp;

@ -16,11 +16,13 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import com.google.gson.Gson; import com.google.gson.Gson;
import io.entgra.application.mgt.common.ExecutionStatus; import io.entgra.device.mgt.core.application.mgt.common.ExecutionStatus;
import io.entgra.application.mgt.common.SubscriptionType; import io.entgra.device.mgt.core.application.mgt.common.SubscriptionType;
import io.entgra.device.mgt.core.application.mgt.common.SubAction;
import io.entgra.device.mgt.core.application.mgt.common.response.ApplicationRelease;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -40,7 +42,7 @@ public class ScheduledSubscriptionDTO {
* Task name is a generated field and in the following pattern: * Task name is a generated field and in the following pattern:
* {@code <SUBSCRIPTION-TYPE>_<ACTION>_<HASH-VALUE>} * {@code <SUBSCRIPTION-TYPE>_<ACTION>_<HASH-VALUE>}
* {@code SUBSCRIPTION-TYPE} - {@see {@linkplain SubscriptionType}} * {@code SUBSCRIPTION-TYPE} - {@see {@linkplain SubscriptionType}}
* {@code ACTION} - {@see {@linkplain io.entgra.application.mgt.common.SubAction} * {@code ACTION} - {@see {@linkplain SubAction }
* {@code HASH-VALUE} - this is a hash value of the combination of application uuid and the subscriber list. * {@code HASH-VALUE} - this is a hash value of the combination of application uuid and the subscriber list.
* *
* Example: {@code DEVICE_INSTALL_e593e00e8ef55efc764295b6aa9ad56b} * Example: {@code DEVICE_INSTALL_e593e00e8ef55efc764295b6aa9ad56b}
@ -49,7 +51,7 @@ public class ScheduledSubscriptionDTO {
/** /**
* UUID of the application release which is subscribed to. * UUID of the application release which is subscribed to.
* {@see {@link io.entgra.application.mgt.common.response.ApplicationRelease}} * {@see {@link ApplicationRelease }}
*/ */
private String applicationUUID; private String applicationUUID;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
public class TagDTO { public class TagDTO {

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.dto; package io.entgra.device.mgt.core.application.mgt.common.dto;
import java.sql.Timestamp; import java.sql.Timestamp;

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception that will be thrown during Application Category Management. * Exception that will be thrown during Application Category Management.

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

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Represents the exception thrown during storing and retrieving the artifacts. * Represents the exception thrown during storing and retrieving the artifacts.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception thrown due to Database Connection issues. * Exception thrown due to Database Connection issues.

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

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception that will be thrown if any error occurs while calling identity server services . * Exception that will be thrown if any error occurs while calling identity server services .

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception thrown due to an issue in database transactions. * Exception thrown due to an issue in database transactions.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception thrown due to invalid configurations provided for Application Management. * Exception thrown due to invalid configurations provided for Application Management.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception caused during the lifecycle management. * Exception caused during the lifecycle management.

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Represents the exception thrown during validating the request. * Represents the exception thrown during validating the request.

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Represents the exception that will be thrown when there is an issue while managing the resources. * Represents the exception that will be thrown when there is an issue while managing the resources.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
public class ReviewDoesNotExistException extends Exception { public class ReviewDoesNotExistException extends Exception {
private String message; private String message;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
public class ReviewManagementException extends Exception { public class ReviewManagementException extends Exception {
private String message; private String message;

@ -16,7 +16,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
public class SubscriptionManagementException extends Exception { public class SubscriptionManagementException extends Exception {
private String message; private String message;

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* Exception thrown due to an issue in TransactionManagement of Database. * Exception thrown due to an issue in TransactionManagement of Database.

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.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.

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.exception; package io.entgra.device.mgt.core.application.mgt.common.exception;
/** /**
* This specialized exception is thrown by the Visibility Manager during unexpected behaviour * This specialized exception is thrown by the Visibility Manager during unexpected behaviour

@ -14,7 +14,7 @@
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package io.entgra.application.mgt.common.response; package io.entgra.device.mgt.core.application.mgt.common.response;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save