public abstract class FsResource extends Object implements com.bradmcevoy.http.Resource, com.bradmcevoy.http.MoveableResource, com.bradmcevoy.http.CopyableResource, com.bradmcevoy.http.LockableResource, com.bradmcevoy.http.DigestResource
| Constructor and Description |
|---|
FsResource(String host,
FileSystemResourceFactory factory,
File file) |
| Modifier and Type | Method and Description |
|---|---|
Object |
authenticate(com.bradmcevoy.http.http11.auth.DigestResponse digestRequest) |
Object |
authenticate(String user,
String password) |
boolean |
authorise(com.bradmcevoy.http.Request request,
com.bradmcevoy.http.Request.Method method,
com.bradmcevoy.http.Auth auth) |
int |
compareTo(com.bradmcevoy.http.Resource o) |
void |
copyTo(com.bradmcevoy.http.CollectionResource newParent,
String newName) |
void |
delete() |
protected abstract void |
doCopy(File dest) |
Date |
getCreateDate() |
com.bradmcevoy.http.LockToken |
getCurrentLock() |
File |
getFile() |
Date |
getModifiedDate() |
String |
getName() |
String |
getRealm() |
String |
getUniqueId() |
boolean |
isDigestAllowed() |
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 |
unlock(String tokenId) |
public FsResource(String host, FileSystemResourceFactory factory, File file)
protected abstract void doCopy(File dest)
public File getFile()
public String getUniqueId()
getUniqueId in interface com.bradmcevoy.http.Resourcepublic String getName()
getName in interface com.bradmcevoy.http.Resourcepublic Object authenticate(String user, String password)
authenticate in interface com.bradmcevoy.http.Resourcepublic Object authenticate(com.bradmcevoy.http.http11.auth.DigestResponse digestRequest)
authenticate in interface com.bradmcevoy.http.DigestResourcepublic boolean isDigestAllowed()
isDigestAllowed in interface com.bradmcevoy.http.DigestResourcepublic boolean authorise(com.bradmcevoy.http.Request request,
com.bradmcevoy.http.Request.Method method,
com.bradmcevoy.http.Auth auth)
authorise in interface com.bradmcevoy.http.Resourcepublic String getRealm()
getRealm in interface com.bradmcevoy.http.Resourcepublic Date getModifiedDate()
getModifiedDate in interface com.bradmcevoy.http.Resourcepublic Date getCreateDate()
public int compareTo(com.bradmcevoy.http.Resource o)
public void moveTo(com.bradmcevoy.http.CollectionResource newParent,
String newName)
moveTo in interface com.bradmcevoy.http.MoveableResourcepublic void copyTo(com.bradmcevoy.http.CollectionResource newParent,
String newName)
copyTo in interface com.bradmcevoy.http.CopyableResourcepublic void delete()
public com.bradmcevoy.http.LockResult lock(com.bradmcevoy.http.LockTimeout timeout,
com.bradmcevoy.http.LockInfo lockInfo)
throws com.bradmcevoy.http.exceptions.NotAuthorizedException
lock in interface com.bradmcevoy.http.LockableResourcecom.bradmcevoy.http.exceptions.NotAuthorizedExceptionpublic com.bradmcevoy.http.LockResult refreshLock(String token) throws com.bradmcevoy.http.exceptions.NotAuthorizedException
refreshLock in interface com.bradmcevoy.http.LockableResourcecom.bradmcevoy.http.exceptions.NotAuthorizedExceptionpublic void unlock(String tokenId) throws com.bradmcevoy.http.exceptions.NotAuthorizedException
unlock in interface com.bradmcevoy.http.LockableResourcecom.bradmcevoy.http.exceptions.NotAuthorizedExceptionpublic com.bradmcevoy.http.LockToken getCurrentLock()
getCurrentLock in interface com.bradmcevoy.http.LockableResourceCopyright © 2016. All rights reserved.