From 98986817960a448745f3acf3ffc15db501e84cd8 Mon Sep 17 00:00:00 2001 From: tharindu1st Date: Tue, 19 Mar 2024 18:18:49 +0530 Subject: [PATCH 1/4] remove registry.search.ui --- .../apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml b/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml index cf4b8cb04be2..ce3fbf6c847d 100644 --- a/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml +++ b/features/apimgt/org.wso2.carbon.apimgt.persistence.feature/pom.xml @@ -82,7 +82,7 @@ - org.wso2.carbon.registry.core:${carbon.registry.version} + org.wso2.carbon.registry.core.server:${carbon.registry.version} From e6c2d05bd0d02c8618aeae5d9506439500b7802b Mon Sep 17 00:00:00 2001 From: tharindu1st Date: Thu, 21 Mar 2024 19:33:23 +0530 Subject: [PATCH 2/4] remove registry.lcmm --- .../org.wso2.carbon.apimgt.impl/pom.xml | 5 +--- .../impl/observers/CommonConfigDeployer.java | 18 ----------- .../CommonConfigDeployerTestCase.java | 9 +----- .../pom.xml | 28 +++++++++-------- .../persistence/RegistryPersistenceImpl.java | 3 -- .../utils/RegistryPersistenceUtil.java | 30 ------------------- pom.xml | 12 ++++---- 7 files changed, 24 insertions(+), 81 deletions(-) diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml index b374ca771124..3d619ed661c7 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml @@ -237,10 +237,7 @@ org.apache.pdfbox pdfbox - - org.wso2.carbon.governance - org.wso2.carbon.governance.lcm - + org.wso2.carbon.event-processing org.wso2.carbon.event.processor.stub diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployer.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployer.java index df115a1e0015..ef4f6d35aff3 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployer.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployer.java @@ -29,17 +29,10 @@ import org.wso2.carbon.apimgt.impl.dto.ThrottleProperties; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder; import org.wso2.carbon.apimgt.impl.loader.KeyManagerConfigurationDataRetriever; -import org.wso2.carbon.apimgt.impl.service.KeyMgtRegistrationService; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.governance.lcm.util.CommonUtil; -import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.utils.AbstractAxis2ConfigurationContextObserver; -import java.io.FileNotFoundException; - -import javax.xml.stream.XMLStreamException; - /** * This task provisions mandatory configs & Artifacts needed by any tenant. The reason for introducing this task is * to prevent {@link org.wso2.carbon.apimgt.impl.observers.TenantServiceCreator} class being run on None-synapse @@ -124,17 +117,6 @@ public void run() { } catch (Exception e) { // The generic Exception is handled explicitly so execution does not stop during config deployment log.error("Exception when creating default roles for tenant " + tenantDomain, e); } - try { - CommonUtil.addDefaultLifecyclesIfNotAvailable(ServiceReferenceHolder.getInstance().getRegistryService() - .getConfigSystemRegistry(tenantId), CommonUtil - .getRootSystemRegistry(tenantId)); - } catch (RegistryException e) { - log.error("Error while accessing registry", e); - } catch (FileNotFoundException e) { - log.error("Error while find lifecycle.xml", e); - } catch (XMLStreamException e) { - log.error("Error while parsing Lifecycle.xml", e); - } KeyManagerConfigurationDataRetriever keyManagerConfigurationDataRetriever = new KeyManagerConfigurationDataRetriever(tenantDomain); keyManagerConfigurationDataRetriever.startLoadKeyManagerConfigurations(); diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployerTestCase.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployerTestCase.java index c6ecd5bd788f..c5fbd7e4ba65 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployerTestCase.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/observers/CommonConfigDeployerTestCase.java @@ -30,14 +30,13 @@ import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.governance.lcm.util.CommonUtil; import org.wso2.carbon.registry.core.service.RegistryService; import static org.wso2.carbon.base.CarbonBaseConstants.CARBON_HOME; @RunWith(PowerMockRunner.class) -@PrepareForTest({APIUtil.class, PrivilegedCarbonContext.class, ServiceReferenceHolder.class, CommonUtil.class}) +@PrepareForTest({APIUtil.class, PrivilegedCarbonContext.class, ServiceReferenceHolder.class}) public class CommonConfigDeployerTestCase { private final int TENANT_ID = 1234; @@ -45,7 +44,6 @@ public class CommonConfigDeployerTestCase { @Test public void testCreatedConfigurationContext() throws APIManagementException { - PowerMockito.mockStatic(CommonUtil.class); System.setProperty(CARBON_HOME, ""); PrivilegedCarbonContext privilegedCarbonContext = Mockito.mock(PrivilegedCarbonContext.class); PowerMockito.mockStatic(PrivilegedCarbonContext.class); @@ -84,16 +82,12 @@ public void testCreatedConfigurationContext() throws APIManagementException { PowerMockito.verifyStatic(APIUtil.class); APIUtil.loadAndSyncTenantConf(TENANT_DOMAIN); - - //PowerMockito.verifyStatic(APIUtil.class); - //APIUtil.addDefaultTenantAdvancedThrottlePolicies(TENANT_DOMAIN, TENANT_ID); } @Test public void testExceptions() throws Exception { PowerMockito.mockStatic(APIUtil.class); - PowerMockito.mockStatic(CommonUtil.class); System.setProperty(CARBON_HOME, ""); PrivilegedCarbonContext privilegedCarbonContext = Mockito.mock(PrivilegedCarbonContext.class); PowerMockito.mockStatic(PrivilegedCarbonContext.class); @@ -144,7 +138,6 @@ public void testExceptions() throws Exception { @Test public void testCreatedConfigurationContextRuntimeException() throws APIManagementException { System.setProperty(CARBON_HOME, ""); - PowerMockito.mockStatic(CommonUtil.class); PrivilegedCarbonContext privilegedCarbonContext = Mockito.mock(PrivilegedCarbonContext.class); PowerMockito.mockStatic(PrivilegedCarbonContext.class); PowerMockito.when(PrivilegedCarbonContext.getThreadLocalCarbonContext()).thenReturn(privilegedCarbonContext); diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml index 876daeb6b81e..341393daef62 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/pom.xml @@ -37,7 +37,6 @@ org.apache.commons.logging.*; version="${import.package.version.commons.logging}", org.wso2.carbon.registry.core.*; version="${carbon.registry.imp.pkg.version}", - org.wso2.carbon.governance.lcm.* version="${carbon.governance.version}", org.apache.cxf.jaxrs.ext.multipart.* version="${cxf.version}" * @@ -100,17 +99,22 @@ org.wso2.carbon org.wso2.carbon.registry.core - - org.wso2.carbon.governance - org.wso2.carbon.governance.lcm - - - jboss - javassist - - - - + + org.wso2.carbon.governance + org.wso2.carbon.governance.api + + + org.wso2.carbon + org.wso2.carbon.core + + + org.wso2.carbon.registry + org.wso2.carbon.registry.indexing + + + javassist + javassist + org.wso2.carbon.apimgt org.wso2.carbon.apimgt.api diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java index 018e297cd62c..13282971c59b 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java @@ -3080,7 +3080,6 @@ protected RegistryHolder getRegistry(String requestedTenantDomain) throws APIPer loadTenantRegistry(tenantId); registry = getRegistryService().getGovernanceSystemRegistry(tenantId); RegistryPersistenceUtil.loadloadTenantAPIRXT(null, tenantId); - RegistryPersistenceUtil.addLifecycleIfNotExists(tenantId); RegistryPersistenceUtil.registerCustomQueries(registry, null, userTenantDomain); holder.setTenantId(tenantId); } @@ -3089,7 +3088,6 @@ protected RegistryHolder getRegistry(String requestedTenantDomain) throws APIPer loadTenantRegistry(tenantId); registry = getRegistryService().getGovernanceSystemRegistry(tenantId); RegistryPersistenceUtil.loadloadTenantAPIRXT(null, tenantId); - RegistryPersistenceUtil.addLifecycleIfNotExists(tenantId); RegistryPersistenceUtil.registerCustomQueries(registry, null, userTenantDomain); holder.setTenantId(tenantId); } @@ -3151,7 +3149,6 @@ protected RegistryHolder getRegistry(String username, String requestedTenantDoma holder.setTenantId(tenantId); } RegistryPersistenceUtil.registerCustomQueries(configRegistry, username, userTenantDomain); - RegistryPersistenceUtil.addLifecycleIfNotExists(tenantId); } catch (RegistryException | UserStoreException | PersistenceException e) { String msg = "Failed to get API"; throw new APIPersistenceException(msg, e); diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java index caff6d983b67..2abad846ff43 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/utils/RegistryPersistenceUtil.java @@ -18,7 +18,6 @@ import com.google.gson.Gson; import org.apache.axis2.context.ConfigurationContext; -import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -53,7 +52,6 @@ import org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifact; import org.wso2.carbon.governance.api.util.GovernanceConstants; import org.wso2.carbon.governance.api.util.GovernanceUtils; -import org.wso2.carbon.governance.lcm.util.CommonUtil; import org.wso2.carbon.registry.core.ActionConstants; import org.wso2.carbon.registry.core.Association; import org.wso2.carbon.registry.core.Registry; @@ -76,7 +74,6 @@ import org.wso2.carbon.utils.FileUtil; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; -import javax.xml.stream.XMLStreamException; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; @@ -90,8 +87,6 @@ import java.util.Properties; import java.util.Set; -import static org.wso2.carbon.apimgt.persistence.utils.PersistenceUtil.handleException; - public class RegistryPersistenceUtil { private static final Log log = LogFactory.getLog(RegistryPersistenceUtil.class); @@ -1816,31 +1811,6 @@ private static TenantManager getTenantManager(){ return ServiceReferenceHolder.getInstance().getRealmService().getTenantManager(); } - public static void addLifecycleIfNotExists(int tenantId) throws APIPersistenceException { - //Add default API LC if it is not there - try { - if (!CommonUtil.lifeCycleExists(APIConstants.API_LIFE_CYCLE, - getRegistryService().getConfigSystemRegistry(tenantId))) { - String defaultLifecyclePath = CommonUtil.getDefaltLifecycleConfigLocation() + File.separator - + APIConstants.API_LIFE_CYCLE + APIConstants.XML_EXTENSION; - File file = new File(defaultLifecyclePath); - String content = null; - if (file != null && file.exists()) { - content = FileUtils.readFileToString(file); - } - if (content != null) { - CommonUtil.addLifecycle(content, getRegistryService().getConfigSystemRegistry(tenantId), - CommonUtil.getRootSystemRegistry(tenantId)); - } - } - } catch (RegistryException e) { - throw new APIPersistenceException("Error occurred while adding default APILifeCycle.", e); - } catch (IOException e) { - throw new APIPersistenceException("Error occurred while loading APILifeCycle.xml.", e); - } catch (XMLStreamException e) { - throw new APIPersistenceException("Error occurred while adding default API LifeCycle.", e); - } - } public static String extractProvider(String apiPath, String apiName) { int startIndex = apiPath.indexOf(APIConstants.API_PROVIDER_SUFFIX_SLASH) + diff --git a/pom.xml b/pom.xml index b58c9f35ca8a..eb01a8126124 100644 --- a/pom.xml +++ b/pom.xml @@ -930,12 +930,6 @@ ${carbon.governance.version} - - org.wso2.carbon.governance - org.wso2.carbon.governance.lcm - ${carbon.governance.version} - - org.wso2.carbon.governance @@ -2003,6 +1997,12 @@ spotbugs-annotations ${spotbugs.annotations.version} + + javassist + javassist + 3.3.GA + test + From daf9b8401252399e1b6f66d36e05f3d08def1fac Mon Sep 17 00:00:00 2001 From: tharindu1st Date: Fri, 22 Mar 2024 18:22:32 +0530 Subject: [PATCH 3/4] update registry.version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb01a8126124..e7bf6bf79b8a 100644 --- a/pom.xml +++ b/pom.xml @@ -2030,7 +2030,7 @@ 4.10.3 - 4.8.30 + 4.8.31 4.7.200 4.1.0 From 1538e72312936badbc5a62ef5745ae3b6583fa8e Mon Sep 17 00:00:00 2001 From: tharindu1st Date: Sun, 24 Mar 2024 10:30:22 +0530 Subject: [PATCH 4/4] remove lcm --- .../org.wso2.carbon.apimgt.gateway/pom.xml | 2 +- .../org.wso2.carbon.apimgt.impl/pom.xml | 11 +- .../carbon/apimgt/impl/APIProviderImpl.java | 2 +- .../apimgt/impl/lifecycle/CheckListItem.java | 142 ++++++++++++++++++ .../apimgt/impl/APIProviderImplTest.java | 5 +- .../v1/common/mappings/APIMappingUtil.java | 2 +- pom.xml | 13 -- 7 files changed, 147 insertions(+), 30 deletions(-) create mode 100644 components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/lifecycle/CheckListItem.java diff --git a/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml index 28f19cc38603..44839aa87a53 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.gateway/pom.xml @@ -379,7 +379,7 @@ --add-exports java.base/sun.nio.cs=ALL-UNNAMED - org.wso2.org.ops4j.pax.logging:pax-logging-api + org.wso2.org.ops4j.pax.logging org.wso2.orbit.com.fasterxml.jackson.core:jackson-core diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml index 3d619ed661c7..d3807cdcc465 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/pom.xml @@ -223,16 +223,7 @@ hamcrest-all test - - org.wso2.carbon.governance - org.wso2.carbon.governance.custom.lifecycles.checklist - - - org.apache.poi.wso2 - poi-ooxml - - - + org.apache.pdfbox pdfbox diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java index 2ff2f27784fa..3bf812e84efe 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java @@ -66,6 +66,7 @@ import org.wso2.carbon.apimgt.impl.importexport.ExportFormat; import org.wso2.carbon.apimgt.impl.importexport.ImportExportAPI; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder; +import org.wso2.carbon.apimgt.impl.lifecycle.CheckListItem; import org.wso2.carbon.apimgt.impl.monetization.DefaultMonetizationImpl; import org.wso2.carbon.apimgt.impl.notification.NotificationDTO; import org.wso2.carbon.apimgt.impl.notification.NotificationExecutor; @@ -96,7 +97,6 @@ import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.databridge.commons.Event; -import org.wso2.carbon.governance.custom.lifecycles.checklist.util.CheckListItem; import org.wso2.carbon.identity.application.common.model.IdentityProvider; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.user.api.UserStoreManager; diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/lifecycle/CheckListItem.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/lifecycle/CheckListItem.java new file mode 100644 index 000000000000..7b5021de2158 --- /dev/null +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/lifecycle/CheckListItem.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2024, WSO2 LLC. (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.apimgt.impl.lifecycle; +public class CheckListItem implements Comparable { + private String lifeCycleStatus; + private String name; + private String value; + private String order; + private String propertyName; + private String isVisible; + private static final Object HASH_CODE_OBJECT = new Object(); + + public String getVisible() { + return this.isVisible; + } + + public void setVisible(String visible) { + this.isVisible = visible; + } + + public String getPropertyName() { + return this.propertyName; + } + + public void setPropertyName(String propertyName) { + this.propertyName = propertyName; + } + + public String getLifeCycleStatus() { + return this.lifeCycleStatus; + } + + public void setLifeCycleStatus(String lifeCycleStatus) { + this.lifeCycleStatus = lifeCycleStatus; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return this.value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getOrder() { + return this.order; + } + + public void setOrder(String order) { + this.order = order; + } + + public CheckListItem(String lifeCycleStatus, String name, String value, String order) { + this.lifeCycleStatus = lifeCycleStatus; + this.name = name; + this.value = value; + this.order = order; + } + + public CheckListItem() { + } + + public boolean matchLifeCycleStatus(String status, boolean ignoreCase) { + if (this.lifeCycleStatus != null && status != null) { + return ignoreCase ? this.lifeCycleStatus.equalsIgnoreCase(status) : this.lifeCycleStatus.equals(status); + } else { + return false; + } + } + + public boolean matchLifeCycleStatus(String status) { + return this.matchLifeCycleStatus(status, true); + } + + public int hashCode() { + int hashCode = HASH_CODE_OBJECT.hashCode(); + if (this.order != null) { + hashCode &= this.order.hashCode(); + } + + if (this.name != null) { + hashCode &= this.name.hashCode(); + } + + if (this.value != null) { + hashCode &= this.value.hashCode(); + } + + if (this.lifeCycleStatus != null) { + hashCode &= this.lifeCycleStatus.hashCode(); + } + + if (this.propertyName != null) { + hashCode &= this.propertyName.hashCode(); + } + + return hashCode; + } + + public boolean equals(Object obj) { + if (!(obj instanceof CheckListItem)) { + return false; + } else { + CheckListItem item = (CheckListItem)obj; + return (this.order != null && this.order.equals(item.order) || this.order == null && item.order == null) && (this.lifeCycleStatus != null && this.lifeCycleStatus.equals(item.lifeCycleStatus) || this.lifeCycleStatus == null && item.lifeCycleStatus == null) && (this.name != null && this.name.equals(item.name) || this.name == null && item.name == null) && (this.value != null && this.value.equals(item.value) || this.value == null && item.value == null) && (this.propertyName != null && this.propertyName.equals(item.propertyName) || this.propertyName == null && item.propertyName == null); + } + } + + public int compareTo(Object anotherItem) { + if (this.equals(anotherItem)) { + return 0; + } else { + CheckListItem item = (CheckListItem)anotherItem; + int otherItemOrder = Integer.parseInt(item.getOrder()); + int itemOrder = Integer.parseInt(this.order); + return itemOrder - otherItemOrder; + } + } +} diff --git a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/APIProviderImplTest.java b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/APIProviderImplTest.java index 1398c4345039..2eb068ab6de8 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/APIProviderImplTest.java +++ b/components/apimgt/org.wso2.carbon.apimgt.impl/src/test/java/org/wso2/carbon/apimgt/impl/APIProviderImplTest.java @@ -31,7 +31,6 @@ import org.mockito.Mockito; import org.mockito.stubbing.Answer; import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.core.classloader.annotations.SuppressStaticInitializationFor; import org.powermock.modules.junit4.PowerMockRunner; @@ -105,7 +104,6 @@ import org.wso2.carbon.governance.api.generic.GenericArtifactManager; import org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifact; import org.wso2.carbon.governance.api.util.GovernanceUtils; -import org.wso2.carbon.governance.custom.lifecycles.checklist.util.LifecycleBeanPopulator; import org.wso2.carbon.registry.core.Collection; import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.core.Resource; @@ -152,7 +150,7 @@ @SuppressStaticInitializationFor("org.wso2.carbon.context.PrivilegedCarbonContext") @PrepareForTest({ ServiceReferenceHolder.class, ApiMgtDAO.class, APIUtil.class, APIGatewayManager.class, GovernanceUtils.class, PrivilegedCarbonContext.class, WorkflowExecutorFactory.class, JavaUtils.class, - APIProviderImpl.class, APIManagerFactory.class, RegistryUtils.class, LifecycleBeanPopulator.class, + APIProviderImpl.class, APIManagerFactory.class, RegistryUtils.class, Caching.class, PaginationContext.class, MultitenantUtils.class, AbstractAPIManager.class, OASParserUtil.class, KeyManagerHolder.class, CertificateManagerImpl.class , PublisherAPI.class, Organization.class, APIPersistence.class, GatewayArtifactsMgtDAO.class, RegistryPersistenceUtil.class}) @@ -183,7 +181,6 @@ public void init() throws Exception { PowerMockito.mockStatic(RegistryUtils.class); PowerMockito.mockStatic(GovernanceUtils.class); PowerMockito.mockStatic(WorkflowExecutorFactory.class); - PowerMockito.mockStatic(LifecycleBeanPopulator.class); PowerMockito.mockStatic(KeyManagerHolder.class); PowerMockito.mockStatic(Caching.class); PowerMockito.mockStatic(PaginationContext.class); diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java index f4284f093503..5367d937353a 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1.common/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/common/mappings/APIMappingUtil.java @@ -62,6 +62,7 @@ import org.wso2.carbon.apimgt.impl.definitions.AsyncApiParser; import org.wso2.carbon.apimgt.impl.definitions.OASParserUtil; import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder; +import org.wso2.carbon.apimgt.impl.lifecycle.CheckListItem; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLInfo; import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLValidationResponse; @@ -121,7 +122,6 @@ import org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.WorkflowResponseDTO; import org.wso2.carbon.core.util.CryptoException; import org.wso2.carbon.core.util.CryptoUtil; -import org.wso2.carbon.governance.custom.lifecycles.checklist.util.CheckListItem; import org.wso2.carbon.user.api.UserStoreException; import org.wso2.carbon.utils.multitenancy.MultitenantConstants; import org.wso2.carbon.utils.multitenancy.MultitenantUtils; diff --git a/pom.xml b/pom.xml index e7bf6bf79b8a..8171a6da81e9 100644 --- a/pom.xml +++ b/pom.xml @@ -930,19 +930,6 @@ ${carbon.governance.version} - - - org.wso2.carbon.governance - org.wso2.carbon.governance.custom.lifecycles.checklist - ${carbon.governance.version} - - - org.apache.poi.wso2 - poi-scratchpad - - - - org.wso2.org.ops4j.pax.logging pax-logging-api