Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APIM] Add changes to provide support for building the API manager product with JDK 17 #375

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion components/governance/org.wso2.carbon.governance.api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,17 @@
javax.servlet;version="${imp.pkg.version.javax.servlet}",
javax.servlet.http;version="${imp.pkg.version.javax.servlet}",
javax.servlet.resources;version="${imp.pkg.version.javax.servlet}",
org.eclipse.equinox.http.helper,
org.eclipse.osgi.services,
org.osgi.service.component.*;version="${imp.package.version.osgi.services}",
*;resolution:=optional
</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Provide-Capability>
osgi.service;objectClass=org.wso2.carbon.registry.common.AttributeSearchService,
osgi.service;objectClass=org.wso2.carbon.registry.indexing.service.ContentSearchService,
osgi.service;objectClass=org.wso2.carbon.registry.indexing.service.TermsQuerySearchService,
osgi.service;objectClass=org.wso2.carbon.registry.indexing.service.TermsSearchService
</Provide-Capability>
</instructions>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
/**
* This is a listener class to listen to cache entry creations
*
* @param <K>
* @param <V>
*/
public class RXTConfigCacheEntryCreatedListener<K, V> implements CacheEntryCreatedListener<K, V> {
private static final Log log = LogFactory.getLog(RXTConfigCacheEntryCreatedListener.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@

/**
* This is a listener class to listen to cache entry removals
* @param <K>
* @param <V>
*
*/
public class RXTConfigCacheEntryRemovedListener<K, V> implements CacheEntryRemovedListener<K, V> {
private static final Log log = LogFactory.getLog(RXTConfigCacheEntryRemovedListener.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

/**
* This is a listener class to listen to cache entry updates
* @param <K>
* @param <V>
*
*/
public class RXTConfigCacheEntryUpdatedListener<K, V> implements CacheEntryUpdatedListener<K, V> {
private static final Log log = LogFactory.getLog(RXTConfigCacheEntryUpdatedListener.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ public GovernanceArtifact[] findGovernanceArtifacts(Map<String, List<String>> cr
* @param facetField field used for faceting
* @param authRequired authorization required flag
* @return term results
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public TermData[] getTermData(Map<String, List<String>> criteria, String facetField, boolean authRequired) throws GovernanceException {
List<TermData> termsList;
Expand Down Expand Up @@ -913,7 +913,7 @@ public void setInteger(Integer integer) {
* @param lcName Name of the lifecycle
*
* @return GovernanceArtifact array
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public GovernanceArtifact[] getAllGovernanceArtifactsByLifecycle(String lcName) throws GovernanceException {
String[] paths = GovernanceUtils.getAllArtifactPathsByLifecycle(registry, lcName, mediaType);
Expand All @@ -930,7 +930,7 @@ public GovernanceArtifact[] getAllGovernanceArtifactsByLifecycle(String lcName)
* @param lcState Name of the current lifecycle state
*
* @return GovernanceArtifact array
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public GovernanceArtifact[] getAllGovernanceArtifactsByLIfecycleStatus(String lcName, String lcState)
throws GovernanceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public interface GovernanceArtifact {
*
* @param qName of the artifact
*/
void setQName(QName qName) throws GovernanceException;
void setQName(QName qName);

/**
* Returns the id of the artifact
Expand Down Expand Up @@ -412,7 +412,7 @@ public interface GovernanceArtifact {
* @param artifactID lifecycle associated artifacts ID.
* @param lcName lifecycle name.
* @return a map of current lifecycle state duration colour and duration.
* @throws GovernanceException
* @throws GovernanceException throws if the operation failed.
*/
public Map<String, String> getCurrentStateDuration(String artifactID, String lcName) throws GovernanceException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public static GovernanceArtifactImpl create(final Registry registry, final Strin
public QName getQName() {
return null;
}
public void setQName(QName qName) throws GovernanceException {
public void setQName(QName qName) {

}
};
Expand All @@ -224,7 +224,7 @@ public static GovernanceArtifactImpl create(final Registry registry, final Strin
public QName getQName() {
return null;
}
public void setQName (QName qName) throws GovernanceException {}
public void setQName (QName qName) {}
};
}

Expand Down Expand Up @@ -401,6 +401,7 @@ public void attachLifecycle(String name) throws GovernanceException {
/**
* De-associate lifecycle associated with the artifact
*
* @param lifecycleName lifecycle name of which actions are needed
* @throws GovernanceException if an error occurred.
*/
public void detachLifecycle(String lifecycleName) throws GovernanceException {
Expand Down Expand Up @@ -1425,7 +1426,7 @@ public boolean compareTo(GovernanceArtifact artifact) {
* @param artifactID lifecycle associated artifacts id.
* @param lcName lifecycle name.
* @return a map of current lifecycle state duration colour and duration.
* @throws GovernanceException
* @throws GovernanceException throws if the operation failed.
*/
@Override
public Map<String, String> getCurrentStateDuration(String artifactID, String lcName) throws GovernanceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl;
import org.wso2.carbon.governance.api.exception.GovernanceException;
import org.wso2.carbon.governance.api.util.GovernanceConstants;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.registry.core.utils.RegistryUtils;
import org.wso2.carbon.registry.extensions.handlers.utils.EndpointUtils;

import javax.xml.namespace.QName;
Expand All @@ -35,9 +33,6 @@
import javax.xml.stream.XMLStreamReader;
import java.io.StringReader;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.Set;

/**
* This represents an endpoint artifact stored on the Registry. Endpoint artifacts are created as a
Expand Down Expand Up @@ -89,7 +84,7 @@ public QName getQName() {
}

@Override
public void setQName(QName qName) throws GovernanceException {
public void setQName(QName qName) {
this.name = qName.getLocalPart();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public GenericArtifact newGovernanceArtifact(QName qName) throws GovernanceExcep
* Creates a new artifact from the given qualified name.
*
* @param qName the qualified name of this artifact.
* @param content content
*
* @return the artifact added.
* @throws GovernanceException if the operation failed.
Expand Down Expand Up @@ -271,7 +272,7 @@ public GenericArtifact[] findGenericArtifacts(Map<String, List<String>> criteria
* @param facetField field used for faceting
* @param authRequired authorization required flag
* @return term results
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public TermData[] getTermData(Map<String, List<String>> criteria, String facetField, boolean authRequired) throws GovernanceException {
return manager.getTermData(criteria, facetField, authRequired);
Expand Down Expand Up @@ -325,7 +326,7 @@ public GenericArtifact[] getAllGenericArtifacts() throws GovernanceException {
* @param lcName Name of the lifecycle
*
* @return GenericArtifact array
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public GenericArtifact[] getAllGenericArtifactsByLifecycle(String lcName) throws GovernanceException {
return getGenericArtifacts(manager.getAllGovernanceArtifactsByLifecycle(lcName));
Expand All @@ -338,7 +339,7 @@ public GenericArtifact[] getAllGenericArtifactsByLifecycle(String lcName) throws
* @param lcState Name of the current lifecycle state
*
* @return GenericArtifact array
* @throws GovernanceException
* @throws GovernanceException if the operation failed.
*/
public GenericArtifact[] getAllGenericArtifactsByLifecycleStatus(String lcName, String lcState) throws GovernanceException {
return getGenericArtifacts(manager.getAllGovernanceArtifactsByLIfecycleStatus(lcName, lcState));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class GenericArtifactImpl extends GovernanceArtifactImpl implements Gener
* Copy constructor used for cloning.
*
* @param artifact the object to be copied.
* @param mediaType Media type
*/
protected GenericArtifactImpl(GovernanceArtifact artifact, String mediaType) {
super((GovernanceArtifactImpl)artifact);
Expand All @@ -72,6 +73,7 @@ protected GenericArtifactImpl(GovernanceArtifact artifact, String mediaType, Lis
*
* @param id the resource identifier.
* @param qName the qualified name.
* @param mediaType Media type
*/
public GenericArtifactImpl(String id, QName qName, String mediaType) {
super(id);
Expand Down Expand Up @@ -155,6 +157,7 @@ public void loadDetails() throws GovernanceException {
* @param artifactNamespaceAttribute the attribute that specifies the namespace of the artifact.
* @param artifactElementNamespace the attribute that specifies the artifact element's
* namespace.
* @param mediaType Media type
*
* @throws GovernanceException if the construction fails.
*/
Expand Down Expand Up @@ -202,7 +205,6 @@ public String getMediaType() {
*
* @param qName the qualified name.
*
* @throws GovernanceException if the operation failed.
*/
public void setQName(QName qName) {
// the path will be synced with the qualified name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl;
import org.wso2.carbon.governance.api.exception.GovernanceException;
import org.wso2.carbon.registry.core.Registry;
Expand Down Expand Up @@ -46,7 +45,6 @@ public class PolicyImpl extends GovernanceArtifactImpl implements Policy {
* Constructor accepting resource path, identifier and a registry instance.
* This constructor should be used only when the policy already saved in the registry.
*
* @param path the resource path.
* @param id the resource identifier.
* @param registry the registry instance.
*
Expand Down Expand Up @@ -171,9 +169,8 @@ public void loadPolicyDetails() throws GovernanceException {
*
* @param qName the qualified name.
*
* @throws GovernanceException if the operation failed.
*/
public void setQName(QName qName) throws GovernanceException {
public void setQName(QName qName) {
// the path will be synced with the qualified name
this.name = qName.getLocalPart();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import org.apache.axiom.om.OMElement;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl;
import org.wso2.carbon.governance.api.exception.GovernanceException;
import org.wso2.carbon.governance.api.util.GovernanceUtils;
Expand Down Expand Up @@ -50,7 +49,6 @@ public class SchemaImpl extends GovernanceArtifactImpl implements Schema {
* Constructor accepting resource path, identifier and a registry instance.
* This constructor should be used only when the wsdl already saved in the registry.
*
* @param path the resource path.
* @param id the resource identifier.
* @param registry the registry instance.
*
Expand Down Expand Up @@ -82,9 +80,8 @@ public QName getQName() {
*
* @param qName the qualified name.
*
* @throws GovernanceException if the operation failed.
*/
public void setQName(QName qName) throws GovernanceException {
public void setQName(QName qName) {
// the path will be synced with the qualified name
this.qname = qName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class ServiceManager {
* Constructor accepting an instance of the registry to use.
*
* @param registry the instance of the registry.
* @throws RegistryException if the operation failed.
*/
public ServiceManager(Registry registry) throws RegistryException {
this(registry, GovernanceConstants.SERVICE_MEDIA_TYPE);
Expand All @@ -57,6 +58,7 @@ public ServiceManager(Registry registry) throws RegistryException {
*
* @param registry the instance of the registry.
* @param mediaType the media type of resources being saved or fetched.
* @throws RegistryException if the operation failed.
*/
protected ServiceManager(Registry registry, String mediaType) throws RegistryException {
GovernanceArtifactConfiguration configuration =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ public QName getQName() {
*
* @param qName the qualified name.
*
* @throws GovernanceException if the operation failed.
*/
public void setQName(QName qName) throws GovernanceException {
public void setQName(QName qName) {
// the path will be synced with the qualified name
this.qName = qName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public void setMediaType(String mediaType) {

/**
* Method to get the content URL.
*
* @return content URL
*/
public String getContentURL() {
return contentURL;
Expand Down Expand Up @@ -123,6 +125,8 @@ public void setExtension(String extension) {

/**
* Method to get whether namespace exists.
*
* @return existence of namespace
*/
public boolean hasNamespace() {
return hasNamespace;
Expand Down Expand Up @@ -487,6 +491,8 @@ public void setLifecycle(String lifecycle) {
/**
* Method to associate taxonomy with the artifact configuration
*
* @param disable enable or disable
* @param isGlobal global or not
* @param taxonomyName Name of the taxonomy associated with the artifact configuration
*/
public void setTaxonomy(String taxonomyName,Boolean disable,Boolean isGlobal) {
Expand Down
Loading