org.apache.slide.store
Class AbstractStore

java.lang.Object
  |
  +--org.apache.slide.common.AbstractServiceBase
        |
        +--org.apache.slide.common.AbstractSimpleService
              |
              +--org.apache.slide.store.AbstractStore
All Implemented Interfaces:
ContentStore, LockStore, NodeStore, RevisionDescriptorsStore, RevisionDescriptorStore, SecurityStore, Service, Store, javax.transaction.xa.XAResource
Direct Known Subclasses:
StandardStore

public abstract class AbstractStore
extends AbstractSimpleService
implements Store

Abstract implementation of a store. Handles all caching operations.

Version:
$Revision: 1.24 $
Author:
Remy Maucherat

Field Summary
protected  ContentStore contentStore
          Content store.
protected  java.lang.String defaultStore
          Default store classname.
protected  Service defaultStoreInstance
          Default store instance.
protected  LockStore lockStore
          Lock store.
protected  NodeStore nodeStore
          Node store.
protected  Service[] resourceManagers
          Active resource manager list.
protected  RevisionDescriptorsStore revisionDescriptorsStore
          Revision descriptors store.
protected  RevisionDescriptorStore revisionDescriptorStore
          Revision descriptor store.
protected  SecurityStore securityStore
          Security store.
 
Fields inherited from class org.apache.slide.common.AbstractSimpleService
currentContext, rollbackOnly, status, transactionTimeout, TX_IDLE, TX_PREPARED, TX_SUSPENDED
 
Fields inherited from class org.apache.slide.common.AbstractServiceBase
LOG_CHANNEL, namespace, scope
 
Fields inherited from interface javax.transaction.xa.XAResource
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY
 
Constructor Summary
AbstractStore()
           
 
Method Summary
protected  void addResourceManager(Service service)
          Add a new resource manager.
 void commit(javax.transaction.xa.Xid xid, boolean onePhase)
          Commit the global transaction specified by xid.
 void connect()
          Connects to descriptors store.
 void createObject(Uri uri, ObjectNode object)
          Create a new object in the Descriptors Store.
 void createRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)
          Create a new revision
 void createRevisionDescriptor(Uri uri, NodeRevisionDescriptor revisionDescriptor)
          Create new revision descriptor.
 void createRevisionDescriptors(Uri uri, NodeRevisionDescriptors revisionDescriptors)
          Create new revision descriptors.
protected  void delist(boolean success)
          Delist (suspend) the resource manager in the current transaction.
protected  void delist(Service service)
          Delist (suspend) the resource manager in the current transaction.
protected  void delist(Service service, boolean success)
          Delist (suspend) the resource manager in the current transaction.
 void disconnect()
          Disconnects from descriptors store.
 void end(javax.transaction.xa.Xid xid, int flags)
          Ends the work performed on behalf of a transaction branch.
protected  void enlist()
          Enlist the resource manager in the current transaction.
protected  void enlist(Service service)
          Enlist the resource manager in the current transaction.
 java.util.Enumeration enumerateLocks(Uri uri)
          Returns the list of locks put on a subject.
 java.util.Enumeration enumeratePermissions(Uri uri)
          Read an object permissions.
 void forget(javax.transaction.xa.Xid xid)
          Tell the resource manager to forget about a heuristically completed transaction branch.
protected  Service getDefaultStoreInstance()
          Return the default store instance.
 java.lang.String getName()
          Return the name of the store as specified in domain.xml.
 void grantPermission(Uri uri, NodePermission permission)
          Store an object permissions in the Descriptors Store.
 void initialize(NamespaceAccessToken token)
          Initializes descriptors store.
 boolean isConnected()
          This function tells whether or not the descriptors store is connected.
protected  boolean isForceStoreEnlistment(Uri uri)
          Return true if the store should also be enlisted for a read operation.
 void killLock(Uri uri, NodeLock lock)
          Kills a lock.
 int prepare(javax.transaction.xa.Xid xid)
          Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
 void putLock(Uri uri, NodeLock lock)
          Puts a lock on a subject.
 void removeLock(Uri uri, NodeLock lock)
          Removes (cancels) a lock.
 void removeObject(Uri uri, ObjectNode object)
          Remove an object from the Descriptors Store.
 void removeRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor)
          Remove revision.
 void removeRevisionDescriptor(Uri uri, NodeRevisionNumber number)
          Remove revision descriptor.
 void removeRevisionDescriptors(Uri uri)
          Remove revision descriptors.
 void renewLock(Uri uri, NodeLock lock)
          Renews a lock.
 void reset()
          Deletes descriptors store.
 ObjectNode retrieveObject(Uri uri)
          Retrive an object from the Descriptors Store.
 NodeRevisionContent retrieveRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor)
          Retrive revision content.
 NodeRevisionDescriptor retrieveRevisionDescriptor(Uri uri, NodeRevisionNumber revisionNumber)
          Retrieve revision descriptor.
 NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
          Retrieve a revision descriptors.
 void revokePermission(Uri uri, NodePermission permission)
          Store an object permissions in the Descriptors Store.
 void revokePermissions(Uri uri)
          Revoke all the permissions on the object.
 void rollback(javax.transaction.xa.Xid xid)
          Inform the resource manager to roll back work done on behalf of a transaction branch.
 void setContentStore(ContentStore contentStore)
          Set the content store associated with this store.
 void setLockStore(LockStore lockStore)
          Set the lock store associated with this store.
 void setName(java.lang.String name)
          Set the name of the store as specified in domain.xml.
 void setNamespace(Namespace namespace)
          Namespace setter.
 void setNodeStore(NodeStore nodeStore)
          Set the node store associated with this store.
 void setParameters(java.util.Hashtable parameters)
          Remeber the store parameters to initialise the default child stores on request
 void setRevisionDescriptorsStore(RevisionDescriptorsStore revisionDescriptorsStore)
          Set the revision descriptors store associated with this store.
 void setRevisionDescriptorStore(RevisionDescriptorStore revisionDescriptorStore)
          Set the revision descriptor store associated with this store.
protected  void setRollbackOnly()
          Mark transaction as rollback in case of enlistment failure.
 void setScope(Scope scope)
          Set the scope of the store as specified in domain.xml.
 void setSecurityStore(SecurityStore securityStore)
          Set the security store associated with this store.
 void start(javax.transaction.xa.Xid xid, int flags)
          Start work on behalf of a transaction branch specified in xid.
 void storeObject(Uri uri, ObjectNode object)
          Store an object in the Descriptors Store.
 void storeRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)
          Modify the latest revision of an object.
 void storeRevisionDescriptor(Uri uri, NodeRevisionDescriptor revisionDescriptor)
          Update revision descriptor.
 void storeRevisionDescriptors(Uri uri, NodeRevisionDescriptors revisionDescriptors)
          Update revision descriptors.
 
Methods inherited from class org.apache.slide.common.AbstractSimpleService
getTransactionTimeout, isSameRM, recover, setTransactionTimeout
 
Methods inherited from class org.apache.slide.common.AbstractServiceBase
cacheResults, connectIfNeeded, getLogger
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.slide.common.Service
cacheResults, connectIfNeeded, getLogger
 
Methods inherited from interface javax.transaction.xa.XAResource
getTransactionTimeout, isSameRM, recover, setTransactionTimeout
 

Field Detail

defaultStore

protected java.lang.String defaultStore
Default store classname.

defaultStoreInstance

protected Service defaultStoreInstance
Default store instance.

nodeStore

protected NodeStore nodeStore
Node store.

securityStore

protected SecurityStore securityStore
Security store.

lockStore

protected LockStore lockStore
Lock store.

revisionDescriptorsStore

protected RevisionDescriptorsStore revisionDescriptorsStore
Revision descriptors store.

revisionDescriptorStore

protected RevisionDescriptorStore revisionDescriptorStore
Revision descriptor store.

contentStore

protected ContentStore contentStore
Content store.

resourceManagers

protected Service[] resourceManagers
Active resource manager list.
Constructor Detail

AbstractStore

public AbstractStore()
Method Detail

setName

public void setName(java.lang.String name)
Set the name of the store as specified in domain.xml.
Specified by:
setName in interface Store

getName

public java.lang.String getName()
Return the name of the store as specified in domain.xml.
Specified by:
getName in interface Store

setScope

public void setScope(Scope scope)
Set the scope of the store as specified in domain.xml.
Specified by:
setScope in interface Store
Overrides:
setScope in class AbstractServiceBase

setNamespace

public void setNamespace(Namespace namespace)
Namespace setter.
Specified by:
setNamespace in interface Service
Overrides:
setNamespace in class AbstractServiceBase

setParameters

public void setParameters(java.util.Hashtable parameters)
                   throws ServiceParameterErrorException,
                          ServiceParameterMissingException
Remeber the store parameters to initialise the default child stores on request
Specified by:
setParameters in interface Service
Overrides:
setParameters in class AbstractServiceBase
Parameters:
parameters - Hashtable containing the parameters' name and associated value
Throws:
ServiceParameterErrorException - Incorrect service parameter
ServiceParameterMissingException - Service parameter missing

connect

public void connect()
             throws ServiceConnectionFailedException
Connects to descriptors store.
Specified by:
connect in interface Service
Overrides:
connect in class AbstractServiceBase
Throws:
DataException -  

disconnect

public void disconnect()
                throws ServiceDisconnectionFailedException
Disconnects from descriptors store.
Specified by:
disconnect in interface Service
Overrides:
disconnect in class AbstractServiceBase
Throws:
ServiceDisconnectionFailedException -  

initialize

public void initialize(NamespaceAccessToken token)
                throws ServiceInitializationFailedException
Initializes descriptors store.
Specified by:
initialize in interface Service
Overrides:
initialize in class AbstractServiceBase
Throws:
ServiceInitializationFailedException - Throws an exception if the descriptors store has already been initialized before

reset

public void reset()
           throws ServiceResetFailedException
Deletes descriptors store. Should remove stored data if possible.
Specified by:
reset in interface Service
Overrides:
reset in class AbstractServiceBase
Throws:
ServiceResetFailedException - Reset failed

isConnected

public boolean isConnected()
                    throws ServiceAccessException
This function tells whether or not the descriptors store is connected.
Specified by:
isConnected in interface Service
Overrides:
isConnected in class AbstractServiceBase
Returns:
boolean true if we are connected
Throws:
ServiceAccessException - Service access error

commit

public void commit(javax.transaction.xa.Xid xid,
                   boolean onePhase)
            throws javax.transaction.xa.XAException
Commit the global transaction specified by xid.
Specified by:
commit in interface javax.transaction.xa.XAResource
Overrides:
commit in class AbstractSimpleService
Parameters:
xid - A global transaction identifier
onePhase - If true, the resource manager should use a one-phase commit protocol to commit the work done on behalf of xid.
Throws:
javax.transaction.xa.XAException - An error has occurred. Possible XAExceptions are XA_HEURHAZ, XA_HEURCOM, XA_HEURRB, XA_HEURMIX, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO. If the resource manager did not commit the transaction and the paramether onePhase is set to true, the resource manager may throw one of the XA_RB* exceptions. Upon return, the resource manager has rolled back the branch's work and has released all held resources.

end

public void end(javax.transaction.xa.Xid xid,
                int flags)
         throws javax.transaction.xa.XAException
Ends the work performed on behalf of a transaction branch.
Specified by:
end in interface javax.transaction.xa.XAResource
Overrides:
end in class AbstractSimpleService
Parameters:
xid - A global transaction identifier that is the same as what was used previously in the start method.
flags - One of TMSUCCESS, TMFAIL, or TMSUSPEND
Throws:
javax.transaction.xa.XAException - An error has occurred. Possible XAException values are XAER_RMERR, XAER_RMFAILED, XAER_NOTA, XAER_INVAL, XAER_PROTO, or XA_RB*.

forget

public void forget(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Tell the resource manager to forget about a heuristically completed transaction branch.
Specified by:
forget in interface javax.transaction.xa.XAResource
Overrides:
forget in class AbstractSimpleService
Parameters:
xid - A global transaction identifier
Throws:
javax.transaction.xa.XAException - An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

prepare

public int prepare(javax.transaction.xa.Xid xid)
            throws javax.transaction.xa.XAException
Ask the resource manager to prepare for a transaction commit of the transaction specified in xid.
Specified by:
prepare in interface javax.transaction.xa.XAResource
Overrides:
prepare in class AbstractSimpleService
Parameters:
xid - A global transaction identifier
Returns:
A value indicating the resource manager's vote on the outcome of the transaction. The possible values are: XA_RDONLY or XA_OK. If the resource manager wants to roll back the transaction, it should do so by raising an appropriate XAException in the prepare method.
Throws:
javax.transaction.xa.XAException - An error has occurred. Possible exception values are: XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

rollback

public void rollback(javax.transaction.xa.Xid xid)
              throws javax.transaction.xa.XAException
Inform the resource manager to roll back work done on behalf of a transaction branch.
Specified by:
rollback in interface javax.transaction.xa.XAResource
Overrides:
rollback in class AbstractSimpleService
Parameters:
xid - A global transaction identifier
Throws:
javax.transaction.xa.XAException - An error has occurred

start

public void start(javax.transaction.xa.Xid xid,
                  int flags)
           throws javax.transaction.xa.XAException
Start work on behalf of a transaction branch specified in xid.
Specified by:
start in interface javax.transaction.xa.XAResource
Overrides:
start in class AbstractSimpleService
Parameters:
xid - A global transaction identifier to be associated with the resource
flags - One of TMNOFLAGS, TMJOIN, or TMRESUME
Throws:
javax.transaction.xa.XAException - An error has occurred. Possible exceptions are XA_RB*, XAER_RMERR, XAER_RMFAIL, XAER_DUPID, XAER_OUTSIDE, XAER_NOTA, XAER_INVAL, or XAER_PROTO.

setNodeStore

public void setNodeStore(NodeStore nodeStore)
Set the node store associated with this store.
Specified by:
setNodeStore in interface Store

setSecurityStore

public void setSecurityStore(SecurityStore securityStore)
Set the security store associated with this store.
Specified by:
setSecurityStore in interface Store

setLockStore

public void setLockStore(LockStore lockStore)
Set the lock store associated with this store.
Specified by:
setLockStore in interface Store

setRevisionDescriptorsStore

public void setRevisionDescriptorsStore(RevisionDescriptorsStore revisionDescriptorsStore)
Set the revision descriptors store associated with this store.
Specified by:
setRevisionDescriptorsStore in interface Store

setRevisionDescriptorStore

public void setRevisionDescriptorStore(RevisionDescriptorStore revisionDescriptorStore)
Set the revision descriptor store associated with this store.
Specified by:
setRevisionDescriptorStore in interface Store

setContentStore

public void setContentStore(ContentStore contentStore)
Set the content store associated with this store.
Specified by:
setContentStore in interface Store

retrieveObject

public ObjectNode retrieveObject(Uri uri)
                          throws ServiceAccessException,
                                 ObjectNotFoundException
Retrive an object from the Descriptors Store.
Specified by:
retrieveObject in interface NodeStore
Parameters:
uri - Uri of the object we want to retrieve
Throws:
ServiceAccessException - Error accessing the Descriptors Store
ObjectNotFoundException - The object to retrieve was not found

storeObject

public void storeObject(Uri uri,
                        ObjectNode object)
                 throws ServiceAccessException,
                        ObjectNotFoundException
Store an object in the Descriptors Store.
Specified by:
storeObject in interface NodeStore
Parameters:
object - Object to update
Throws:
ServiceAccessException - Error accessing the Descriptors Store
ObjectNotFoundException - The object to update was not found

createObject

public void createObject(Uri uri,
                         ObjectNode object)
                  throws ServiceAccessException,
                         ObjectAlreadyExistsException
Create a new object in the Descriptors Store.
Specified by:
createObject in interface NodeStore
Parameters:
object - SlideObject
uri - Uri of the object we want to create
Throws:
ServiceAccessException - Error accessing the Descriptors Store
ObjectAlreadyExistsException - An object already exists at this Uri

removeObject

public void removeObject(Uri uri,
                         ObjectNode object)
                  throws ServiceAccessException,
                         ObjectNotFoundException
Remove an object from the Descriptors Store.
Specified by:
removeObject in interface NodeStore
Parameters:
object - Object to remove
Throws:
ServiceAccessException - Error accessing the Descriptors Store
ObjectNotFoundException - The object to remove was not found

grantPermission

public void grantPermission(Uri uri,
                            NodePermission permission)
                     throws ServiceAccessException
Store an object permissions in the Descriptors Store.
Specified by:
grantPermission in interface SecurityStore
Parameters:
permission - Permission we want to create
Throws:
ServiceAccessException - Error accessing the Descriptors Store

revokePermission

public void revokePermission(Uri uri,
                             NodePermission permission)
                      throws ServiceAccessException
Store an object permissions in the Descriptors Store.
Specified by:
revokePermission in interface SecurityStore
Parameters:
permission - Permission we want to create
Throws:
ServiceAccessException - Error accessing the Descriptors Store

revokePermissions

public void revokePermissions(Uri uri)
                       throws ServiceAccessException
Revoke all the permissions on the object.
Specified by:
revokePermissions in interface SecurityStore
Parameters:
permission - Permission we want to create
Throws:
ServiceAccessException - Error accessing the Descriptors Store

enumeratePermissions

public java.util.Enumeration enumeratePermissions(Uri uri)
                                           throws ServiceAccessException
Read an object permissions.
Specified by:
enumeratePermissions in interface SecurityStore
Parameters:
permission - Permission we want to create
Throws:
ServiceAccessException - Error accessing the Descriptors Store

putLock

public void putLock(Uri uri,
                    NodeLock lock)
             throws ServiceAccessException
Puts a lock on a subject.
Specified by:
putLock in interface LockStore
Parameters:
lock - Lock token
Throws:
ServiceAccessException - Service access error

renewLock

public void renewLock(Uri uri,
                      NodeLock lock)
               throws ServiceAccessException,
                      LockTokenNotFoundException
Renews a lock.
Specified by:
renewLock in interface LockStore
Parameters:
lock - Token to renew
Throws:
ServiceAccessException - Service access error
LockTokenNotFoundException - Lock token was not found

removeLock

public void removeLock(Uri uri,
                       NodeLock lock)
                throws ServiceAccessException,
                       LockTokenNotFoundException
Removes (cancels) a lock.
Specified by:
removeLock in interface LockStore
Parameters:
lock - Token to remove
Throws:
ServiceAccessException - Service access error
LockTokenNotFoundException - Lock token was not found

killLock

public void killLock(Uri uri,
                     NodeLock lock)
              throws ServiceAccessException,
                     LockTokenNotFoundException
Kills a lock.
Specified by:
killLock in interface LockStore
Parameters:
lock - Token to remove
Throws:
ServiceAccessException - Service access error
LockTokenNotFoundException - Lock token was not found

enumerateLocks

public java.util.Enumeration enumerateLocks(Uri uri)
                                     throws ServiceAccessException
Returns the list of locks put on a subject.
Specified by:
enumerateLocks in interface LockStore
Parameters:
subject - Subject
Returns:
Enumeration List of locks which have been put on the subject
Throws:
ServiceAccessException - Service access error

retrieveRevisionDescriptors

public NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
                                                    throws ServiceAccessException,
                                                           RevisionDescriptorNotFoundException
Retrieve a revision descriptors.
Specified by:
retrieveRevisionDescriptors in interface RevisionDescriptorsStore
Parameters:
uri - Uri
Throws:
ServiceAccessException - Service access error
RevisionDescriptorNotFoundException - Revision descriptor was not found

createRevisionDescriptors

public void createRevisionDescriptors(Uri uri,
                                      NodeRevisionDescriptors revisionDescriptors)
                               throws ServiceAccessException
Create new revision descriptors.
Specified by:
createRevisionDescriptors in interface RevisionDescriptorsStore
Parameters:
uri - Uri
revisionDescriptors - Node revision descriptors
Throws:
ServiceAccessException - Service access error

storeRevisionDescriptors

public void storeRevisionDescriptors(Uri uri,
                                     NodeRevisionDescriptors revisionDescriptors)
                              throws ServiceAccessException,
                                     RevisionDescriptorNotFoundException
Update revision descriptors.
Specified by:
storeRevisionDescriptors in interface RevisionDescriptorsStore
Parameters:
uri - Uri
revisionDescriptors - Node revision descriptors
Throws:
ServiceAccessException - Service access error
RevisionDescriptorNotFoundException - Revision descriptor was not found

removeRevisionDescriptors

public void removeRevisionDescriptors(Uri uri)
                               throws ServiceAccessException
Remove revision descriptors.
Specified by:
removeRevisionDescriptors in interface RevisionDescriptorsStore
Parameters:
uri - Uri
Throws:
ServiceAccessException - Service access error

retrieveRevisionDescriptor

public NodeRevisionDescriptor retrieveRevisionDescriptor(Uri uri,
                                                         NodeRevisionNumber revisionNumber)
                                                  throws ServiceAccessException,
                                                         RevisionDescriptorNotFoundException
Retrieve revision descriptor.
Specified by:
retrieveRevisionDescriptor in interface RevisionDescriptorStore
Parameters:
Uri - uri
revisionNumber - Node revision number

createRevisionDescriptor

public void createRevisionDescriptor(Uri uri,
                                     NodeRevisionDescriptor revisionDescriptor)
                              throws ServiceAccessException
Create new revision descriptor.
Specified by:
createRevisionDescriptor in interface RevisionDescriptorStore
Parameters:
uri - Uri
revisionDescriptor - Node revision descriptor
Throws:
ServiceAccessException - Service access error

storeRevisionDescriptor

public void storeRevisionDescriptor(Uri uri,
                                    NodeRevisionDescriptor revisionDescriptor)
                             throws ServiceAccessException,
                                    RevisionDescriptorNotFoundException
Update revision descriptor.
Specified by:
storeRevisionDescriptor in interface RevisionDescriptorStore
Parameters:
uri - Uri
revisionDescriptors - Node revision descriptor
Throws:
ServiceAccessException - Service access error
RevisionDescriptorNotFoundException - Revision descriptor was not found

removeRevisionDescriptor

public void removeRevisionDescriptor(Uri uri,
                                     NodeRevisionNumber number)
                              throws ServiceAccessException
Remove revision descriptor.
Specified by:
removeRevisionDescriptor in interface RevisionDescriptorStore
Parameters:
uri - Uri
revisionNumber - Revision number
Throws:
ServiceAccessException - Service access error

retrieveRevisionContent

public NodeRevisionContent retrieveRevisionContent(Uri uri,
                                                   NodeRevisionDescriptor revisionDescriptor)
                                            throws ServiceAccessException,
                                                   RevisionNotFoundException
Retrive revision content.
Specified by:
retrieveRevisionContent in interface ContentStore
Parameters:
uri - Uri
revisionNumber - Node revision number

createRevisionContent

public void createRevisionContent(Uri uri,
                                  NodeRevisionDescriptor revisionDescriptor,
                                  NodeRevisionContent revisionContent)
                           throws ServiceAccessException,
                                  RevisionAlreadyExistException
Create a new revision
Specified by:
createRevisionContent in interface ContentStore
Parameters:
uri - Uri
revisionDescriptor - Node revision descriptor
revisionContent - Node revision content

storeRevisionContent

public void storeRevisionContent(Uri uri,
                                 NodeRevisionDescriptor revisionDescriptor,
                                 NodeRevisionContent revisionContent)
                          throws ServiceAccessException,
                                 RevisionNotFoundException
Modify the latest revision of an object.
Specified by:
storeRevisionContent in interface ContentStore
Parameters:
uri - Uri
revisionDescriptor - Node revision descriptor
revisionContent - Node revision content

removeRevisionContent

public void removeRevisionContent(Uri uri,
                                  NodeRevisionDescriptor revisionDescriptor)
                           throws ServiceAccessException
Remove revision.
Specified by:
removeRevisionContent in interface ContentStore
Parameters:
uri - Uri
revisionNumber - Node revision number

isForceStoreEnlistment

protected boolean isForceStoreEnlistment(Uri uri)
Return true if the store should also be enlisted for a read operation.

getDefaultStoreInstance

protected Service getDefaultStoreInstance()
Return the default store instance.

addResourceManager

protected void addResourceManager(Service service)
Add a new resource manager.
Parameters:
service - New resource manager

enlist

protected void enlist()
               throws ServiceAccessException
Enlist the resource manager in the current transaction.

enlist

protected void enlist(Service service)
               throws ServiceAccessException
Enlist the resource manager in the current transaction.

delist

protected void delist(boolean success)
               throws ServiceAccessException
Delist (suspend) the resource manager in the current transaction.

delist

protected void delist(Service service)
               throws ServiceAccessException
Delist (suspend) the resource manager in the current transaction.

delist

protected void delist(Service service,
                      boolean success)
               throws ServiceAccessException
Delist (suspend) the resource manager in the current transaction.

setRollbackOnly

protected void setRollbackOnly()
Mark transaction as rollback in case of enlistment failure.