|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.components.source.impl.WebDAVSource
public class WebDAVSource
A source implementation to get access to WebDAV repositories.
webdav://[user[:password]@]host[:port][/path][?cocoon:webdav-depth][&cocoon:webdav-action]
cocoon:webdav-depth
allows to specify the default depth
to use during initialization of the webdav resource.
cocoon:webdav-action
allows to specify a default action
to take upon initialization of the webdav resource.
Method Summary | |
---|---|
boolean |
canCancel(OutputStream stream)
Can the data sent to an OutputStream returned by
getOutputStream() be cancelled ? |
void |
cancel(OutputStream stream)
Cancel the data sent to an OutputStream returned by
getOutputStream() . |
void |
copyTo(Source source)
Copy the current source to a specified destination. |
void |
delete()
Delete this source (unimplemented). |
boolean |
exists()
Does this source actually exist ? |
Source |
getChild(String childName)
Get a collection child. |
Collection |
getChildren()
Get the collection children. |
long |
getContentLength()
Return the content length of the content or -1 if the length is unknown |
InputStream |
getInputStream()
Return an InputStream object to read from the source. |
long |
getLastModified()
Get the last modification date. |
String |
getMimeType()
The mime-type of the content described by this object. |
String |
getName()
Get the name of this resource. |
OutputStream |
getOutputStream()
Get an OutputStream where raw bytes can be written to. |
Source |
getParent()
Get the parent. |
String |
getScheme()
Get the scheme for this Source. |
protected String |
getSecureURI()
Return the URI securely, without username and password |
SourceProperty[] |
getSourceProperties()
Returns a enumeration of the properties |
SourceProperty |
getSourceProperty(String namespace,
String name)
Returns a property from a source. |
String |
getURI()
Return the unique identifer for this source |
SourceValidity |
getValidity()
Get the Validity object. |
boolean |
isCollection()
Check if this source is a collection. |
void |
makeCollection()
Create the collection, if it doesn't exist. |
void |
moveTo(Source source)
Move the current source to a specified destination. |
static WebDAVSource |
newWebDAVSource(org.apache.commons.httpclient.HttpURL url,
String protocol,
Logger logger,
WebDAVEventFactory eventfactory)
Static factory method to obtain a Source. |
void |
refresh()
Refresh the content of this object after the underlying data content has changed. |
void |
removeSourceProperty(String namespace,
String name)
Remove a specified source property. |
void |
setSourceProperty(SourceProperty sourceproperty)
Sets a property for a source. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static WebDAVSource newWebDAVSource(org.apache.commons.httpclient.HttpURL url, String protocol, Logger logger, WebDAVEventFactory eventfactory) throws org.apache.commons.httpclient.URIException
org.apache.commons.httpclient.URIException
public String getScheme()
getScheme
in interface Source
public String getURI()
getURI
in interface Source
protected String getSecureURI()
public SourceValidity getValidity()
null
is returned.
getValidity
in interface Source
public void refresh()
refresh
in interface Source
public InputStream getInputStream() throws IOException, SourceException
InputStream
object to read from the source.
This is the data at the point of invocation of this method,
so if this is Modifiable, you might get different content
from two different invocations.
getInputStream
in interface Source
IOException
SourceException
public String getMimeType()
null
.
getMimeType
in interface Source
public long getContentLength()
getContentLength
in interface Source
public long getLastModified()
getLastModified
in interface Source
public boolean exists()
exists
in interface Source
public Source getChild(String childName) throws SourceException
getChild
in interface TraversableSource
SourceException
TraversableSource.getChild(java.lang.String)
public Collection getChildren() throws SourceException
getChildren
in interface TraversableSource
SourceException
TraversableSource.getChildren()
public String getName()
getName
in interface TraversableSource
TraversableSource.getName()
public Source getParent() throws SourceException
getParent
in interface TraversableSource
SourceException
TraversableSource.getParent()
public boolean isCollection()
isCollection
in interface TraversableSource
TraversableSource.isCollection()
public OutputStream getOutputStream() throws IOException
OutputStream
where raw bytes can be written to.
The signification of these bytes is implementation-dependent and
is not restricted to a serialized XML document.
getOutputStream
in interface ModifiableSource
IOException
public boolean canCancel(OutputStream stream)
OutputStream
returned by
getOutputStream()
be cancelled ?
canCancel
in interface ModifiableSource
public void cancel(OutputStream stream) throws SourceException
OutputStream
returned by
getOutputStream()
.
After cancel, the stream should no more be used.
cancel
in interface ModifiableSource
SourceException
public void delete() throws SourceException
delete
in interface ModifiableSource
SourceException
ModifiableSource.delete()
public void makeCollection() throws SourceException
makeCollection
in interface ModifiableTraversableSource
SourceException
ModifiableTraversableSource.makeCollection()
public SourceProperty[] getSourceProperties() throws SourceException
getSourceProperties
in interface InspectableSource
SourceException
- If an exception occurs.public SourceProperty getSourceProperty(String namespace, String name) throws SourceException
getSourceProperty
in interface InspectableSource
namespace
- Namespace of the propertyname
- Name of the property
SourceException
- If an exception occurs.public void removeSourceProperty(String namespace, String name) throws SourceException
removeSourceProperty
in interface InspectableSource
namespace
- Namespace of the property.name
- Name of the property.
SourceException
- If an exception occurs.public void setSourceProperty(SourceProperty sourceproperty) throws SourceException
setSourceProperty
in interface InspectableSource
sourceproperty
- Property of the source
SourceException
- If an exception occurs during this operationpublic void moveTo(Source source) throws SourceException
moveTo
in interface MoveableSource
source
-
SourceException
- If an exception occurs during the move.public void copyTo(Source source) throws SourceException
copyTo
in interface MoveableSource
source
-
SourceException
- If an exception occurs during the copy.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |