mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixed apimgt publisher component issues
This commit is contained in:
parent
bdf976ad2e
commit
d7ea5625bc
@ -52,6 +52,10 @@
|
|||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.felix</groupId>
|
||||||
|
<artifactId>maven-scr-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
|
|||||||
@ -26,11 +26,13 @@ import org.wso2.carbon.apimgt.impl.APIManagerConfigurationService;
|
|||||||
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService;
|
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherService;
|
||||||
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl;
|
import org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @scr.component name="org.wso2.carbon.apimgt.webapp.publisher" immediate="true"
|
||||||
|
*/
|
||||||
public class APIPublisherServiceComponent {
|
public class APIPublisherServiceComponent {
|
||||||
|
|
||||||
private static Log log = LogFactory.getLog(APIPublisherServiceComponent.class);
|
private static Log log = LogFactory.getLog(APIPublisherServiceComponent.class);
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
protected void activate(ComponentContext componentContext) {
|
protected void activate(ComponentContext componentContext) {
|
||||||
try {
|
try {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
@ -48,7 +50,6 @@ public class APIPublisherServiceComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
protected void deactivate(ComponentContext componentContext) {
|
protected void deactivate(ComponentContext componentContext) {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,7 +54,7 @@ public class APIPublisherLifecycleListener implements LifecycleListener {
|
|||||||
ServletContext servletContext = context.getServletContext();
|
ServletContext servletContext = context.getServletContext();
|
||||||
|
|
||||||
String param = servletContext.getInitParameter(PARAM_MANAGED_API_ENABLED);
|
String param = servletContext.getInitParameter(PARAM_MANAGED_API_ENABLED);
|
||||||
boolean isManagedApi = (param != null && param.isEmpty()) && Boolean.parseBoolean(param);
|
boolean isManagedApi = (param != null && !param.isEmpty()) && Boolean.parseBoolean(param);
|
||||||
|
|
||||||
if (isManagedApi) {
|
if (isManagedApi) {
|
||||||
APIConfig apiConfig = this.buildApiConfig(servletContext);
|
APIConfig apiConfig = this.buildApiConfig(servletContext);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user