just a refactor to thrownBySource
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@173781 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f9e4cbcf24
commit
d47e6b4748
|
@ -19,7 +19,6 @@ import org.gcube.common.scope.api.ScopeProvider;
|
|||
import org.gcube.datatransfer.resolver.applicationprofile.ApplicationProfileNotFoundException;
|
||||
import org.gcube.datatransfer.resolver.applicationprofile.GcubeQuery;
|
||||
import org.gcube.datatransfer.resolver.applicationprofile.GcubeQuery.FIELD_TYPE;
|
||||
import org.gcube.datatransfer.resolver.applicationprofile.ScopeUtil;
|
||||
import org.gcube.resources.discovery.client.api.DiscoveryClient;
|
||||
import org.gcube.resources.discovery.client.queries.api.Query;
|
||||
import org.gcube.resources.discovery.client.queries.impl.QueryBox;
|
||||
|
|
|
@ -21,7 +21,7 @@ import lombok.experimental.Builder;
|
|||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@XmlType (propOrder={"name","httpErrorCode","message","reportedBy"})
|
||||
@XmlType (propOrder={"name","httpErrorCode","message","thrownBy"})
|
||||
public class ErrorReport implements Serializable{
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,6 @@ public class ErrorReport implements Serializable{
|
|||
private Integer httpErrorCode;
|
||||
private String name;
|
||||
private String message;
|
||||
private String reportedBy;
|
||||
private String thrownBy;
|
||||
|
||||
}
|
||||
|
|
|
@ -38,9 +38,10 @@ public class BadParameterException extends WebApplicationException {
|
|||
* @param request the request
|
||||
* @param httpReturnStatus the http return status
|
||||
* @param message the message
|
||||
* @param reportedBySource the reported by source
|
||||
* @param thrownBySource the thrown by source
|
||||
* @param help the help
|
||||
*/
|
||||
public BadParameterException(HttpServletRequest request, Status httpReturnStatus, String message, Class reportedBySource, URI help) {
|
||||
public BadParameterException(HttpServletRequest request, Status httpReturnStatus, String message, Class thrownBySource, URI help) {
|
||||
|
||||
super(Response.status(httpReturnStatus).entity(
|
||||
ExceptionReport.builder().
|
||||
|
@ -53,7 +54,7 @@ public class BadParameterException extends WebApplicationException {
|
|||
httpErrorCode(Status.BAD_REQUEST.getStatusCode()).
|
||||
name(Status.BAD_REQUEST.name())
|
||||
.message(message).
|
||||
reportedBy(reportedBySource.getName()).build())
|
||||
thrownBy(thrownBySource.getName()).build())
|
||||
.build())
|
||||
.type(MediaType.APPLICATION_XML).build());
|
||||
|
||||
|
|
|
@ -37,9 +37,10 @@ public class BadRequestException extends WebApplicationException {
|
|||
* @param request the request
|
||||
* @param httpReturnStatus the http return status
|
||||
* @param message the message
|
||||
* @param reportedBySource the reported by source
|
||||
* @param thrownBySource the thrown by source
|
||||
* @param help the help
|
||||
*/
|
||||
public BadRequestException(HttpServletRequest request, Status httpReturnStatus, String message, Class reportedBySource, URI help) {
|
||||
public BadRequestException(HttpServletRequest request, Status httpReturnStatus, String message, Class thrownBySource, URI help) {
|
||||
super(Response.status(httpReturnStatus).entity(
|
||||
ExceptionReport.builder().
|
||||
request(Util.getFullURL(request)).
|
||||
|
@ -51,7 +52,7 @@ public class BadRequestException extends WebApplicationException {
|
|||
httpErrorCode(Status.BAD_REQUEST.getStatusCode()).
|
||||
name(Status.BAD_REQUEST.name())
|
||||
.message(message).
|
||||
reportedBy(reportedBySource.getName()).build())
|
||||
thrownBy(thrownBySource.getName()).build())
|
||||
.build())
|
||||
.type(MediaType.APPLICATION_XML).build());
|
||||
|
||||
|
|
|
@ -37,9 +37,10 @@ public class InternalServerException extends InternalServerErrorException {
|
|||
* @param request the request
|
||||
* @param httpReturnStatus the http return status
|
||||
* @param message the message
|
||||
* @param reportedBySource the reported by source
|
||||
* @param thrownBySource the thrown by source
|
||||
* @param help the help
|
||||
*/
|
||||
public InternalServerException(HttpServletRequest request, Status httpReturnStatus, String message, Class reportedBySource, URI help) {
|
||||
public InternalServerException(HttpServletRequest request, Status httpReturnStatus, String message, Class thrownBySource, URI help) {
|
||||
super(Response.status(httpReturnStatus).entity(
|
||||
ExceptionReport.builder().
|
||||
request(Util.getFullURL(request)).
|
||||
|
@ -51,7 +52,7 @@ public class InternalServerException extends InternalServerErrorException {
|
|||
httpErrorCode(Status.INTERNAL_SERVER_ERROR.getStatusCode()).
|
||||
name(Status.INTERNAL_SERVER_ERROR.name())
|
||||
.message(message).
|
||||
reportedBy(reportedBySource.getName()).build())
|
||||
thrownBy(thrownBySource.getName()).build())
|
||||
.build())
|
||||
.type(MediaType.APPLICATION_XML).build());
|
||||
|
||||
|
|
|
@ -38,9 +38,10 @@ public class WrongParameterException extends WebApplicationException {
|
|||
* @param request the request
|
||||
* @param httpReturnStatus the http return status
|
||||
* @param message the message
|
||||
* @param reportedBySource the reported by source
|
||||
* @param thrownBySource the reported by source
|
||||
* @param help the help
|
||||
*/
|
||||
public WrongParameterException(HttpServletRequest request, Status httpReturnStatus, String message, Class reportedBySource, URI help) {
|
||||
public WrongParameterException(HttpServletRequest request, Status httpReturnStatus, String message, Class thrownBySource, URI help) {
|
||||
super(Response.status(httpReturnStatus).entity(
|
||||
ExceptionReport.builder().
|
||||
request(Util.getFullURL(request)).
|
||||
|
@ -52,7 +53,7 @@ public class WrongParameterException extends WebApplicationException {
|
|||
httpErrorCode(Status.BAD_REQUEST.getStatusCode()).
|
||||
name(Status.BAD_REQUEST.name())
|
||||
.message(message).
|
||||
reportedBy(reportedBySource.getName()).build())
|
||||
thrownBy(thrownBySource.getName()).build())
|
||||
.build())
|
||||
.type(MediaType.APPLICATION_XML).build());
|
||||
|
||||
|
|
Loading…
Reference in New Issue