added two more annotations (for ckan resource and simple field)

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@133393 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-10-21 20:33:38 +00:00
parent 584cac5372
commit 4b6d48850b
5 changed files with 37 additions and 2 deletions

View File

@ -3,6 +3,9 @@
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<dependent-module archiveName="ckan-util-library-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-util-library/ckan-util-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="context-root" value="grsf-publisher-ws"/>
<property name="java-output-path" value="/grsf-publisher-ws/target/classes"/>
</wb-module>

View File

@ -0,0 +1,16 @@
package org.gcube.data_catalogue.grsf_publish_ws.custom_annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotate a field of the json input representing a future CKAN field (key, value)
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface CkanField {
}

View File

@ -0,0 +1,16 @@
package org.gcube.data_catalogue.grsf_publish_ws.custom_annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Annotate a field of the json input representing a future CKAN resource
* @author Costantino Perciante at ISTI-CNR (costantino.perciante@isti.cnr.it)
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface CkanResource {
}

View File

@ -8,11 +8,11 @@ import javax.ws.rs.ext.Provider;
import org.gcube.data_catalogue.grsf_publish_ws.json.output.ResponseBean;
import org.slf4j.LoggerFactory;
@Provider
/**
* Exception thrown when @Valid fail
* @author Costantino Perciante at ISTI-CNR
*/
@Provider
public class ApplicationException implements ExceptionMapper<Exception> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ApplicationException.class);

View File

@ -10,11 +10,11 @@ import javax.ws.rs.ext.Provider;
import org.gcube.data_catalogue.grsf_publish_ws.json.output.ResponseBean;
import org.slf4j.LoggerFactory;
@Provider
/**
* Exception thrown on fail
* @author Costantino Perciante at ISTI-CNR
*/
@Provider
public class ValidationException implements ExceptionMapper<javax.validation.ValidationException> {
private static final org.slf4j.Logger logger = LoggerFactory.getLogger(ValidationException.class);