com.bradmcevoy.property
Interface PropertySource

All Known Implementing Classes:
BeanPropertySource, CustomPropertySource, MultiNamespaceCustomPropertySource, WebDavProtocol

public interface PropertySource

Defines a source of properties. This is used by both propfind and proppatch

Author:
brad

Nested Class Summary
static class PropertySource.PropertyAccessibility
           
static class PropertySource.PropertyMetaData
           
static class PropertySource.PropertySetException
          Exception from setting a field
 
Method Summary
 void clearProperty(javax.xml.namespace.QName name, Resource r)
          Remove the given property.
 java.util.List<javax.xml.namespace.QName> getAllPropertyNames(Resource r)
           
 java.lang.Object getProperty(javax.xml.namespace.QName name, Resource r)
           
 PropertySource.PropertyMetaData getPropertyMetaData(javax.xml.namespace.QName name, Resource r)
          Check to see if the property is known, and if it is writable.
 void setProperty(javax.xml.namespace.QName name, java.lang.Object value, Resource r)
           
 

Method Detail

getProperty

java.lang.Object getProperty(javax.xml.namespace.QName name,
                             Resource r)
                             throws NotAuthorizedException
Throws:
NotAuthorizedException

setProperty

void setProperty(javax.xml.namespace.QName name,
                 java.lang.Object value,
                 Resource r)
                 throws PropertySource.PropertySetException,
                        NotAuthorizedException
Throws:
PropertySource.PropertySetException
NotAuthorizedException

getPropertyMetaData

PropertySource.PropertyMetaData getPropertyMetaData(javax.xml.namespace.QName name,
                                                    Resource r)
Check to see if the property is known, and if it is writable. The returned value also contains a class which is the most specific known class of the values which can be contained in this property. This class must be sufficient to locate a ValueWriter to parse the textual representation sent in PROPPATCH requests.

Parameters:
name - - the qualified name of the property
r - - the resource which might contain the property
Returns:
- never null, contains an enum value indicating if the property is known to this source, and if it is writable, and a class indicating the type of the property.

clearProperty

void clearProperty(javax.xml.namespace.QName name,
                   Resource r)
                   throws PropertySource.PropertySetException,
                          NotAuthorizedException
Remove the given property. There may be a semantic difference in some cases between setting a property to a null value vs removing the property. Generally this should completely the remove the property if possible.

Parameters:
name -
r -
Throws:
PropertySource.PropertySetException
NotAuthorizedException

getAllPropertyNames

java.util.List<javax.xml.namespace.QName> getAllPropertyNames(Resource r)
Parameters:
r - - the resource which may contain properties
Returns:
- all properties known by this source on the given resource. This list should be exclusive. Ie only return properties not returned by any other source


Copyright © 2011. All Rights Reserved.