Package io.milton.http.annotated
Class AnnoResource
java.lang.Object
io.milton.http.annotated.AnnoResource
- All Implemented Interfaces:
CommonResource,ConditionalCompatibleResource,AccessControlledResource,CopyableResource,DeletableResource,DigestResource,DisplayNameResource,GetableResource,LockableResource,MoveableResource,PostableResource,PropFindableResource,ReportableResource,Resource
- Direct Known Subclasses:
AnnoCollectionResource,AnnoFileResource
public abstract class AnnoResource
extends Object
implements GetableResource, PropFindableResource, DeletableResource, CopyableResource, MoveableResource, LockableResource, ConditionalCompatibleResource, CommonResource, DigestResource, PostableResource, ReportableResource, AccessControlledResource, DisplayNameResource
- Author:
- brad
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.milton.resource.AccessControlledResource
AccessControlledResource.Priviledge -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set<AccessControlledResource.Priviledge>protected final AnnotationResourceFactoryprotected JsonResultprotected Stringprotected AnnoCollectionResourceprotected Stringprotected ObjectFields inherited from interface io.milton.resource.AccessControlledResource
NONE, READ_BROWSE, READ_CONTENT, READ_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionAnnoResource(AnnotationResourceFactory outer, Object source, AnnoCollectionResource parent) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(DigestResponse digestRequest) authenticate(String user, String password) booleanauthorise(Request request, Request.Method method, Auth auth) checkRedirect(Request request) voidcopyTo(CollectionResource toCollection, String name) voiddelete()getContentType(String accepts) getHref()getLink()getMaxAgeSeconds(Auth auth) getName()getPriviledges(Auth auth) getRealm()getRoot()booleanbooleanReturn whether or not this resource might be compatible with the given HTTP method.booleanlock(LockTimeout timeout, LockInfo lockInfo) voidmoveTo(CollectionResource rDest, String name) refreshLock(String token, LockTimeout timeout) voidsendContent(OutputStream out, Range range, Map<String, String> params, String contentType) voidvoidvoidsetNameOverride(String nameOverride) void
-
Field Details
-
source
-
annoFactory
-
parent
-
jsonResult
-
nameOverride
-
acl
-
realm
-
-
Constructor Details
-
AnnoResource
-
-
Method Details
-
processForm
public String processForm(Map<String, String> parameters, Map<String, throws BadRequestException, NotAuthorizedException, ConflictExceptionFileItem> files) - Specified by:
processFormin interfacePostableResource- Throws:
BadRequestExceptionNotAuthorizedExceptionConflictException
-
sendContent
public void sendContent(OutputStream out, Range range, Map<String, String> params, String contentType) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException- Specified by:
sendContentin interfaceGetableResource- Throws:
IOExceptionNotAuthorizedExceptionBadRequestExceptionNotFoundException
-
getUniqueId
- Specified by:
getUniqueIdin interfaceResource
-
getName
-
authenticate
- Specified by:
authenticatein interfaceResource
-
authenticate
- Specified by:
authenticatein interfaceDigestResource
-
authorise
-
getRealm
-
getModifiedDate
- Specified by:
getModifiedDatein interfaceResource
-
checkRedirect
- Specified by:
checkRedirectin interfaceResource- Throws:
NotAuthorizedExceptionBadRequestException
-
delete
- Specified by:
deletein interfaceDeletableResource- Throws:
NotAuthorizedExceptionConflictExceptionBadRequestException
-
isCompatible
Description copied from interface:ConditionalCompatibleResourceReturn whether or not this resource might be compatible with the given HTTP method. Note that a resource MUST also implement the corresponding milton interface (E.g. GetableResource)- Specified by:
isCompatiblein interfaceConditionalCompatibleResource- Parameters:
m- - the HTTP method in the current request- Returns:
- - false to say that this resource must not handle this request, true to indicate that it might, if it also implements the appropriate method interface
-
is
- Specified by:
isin interfaceCommonResource
-
getCreateDate
- Specified by:
getCreateDatein interfacePropFindableResource
-
moveTo
public void moveTo(CollectionResource rDest, String name) throws ConflictException, NotAuthorizedException, BadRequestException - Specified by:
moveToin interfaceMoveableResource- Throws:
ConflictExceptionNotAuthorizedExceptionBadRequestException
-
getSource
-
getAnnoFactory
-
getParent
- Specified by:
getParentin interfaceCommonResource
-
copyTo
public void copyTo(CollectionResource toCollection, String name) throws NotAuthorizedException, BadRequestException, ConflictException - Specified by:
copyToin interfaceCopyableResource- Throws:
NotAuthorizedExceptionBadRequestExceptionConflictException
-
getMaxAgeSeconds
- Specified by:
getMaxAgeSecondsin interfaceGetableResource
-
getContentType
- Specified by:
getContentTypein interfaceGetableResource
-
getContentType
-
getContentLength
- Specified by:
getContentLengthin interfaceGetableResource
-
isDigestAllowed
public boolean isDigestAllowed()- Specified by:
isDigestAllowedin interfaceDigestResource
-
getAsList
-
getHref
-
getRoot
-
getLink
-
getDisplayName
- Specified by:
getDisplayNamein interfaceDisplayNameResource
-
setDisplayName
- Specified by:
setDisplayNamein interfaceDisplayNameResource
-
lock
public LockResult lock(LockTimeout timeout, LockInfo lockInfo) throws NotAuthorizedException, PreConditionFailedException, LockedException - Specified by:
lockin interfaceLockableResource- Throws:
NotAuthorizedExceptionPreConditionFailedExceptionLockedException
-
refreshLock
public LockResult refreshLock(String token, LockTimeout timeout) throws NotAuthorizedException, PreConditionFailedException - Specified by:
refreshLockin interfaceLockableResource- Throws:
NotAuthorizedExceptionPreConditionFailedException
-
unlock
- Specified by:
unlockin interfaceLockableResource- Throws:
NotAuthorizedExceptionPreConditionFailedException
-
getCurrentLock
- Specified by:
getCurrentLockin interfaceLockableResource
-
getNameOverride
-
setNameOverride
-
getPrincipalCollectionHrefs
- Specified by:
getPrincipalCollectionHrefsin interfaceAccessControlledResource
-
getPriviledges
- Specified by:
getPriviledgesin interfaceAccessControlledResource
-
setAccessControlList
- Specified by:
setAccessControlListin interfaceAccessControlledResource
-
getAccessControlList
- Specified by:
getAccessControlListin interfaceAccessControlledResource
-
getPrincipalURL
- Specified by:
getPrincipalURLin interfaceAccessControlledResource
-