org.apache.cocoon.components.repository.impl
Class WebDAVRepositoryPropertyHelper

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.components.repository.impl.WebDAVRepositoryPropertyHelper
All Implemented Interfaces:
Disposable, Component, LogEnabled, Serviceable, RepositoryPropertyHelper

public class WebDAVRepositoryPropertyHelper
extends AbstractLogEnabled
implements RepositoryPropertyHelper, Serviceable, Disposable, Component

A property helper class for the WebDAV repository intended to be used by flowscripts or corresponding wrapper components.


Constructor Summary
WebDAVRepositoryPropertyHelper(CredentialsToken credentials, WebDAVRepository repo)
          create a WebDAVRepositoryPropertyHelper
 
Method Summary
 void dispose()
           
 List getAllProperties(String uri)
          get all properties
 Map getProperties(String uri, Set propNames)
          get multiple properties
 SourceProperty getProperty(String uri, String name, String namespace)
          get a single property
 void service(ServiceManager manager)
           
 boolean setProperties(String uri, Map properties)
          set multiple properties
 boolean setProperty(String uri, String name, String namespace, Node value)
          set a single property to a W3C Node value
 boolean setProperty(String uri, String name, String namespace, String value)
          set a single property to a String value
 
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
 

Constructor Detail

WebDAVRepositoryPropertyHelper

public WebDAVRepositoryPropertyHelper(CredentialsToken credentials,
                                      WebDAVRepository repo)
create a WebDAVRepositoryPropertyHelper

Parameters:
credentials - the user credentials to be used against the WebDAV repository.
repo - a reference to the WebDAVRepository object.
Method Detail

service

public void service(ServiceManager manager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

dispose

public void dispose()
Specified by:
dispose in interface Disposable

getProperty

public SourceProperty getProperty(String uri,
                                  String name,
                                  String namespace)
Description copied from interface: RepositoryPropertyHelper
get a single property

Specified by:
getProperty in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
name - the name of the property.
namespace - the namespace of the property.
Returns:
the property.

getProperties

public Map getProperties(String uri,
                         Set propNames)
Description copied from interface: RepositoryPropertyHelper
get multiple properties

Specified by:
getProperties in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
propNames - a Set containing the property names.
Returns:
a Map containing the property values.

getAllProperties

public List getAllProperties(String uri)
Description copied from interface: RepositoryPropertyHelper
get all properties

Specified by:
getAllProperties in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
Returns:
a List containing the property values.

setProperty

public boolean setProperty(String uri,
                           String name,
                           String namespace,
                           String value)
Description copied from interface: RepositoryPropertyHelper
set a single property to a String value

Specified by:
setProperty in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
name - the name of the property.
namespace - the namespace of the property.
value - the String value to set the property to.
Returns:
a boolean indicating success.

setProperty

public boolean setProperty(String uri,
                           String name,
                           String namespace,
                           Node value)
Description copied from interface: RepositoryPropertyHelper
set a single property to a W3C Node value

Specified by:
setProperty in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
name - the name of the property.
namespace - the namespace of the property.
value - the DOM value to set the property to.
Returns:
a boolean indicating success.

setProperties

public boolean setProperties(String uri,
                             Map properties)
Description copied from interface: RepositoryPropertyHelper
set multiple properties

Specified by:
setProperties in interface RepositoryPropertyHelper
Parameters:
uri - the uri of the resource.
properties - a Map containing the properties to set.
Returns:
a boolean indicating success.


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.