com.ettrema.http.fs
Class FsResource
java.lang.Object
com.ettrema.http.fs.FsResource
- All Implemented Interfaces:
- CopyableResource, DigestResource, LockableResource, MoveableResource, Resource
- Direct Known Subclasses:
- FsDirectoryResource, FsFileResource
public abstract class FsResource
- extends java.lang.Object
- implements Resource, MoveableResource, CopyableResource, LockableResource, DigestResource
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FsResource
public FsResource(java.lang.String host,
FileSystemResourceFactory factory,
java.io.File file)
doCopy
protected abstract void doCopy(java.io.File dest)
getFile
public java.io.File getFile()
getUniqueId
public java.lang.String getUniqueId()
- Specified by:
getUniqueId in interface Resource
getName
public java.lang.String getName()
- Specified by:
getName in interface Resource
authenticate
public java.lang.Object authenticate(java.lang.String user,
java.lang.String password)
- Specified by:
authenticate in interface Resource
authenticate
public java.lang.Object authenticate(DigestResponse digestRequest)
- Specified by:
authenticate in interface DigestResource
isDigestAllowed
public boolean isDigestAllowed()
- Specified by:
isDigestAllowed in interface DigestResource
authorise
public boolean authorise(Request request,
Request.Method method,
Auth auth)
- Specified by:
authorise in interface Resource
getRealm
public java.lang.String getRealm()
- Specified by:
getRealm in interface Resource
getModifiedDate
public java.util.Date getModifiedDate()
- Specified by:
getModifiedDate in interface Resource
getCreateDate
public java.util.Date getCreateDate()
compareTo
public int compareTo(Resource o)
moveTo
public void moveTo(CollectionResource newParent,
java.lang.String newName)
- Specified by:
moveTo in interface MoveableResource
copyTo
public void copyTo(CollectionResource newParent,
java.lang.String newName)
- Specified by:
copyTo in interface CopyableResource
delete
public void delete()
lock
public LockResult lock(LockTimeout timeout,
LockInfo lockInfo)
throws NotAuthorizedException
- Specified by:
lock in interface LockableResource
- Throws:
NotAuthorizedException
refreshLock
public LockResult refreshLock(java.lang.String token)
throws NotAuthorizedException
- Specified by:
refreshLock in interface LockableResource
- Throws:
NotAuthorizedException
unlock
public void unlock(java.lang.String tokenId)
throws NotAuthorizedException
- Specified by:
unlock in interface LockableResource
- Throws:
NotAuthorizedException
getCurrentLock
public LockToken getCurrentLock()
- Specified by:
getCurrentLock in interface LockableResource
Copyright © 2011. All Rights Reserved.