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:
Olivier Lamy 2011-11-14 17:58:54 +00:00
parent 9b4e61dee7
commit b8c79cf8c6
2 changed files with 6 additions and 7 deletions

View File

@ -26,8 +26,8 @@ import javax.xml.bind.annotation.XmlRootElement;
* @author Olivier Lamy * @author Olivier Lamy
* @since 1.4-M2 * @since 1.4-M2
*/ */
@XmlRootElement( name = "restError" ) @XmlRootElement( name = "archivaRestError" )
public class RestError public class ArchivaRestError
{ {
private int httpErrorCode; private int httpErrorCode;
@ -36,12 +36,12 @@ public class RestError
private String errorMessage; private String errorMessage;
public RestError() public ArchivaRestError()
{ {
// no op // no op
} }
public RestError( ArchivaRestServiceException e) public ArchivaRestError( ArchivaRestServiceException e )
{ {
httpErrorCode = e.getHttpErrorCode(); httpErrorCode = e.getHttpErrorCode();
errorKey = e.getErrorKey(); errorKey = e.getErrorKey();

View File

@ -19,10 +19,9 @@ package org.apache.archiva.rest.services.interceptors;
*/ */
import org.apache.archiva.rest.api.services.ArchivaRestServiceException; 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 org.springframework.stereotype.Service;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider; import javax.ws.rs.ext.Provider;
@ -38,7 +37,7 @@ public class ArchivaRestServiceExceptionMapper
{ {
public Response toResponse( ArchivaRestServiceException e ) public Response toResponse( ArchivaRestServiceException e )
{ {
RestError restError = new RestError( e ); ArchivaRestError restError = new ArchivaRestError( e );
Response.ResponseBuilder responseBuilder = Response.status( e.getHttpErrorCode() ).entity( restError ); Response.ResponseBuilder responseBuilder = Response.status( e.getHttpErrorCode() ).entity( restError );
return responseBuilder.build(); return responseBuilder.build();
} }