org.apache.slide.store
Class BindingStore

java.lang.Object
  extended byorg.apache.slide.common.AbstractServiceBase
      extended byorg.apache.slide.common.AbstractSimpleService
          extended byorg.apache.slide.store.AbstractStore
              extended byorg.apache.slide.store.ExtendedStore
                  extended byorg.apache.slide.store.BindingStore
All Implemented Interfaces:
ContentStore, LockStore, NodeStore, RevisionDescriptorsStore, RevisionDescriptorStore, SecurityStore, SequenceStore, Service, Store, javax.transaction.xa.XAResource

public class BindingStore
extends ExtendedStore

Store implementation supporting binding-resolution. By extending ExtendedStore, this store implementation inherits also caching.

Version:
$Revision: 1.3.2.1 $

Nested Class Summary
 
Nested classes inherited from class org.apache.slide.store.ExtendedStore
ExtendedStore.TxCacheWrapper, ExtendedStore.TxContentCacheWrapper
 
Field Summary
 
Fields inherited from class org.apache.slide.store.ExtendedStore
activeTransactionBranch, CACHE_MODE_FULL, CACHE_MODE_LOCAL, CACHE_MODE_NO_GLOBAL_IN_TX, CACHE_MODE_OFF, CACHE_MODE_PARAMETER, CONTENT_CACHE_BYTES_PARAMETER, contentCache, contentCacheBytes, contentCachingEnabled, DEFAULT_CACHE_MODE, DEFAULT_CONTENT_CACHE_BYTES, DEFAULT_ENABLE_CONTENT_CACHING, DEFAULT_GLOBAL_CONTENT_CACHE_SIZE, DEFAULT_GLOBAL_DESCRIPTOR_CACHE_SIZE, DEFAULT_GLOBAL_DESCRIPTORS_CACHE_SIZE, DEFAULT_GLOBAL_LOCK_CACHE_SIZE, DEFAULT_GLOBAL_PERMISSION_CACHE_SIZE, DEFAULT_MAX_CONTENT_BYTES_PER_ENTRY, DEFAULT_OBJECT_GLOBAL_CACHE_SIZE, DEFAULT_TLOCK_TIMEOUT, DEFAULT_TX_CONTENT_CACHE_BYTES, DEFAULT_TX_CONTENT_CACHE_SIZE, descriptorCache, descriptorsCache, ENABLE_CONTENT_CACHING_PARAMETER, GLOBAL_CONTENT_CACHE_SIZE_PARAMETER, GLOBAL_DESCRIPTOR_CACHE_SIZE_PARAMETER, GLOBAL_DESCRIPTORS_CACHE_SIZE_PARAMETER, GLOBAL_LOCK_CACHE_SIZE_PARAMETER, GLOBAL_OBJECT_CACHE_SIZE_PARAMETER, GLOBAL_PERMISSION_CACHE_SIZE_PARAMETER, globalCacheOff, globalContentCacheSize, globalDescrtiptorCacheSize, globalDescrtiptorsCacheSize, globalLockCacheSize, globalObjectCacheSize, globalPermissionCacheSize, lockManager, locks, locksCache, MAX_CONTENT_BYTES_PER_ENTRY_PARAMETER, maxByteSizePerEntry, noGlobalCacheInTx, objectsCache, permissionsCache, timeout, TLOCK_TIMEOUT_PARAMETER, TX_CONTENT_CACHE_BYTES_PARAMETER, TX_CONTENT_CACHE_SIZE_PARAMETER, txContentCacheBytes, txContentCacheSize
 
Fields inherited from class org.apache.slide.store.AbstractStore
contentIndexer, contentStore, lockStore, nodeStore, parameters, propertiesIndexer, resourceManagers, revisionDescriptorsStore, revisionDescriptorStore, securityStore, sequenceStore
 
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
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
BindingStore()
           
 
Method Summary
 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.
 java.util.Enumeration enumerateLocks(Uri uri)
          Enumerate locks on an object.
 java.util.Enumeration enumeratePermissions(Uri uri)
          Enumerate locks on an object.
 NodeStore getNodeStore()
          NodeStore accessor
 java.lang.String getXmlParentSet(Uri uri, ObjectNode objectNode)
           
 void grantPermission(Uri uri, NodePermission permission)
          Store an object permissions in the Descriptors Store.
 void killLock(Uri uri, NodeLock lock)
          Kills a lock.
 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.
 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 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.
 boolean useBinding()
          Always returns false.
 
Methods inherited from class org.apache.slide.store.ExtendedStore
commit, end, exclusiveTransientLock, fatalError, fatalError, fillLocksCache, fillPermissionsCache, forget, init, prepare, releaseTransientLocks, removeObjectFromCache, resetCache, rollback, setParameters, start, toString
 
Methods inherited from class org.apache.slide.store.AbstractStore
addResourceManager, connect, connect, createSequence, delist, delist, delist, disconnect, enlist, enlist, getContentIndexer, getName, getParameter, getPropertiesIndexer, initialize, isConnected, isForceStoreEnlistment, isSequenceSupported, nextSequenceValue, reset, sequenceExists, setContentIndexer, setContentStore, setLockStore, setName, setNamespace, setNodeStore, setPropertiesIndexer, setRevisionDescriptorsStore, setRevisionDescriptorStore, setRollbackOnly, setScope, setSecurityStore, setSequenceStore
 
Methods inherited from class org.apache.slide.common.AbstractSimpleService
getTransactionTimeout, isSameRM, recover, setTransactionTimeout
 
Methods inherited from class org.apache.slide.common.AbstractServiceBase
cacheResults, connectIfNeeded, connectIfNeeded, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.slide.common.Service
cacheResults, connectIfNeeded, connectIfNeeded, getLogger
 
Methods inherited from interface javax.transaction.xa.XAResource
getTransactionTimeout, isSameRM, recover, setTransactionTimeout
 

Constructor Detail

BindingStore

public BindingStore()
Method Detail

retrieveObject

public ObjectNode retrieveObject(Uri uri)
                          throws ServiceAccessException,
                                 ObjectNotFoundException
Description copied from class: AbstractStore
Retrive an object from the Descriptors Store.

Specified by:
retrieveObject in interface NodeStore
Overrides:
retrieveObject in class ExtendedStore
Throws:
ServiceAccessException
ObjectNotFoundException

storeObject

public void storeObject(Uri uri,
                        ObjectNode object)
                 throws ServiceAccessException,
                        ObjectNotFoundException
Description copied from class: AbstractStore
Store an object in the Descriptors Store.

Specified by:
storeObject in interface NodeStore
Overrides:
storeObject in class ExtendedStore
Throws:
ServiceAccessException
ObjectNotFoundException

createObject

public void createObject(Uri uri,
                         ObjectNode object)
                  throws ServiceAccessException,
                         ObjectAlreadyExistsException
Description copied from class: AbstractStore
Create a new object in the Descriptors Store.

Specified by:
createObject in interface NodeStore
Overrides:
createObject in class ExtendedStore
Throws:
ServiceAccessException
ObjectAlreadyExistsException

removeObject

public void removeObject(Uri uri,
                         ObjectNode object)
                  throws ServiceAccessException,
                         ObjectNotFoundException
Description copied from class: AbstractStore
Remove an object from the Descriptors Store.

Specified by:
removeObject in interface NodeStore
Overrides:
removeObject in class ExtendedStore
Throws:
ServiceAccessException
ObjectNotFoundException

grantPermission

public void grantPermission(Uri uri,
                            NodePermission permission)
                     throws ServiceAccessException
Description copied from class: AbstractStore
Store an object permissions in the Descriptors Store.

Specified by:
grantPermission in interface SecurityStore
Overrides:
grantPermission in class ExtendedStore
Throws:
ServiceAccessException

revokePermission

public void revokePermission(Uri uri,
                             NodePermission permission)
                      throws ServiceAccessException
Description copied from class: AbstractStore
Store an object permissions in the Descriptors Store.

Specified by:
revokePermission in interface SecurityStore
Overrides:
revokePermission in class ExtendedStore
Throws:
ServiceAccessException

revokePermissions

public void revokePermissions(Uri uri)
                       throws ServiceAccessException
Description copied from class: AbstractStore
Revoke all the permissions on the object.

Specified by:
revokePermissions in interface SecurityStore
Overrides:
revokePermissions in class ExtendedStore
Throws:
ServiceAccessException

enumeratePermissions

public java.util.Enumeration enumeratePermissions(Uri uri)
                                           throws ServiceAccessException
Description copied from class: AbstractStore
Enumerate locks on an object.

Specified by:
enumeratePermissions in interface SecurityStore
Overrides:
enumeratePermissions in class ExtendedStore
Throws:
ServiceAccessException

putLock

public void putLock(Uri uri,
                    NodeLock lock)
             throws ServiceAccessException
Description copied from class: AbstractStore
Puts a lock on a subject.

Specified by:
putLock in interface LockStore
Overrides:
putLock in class ExtendedStore
Throws:
ServiceAccessException

renewLock

public void renewLock(Uri uri,
                      NodeLock lock)
               throws ServiceAccessException,
                      LockTokenNotFoundException
Description copied from class: AbstractStore
Renews a lock.

Specified by:
renewLock in interface LockStore
Overrides:
renewLock in class ExtendedStore
Throws:
ServiceAccessException
LockTokenNotFoundException

removeLock

public void removeLock(Uri uri,
                       NodeLock lock)
                throws ServiceAccessException,
                       LockTokenNotFoundException
Description copied from class: AbstractStore
Removes (cancels) a lock.

Specified by:
removeLock in interface LockStore
Overrides:
removeLock in class ExtendedStore
Throws:
ServiceAccessException
LockTokenNotFoundException

killLock

public void killLock(Uri uri,
                     NodeLock lock)
              throws ServiceAccessException,
                     LockTokenNotFoundException
Description copied from class: AbstractStore
Kills a lock.

Specified by:
killLock in interface LockStore
Overrides:
killLock in class ExtendedStore
Throws:
ServiceAccessException
LockTokenNotFoundException

enumerateLocks

public java.util.Enumeration enumerateLocks(Uri uri)
                                     throws ServiceAccessException
Description copied from class: AbstractStore
Enumerate locks on an object.

Specified by:
enumerateLocks in interface LockStore
Overrides:
enumerateLocks in class ExtendedStore
Throws:
ServiceAccessException

retrieveRevisionDescriptors

public NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
                                                    throws ServiceAccessException,
                                                           RevisionDescriptorNotFoundException
Description copied from class: AbstractStore
Retrieve a revision descriptors.

Specified by:
retrieveRevisionDescriptors in interface RevisionDescriptorsStore
Overrides:
retrieveRevisionDescriptors in class ExtendedStore
Throws:
ServiceAccessException
RevisionDescriptorNotFoundException

createRevisionDescriptors

public void createRevisionDescriptors(Uri uri,
                                      NodeRevisionDescriptors revisionDescriptors)
                               throws ServiceAccessException
Description copied from class: AbstractStore
Create new revision descriptors.

Specified by:
createRevisionDescriptors in interface RevisionDescriptorsStore
Overrides:
createRevisionDescriptors in class ExtendedStore
Throws:
ServiceAccessException

storeRevisionDescriptors

public void storeRevisionDescriptors(Uri uri,
                                     NodeRevisionDescriptors revisionDescriptors)
                              throws ServiceAccessException,
                                     RevisionDescriptorNotFoundException
Description copied from class: AbstractStore
Update revision descriptors.

Specified by:
storeRevisionDescriptors in interface RevisionDescriptorsStore
Overrides:
storeRevisionDescriptors in class ExtendedStore
Throws:
ServiceAccessException
RevisionDescriptorNotFoundException

removeRevisionDescriptors

public void removeRevisionDescriptors(Uri uri)
                               throws ServiceAccessException
Description copied from class: AbstractStore
Remove revision descriptors.

Specified by:
removeRevisionDescriptors in interface RevisionDescriptorsStore
Overrides:
removeRevisionDescriptors in class ExtendedStore
Throws:
ServiceAccessException

retrieveRevisionDescriptor

public NodeRevisionDescriptor retrieveRevisionDescriptor(Uri uri,
                                                         NodeRevisionNumber revisionNumber)
                                                  throws ServiceAccessException,
                                                         RevisionDescriptorNotFoundException
Description copied from class: AbstractStore
Retrieve revision descriptor.

Specified by:
retrieveRevisionDescriptor in interface RevisionDescriptorStore
Overrides:
retrieveRevisionDescriptor in class ExtendedStore
Throws:
ServiceAccessException
RevisionDescriptorNotFoundException

getXmlParentSet

public java.lang.String getXmlParentSet(Uri uri,
                                        ObjectNode objectNode)
                                 throws ServiceAccessException,
                                        ObjectNotFoundException
Throws:
ServiceAccessException
ObjectNotFoundException

createRevisionDescriptor

public void createRevisionDescriptor(Uri uri,
                                     NodeRevisionDescriptor revisionDescriptor)
                              throws ServiceAccessException
Description copied from class: AbstractStore
Create new revision descriptor.

Specified by:
createRevisionDescriptor in interface RevisionDescriptorStore
Overrides:
createRevisionDescriptor in class ExtendedStore
Throws:
ServiceAccessException

storeRevisionDescriptor

public void storeRevisionDescriptor(Uri uri,
                                    NodeRevisionDescriptor revisionDescriptor)
                             throws ServiceAccessException,
                                    RevisionDescriptorNotFoundException
Description copied from class: AbstractStore
Update revision descriptor.

Specified by:
storeRevisionDescriptor in interface RevisionDescriptorStore
Overrides:
storeRevisionDescriptor in class ExtendedStore
Throws:
ServiceAccessException
RevisionDescriptorNotFoundException

removeRevisionDescriptor

public void removeRevisionDescriptor(Uri uri,
                                     NodeRevisionNumber number)
                              throws ServiceAccessException
Description copied from class: AbstractStore
Remove revision descriptor.

Specified by:
removeRevisionDescriptor in interface RevisionDescriptorStore
Overrides:
removeRevisionDescriptor in class ExtendedStore
Throws:
ServiceAccessException

retrieveRevisionContent

public NodeRevisionContent retrieveRevisionContent(Uri uri,
                                                   NodeRevisionDescriptor revisionDescriptor)
                                            throws ServiceAccessException,
                                                   RevisionNotFoundException
Description copied from class: AbstractStore
Retrive revision content.

Specified by:
retrieveRevisionContent in interface ContentStore
Overrides:
retrieveRevisionContent in class ExtendedStore
Throws:
ServiceAccessException
RevisionNotFoundException

createRevisionContent

public void createRevisionContent(Uri uri,
                                  NodeRevisionDescriptor revisionDescriptor,
                                  NodeRevisionContent revisionContent)
                           throws ServiceAccessException,
                                  RevisionAlreadyExistException
Description copied from class: AbstractStore
Create a new revision

Specified by:
createRevisionContent in interface ContentStore
Overrides:
createRevisionContent in class ExtendedStore
Throws:
ServiceAccessException
RevisionAlreadyExistException

storeRevisionContent

public void storeRevisionContent(Uri uri,
                                 NodeRevisionDescriptor revisionDescriptor,
                                 NodeRevisionContent revisionContent)
                          throws ServiceAccessException,
                                 RevisionNotFoundException
Description copied from class: AbstractStore
Modify the latest revision of an object.

Specified by:
storeRevisionContent in interface ContentStore
Overrides:
storeRevisionContent in class ExtendedStore
Throws:
ServiceAccessException
RevisionNotFoundException

removeRevisionContent

public void removeRevisionContent(Uri uri,
                                  NodeRevisionDescriptor revisionDescriptor)
                           throws ServiceAccessException
Description copied from class: AbstractStore
Remove revision.

Specified by:
removeRevisionContent in interface ContentStore
Overrides:
removeRevisionContent in class ExtendedStore
Throws:
ServiceAccessException

getNodeStore

public NodeStore getNodeStore()
NodeStore accessor


useBinding

public boolean useBinding()
Always returns false. Default implementation for this method Stores that support binding should override this method.

Specified by:
useBinding in interface Store
Overrides:
useBinding in class AbstractStore