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

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

public class WebDAVRepositoryVersioningHelper
extends AbstractLogEnabled
implements RepositoryVersioningHelper, Serviceable, Disposable, Component

A versioning helper class intended to be used by flowscripts or corresponding wrapper components.


Constructor Summary
WebDAVRepositoryVersioningHelper(CredentialsToken credentials, WebDAVRepository repo)
          create a WebDAVRepositoryVersioningHelper
 
Method Summary
 boolean checkin(String uri)
          checkin a resource
 boolean checkout(String uri)
          checkout a resource
 void dispose()
           
 List getVersions(String uri)
          get the version history of a resource
 boolean isVersioned(String uri)
          check if a resource is under version control
 void service(ServiceManager manager)
           
 boolean setVersioned(String uri, boolean versioned)
          set a resource under version control
 boolean uncheckout(String uri)
          undo a previously done checkout
 
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

WebDAVRepositoryVersioningHelper

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

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

checkout

public boolean checkout(String uri)
Description copied from interface: RepositoryVersioningHelper
checkout a resource

Specified by:
checkout in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating success.

checkin

public boolean checkin(String uri)
Description copied from interface: RepositoryVersioningHelper
checkin a resource

Specified by:
checkin in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating success.

uncheckout

public boolean uncheckout(String uri)
Description copied from interface: RepositoryVersioningHelper
undo a previously done checkout

Specified by:
uncheckout in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating success.

isVersioned

public boolean isVersioned(String uri)
Description copied from interface: RepositoryVersioningHelper
check if a resource is under version control

Specified by:
isVersioned in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating if the resource is under version control.

setVersioned

public boolean setVersioned(String uri,
                            boolean versioned)
Description copied from interface: RepositoryVersioningHelper
set a resource under version control

Specified by:
setVersioned in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
versioned - if true the resource is set under version control.
Returns:
a boolean indicating success.

getVersions

public List getVersions(String uri)
Description copied from interface: RepositoryVersioningHelper
get the version history of a resource

Specified by:
getVersions in interface RepositoryVersioningHelper
Parameters:
uri - the uri of the resource.
Returns:
a list containing the versions.


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