mirror of https://github.com/apache/archiva.git
use a Archiva* name
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1201812 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9b4e61dee7
commit
b8c79cf8c6
|
@ -26,8 +26,8 @@ import javax.xml.bind.annotation.XmlRootElement;
|
|||
* @author Olivier Lamy
|
||||
* @since 1.4-M2
|
||||
*/
|
||||
@XmlRootElement( name = "restError" )
|
||||
public class RestError
|
||||
@XmlRootElement( name = "archivaRestError" )
|
||||
public class ArchivaRestError
|
||||
{
|
||||
|
||||
private int httpErrorCode;
|
||||
|
@ -36,12 +36,12 @@ public class RestError
|
|||
|
||||
private String errorMessage;
|
||||
|
||||
public RestError()
|
||||
public ArchivaRestError()
|
||||
{
|
||||
// no op
|
||||
}
|
||||
|
||||
public RestError( ArchivaRestServiceException e)
|
||||
public ArchivaRestError( ArchivaRestServiceException e )
|
||||
{
|
||||
httpErrorCode = e.getHttpErrorCode();
|
||||
errorKey = e.getErrorKey();
|
|
@ -19,10 +19,9 @@ package org.apache.archiva.rest.services.interceptors;
|
|||
*/
|
||||
|
||||
import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
|
||||
import org.apache.archiva.rest.services.RestError;
|
||||
import org.apache.archiva.rest.services.ArchivaRestError;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.ext.ExceptionMapper;
|
||||
import javax.ws.rs.ext.Provider;
|
||||
|
@ -38,7 +37,7 @@ public class ArchivaRestServiceExceptionMapper
|
|||
{
|
||||
public Response toResponse( ArchivaRestServiceException e )
|
||||
{
|
||||
RestError restError = new RestError( e );
|
||||
ArchivaRestError restError = new ArchivaRestError( e );
|
||||
Response.ResponseBuilder responseBuilder = Response.status( e.getHttpErrorCode() ).entity( restError );
|
||||
return responseBuilder.build();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue