org.abstracthorizon.danube.webdav.java
Class StringDelegate
java.lang.Object
org.abstracthorizon.danube.webdav.java.Bean
org.abstracthorizon.danube.webdav.java.Delegate
org.abstracthorizon.danube.webdav.java.StringDelegate
- Direct Known Subclasses:
- ObjectType, Property
public abstract class StringDelegate
- extends Delegate
Convenience class for deletage. It allows resource's value to be obtained
as a string and resource's value to be stored as a string.
- Author:
- Daniel Sendula
Fields inherited from class org.abstracthorizon.danube.webdav.java.Bean |
path |
StringDelegate
public StringDelegate(String path)
- Constructor
- Parameters:
path
- path
getValueAsString
protected abstract String getValueAsString(JavaWebDAVResourceAdapter adapter)
- Returns value as a string
- Parameters:
adapter
- adapter
- Returns:
- value of the resource as a string
resourceLength
public int resourceLength(JavaWebDAVResourceAdapter adapter)
- Returns resource length by checking resource's value string length
- Specified by:
resourceLength
in class Delegate
- Parameters:
adapter
- adapter
- Returns:
- resource length
getInputStream
public InputStream getInputStream(JavaWebDAVResourceAdapter adapter)
- Returns an input stream of the value returned from the
getValueAsString(JavaWebDAVResourceAdapter)
method.
- Overrides:
getInputStream
in class Delegate
- Parameters:
adapter
- adapter
- Returns:
- input stream or
null
getContentType
public String getContentType(JavaWebDAVResourceAdapter adapter)
- Returns type as "text/plain"
- Overrides:
getContentType
in class Delegate
- Parameters:
adapter
-
- Returns:
- "text/plain"
Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.