public class HandlerHelper extends Object
| Constructor and Description |
|---|
HandlerHelper(AuthenticationService authenticationService) |
HandlerHelper(AuthenticationService authenticationService,
AuthorisationListener authorisationListener) |
HandlerHelper(AuthenticationService authenticationService,
List<StorageChecker> storageCheckers) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationService.AuthStatus |
checkAuthentication(HttpManager manager,
Resource resource,
Request request) |
boolean |
checkAuthorisation(HttpManager manager,
Resource resource,
Request request) |
boolean |
checkAuthorisation(HttpManager manager,
Resource resource,
Request request,
Request.Method method,
Auth auth)
Check that the user has the priviledge to perform the requested operation
on the primary resource, ie that which is specified or implied in the URL
Note that for a PUT we can
|
boolean |
checkExpects(Http11ResponseHandler responseHandler,
Request request,
Response response)
Checks the expect header, and responds if necessary
|
StorageChecker.StorageErrorReason |
checkStorageOnAdd(Request request,
CollectionResource nearestParent,
Path parentPath,
String host) |
StorageChecker.StorageErrorReason |
checkStorageOnReplace(Request request,
CollectionResource parentCol,
Resource replaced,
String host) |
boolean |
doCheckRedirect(Http11ResponseHandler responseHandler,
Request request,
Response response,
Resource resource) |
boolean |
isEnableExpectContinue() |
boolean |
isLocked(Resource inResource) |
boolean |
isLockedOut(Request inRequest,
Resource inResource) |
boolean |
isNotCompatible(Resource r,
Request.Method m)
Returns true to indicate that the given resource MUST NOT handle the
given method.
|
boolean |
missingLock(Request inRequest,
Resource inParentcol)
Check of an IF header, and if it exists return true if it contains "no-lock"
|
void |
setEnableExpectContinue(boolean enableExpectContinue) |
public HandlerHelper(AuthenticationService authenticationService, List<StorageChecker> storageCheckers)
public HandlerHelper(AuthenticationService authenticationService)
public HandlerHelper(AuthenticationService authenticationService, AuthorisationListener authorisationListener)
public boolean checkExpects(Http11ResponseHandler responseHandler, Request request, Response response)
responseHandler - request - response - public AuthenticationService.AuthStatus checkAuthentication(HttpManager manager, Resource resource, Request request)
public boolean checkAuthorisation(HttpManager manager, Resource resource, Request request)
public boolean checkAuthorisation(HttpManager manager, Resource resource, Request request, Request.Method method, Auth auth)
manager - resource - request - auth - public boolean doCheckRedirect(Http11ResponseHandler responseHandler, Request request, Response response, Resource resource) throws NotAuthorizedException, BadRequestException
public boolean isLocked(Resource inResource)
public boolean isLockedOut(Request inRequest, Resource inResource)
inRequest - inResource - public boolean missingLock(Request inRequest, Resource inParentcol)
inRequest - inParentcol - public StorageChecker.StorageErrorReason checkStorageOnReplace(Request request, CollectionResource parentCol, Resource replaced, String host)
public StorageChecker.StorageErrorReason checkStorageOnAdd(Request request, CollectionResource nearestParent, Path parentPath, String host)
public boolean isNotCompatible(Resource r, Request.Method m)
r - - the resource to checkm - - the HTTP request methodpublic boolean isEnableExpectContinue()
public void setEnableExpectContinue(boolean enableExpectContinue)
Copyright © 2021 McEvoy Software Ltd. All rights reserved.