com.xpn.xwiki.plugin.webdav.resources.domain
Class DavTempFile
java.lang.Object
com.xpn.xwiki.plugin.webdav.resources.partial.AbstractDavResource
com.xpn.xwiki.plugin.webdav.resources.domain.DavTempFile
- All Implemented Interfaces:
- XWikiDavResource, org.apache.jackrabbit.webdav.DavResource
public class DavTempFile
- extends AbstractDavResource
Resource used to represent temporary resources demanded by various dav clients.
- Version:
- $Id: 0b7d4746850c6a6fa0794ca48e1bf874e12d59d0 $
| Fields inherited from interface org.apache.jackrabbit.webdav.DavResource |
COMPLIANCE_CLASS, METHODS |
|
Method Summary |
void |
addMember(org.apache.jackrabbit.webdav.DavResource resource,
org.apache.jackrabbit.webdav.io.InputContext inputContext)
|
XWikiDavResource |
decode(String[] tokens,
int next)
The default decode implementation assumes the next resource in chain to be a temporary resource. |
boolean |
exists()
|
org.apache.jackrabbit.webdav.DavResourceIterator |
getMembers()
|
long |
getModificationTime()
|
void |
init(XWikiDavResource parent,
String name,
String relativePath)
Initializes this resource with common attributes inherited from the parent. |
boolean |
isCollection()
|
void |
move(org.apache.jackrabbit.webdav.DavResource destination)
|
void |
removeMember(org.apache.jackrabbit.webdav.DavResource resource)
|
void |
setCollection()
Sets the isCollection flag to true. |
void |
setModified(Date modificationTime)
Changes the time of modification of this resource. |
void |
spool(org.apache.jackrabbit.webdav.io.OutputContext outputContext)
|
void |
update(byte[] data,
Date modificationTime)
|
| Methods inherited from class com.xpn.xwiki.plugin.webdav.resources.partial.AbstractDavResource |
addLockManager, addVirtualMember, alterProperties, alterProperties, clearCache, copy, equals, getCollection, getComplianceClass, getContext, getDisplayName, getFactory, getHref, getInitMembers, getLocator, getLock, getLocks, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, getSupportedMethods, getVirtualMembers, getVirtualProperties, hashCode, hasLock, init, isLockable, isTempResource, lock, refreshLock, removeProperty, removeVirtualMember, setProperty, unlock |
DavTempFile
public DavTempFile()
- Default constructor.
init
public void init(XWikiDavResource parent,
String name,
String relativePath)
throws org.apache.jackrabbit.webdav.DavException
- Description copied from interface:
XWikiDavResource
- Initializes this resource with common attributes inherited from the parent.
- Specified by:
init in interface XWikiDavResource- Overrides:
init in class AbstractDavResource
- Parameters:
parent - Parent resource.name - Name of this resource.relativePath - Path relative to the parent resource.
- Throws:
org.apache.jackrabbit.webdav.DavException - If the initialization fails.
decode
public XWikiDavResource decode(String[] tokens,
int next)
throws org.apache.jackrabbit.webdav.DavException
- Description copied from class:
AbstractDavResource
- The default decode implementation assumes the next resource in chain to be a temporary resource. Sub classes
should override this method to provide their own implementation.
- Specified by:
decode in interface XWikiDavResource- Overrides:
decode in class AbstractDavResource
- Parameters:
tokens - segmented URL.next - next index to be processed by this resource.
- Returns:
- the
XWikiDavResource corresponding to the given URL.
- Throws:
org.apache.jackrabbit.webdav.DavException - If it's not possible to decode the URL.
exists
public boolean exists()
spool
public void spool(org.apache.jackrabbit.webdav.io.OutputContext outputContext)
throws IOException
- Throws:
IOException
getMembers
public org.apache.jackrabbit.webdav.DavResourceIterator getMembers()
addMember
public void addMember(org.apache.jackrabbit.webdav.DavResource resource,
org.apache.jackrabbit.webdav.io.InputContext inputContext)
throws org.apache.jackrabbit.webdav.DavException
- Throws:
org.apache.jackrabbit.webdav.DavException
removeMember
public void removeMember(org.apache.jackrabbit.webdav.DavResource resource)
throws org.apache.jackrabbit.webdav.DavException
- Throws:
org.apache.jackrabbit.webdav.DavException
move
public void move(org.apache.jackrabbit.webdav.DavResource destination)
throws org.apache.jackrabbit.webdav.DavException
- Throws:
org.apache.jackrabbit.webdav.DavException
update
public void update(byte[] data,
Date modificationTime)
- Parameters:
data - Data to be set as the content of this temporary file.modificationTime - Time of modification.
setModified
public void setModified(Date modificationTime)
- Changes the time of modification of this resource.
- Parameters:
modificationTime - Time of modification.
setCollection
public void setCollection()
- Sets the isCollection flag to true.
isCollection
public boolean isCollection()
getModificationTime
public long getModificationTime()
Copyright © 2004-2013 XWiki. All Rights Reserved.