Refactor services

feature/appm-store/pbac
Chatura Dilan 8 years ago
parent d5ba266583
commit 43ef32b37c

@ -30,7 +30,7 @@ import javax.ws.rs.core.Response;
"such as get all the available devices, etc.") "such as get all the available devices, etc.")
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
public interface ApplicationManagementService { public interface ApplicationManagementAPI {
public final static String SCOPE = "scope"; public final static String SCOPE = "scope";

@ -20,21 +20,25 @@ package org.wso2.carbon.device.application.mgt.api.services.impl;
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.application.mgt.common.Application;
import org.wso2.carbon.device.application.mgt.common.Filter; import org.wso2.carbon.device.application.mgt.common.Filter;
import org.wso2.carbon.device.application.mgt.common.ApplicationList; import org.wso2.carbon.device.application.mgt.common.ApplicationList;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager; import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.application.mgt.api.util.ApplicationMgtAPIUtil; import org.wso2.carbon.device.application.mgt.api.util.ApplicationMgtAPIUtil;
import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import static org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory.ManagerService.APPLICATION_MANAGER;
@Produces({ "application/json"}) @Produces({ "application/json"})
@Consumes({ "application/json"}) @Consumes({ "application/json"})
public class ApplicationManagementServiceImpl { public class ApplicationManagementAPIImpl {
public static final int DEFAULT_LIMIT = 20; public static final int DEFAULT_LIMIT = 20;
private static Log log = LogFactory.getLog(ApplicationManagementServiceImpl.class); private static Log log = LogFactory.getLog(ApplicationManagementAPIImpl.class);
@GET @GET
@ -42,7 +46,9 @@ public class ApplicationManagementServiceImpl {
@Path("applications") @Path("applications")
public Response getApplications(@QueryParam("offset") int offset, @QueryParam("limit") int limit, public Response getApplications(@QueryParam("offset") int offset, @QueryParam("limit") int limit,
@QueryParam("q") String searchQuery) { @QueryParam("q") String searchQuery) {
ApplicationManager applicationManager = ApplicationMgtAPIUtil.getApplicationManagementService(); ApplicationManagementServiceFactory serviceFactory = ApplicationMgtAPIUtil.getApplicationManagementServiceFactory();
ApplicationManager applicationManager = (ApplicationManager) serviceFactory
.getApplicationManagementService(APPLICATION_MANAGER);
try { try {
if(limit == 0){ if(limit == 0){

@ -20,9 +20,8 @@ package org.wso2.carbon.device.application.mgt.api.util;
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.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService; import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
/** /**
* Holds util methods required for Application-Mgt API component. * Holds util methods required for Application-Mgt API component.
@ -31,15 +30,15 @@ public class ApplicationMgtAPIUtil {
private static Log log = LogFactory.getLog(ApplicationMgtAPIUtil.class); private static Log log = LogFactory.getLog(ApplicationMgtAPIUtil.class);
public static ApplicationManagementService getApplicationManagementService() { public static ApplicationManagementServiceFactory getApplicationManagementServiceFactory() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
ApplicationManagementService applicationManager = ApplicationManagementServiceFactory applicationManagerServiceFactory =
(ApplicationManagementService) ctx.getOSGiService(ApplicationManagementService.class, null); (ApplicationManagementServiceFactory) ctx.getOSGiService(ApplicationManagementServiceFactory.class, null);
if (applicationManager == null) { if (applicationManagerServiceFactory == null) {
String msg = "Application Management provider service has not initialized."; String msg = "Application Management provider service has not initialized.";
log.error(msg); log.error(msg);
throw new IllegalStateException(msg); throw new IllegalStateException(msg);
} }
return applicationManager; return applicationManagerServiceFactory;
} }
} }

@ -32,7 +32,7 @@ http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
</jaxrs:providers> </jaxrs:providers>
</jaxrs:server> </jaxrs:server>
<bean id="applicationMgtServiceBean" class="org.wso2.carbon.device.application.mgt.api.services.impl.ApplicationManagementServiceImpl"/> <bean id="applicationMgtServiceBean" class="org.wso2.carbon.device.application.mgt.api.services.impl.ApplicationManagementAPIImpl"/>
<bean id="jsonProvider" class="org.wso2.carbon.device.application.mgt.api.common.GsonMessageBodyHandler"/> <bean id="jsonProvider" class="org.wso2.carbon.device.application.mgt.api.common.GsonMessageBodyHandler"/>
</beans> </beans>

@ -64,6 +64,18 @@ public class Application {
private boolean published; private boolean published;
private LifecycleState lifecycleState;
private Date lifecycleStateModifiedAt;
private Date getLifecycleStateModifiedBy;
private boolean freeApp;
private String paymentCurrency;
private Float paymentPrice;
public int getId() { public int getId() {
return id; return id;
@ -208,4 +220,52 @@ public class Application {
public void setPublished(boolean published) { public void setPublished(boolean published) {
this.published = published; this.published = published;
} }
public LifecycleState getLifecycleState() {
return lifecycleState;
}
public void setLifecycleState(LifecycleState lifecycleState) {
this.lifecycleState = lifecycleState;
}
public Date getLifecycleStateModifiedAt() {
return lifecycleStateModifiedAt;
}
public void setLifecycleStateModifiedAt(Date lifecycleStateModifiedAt) {
this.lifecycleStateModifiedAt = lifecycleStateModifiedAt;
}
public Date getGetLifecycleStateModifiedBy() {
return getLifecycleStateModifiedBy;
}
public void setGetLifecycleStateModifiedBy(Date getLifecycleStateModifiedBy) {
this.getLifecycleStateModifiedBy = getLifecycleStateModifiedBy;
}
public boolean isFreeApp() {
return freeApp;
}
public void setFreeApp(boolean freeApp) {
this.freeApp = freeApp;
}
public String getPaymentCurrency() {
return paymentCurrency;
}
public void setPaymentCurrency(String paymentCurrency) {
this.paymentCurrency = paymentCurrency;
}
public Float getPaymentPrice() {
return paymentPrice;
}
public void setPaymentPrice(Float paymentPrice) {
this.paymentPrice = paymentPrice;
}
} }

@ -43,14 +43,14 @@ public class ApplicationRelease {
private Application application; private Application application;
private LifecycleState lifecycleState;
private Date lifecycleStateModifiedAt; private Date lifecycleStateModifiedAt;
private String lifecycleStateModifiedBy; private String lifecycleStateModifiedBy;
private Map<String, String> properties; private Map<String, String> properties;
private boolean published;
public int getId() { public int getId() {
return id; return id;
} }
@ -115,14 +115,6 @@ public class ApplicationRelease {
this.application = application; this.application = application;
} }
public LifecycleState getLifecycleState() {
return lifecycleState;
}
public void setLifecycleState(LifecycleState lifecycleState) {
this.lifecycleState = lifecycleState;
}
public Date getLifecycleStateModifiedAt() { public Date getLifecycleStateModifiedAt() {
return lifecycleStateModifiedAt; return lifecycleStateModifiedAt;
} }
@ -146,4 +138,12 @@ public class ApplicationRelease {
public void setProperties(Map<String, String> properties) { public void setProperties(Map<String, String> properties) {
this.properties = properties; this.properties = properties;
} }
public boolean isPublished() {
return published;
}
public void setPublished(boolean published) {
this.published = published;
}
} }

@ -0,0 +1,23 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.application.mgt.common.services;
public interface ApplicationManagementExtensionsService {
}

@ -18,10 +18,5 @@
*/ */
package org.wso2.carbon.device.application.mgt.common.services; package org.wso2.carbon.device.application.mgt.common.services;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException; public interface ApplicationManagementService {
public interface ApplicationManagementService extends ApplicationReleaseManager, ApplicationManager, CategoryManager,
CommentsManager, LifecycleStateManager, PlatformManager, ResourceTypeManager, SubscriptionManager,
VisibilityManager {
} }

@ -23,7 +23,7 @@ import org.wso2.carbon.device.application.mgt.common.Filter;
import org.wso2.carbon.device.application.mgt.common.ApplicationList; import org.wso2.carbon.device.application.mgt.common.ApplicationList;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException;
public interface ApplicationManager { public interface ApplicationManager extends ApplicationManagementService {
void createApplication(Application application) throws ApplicationManagerException; void createApplication(Application application) throws ApplicationManagerException;

@ -0,0 +1,28 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.application.mgt.core.dao.common;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementExtensionsService;
public class ApplicationManagementExtensionsFactory {
public ApplicationManagementExtensionsService getExtensionsService(Class managerClass) throws Exception {
return (ApplicationManagementExtensionsService) managerClass.newInstance();
}
}

@ -18,17 +18,17 @@
*/ */
package org.wso2.carbon.device.application.mgt.core.internal; package org.wso2.carbon.device.application.mgt.core.internal;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService; import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService; import org.wso2.carbon.device.mgt.core.service.DeviceManagementProviderService;
public class ApplicationManagementDataHolder { public class ApplicationManagementDataHolder {
private DeviceManagementProviderService deviceManagementService; private DeviceManagementProviderService deviceManagementService;
private ApplicationManagementService applicationManagementService; private ApplicationManagementServiceFactory applicationManagementServiceFactory;
private static final ApplicationManagementDataHolder applicationMgtDataHolder = new ApplicationManagementDataHolder(); private static final ApplicationManagementDataHolder applicationMgtDataHolder = new ApplicationManagementDataHolder();
private ApplicationManagementDataHolder(){ private ApplicationManagementDataHolder() {
} }
@ -44,11 +44,15 @@ public class ApplicationManagementDataHolder {
this.deviceManagementService = deviceManagementService; this.deviceManagementService = deviceManagementService;
} }
public ApplicationManagementService getApplicationManagementService() { public ApplicationManagementServiceFactory getApplicationManagementServiceFactory() {
return applicationManagementService; return applicationManagementServiceFactory;
} }
public void setApplicationManagementService(ApplicationManagementService applicationManagementService) { public void setApplicationManagementServiceFactory(ApplicationManagementServiceFactory applicationManagementServiceFactory) {
this.applicationManagementService = applicationManagementService; this.applicationManagementServiceFactory = applicationManagementServiceFactory;
}
public static ApplicationManagementDataHolder getApplicationMgtDataHolder() {
return applicationMgtDataHolder;
} }
} }

@ -23,7 +23,7 @@ import org.osgi.service.component.ComponentContext;
import org.osgi.framework.BundleContext; import org.osgi.framework.BundleContext;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService; import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService;
import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceImpl; import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
import org.wso2.carbon.device.application.mgt.core.config.ApplicationConfigurationManager; import org.wso2.carbon.device.application.mgt.core.config.ApplicationConfigurationManager;
import org.wso2.carbon.device.application.mgt.core.config.datasource.DataSourceConfig; import org.wso2.carbon.device.application.mgt.core.config.datasource.DataSourceConfig;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
@ -47,11 +47,9 @@ public class ApplicationManagementServiceComponent {
protected void activate(ComponentContext componentContext) throws NamingException { protected void activate(ComponentContext componentContext) throws NamingException {
BundleContext bundleContext = componentContext.getBundleContext(); BundleContext bundleContext = componentContext.getBundleContext();
ApplicationManagementService applicationManagementService = new ApplicationManagementServiceImpl(); ApplicationManagementServiceFactory serviceFactory = new ApplicationManagementServiceFactory();
ApplicationManagementDataHolder.getInstance().setApplicationManagementService(applicationManagementService); ApplicationManagementDataHolder.getInstance().setApplicationManagementServiceFactory(serviceFactory);
bundleContext.registerService(ApplicationManagementService.class.getName(), bundleContext.registerService(ApplicationManagementServiceFactory.class.getName(), serviceFactory, null);
applicationManagementService, null);
DataSourceConfig dataSourceConfig = ApplicationConfigurationManager.getInstance() DataSourceConfig dataSourceConfig = ApplicationConfigurationManager.getInstance()
.getApplicationManagerConfiguration().getApplicationManagerRepository().getDataSourceConfig(); .getApplicationManagerConfiguration().getApplicationManagerRepository().getDataSourceConfig();

@ -0,0 +1,49 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.application.mgt.core.services.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException;
import org.wso2.carbon.device.application.mgt.common.Application;
import org.wso2.carbon.device.application.mgt.common.ApplicationList;
import org.wso2.carbon.device.application.mgt.common.Filter;
import org.wso2.carbon.device.application.mgt.common.services.*;
import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOException;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
public class ApplicationManagementServiceFactory {
public enum ManagerService {
APPLICATION_MANAGER,
APPLICATION_RELEASE_MANAGER
}
public ApplicationManagementService getApplicationManagementService(ManagerService managerService) {
switch (managerService) {
case APPLICATION_MANAGER:
return new ApplicationManagerImpl();
default:
return null;
}
}
}

@ -18,25 +18,20 @@
*/ */
package org.wso2.carbon.device.application.mgt.core.services.impl; package org.wso2.carbon.device.application.mgt.core.services.impl;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException;
import org.wso2.carbon.device.application.mgt.common.Application; import org.wso2.carbon.device.application.mgt.common.Application;
import org.wso2.carbon.device.application.mgt.common.ApplicationList; import org.wso2.carbon.device.application.mgt.common.ApplicationList;
import org.wso2.carbon.device.application.mgt.common.Filter; import org.wso2.carbon.device.application.mgt.common.Filter;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException;
import org.wso2.carbon.device.application.mgt.common.exception.DBConnectionException;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManager;
import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO; import org.wso2.carbon.device.application.mgt.core.dao.ApplicationDAO;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOException; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOException;
import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory; import org.wso2.carbon.device.application.mgt.core.dao.common.ApplicationManagementDAOFactory;
import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil; import org.wso2.carbon.device.application.mgt.core.util.ConnectionManagerUtil;
public class ApplicationManagementServiceImpl implements ApplicationManagementService { public class ApplicationManagerImpl implements ApplicationManager {
private static final Log log = LogFactory.getLog(ApplicationManagementServiceImpl.class);
@Override @Override
public void createApplication(Application application) { public void createApplication(Application application) throws ApplicationManagerException {
} }

@ -23,8 +23,8 @@ import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.CarbonContext;
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.device.application.mgt.common.services.ApplicationManagementService;
import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException; import org.wso2.carbon.device.application.mgt.common.exception.ApplicationManagerException;
import org.wso2.carbon.device.application.mgt.core.services.impl.ApplicationManagementServiceFactory;
import javax.xml.XMLConstants; import javax.xml.XMLConstants;
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilder;
@ -35,16 +35,16 @@ public class ApplicationManagementUtil {
private static Log log = LogFactory.getLog(ApplicationManagementUtil.class); private static Log log = LogFactory.getLog(ApplicationManagementUtil.class);
public static ApplicationManagementService getApplicationManagementService() { public static ApplicationManagementServiceFactory getApplicationManagementServiceFactory() {
PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext(); PrivilegedCarbonContext ctx = PrivilegedCarbonContext.getThreadLocalCarbonContext();
ApplicationManagementService applicationManager = ApplicationManagementServiceFactory applicationManagerServiceFactory =
(ApplicationManagementService) CarbonContext.getThreadLocalCarbonContext().getOSGiService(ApplicationManagementService.class, null); (ApplicationManagementServiceFactory) ctx.getOSGiService(ApplicationManagementServiceFactory.class, null);
if (applicationManager == null) { if (applicationManagerServiceFactory == null) {
String msg = "Application Management provider service has not initialized."; String msg = "Application Management provider service has not initialized.";
log.error(msg); log.error(msg);
throw new IllegalStateException(msg); throw new IllegalStateException(msg);
} }
return applicationManager; return applicationManagerServiceFactory;
} }
public static Document convertToDocument(File file) throws ApplicationManagerException { public static Document convertToDocument(File file) throws ApplicationManagerException {

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<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>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt</artifactId>
<version>2.0.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.extensions</artifactId>
<version>2.0.63-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>WSO2 Carbon - Application Management Extensions</name>
<description>WSO2 Carbon - Application Management Extensions</description>
<url>http://wso2.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.artifactId}</Bundle-Name>
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
<Bundle-Description>Application Management Core Bundle</Bundle-Description>
<Private-Package>
org.wso2.carbon.device.application.mgt.core.internal
</Private-Package>
<Import-Package>
org.osgi.framework,
org.osgi.service.component,
org.apache.commons.logging,
javax.xml.*,
javax.xml.parsers;version="${javax.xml.parsers.import.pkg.version}";resolution:=optional,
org.wso2.carbon.context.*,
org.wso2.carbon.utils.*,
org.w3c.dom,
org.json,
javax.sql,
com.google.gson,
javax.naming,
javax.xml.bind.annotation,
javax.xml.bind,
org.wso2.carbon.device.application.mgt.common.*,
org.wso2.carbon.device.mgt.core.*,
org.wso2.carbon.device.mgt.common.*,
</Import-Package>
<Export-Package>
!org.wso2.carbon.device.application.mgt.core.internal.*,
org.wso2.carbon.device.application.mgt.core.*
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<configuration>
<systemPropertyVariables>
<log4j.configuration>file:src/test/resources/log4j.properties</log4j.configuration>
</systemPropertyVariables>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.osgi</groupId>
<artifactId>org.eclipse.osgi.services</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.common</artifactId>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.logging</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
</dependency>
<dependency>
<groupId>commons-codec.wso2</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>commons-io.wso2</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.json.wso2</groupId>
<artifactId>json</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.mgt.core</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,22 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.application.mgt.extensions.payments;
public interface PaymentService {
}

@ -0,0 +1,24 @@
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.wso2.carbon.device.application.mgt.extensions.payments.impl;
import org.wso2.carbon.device.application.mgt.extensions.payments.PaymentService;
public class PaymentServiceImpl implements PaymentService {
}

@ -39,6 +39,8 @@
<module>org.wso2.carbon.device.application.mgt.common</module> <module>org.wso2.carbon.device.application.mgt.common</module>
<module>org.wso2.carbon.device.application.mgt.api</module> <module>org.wso2.carbon.device.application.mgt.api</module>
<module>org.wso2.carbon.device.application.mgt.ui</module> <module>org.wso2.carbon.device.application.mgt.ui</module>
<module>org.wso2.carbon.device.application.mgt.extensions</module>
</modules> </modules>
<build> <build>

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<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/maven-v4_0_0.xsd">
<parent>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>application-mgt-feature</artifactId>
<version>2.0.63-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>org.wso2.carbon.device.application.mgt.extensions.feature</artifactId>
<packaging>pom</packaging>
<version>2.0.63-SNAPSHOT</version>
<name>WSO2 Carbon - Application Management Extension Feature</name>
<url>http://wso2.org</url>
<description>WSO2 Application Management Extension Feature</description>
<dependencies>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.extensions</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>src/main/resources</outputDirectory>
<resources>
<resource>
<directory>resources</directory>
<includes>
<include>build.properties</include>
<include>p2.inf</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>carbon-p2-plugin</artifactId>
<version>${carbon.p2.plugin.version}</version>
<executions>
<execution>
<id>p2-feature-generation</id>
<phase>package</phase>
<goals>
<goal>p2-feature-gen</goal>
</goals>
<configuration>
<id>org.wso2.carbon.device.application.mgt.extensions</id>
<propertiesFile>../../../features/etc/feature.properties</propertiesFile>
<adviceFile>
<properties>
<propertyDef>org.wso2.carbon.p2.category.type:server</propertyDef>
<propertyDef>org.eclipse.equinox.p2.type.group:false</propertyDef>
</properties>
</adviceFile>
<bundles>
<bundleDef>
org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.extensions:${carbon.device.mgt.version}
</bundleDef>
</bundles>
<importBundles>
</importBundles>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

@ -100,6 +100,7 @@
</adviceFile> </adviceFile>
<includedFeatures> <includedFeatures>
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef> <includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.api.feature:${carbon.device.mgt.version}</includedFeatureDef>
<includedFeatureDef>org.wso2.carbon.devicemgt:org.wso2.carbon.device.application.mgt.extensions.feature:${carbon.device.mgt.version}</includedFeatureDef>
</includedFeatures> </includedFeatures>
<bundles> <bundles>
<bundleDef> <bundleDef>

@ -38,6 +38,7 @@
<module>org.wso2.carbon.device.application.mgt.api.feature</module> <module>org.wso2.carbon.device.application.mgt.api.feature</module>
<module>org.wso2.carbon.device.application.mgt.ui.feature</module> <module>org.wso2.carbon.device.application.mgt.ui.feature</module>
<module>org.wso2.carbon.device.application.mgt.feature</module> <module>org.wso2.carbon.device.application.mgt.feature</module>
<module>org.wso2.carbon.device.application.mgt.extensions.feature</module>
<module>org.wso2.carbon.device.application.mgt.server.feature</module> <module>org.wso2.carbon.device.application.mgt.server.feature</module>
</modules> </modules>
</project> </project>

@ -187,6 +187,11 @@
<artifactId>org.wso2.carbon.device.application.mgt.api</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.api</artifactId>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.extensions</artifactId>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.ui</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.ui</artifactId>
@ -350,6 +355,12 @@
<type>zip</type> <type>zip</type>
<version>${carbon.device.mgt.version}</version> <version>${carbon.device.mgt.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.extensions.feature</artifactId>
<type>zip</type>
<version>${carbon.device.mgt.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.wso2.carbon.devicemgt</groupId> <groupId>org.wso2.carbon.devicemgt</groupId>
<artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId> <artifactId>org.wso2.carbon.device.application.mgt.api.feature</artifactId>

Loading…
Cancel
Save