org.apache.cocoon.components.repository.helpers
Interface RepositoryTransactionHelper

All Known Implementing Classes:
WebDAVRepositoryTransactionHelper

public interface RepositoryTransactionHelper

A locking helper interface intended to be used by flowscripts or corresponding wrapper components.


Method Summary
 boolean beginTran()
          beginning a transaction on the repository
 boolean commitTran()
          committing a transaction on the repository
 boolean lock(String uri)
          lock the resource
 boolean lock(String uri, int timeout)
          lock the resource with explicit timeout in seconds
 boolean rollbackTran()
          rolling back a transaction on the repository
 boolean supportsLocking()
          checking wether the repository supports locking
 boolean supportsTransactions()
          checking wether the repository supports transactions
 boolean unlock(String uri)
          unlock resource
 

Method Detail

beginTran

boolean beginTran()
                  throws ProcessingException
beginning a transaction on the repository

Returns:
a boolean indicating success.
Throws:
ProcessingException

commitTran

boolean commitTran()
                   throws ProcessingException
committing a transaction on the repository

Returns:
a boolean indicating success.
Throws:
ProcessingException

rollbackTran

boolean rollbackTran()
                     throws ProcessingException
rolling back a transaction on the repository

Returns:
a boolean indicating success.
Throws:
ProcessingException

lock

boolean lock(String uri)
             throws ProcessingException
lock the resource

Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating success.
Throws:
ProcessingException

lock

boolean lock(String uri,
             int timeout)
             throws ProcessingException
lock the resource with explicit timeout in seconds

Parameters:
uri - the uri of the resource.
timeout - the lock timeout in seconds.
Returns:
a boolean indicating success.
Throws:
ProcessingException

unlock

boolean unlock(String uri)
               throws ProcessingException
unlock resource

Parameters:
uri - the uri of the resource.
Returns:
a boolean indicating success.
Throws:
ProcessingException

supportsTransactions

boolean supportsTransactions()
checking wether the repository supports transactions

Returns:
true if the repository supports transactions.

supportsLocking

boolean supportsLocking()
checking wether the repository supports locking

Returns:
true if the repository supports locking.


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