|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.webdav.WebdavLock
public abstract class WebdavLock
This class is an Abstract Representation of a Webdav Lock handling all webdav mechanism in memory.
Field Summary | |
---|---|
static int |
DEFAULT_TIMEOUT
|
protected int |
depth
|
protected String |
id
|
protected long |
lastMod
|
static int |
MAX_TIMEOUT
|
static MessageDigest |
md5Digest
|
protected String |
owner
|
static String |
REVISION
|
protected String |
scope
|
protected String |
secret
|
protected int |
timeout
|
protected Collection<String> |
tokens
|
protected String |
type
|
protected String |
uri
|
Constructor Summary | |
---|---|
protected |
WebdavLock(String uri,
WebdavContext ctxt)
The lock must be a relative URI to the path folders starting and ending by '/'. |
Method Summary | |
---|---|
void |
acquire(WebdavResource resource,
WebdavContext ctxt)
This method is called for other mecanism outside of Webdav that need to be notified by lock |
String |
encode(byte[] binaryData)
Encodes the 128 bit (16 bytes) MD5 into a 32 character String. |
String |
generateId(WebdavContext ctxt)
Generate an MD5 id from the given locks parameters |
int |
getDepth()
This method retrieve the Depth of the Lock |
long |
getExpiredTime()
This method retrieve the expired timeout |
String |
getId()
An MD5 representation of the Lock |
long |
getLastModified()
This method retrieve the lastmodified of timeout |
String |
getOwner()
This method retrieve the Owner of the Lock |
String |
getScope()
This method retrieve the Scope of the Lock |
int |
getTimeout()
This method retrieve the Timeout of the Lock without lastMod |
Collection<String> |
getTokens()
This method retrieve the Tokens of the Lock |
String |
getType()
This method retrieve the Type of the Lock |
boolean |
hasExpired()
|
boolean |
isExclusive()
|
void |
refresh(WebdavResource resource,
WebdavContext ctxt)
This method is called for other mecanism outside of Webdav that need to be notified by unlock |
void |
release(WebdavResource resource,
WebdavContext ctxt)
This method is called for other mecanism outside of Webdav that need to be notified by unlock |
void |
setDepth(int depth)
This method set the Depth of the Lock |
void |
setOwner(String owner)
This method set the Owner of the Lock |
void |
setScope(String scope)
This method set the Scope of the Lock |
void |
setTimeout(int timeout)
This method set the Timeout of the Lock |
void |
setType(String type)
This method set the Type of the Lock |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final int DEFAULT_TIMEOUT
public static final int MAX_TIMEOUT
public static final MessageDigest md5Digest
protected String uri
protected long lastMod
protected int timeout
protected int depth
protected String type
protected String scope
protected String owner
protected String id
protected String secret
protected Collection<String> tokens
Constructor Detail |
---|
protected WebdavLock(String uri, WebdavContext ctxt)
uri
- the lock urictxt
- the Webdav ContextWebdavFileSystem.getLocks(WebdavResource, WebdavContext)
Method Detail |
---|
public int getDepth()
public void setDepth(int depth)
depth
- public long getExpiredTime()
public long getLastModified()
public int getTimeout()
public void setTimeout(int timeout)
timeout
- the timeout since mdatepublic String getType()
public void setType(String type)
type
- the type of the lockpublic String getScope()
public void setScope(String scope)
scope
- the scope of the lockpublic String getOwner()
public void setOwner(String owner)
owner
- the owner of the lockpublic String getId()
public Collection<String> getTokens()
public boolean isExclusive()
public boolean hasExpired()
public String toString()
toString
in class Object
public void acquire(WebdavResource resource, WebdavContext ctxt)
ctxt
- the Webdav Contextpublic void release(WebdavResource resource, WebdavContext ctxt)
ctxt
- the Webdav Contextpublic void refresh(WebdavResource resource, WebdavContext ctxt)
ctxt
- the Webdav Contextpublic String generateId(WebdavContext ctxt)
ctxt
- the WebDav Context
public String encode(byte[] binaryData)
binaryData
- Array containing the digest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |