org.skunk.dav.client
Class DAVFile
java.lang.Object
|
+--org.skunk.dav.client.DAVFile
- All Implemented Interfaces:
- java.lang.Comparable
- public class DAVFile
- extends java.lang.Object
- implements java.lang.Comparable
a wrapper around the results returned by a DAV propfind or other DAV method.
It resembles a beanified ResultSet more than a File object; two DAVFile objects
with the same host, port, and path may have quite different contents, depending
on the sorts of queries that were used to generate it.
Constructor Summary |
DAVFile(java.lang.String path)
|
DAVFile(java.lang.String host,
int port,
java.lang.String filename)
|
DAVFile(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DAVFile
public DAVFile(java.lang.String path)
DAVFile
public DAVFile(java.lang.String host,
int port,
java.lang.String filename)
DAVFile
public DAVFile(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String path)
getName
public java.lang.String getName()
getFullName
public java.lang.String getFullName()
getFullNameWithProtocol
public java.lang.String getFullNameWithProtocol()
getProtocol
public java.lang.String getProtocol()
setProtocol
public void setProtocol(java.lang.String protocol)
getFileName
public java.lang.String getFileName()
getHost
public java.lang.String getHost()
setHost
public void setHost(java.lang.String host)
getPort
public int getPort()
setPort
public void setPort(int port)
getDAVConnection
public DAVConnection getDAVConnection()
isCollection
public boolean isCollection()
addChild
public void addChild(DAVFile child)
children
public java.util.Iterator children()
getChildCount
public int getChildCount()
getChildCollectionCount
public int getChildCollectionCount()
getChildAt
public DAVFile getChildAt(int index)
getChildNamed
public DAVFile getChildNamed(java.lang.String path)
getResourceType
public java.lang.String getResourceType()
setResourceType
public void setResourceType(java.lang.String resourceType)
isLocked
public boolean isLocked()
isExclusiveLocked
public boolean isExclusiveLocked()
getExclusiveLockToken
public java.lang.String getExclusiveLockToken()
getLocks
public Lock[] getLocks()
getExclusiveLock
public Lock getExclusiveLock()
getLock
public Lock getLock(java.lang.String owner)
setExclusiveLock
public void setExclusiveLock(Lock lock)
addLock
public void addLock(Lock lock)
removeLock
public void removeLock(Lock lock)
getLastModified
public java.lang.String getLastModified()
setLastModified
public void setLastModified(java.lang.String lastModified)
getCreationDate
public java.lang.String getCreationDate()
setCreationDate
public void setCreationDate(java.lang.String creationDate)
getExclusiveLockOwner
public java.lang.String getExclusiveLockOwner()
getEtag
public java.lang.String getEtag()
setEtag
public void setEtag(java.lang.String etag)
getContentLength
public java.lang.Long getContentLength()
setContentLength
public void setContentLength(java.lang.Long contentLength)
getCustomProperty
public java.lang.String getCustomProperty(DAVProperty property)
setCustomProperty
public void setCustomProperty(DAVProperty property,
java.lang.String propertyValue)
getCustomProperties
public java.util.Map getCustomProperties()
getSupportedLocks
public Lock[] getSupportedLocks()
addSupportedLock
public void addSupportedLock(Lock shlock)
getAvailableProperties
public DAVProperty[] getAvailableProperties()
- N.B. this only has meaning after a propname query. An allprop or prop
will not populate this structure and this method will then return null
addAvailableProperty
public void addAvailableProperty(DAVProperty property)
getStatus
public java.lang.Integer getStatus()
setStatus
public void setStatus(java.lang.Integer status)
getDisplayName
public java.lang.String getDisplayName()
setDisplayName
public void setDisplayName(java.lang.String displayName)
getContentLanguage
public java.lang.String getContentLanguage()
setContentLanguage
public void setContentLanguage(java.lang.String contentLanguage)
getContentType
public java.lang.String getContentType()
setContentType
public void setContentType(java.lang.String contentType)
getLinks
public Link[] getLinks()
addLink
public void addLink(Link l)
getResponseDescription
public java.lang.String getResponseDescription()
setResponseDescription
public void setResponseDescription(java.lang.String responseDescription)
toVerboseString
public java.lang.String toVerboseString()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
compareToDAVFile
public int compareToDAVFile(DAVFile otherFile)
compareTo
public int compareTo(java.lang.Object otherObject)
- Specified by:
compareTo
in interface java.lang.Comparable