public class DocumentResource extends Object implements com.bradmcevoy.http.CopyableResource, com.bradmcevoy.http.DeletableResource, com.bradmcevoy.http.GetableResource, com.bradmcevoy.http.MoveableResource, com.bradmcevoy.http.PropFindableResource, com.bradmcevoy.http.PropPatchableResource, com.bradmcevoy.http.LockableResource, com.bradmcevoy.http.QuotaResource
Constructor and Description |
---|
DocumentResource(Document doc) |
Modifier and Type | Method and Description |
---|---|
Object |
authenticate(String user,
String password) |
boolean |
authorise(com.bradmcevoy.http.Request request,
com.bradmcevoy.http.Request.Method method,
com.bradmcevoy.http.Auth auth) |
String |
checkRedirect(com.bradmcevoy.http.Request request) |
void |
copyTo(com.bradmcevoy.http.CollectionResource newParent,
String newName) |
void |
delete() |
Long |
getContentLength() |
String |
getContentType(String accepts) |
Date |
getCreateDate() |
com.bradmcevoy.http.LockToken |
getCurrentLock() |
Long |
getMaxAgeSeconds(com.bradmcevoy.http.Auth auth) |
Date |
getModifiedDate() |
String |
getName() |
Long |
getQuotaAvailable() |
Long |
getQuotaUsed() |
String |
getRealm() |
String |
getUniqueId() |
com.bradmcevoy.http.LockResult |
lock(com.bradmcevoy.http.LockTimeout timeout,
com.bradmcevoy.http.LockInfo lockInfo) |
void |
moveTo(com.bradmcevoy.http.CollectionResource newParent,
String newName) |
com.bradmcevoy.http.LockResult |
refreshLock(String token) |
void |
sendContent(OutputStream out,
com.bradmcevoy.http.Range range,
Map<String,String> params,
String contentType) |
void |
setProperties(com.bradmcevoy.http.webdav.PropPatchHandler.Fields fields) |
String |
toString() |
void |
unlock(String tokenId) |
public DocumentResource(Document doc)
public String getUniqueId()
getUniqueId
in interface com.bradmcevoy.http.Resource
public String getName()
getName
in interface com.bradmcevoy.http.Resource
public Object authenticate(String user, String password)
authenticate
in interface com.bradmcevoy.http.Resource
public boolean authorise(com.bradmcevoy.http.Request request, com.bradmcevoy.http.Request.Method method, com.bradmcevoy.http.Auth auth)
authorise
in interface com.bradmcevoy.http.Resource
public String getRealm()
getRealm
in interface com.bradmcevoy.http.Resource
public Date getCreateDate()
getCreateDate
in interface com.bradmcevoy.http.PropFindableResource
public Date getModifiedDate()
getModifiedDate
in interface com.bradmcevoy.http.Resource
public String checkRedirect(com.bradmcevoy.http.Request request)
checkRedirect
in interface com.bradmcevoy.http.Resource
public Long getMaxAgeSeconds(com.bradmcevoy.http.Auth auth)
getMaxAgeSeconds
in interface com.bradmcevoy.http.GetableResource
public String getContentType(String accepts)
getContentType
in interface com.bradmcevoy.http.GetableResource
public Long getContentLength()
getContentLength
in interface com.bradmcevoy.http.GetableResource
public void sendContent(OutputStream out, com.bradmcevoy.http.Range range, Map<String,String> params, String contentType) throws IOException, com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.BadRequestException
sendContent
in interface com.bradmcevoy.http.GetableResource
IOException
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.BadRequestException
public void delete() throws com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.ConflictException, com.bradmcevoy.http.exceptions.BadRequestException
delete
in interface com.bradmcevoy.http.DeletableResource
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.ConflictException
com.bradmcevoy.http.exceptions.BadRequestException
public void setProperties(com.bradmcevoy.http.webdav.PropPatchHandler.Fields fields)
setProperties
in interface com.bradmcevoy.http.PropPatchableResource
public void moveTo(com.bradmcevoy.http.CollectionResource newParent, String newName) throws com.bradmcevoy.http.exceptions.ConflictException, com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.BadRequestException
moveTo
in interface com.bradmcevoy.http.MoveableResource
com.bradmcevoy.http.exceptions.ConflictException
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.BadRequestException
public void copyTo(com.bradmcevoy.http.CollectionResource newParent, String newName) throws com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.BadRequestException, com.bradmcevoy.http.exceptions.ConflictException
copyTo
in interface com.bradmcevoy.http.CopyableResource
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.BadRequestException
com.bradmcevoy.http.exceptions.ConflictException
public com.bradmcevoy.http.LockResult lock(com.bradmcevoy.http.LockTimeout timeout, com.bradmcevoy.http.LockInfo lockInfo) throws com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.PreConditionFailedException, com.bradmcevoy.http.exceptions.LockedException
lock
in interface com.bradmcevoy.http.LockableResource
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.PreConditionFailedException
com.bradmcevoy.http.exceptions.LockedException
public com.bradmcevoy.http.LockResult refreshLock(String token) throws com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.PreConditionFailedException
refreshLock
in interface com.bradmcevoy.http.LockableResource
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.PreConditionFailedException
public void unlock(String tokenId) throws com.bradmcevoy.http.exceptions.NotAuthorizedException, com.bradmcevoy.http.exceptions.PreConditionFailedException
unlock
in interface com.bradmcevoy.http.LockableResource
com.bradmcevoy.http.exceptions.NotAuthorizedException
com.bradmcevoy.http.exceptions.PreConditionFailedException
public com.bradmcevoy.http.LockToken getCurrentLock()
getCurrentLock
in interface com.bradmcevoy.http.LockableResource
public Long getQuotaUsed()
getQuotaUsed
in interface com.bradmcevoy.http.QuotaResource
public Long getQuotaAvailable()
getQuotaAvailable
in interface com.bradmcevoy.http.QuotaResource
Copyright © 2017 Open Knowledge Management System S.L.. All rights reserved.