Project

General

Profile

« Previous | Next » 

Revision 60105

[Trunk | Admin Tools Library]:
1. GenericPortalController.java: Added Generic portal controller for handling all portals without type limitation.
2. SimpleErrorController.java: Added /error request mapping, to format all error that are not explicitly handled.
3. AdminToolsLibraryExceptionsHandler.java: Added methods
"notFoundException()" (ChangeSetPersister.NotFoundException),
"forbiddenException()" (ForbiddenException),
"duplicateKeyException()" (DuplicateKeyException).
4. ForbiddenException.java: [NEW] Added class ForbiddenException extends RuntimeException.
5. ExceptionResponse.java: Added field HttpStatus status.
6. SingleValueWrapperResponse.java: [Moved from Admin Tools Service to Admin Tools Library]
Generic class SingleValueWrapperResponse created, with field "value" of type defined when instance is created (used for returning single value from API methods).

View differences:

ExceptionResponse.java
1 1
package eu.dnetlib.uoaadmintoolslibrary.responses;
2 2

  
3
import java.util.List;
3
import org.springframework.http.HttpStatus;
4 4

  
5 5
public class ExceptionResponse {
6

  
6
    private HttpStatus status;
7 7
    private String errorCode;
8 8
    private String errorMessage;
9 9
    private String errors;
10 10

  
11
    public ExceptionResponse() {
12
    }
11
    public ExceptionResponse() {}
13 12

  
13
    public HttpStatus getStatus() { return status; }
14

  
15
    public void setStatus(HttpStatus status) { this.status = status; }
16

  
14 17
    public String getErrorCode() {
15 18
        return errorCode;
16 19
    }

Also available in: Unified diff