DeleteHandler, GetHandler, OptionsHandler, PatchHandler, PostHandler, PutHandlerpublic class BaseLdpHandler
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
protected static java.util.Optional<org.trellisldp.api.AuditService> |
audit |
|
protected static java.util.List<org.trellisldp.api.ConstraintService> |
constraintServices |
|
protected java.util.Map<java.lang.String,java.lang.String> |
partitions |
|
protected static org.apache.commons.rdf.api.RDF |
rdf |
|
protected LdpRequest |
req |
|
protected org.trellisldp.api.ResourceService |
resourceService |
|
protected static java.util.List<org.apache.commons.rdf.api.RDFSyntax> |
SUPPORTED_RDF_TYPES |
| Constructor | Description |
|---|---|
BaseLdpHandler(java.util.Map<java.lang.String,java.lang.String> partitions,
LdpRequest req,
org.trellisldp.api.ResourceService resourceService) |
A base class for response handling
|
| Modifier and Type | Method | Description |
|---|---|---|
protected static void |
checkCache(javax.ws.rs.core.Request request,
java.time.Instant modified,
javax.ws.rs.core.EntityTag etag) |
Check the request for a cache-related response
|
protected static void |
checkDeleted(org.trellisldp.api.Resource res,
java.lang.String identifier) |
Check if this is a deleted resource, and if so return an appropriate response
|
protected static final org.apache.commons.rdf.api.RDF rdf
protected static java.util.Optional<org.trellisldp.api.AuditService> audit
protected static final java.util.List<org.trellisldp.api.ConstraintService> constraintServices
protected static final java.util.List<org.apache.commons.rdf.api.RDFSyntax> SUPPORTED_RDF_TYPES
protected final java.util.Map<java.lang.String,java.lang.String> partitions
protected final LdpRequest req
protected final org.trellisldp.api.ResourceService resourceService
public BaseLdpHandler(java.util.Map<java.lang.String,java.lang.String> partitions,
LdpRequest req,
org.trellisldp.api.ResourceService resourceService)
partitions - the partitionsreq - the LDP requestresourceService - the resource serviceprotected static void checkDeleted(org.trellisldp.api.Resource res,
java.lang.String identifier)
res - the resourceidentifier - the identifierjavax.ws.rs.WebApplicationException - a 410 Gone exceptionprotected static void checkCache(javax.ws.rs.core.Request request,
java.time.Instant modified,
javax.ws.rs.core.EntityTag etag)
request - the requestmodified - the modified timeetag - the etagjavax.ws.rs.WebApplicationException - either a 412 Precondition Failed or a 304 Not Modified, depending on the context.