org.abstracthorizon.danube.webdav.java
Class Property

java.lang.Object
  extended by org.abstracthorizon.danube.webdav.java.Bean
      extended by org.abstracthorizon.danube.webdav.java.Delegate
          extended by org.abstracthorizon.danube.webdav.java.StringDelegate
              extended by org.abstracthorizon.danube.webdav.java.Property

public class Property
extends StringDelegate

This class defines property value as a WebDAV's resource (file). Reading the file will return object's property content as a string, while writing to the file will change (if possible) property's value from the string (using property editors defined)

Author:
Daniel Sendula

Field Summary
protected  String propertyName
          Cached property name
 
Fields inherited from class org.abstracthorizon.danube.webdav.java.Delegate
objectPath
 
Fields inherited from class org.abstracthorizon.danube.webdav.java.Bean
path
 
Constructor Summary
Property(String path)
          Constructor
 
Method Summary
 OutputStream getOutputStream(JavaWebDAVResourceAdapter adapter)
          Returns an output stream to write value to.
protected  String getValueAsString(JavaWebDAVResourceAdapter adapter)
          Reads property as a string value
protected  boolean setValueAsString(JavaWebDAVResourceAdapter adapter, String value)
          This method sets property's value from a given string
 
Methods inherited from class org.abstracthorizon.danube.webdav.java.StringDelegate
getContentType, getInputStream, resourceLength
 
Methods inherited from class org.abstracthorizon.danube.webdav.java.Delegate
getInputStream, getOutputStream, getResourceETag
 
Methods inherited from class org.abstracthorizon.danube.webdav.java.Bean
equals, getPath, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertyName

protected String propertyName
Cached property name

Constructor Detail

Property

public Property(String path)
Constructor

Parameters:
path - path to the property
Method Detail

getValueAsString

protected String getValueAsString(JavaWebDAVResourceAdapter adapter)
Reads property as a string value

Specified by:
getValueAsString in class StringDelegate
Parameters:
adapter -
Returns:
property value as a string

setValueAsString

protected boolean setValueAsString(JavaWebDAVResourceAdapter adapter,
                                   String value)
This method sets property's value from a given string

Parameters:
adapter - adapter
value - value as a string

getOutputStream

public OutputStream getOutputStream(JavaWebDAVResourceAdapter adapter)
Returns an output stream to write value to.

Overrides:
getOutputStream in class Delegate
Parameters:
adapter - adapter
Returns:
output stream


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.