added javadoc to GeoportalExporter

This commit is contained in:
Francesco Mangiacrapa 2024-04-23 15:17:02 +02:00
parent 4f6bf4613e
commit 82e8674d2c
2 changed files with 21 additions and 13 deletions

View File

@ -1,6 +1,8 @@
# gCube URI Resolver
The URI Resolver is a RESTful service which gives access via HTTP(s) to different gCube Resolver services and gCube Applications
The URI Resolver is a RESTful service which gives access via HTTP(s) to different gCube Resolver services and gCube Applications.
The URI Resolver production service is available at [D4Science URI Resolver](https://data.d4science.org/)
## Built With
@ -11,7 +13,7 @@ The URI Resolver is a RESTful service which gives access via HTTP(s) to differen
You can find the URI Resolver documentation at [URI Resolver Wiki Page](https://wiki.gcube-system.org/gcube/URI_Resolver)
The API documentation accessible by [links](https://wiki.gcube-system.org/gcube/URI_Resolver#Instances) is provided by [Enunciate](https://github.com/stoicflame/enunciate/)
The API documentation accessible by this [link](https://wiki.gcube-system.org/gcube/URI_Resolver#Instances) is provided by [Enunciate](https://github.com/stoicflame/enunciate/)
## Change log

View File

@ -80,11 +80,13 @@ public class GeoportalExporter {
* Export.
*
* @param req the req
* @param export_type the export type
* @param export_type the export type. Must be a value of the enum
* {#ACCEPTED_EXPORT_TYPE}
* @param ucdID the ucd ID
* @param projectID the project ID
* @param asURL the as URL
* @return the response
* @param asURL the as URL. If true returns the project exported as an URL
* in the response
* @return the response. Can be an URL or a Stream of the project exported.
* @throws WebApplicationException the web application exception
*/
@GET
@ -141,8 +143,8 @@ public class GeoportalExporter {
+ " seems to be not configured in the context: " + context,
this.getClass(), helpURI);
}
// if the configuration exists in the context
if (checked) {
if (getAsURL) {
try {
LOG.info("Serving request as getAsURL...");
@ -219,11 +221,12 @@ public class GeoportalExporter {
}
/**
* Healthcheck.
*
* Healthcheck. Checks if the export facility is configured in the context (i.e.
* the scope read from input token).
*
* @param req the req
* @param export_type the export type
* @return the response
* @return an object of type {#GeoportalJsonResponse) that contains the response
* @throws WebApplicationException the web application exception
*/
@GET
@ -275,11 +278,14 @@ public class GeoportalExporter {
}
/**
* View job.
* View job. Check the job export status.
*
* @param req the req
* @param jobCode the job code
* @return the response
* @param jobCode the job code. The job ID assigned by export facility that
* returns a waiting HTML page
* @return the response. It is a {#GeoportalJsonResponse} with the status of the
* job. An export job completed contains the URL of the project
* exported.
* @throws WebApplicationException the web application exception
*/
@GET
@ -307,7 +313,7 @@ public class GeoportalExporter {
if (fetchedPDF == null) {
theJson.setState(Status.NOT_FOUND.getReasonPhrase());
theJson.setMessage("No job found with id: "+jobCode);
theJson.setMessage("No job found with id: " + jobCode);
try {
jsonReponse = responseToString(theJson);
LOG.info("viewJob returning not found: " + jsonReponse);