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.content
Class AbstractContentInterceptor

    java.lang.Object
      org.apache.slide.content.AbstractContentInterceptor

All Implemented Interfaces:
  ContentInterceptor

public abstract class AbstractContentInterceptor
extends java.lang.Object
implements ContentInterceptor

Provides a basic implementation of the `ContentInterceptor` interface.

This implementation does nothing but store the parameters and the NamespaceAccessToken, and provide empty implementations of the various hook methods. You can extend this class instead of implementing the `ContentInterceptor` interface directly, and only override the methods required for your specific interceptor to operate.

Constructor Summary
`AbstractContentInterceptor()` Default constructor.

Method Summary
`protected NamespaceAccessToken` | `getNamespace()` Returns the namespace access token.
`protected java.lang.String` | `getParameter(java.lang.String name)` Returns the value of the specified parameter.
`protected java.util.Hashtable` | `getParameters()` Returns a Hashtable containing the configuration parameters of the interceptor.
`void` | `postRemoveContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor)` Does nothing.
`void` | `postRetrieveContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)` Does nothing.
`void` | `postStoreContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)` Does nothing.
`void` | `preRemoveContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor)` Does nothing.
`void` | `preRetrieveContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionNumber revisionNumber, NodeRevisionDescriptor revisionDescriptor)` Does nothing.
`void` | `preStoreContent(SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent)` Does nothing.
`void` | `setNamespace(NamespaceAccessToken nat)` Implemented to store the namespace access token as instance variable.
`void` | `setParameters(java.util.Hashtable parameters)` Implemented to store the parameter Hashtable as instance variable.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractContentInterceptor

    public AbstractContentInterceptor()

  Default constructor.

Method Detail

### preStoreContent

    public void preStoreContent(SlideToken token,
                                NodeRevisionDescriptors revisionDescriptors,
                                NodeRevisionDescriptor revisionDescriptor,
                                NodeRevisionContent revisionContent)
                         throws AccessDeniedException,
                                ObjectNotFoundException,
                                LinkedObjectNotFoundException,
                                ObjectLockedException,
                                ServiceAccessException

  Does nothing.

  Specified by:
    `preStoreContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the content to be stored
    `revisionDescriptor` - revision descriptor of the content to be stored
    `revisionContent` - the actual content to be stored
  Throws:
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found
    `ObjectNotFoundException` - if an object could not be found
    `AccessDeniedException` - if access to a resource has been denied
    `ObjectLockedException` - if an object is locked
    `ServiceAccessException` - low-level service failure

### postStoreContent

    public void postStoreContent(SlideToken token,
                                 NodeRevisionDescriptors revisionDescriptors,
                                 NodeRevisionDescriptor revisionDescriptor,
                                 NodeRevisionContent revisionContent)
                          throws AccessDeniedException,
                                 ObjectNotFoundException,
                                 LinkedObjectNotFoundException,
                                 ObjectLockedException,
                                 ServiceAccessException

  Does nothing.

  Specified by:
    `postStoreContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the content that has been stored
    `revisionDescriptor` - revision descriptor of the content that has been stored
    `revisionContent` - the actual content that has been stored
  Throws:
    `ObjectNotFoundException` - if an object could not be found
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found
    `AccessDeniedException` - if access to a resource has been denied
    `ServiceAccessException` - low-level service failure
    `ObjectLockedException` - if an object is locked

### preRetrieveContent

    public void preRetrieveContent(SlideToken token,
                                   NodeRevisionDescriptors revisionDescriptors,
                                   NodeRevisionNumber revisionNumber,
                                   NodeRevisionDescriptor revisionDescriptor)
                            throws AccessDeniedException,
                                   ObjectNotFoundException,
                                   LinkedObjectNotFoundException,
                                   ObjectLockedException,
                                   ServiceAccessException

  Does nothing.

  Specified by:
    `preRetrieveContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the descriptor that should be retrieved, or `null` if the content should be retrieved
    `revisionNumber` - revision number of the descriptor that should be retrieved, or `null` if the content should be retrieved
    `revisionDescriptor` - revision descriptor of the content that should be retrieved, or `null` if the descriptor will be retrieved
  Throws:
    `ObjectLockedException` - if an object is locked
    `ObjectNotFoundException` - if an object could not be found
    `ServiceAccessException` - low-level service failure
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found
    `AccessDeniedException` - if access to a resource has been denied

### postRetrieveContent

    public void postRetrieveContent(SlideToken token,
                                    NodeRevisionDescriptors revisionDescriptors,
                                    NodeRevisionDescriptor revisionDescriptor,
                                    NodeRevisionContent revisionContent)
                             throws AccessDeniedException,
                                    ObjectNotFoundException,
                                    LinkedObjectNotFoundException,
                                    ObjectLockedException,
                                    ServiceAccessException

  Does nothing.

  Specified by:
    `postRetrieveContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the descriptor that has been retrieved, or `null` when the content has been retrieved
    `revisionDescriptor` - revision descriptor of the content that has been retrieved, or the descriptor itself has been retrieved
    `revisionContent` - the actual content that has been retrieved, or `null` when the descriptor has been retrieved
  Throws:
    `ObjectNotFoundException` - if an object could not be found
    `ObjectLockedException` - if an object is locked
    `AccessDeniedException` - if access to a resource has been denied
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found
    `ServiceAccessException` - low-level service failure

### preRemoveContent

    public void preRemoveContent(SlideToken token,
                                 NodeRevisionDescriptors revisionDescriptors,
                                 NodeRevisionDescriptor revisionDescriptor)
                          throws AccessDeniedException,
                                 ObjectNotFoundException,
                                 LinkedObjectNotFoundException,
                                 ObjectLockedException,
                                 ServiceAccessException

  Does nothing.

  Specified by:
    `preRemoveContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the content that will be removed, or `null` if a only a particular revision should be removed
    `revisionDescriptor` - revision descriptor of the content that will be removed, or `null` if all revisions of a node should be removed
  Throws:
    `ServiceAccessException` - low-level service failure
    `ObjectNotFoundException` - if an object could not be found
    `AccessDeniedException` - if access to a resource has been denied
    `ObjectLockedException` - if an object is locked
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found

### postRemoveContent

    public void postRemoveContent(SlideToken token,
                                  NodeRevisionDescriptors revisionDescriptors,
                                  NodeRevisionDescriptor revisionDescriptor)
                           throws AccessDeniedException,
                                  ObjectNotFoundException,
                                  LinkedObjectNotFoundException,
                                  ObjectLockedException,
                                  ServiceAccessException

  Does nothing.

  Specified by:
    `postRemoveContent` in interface `ContentInterceptor`
  Parameters:
    `token` - the SlideToken
    `revisionDescriptors` - revision tree of the content that has been removed, or `null` if a only a particular revision has been removed
    `revisionDescriptor` - revision descriptor of the content that has been removed, or `null` if all revisions of a node have been removed
  Throws:
    `LinkedObjectNotFoundException` - if an object linked to by another object could not be found
    `ObjectNotFoundException` - if an object could not be found
    `ObjectLockedException` - if an object is locked
    `ServiceAccessException` - low-level service failure
    `AccessDeniedException` - if access to a resource has been denied

### setNamespace

    public void setNamespace(NamespaceAccessToken nat)

  Implemented to store the namespace access token as instance variable.

  Specified by:
    `setNamespace` in interface `ContentInterceptor`
  Parameters:
    `nat` - the access token to the namespace this ContentInterceptor has been associated with

### setParameters

    public void setParameters(java.util.Hashtable parameters)

  Implemented to store the parameter Hashtable as instance variable.

  Specified by:
    `setParameters` in interface `ContentInterceptor`
  Parameters:
    `parameters` - Hashtable containing the parameters' names as keys and the associated parameter values as values, both of type `java.lang.String`

### getNamespace

    protected NamespaceAccessToken getNamespace()

  Returns the namespace access token.

  Returns:
    the `NamespaceAccessToken` object, or `null` if the interceptor has not been initialized

### getParameter

    protected java.lang.String getParameter(java.lang.String name)

  Returns the value of the specified parameter.

  Parameters:
    `name` - name of the parameter to be retrieved
  Returns:
    value of the parameter, or `null` if the parameter was not provided

### getParameters

    protected java.util.Hashtable getParameters()

  Returns a Hashtable containing the configuration parameters of the interceptor.

  Returns:
    configuration parameters of the interceptor, or `null` if the interceptor has not been initialized

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