Skip to content
Snippets Groups Projects
Commit 307aa5d6 authored by Nicola Fulvio Calabria's avatar Nicola Fulvio Calabria
Browse files

Task #3546 - Complete CreateNode endpoint implementation. Added tests:

didn't use new Mock Filter for User injection, will include it later
parent f5b92e18
No related branches found
No related tags found
No related merge requests found
package it.inaf.oats.vospace.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.NOT_FOUND)
public class ContainerNotFoundException extends VoSpaceException {
public ContainerNotFoundException(String path) {
super("Container Not Found at path: " + path);
}
}
package it.inaf.oats.vospace.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.CONFLICT)
public class DuplicateNodeException extends VoSpaceException {
public DuplicateNodeException(String path) {
super("Duplicate Node at path: " + path);
}
}
package it.inaf.oats.vospace.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public class InvalidURIException extends VoSpaceException {
public InvalidURIException(String URI, String path) {
super("InvalidURI. Payload node URI: " + URI +
" is not consistent with request path: " + path);
}
public InvalidURIException(String URI)
{
super("InvalidURI. URI: "+URI+ " is not in a valid format");
}
}
package it.inaf.oats.vospace.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public class LinkFoundException extends VoSpaceException {
public LinkFoundException(String path) {
super("Link Found at path: " + path);
}
}
package it.inaf.oats.vospace.exception;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(value = HttpStatus.FORBIDDEN)
public class PermissionDeniedException extends VoSpaceException {
public PermissionDeniedException(String path) {
super("Permission Denied at path: " + path);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment