Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.slide.store
Interface ContentStore

All Superinterfaces:
  Service, javax.transaction.xa.XAResource

All Known Subinterfaces:
  Store

All Known Implementing Classes:
  AbstractStore

public interface ContentStore
extends Service

Store service.

Version:
  $Revision: 1.9 $

Field Summary

Fields inherited from interface javax.transaction.xa.XAResource
`TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY`

Method Summary
`void` | `createRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)` Create revision content.
`void` | `removeRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor)` Remove revision content.
`NodeRevisionContent` | `retrieveRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor)` Retrieve revision content.
`void` | `storeRevisionContent(Uri uri, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)` Modify revision content.

Methods inherited from interface org.apache.slide.common.Service
`cacheResults, connect, connect, connectIfNeeded, connectIfNeeded, disconnect, getLogger, initialize, isConnected, reset, setNamespace, setParameters, setScope`

Methods inherited from interface javax.transaction.xa.XAResource
`commit, end, forget, getTransactionTimeout, isSameRM, prepare, recover, rollback, setTransactionTimeout, start`

Method Detail

### retrieveRevisionContent

    public NodeRevisionContent retrieveRevisionContent(Uri uri,
                                                       NodeRevisionDescriptor revisionDescriptor)
                                                throws ServiceAccessException,
                                                       RevisionNotFoundException

  Retrieve revision content.

  Parameters:
    `uri` - Uri
    `revisionDescriptor` - Node revision descriptor
  Throws:
    `ServiceAccessException`
    `RevisionNotFoundException`

### createRevisionContent

    public void createRevisionContent(Uri uri,
                                      NodeRevisionDescriptor revisionDescriptor,
                                      NodeRevisionContent revisionContent)
                               throws ServiceAccessException,
                                      RevisionAlreadyExistException

  Create revision content.

  Notes:

  - If a content length is specified by the revisionDescriptor (ie, revisionDescriptor.getContentLength != -1), then the ContentStore MUST enforce it, and throw a ServiceAccessException if an incorrect number of bytes are read. It MUST also revert any changes made to the underlying repository.
  - If a content length is not specified by the revisionDescriptor (ie, revisionDescriptor.getContentLength == -1), then the ContentStore MUST read all the bytes available and then call revisionDescriptor.setContentLength(numberOfBytesRead).

  Parameters:
    `uri` - Uri
    `revisionDescriptor` - Node revision descriptor
    `revisionContent` - Node revision content
  Throws:
    `ServiceAccessException`
    `RevisionAlreadyExistException`

### storeRevisionContent

    public void storeRevisionContent(Uri uri,
                                     NodeRevisionDescriptor revisionDescriptor,
                                     NodeRevisionContent revisionContent)
                              throws ServiceAccessException,
                                     RevisionNotFoundException

  Modify revision content.

  Notes:

  - If a content length is specified by the revisionDescriptor (ie, revisionDescriptor.getContentLength != -1), then the ContentStore MUST enforce it, and throw a ServiceAccessException if an incorrect number of bytes are read. It MUST also revert any changes made to the unedrlying repository.
  - If a content length is not specified by the revisionDescriptor (ie, revisionDescriptor.getContentLength == -1), then the ContentStore MUST read all the bytes available and then call revisionDescriptor.setContentLength(numberOfBytesRead).

  Parameters:
    `uri` - Uri
    `revisionDescriptor` - Node revision descriptor
    `revisionContent` - Node revision content
  Throws:
    `ServiceAccessException`
    `RevisionNotFoundException`

### removeRevisionContent

    public void removeRevisionContent(Uri uri,
                                      NodeRevisionDescriptor revisionDescriptor)
                               throws ServiceAccessException

  Remove revision content.

  Parameters:
    `uri` - Uri
    `revisionDescriptor` - Node revision descriptor
  Throws:
    `ServiceAccessException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD