public abstract class AnnoResource extends Object implements GetableResource, PropFindableResource, DeletableResource, CopyableResource, MoveableResource, LockableResource, ConditionalCompatibleResource, CommonResource, DigestResource, PostableResource, ReportableResource, AccessControlledResource, DisplayNameResource
AccessControlledResource.Priviledge| Modifier and Type | Field and Description |
|---|---|
protected Set<AccessControlledResource.Priviledge> |
acl |
protected AnnotationResourceFactory |
annoFactory |
protected JsonResult |
jsonResult |
protected String |
nameOverride |
protected AnnoCollectionResource |
parent |
protected String |
realm |
protected Object |
source |
NONE, READ_BROWSE, READ_CONTENT, READ_WRITE| Constructor and Description |
|---|
AnnoResource(AnnotationResourceFactory outer,
Object source,
AnnoCollectionResource parent) |
protected Object source
protected final AnnotationResourceFactory annoFactory
protected AnnoCollectionResource parent
protected JsonResult jsonResult
protected String nameOverride
protected Set<AccessControlledResource.Priviledge> acl
protected String realm
public AnnoResource(AnnotationResourceFactory outer, Object source, AnnoCollectionResource parent)
public String processForm(Map<String,String> parameters, Map<String,FileItem> files) throws BadRequestException, NotAuthorizedException, ConflictException
processForm in interface PostableResourceBadRequestExceptionNotAuthorizedExceptionConflictExceptionpublic void sendContent(OutputStream out, Range range, Map<String,String> params, String contentType) throws IOException, NotAuthorizedException, BadRequestException, NotFoundException
sendContent in interface GetableResourceIOExceptionNotAuthorizedExceptionBadRequestExceptionNotFoundExceptionpublic String getUniqueId()
getUniqueId in interface Resourcepublic Object authenticate(String user, String password)
authenticate in interface Resourcepublic Object authenticate(DigestResponse digestRequest)
authenticate in interface DigestResourcepublic boolean authorise(Request request, Request.Method method, Auth auth)
public Date getModifiedDate()
getModifiedDate in interface Resourcepublic String checkRedirect(Request request) throws NotAuthorizedException, BadRequestException
checkRedirect in interface ResourceNotAuthorizedExceptionBadRequestExceptionpublic void delete()
throws NotAuthorizedException,
ConflictException,
BadRequestException
delete in interface DeletableResourceNotAuthorizedExceptionConflictExceptionBadRequestExceptionpublic boolean isCompatible(Request.Method m)
ConditionalCompatibleResourceisCompatible in interface ConditionalCompatibleResourcem - - the HTTP method in the current requestpublic boolean is(String type)
is in interface CommonResourcepublic Date getCreateDate()
getCreateDate in interface PropFindableResourcepublic void moveTo(CollectionResource rDest, String name) throws ConflictException, NotAuthorizedException, BadRequestException
moveTo in interface MoveableResourceConflictExceptionNotAuthorizedExceptionBadRequestExceptionpublic Object getSource()
public AnnotationResourceFactory getAnnoFactory()
public AnnoCollectionResource getParent()
getParent in interface CommonResourcepublic void copyTo(CollectionResource toCollection, String name) throws NotAuthorizedException, BadRequestException, ConflictException
copyTo in interface CopyableResourceNotAuthorizedExceptionBadRequestExceptionConflictExceptionpublic Long getMaxAgeSeconds(Auth auth)
getMaxAgeSeconds in interface GetableResourcepublic String getContentType(String accepts)
getContentType in interface GetableResourcepublic String getContentType()
public Long getContentLength()
getContentLength in interface GetableResourcepublic boolean isDigestAllowed()
isDigestAllowed in interface DigestResourcepublic ResourceList getAsList()
public String getHref()
public AnnoCollectionResource getRoot()
public String getLink()
public String getDisplayName()
getDisplayName in interface DisplayNameResourcepublic void setDisplayName(String s)
setDisplayName in interface DisplayNameResourcepublic LockResult lock(LockTimeout timeout, LockInfo lockInfo) throws NotAuthorizedException, PreConditionFailedException, LockedException
lock in interface LockableResourceNotAuthorizedExceptionPreConditionFailedExceptionLockedExceptionpublic LockResult refreshLock(String token, LockTimeout timeout) throws NotAuthorizedException, PreConditionFailedException
refreshLock in interface LockableResourceNotAuthorizedExceptionPreConditionFailedExceptionpublic void unlock(String tokenId) throws NotAuthorizedException, PreConditionFailedException
unlock in interface LockableResourceNotAuthorizedExceptionPreConditionFailedExceptionpublic LockToken getCurrentLock()
getCurrentLock in interface LockableResourcepublic String getNameOverride()
public void setNameOverride(String nameOverride)
public HrefList getPrincipalCollectionHrefs()
getPrincipalCollectionHrefs in interface AccessControlledResourcepublic List<AccessControlledResource.Priviledge> getPriviledges(Auth auth)
getPriviledges in interface AccessControlledResourcepublic void setAccessControlList(Map<Principal,List<AccessControlledResource.Priviledge>> privs)
setAccessControlList in interface AccessControlledResourcepublic Map<Principal,List<AccessControlledResource.Priviledge>> getAccessControlList()
getAccessControlList in interface AccessControlledResourcepublic String getPrincipalURL()
getPrincipalURL in interface AccessControlledResourceCopyright © 2021 McEvoy Software Ltd. All rights reserved.