Interface EntityViewAccessProvider
-
- All Known Subinterfaces:
AccessFormats,AccessViews,RequestHandler
public interface EntityViewAccessProviderRepresents a bean which is capable of handling access for anEntityView, this replaces theHttpServletAccessProvideras all entity URLs are now being parsed so more information can be provided through theEntityView
This interface would be typically implemented from a tool (webapp) context, and registered with theEntityViewAccessProviderManagerin a context loader listener
If the implementation throws aSecurityExceptionduring the course of this method, the access will be directed to a login page or authentication method before being redirected back to the implementation method
If you want to control the requests which make it through to this by format type you can optionally implementAccessFormats- Author:
- Aaron Zeckoski (aaron@caret.cam.ac.uk)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleAccess(EntityView view, HttpServletRequest req, HttpServletResponse res)Make and return the data responses for this type of data provider for a specific entity view and entity reference (contained within the entity view), use the request to get any additional sent in information you may need or want and use the response to hold the output you generate
NOTE: If you decide that you cannot handle this access request for any reason you can either throw anEntityExceptionto specify why OR throw a generalException, both will kill the request entirely but the general exception will pass through the system while theEntityExceptionwill produce a handled result
-
-
-
Method Detail
-
handleAccess
void handleAccess(EntityView view, HttpServletRequest req, HttpServletResponse res)
Make and return the data responses for this type of data provider for a specific entity view and entity reference (contained within the entity view), use the request to get any additional sent in information you may need or want and use the response to hold the output you generate
NOTE: If you decide that you cannot handle this access request for any reason you can either throw anEntityExceptionto specify why OR throw a generalException, both will kill the request entirely but the general exception will pass through the system while theEntityExceptionwill produce a handled result- Parameters:
view- an entity view, should contain all the information related to the incoming entity URLreq- the servlet request (available in case you need to get anything out of it)res- the servlet response, put the correct data response into the outputstream- Throws:
FormatUnsupportedException- if the format requested in the view is not supportedEntityException- if there is a request processing/handling failure
-
-