@ApplicationScoped @Path(value="{path: .*}") public class TrellisHttpResource extends Object
Constructor and Description |
---|
TrellisHttpResource()
For use with RESTeasy and CDI.
|
TrellisHttpResource(ServiceBundler trellis)
Create a Trellis HTTP resource matcher.
|
TrellisHttpResource(ServiceBundler trellis,
Map<String,IRI> extensions,
String baseUrl)
Create a Trellis HTTP resource matcher.
|
Modifier and Type | Method and Description |
---|---|
CompletionStage<Response> |
createResource(Request request,
UriInfo uriInfo,
HttpHeaders headers,
SecurityContext secContext,
InputStream body)
Perform a POST operation on a LDP Resource.
|
CompletionStage<Response> |
deleteResource(Request request,
UriInfo uriInfo,
HttpHeaders headers,
SecurityContext secContext)
Perform a DELETE operation on an LDP Resource.
|
CompletionStage<Response> |
getResource(Request request,
UriInfo uriInfo,
HttpHeaders headers)
Perform a GET operation on an LDP Resource.
|
CompletionStage<Response> |
getResourceHeaders(Request request,
UriInfo uriInfo,
HttpHeaders headers)
Perform a HEAD operation on an LDP Resource.
|
void |
initialize()
Initialize the Trellis backend with a root container quads.
|
CompletionStage<Response> |
options(Request request,
UriInfo uriInfo,
HttpHeaders headers)
Perform an OPTIONS operation on an LDP Resource.
|
CompletionStage<Response> |
setResource(Request request,
UriInfo uriInfo,
HttpHeaders headers,
SecurityContext secContext,
InputStream body)
Perform a PUT operation on a LDP Resource.
|
CompletionStage<Response> |
updateResource(Request request,
UriInfo uriInfo,
HttpHeaders headers,
SecurityContext secContext,
String body)
Perform a PATCH operation on an LDP Resource.
|
@Inject public TrellisHttpResource(ServiceBundler trellis)
trellis
- the Trellis application bundlepublic TrellisHttpResource()
public TrellisHttpResource(ServiceBundler trellis, Map<String,IRI> extensions, String baseUrl)
trellis
- the Trellis application bundleextensions
- the extension graph mappingbaseUrl
- a base URL@PostConstruct public void initialize() throws Exception
Exception
- if there was an error initializing the root resource@GET @Timed public CompletionStage<Response> getResource(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers)
uriInfo
- the URI infoheaders
- the HTTP headersrequest
- the request@HEAD @Timed public CompletionStage<Response> getResourceHeaders(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers)
uriInfo
- the URI infoheaders
- the HTTP headersrequest
- the request@OPTIONS @Timed public CompletionStage<Response> options(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers)
uriInfo
- the URI infoheaders
- the HTTP headersrequest
- the request@PATCH @Timed public CompletionStage<Response> updateResource(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context SecurityContext secContext, String body)
uriInfo
- the URI infosecContext
- the security contextheaders
- the HTTP headersrequest
- the requestbody
- the body@DELETE @Timed public CompletionStage<Response> deleteResource(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context SecurityContext secContext)
uriInfo
- the URI infosecContext
- the security contextheaders
- the HTTP headersrequest
- the request@POST @Timed public CompletionStage<Response> createResource(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context SecurityContext secContext, InputStream body)
uriInfo
- the URI infosecContext
- the security contextheaders
- the HTTP headersrequest
- the requestbody
- the body@PUT @Timed public CompletionStage<Response> setResource(@Context Request request, @Context UriInfo uriInfo, @Context HttpHeaders headers, @Context SecurityContext secContext, InputStream body)
uriInfo
- the URI infosecContext
- the security contextheaders
- the HTTP headersrequest
- the requestbody
- the body