diff --git a/src/main/java/org/gcube/portlets/user/uriresolvermanager/geoportal/GeoportalExporterAPI.java b/src/main/java/org/gcube/portlets/user/uriresolvermanager/geoportal/GeoportalExporterAPI.java index 8cd4b15..fc28ae0 100644 --- a/src/main/java/org/gcube/portlets/user/uriresolvermanager/geoportal/GeoportalExporterAPI.java +++ b/src/main/java/org/gcube/portlets/user/uriresolvermanager/geoportal/GeoportalExporterAPI.java @@ -7,6 +7,15 @@ import org.gcube.portlets.user.uriresolvermanager.entity.ServiceAccessPoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/** + * The Class GeoportalExporterAPI. + * + * The endpoints provided by GeoportalExporter service in the URI-Resolver service + * + * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it + * + * Apr 23, 2024 + */ public class GeoportalExporterAPI { private GeoportalExporterEndpoint endpoint; @@ -18,11 +27,26 @@ public class GeoportalExporterAPI { public static String DEFAULT_TYPE = "pdf"; + /** + * Instantiates a new geoportal exporter API. + * + * @throws Exception the exception + */ public GeoportalExporterAPI() throws Exception { this.endpoint = new GeoportalExporterEndpoint(); this.serviceAccessPoint = this.endpoint.getServiceAccessPoint(); } + /** + * Export project. + * + * @param type the type + * @param ucdID the ucd ID + * @param projectID the project ID + * @param asURL the as URL + * @return the url + * @throws MalformedURLException the malformed URL exception + */ public URL exportProject(String type, String ucdID, String projectID, boolean asURL) throws MalformedURLException { if (type == null || type.isEmpty()) type = DEFAULT_TYPE; @@ -35,12 +59,26 @@ public class GeoportalExporterAPI { return new URL(api); } + /** + * View job. + * + * @param jobCode the job code + * @return the url + * @throws MalformedURLException the malformed URL exception + */ public URL viewJob(String jobCode) throws MalformedURLException { String api = String.format("%s/view/%s", serviceAccessPoint.getServiceUrl(), jobCode); LOG.info("returning viewJob API: " + api); return new URL(api); } + /** + * Healthcheck. + * + * @param type the type + * @return the url + * @throws MalformedURLException the malformed URL exception + */ public URL healthcheck(String type) throws MalformedURLException { if (type == null || type.isEmpty()) type = DEFAULT_TYPE;