org.sakaiproject.service.legacy.entity
Interface HttpAccess

All Known Implementing Classes:
HttpAccessBase

public interface HttpAccess

Provide entity access via http for use in the access servlet.


Method Summary
 void handleAccess(HttpServletRequest req, HttpServletResponse res, Reference ref, Collection copyrightAcceptedRefs)
          Handle an HTTP request for access.
 

Method Detail

handleAccess

public void handleAccess(HttpServletRequest req,
                         HttpServletResponse res,
                         Reference ref,
                         Collection copyrightAcceptedRefs)
                  throws PermissionException,
                         IdUnusedException,
                         ServerOverloadException,
                         CopyrightException
Handle an HTTP request for access. The request and response objects are provider.
The access is for the referenced entity.
Use the response object to send the headers, length, content type, and bytes of the response in whatever manner needed.
Make the response ONLY if it is permitted and exists and otherwise valid. Use the exceptions for any error handling.

Parameters:
req - The request object.
res - The response object.
ref - The entity reference
copyrightAcceptedRefs - The collection (entity reference String) of entities that the end user in this session have already accepted the copyright for.
Throws:
PermissionException - Throw this if the current user does not have permission for the access.
IdUnusedException - Throw this if the ref is not supported or the entity is not available for access in any way.
ServerOverloadException - Throw this if you are rejecting an otherwise valid request because of some sort of server resource shortage or limit.
CopyrightException - Throw this if you are rejecting an otherwise valid request because the user needs to agree to the copyright and has not yet done so.