public interface EntityRequestHandler
| Modifier and Type | Field and Description |
|---|---|
static String |
BATCH
The reserved word used to trigger batch operations
|
static String |
COMPENSATE_METHOD
This is the special indicator used to denote that POST should be translated to a PUT or DELETE
in order to compensate for browser limitations,
Example: /people/1?
|
static String |
DESCRIBE
The reserved word used to trigger entity descriptions
|
static String |
FAKE_ID
The id used in generated URLs
|
static String |
HEADER_ENTITY_ID
This is the name of the header which will contain the id of newly created entities
|
static String |
HEADER_ENTITY_REFERENCE
This is the name of the header which will contain the reference of created/updated entities
|
static String |
HEADER_ENTITY_URL
This is the name of the header that will contain created/updated entities SHOW URL
|
static String |
SLASH_BATCH |
static String |
SLASH_DESCRIBE |
| Modifier and Type | Method and Description |
|---|---|
String |
handleEntityAccess(HttpServletRequest req,
HttpServletResponse res,
String path)
Handles the servlet request response cycle for all direct servlet accesses,
logically, we only want to let this request continue on if the entity exists AND
there is an http access provider to handle it AND the user can access it
(there is some auth completed already or no auth is required)
|
String |
handleEntityError(HttpServletRequest req,
Throwable error)
Handles an error which occurs by sending an email and logging extra info about the failure
|
static final String DESCRIBE
static final String SLASH_DESCRIBE
static final String BATCH
static final String SLASH_BATCH
static final String HEADER_ENTITY_ID
static final String HEADER_ENTITY_REFERENCE
static final String HEADER_ENTITY_URL
static final String FAKE_ID
static final String COMPENSATE_METHOD
String handleEntityAccess(HttpServletRequest req, HttpServletResponse res, String path)
req - the servlet requestres - the servlet responsepath - the path from the request (if null it will be generated from the req)EntityException - if entity could not be found or failure parsingString handleEntityError(HttpServletRequest req, Throwable error)
req - the current requesterror - the current error that occurredCopyright © 2023. All rights reserved.