|
|||||||||
| Home >> All >> org >> apache >> slide >> [ content overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.slide.content
Interface ContentInterceptor

- All Known Implementing Classes:
- AbstractContentInterceptor
- public interface ContentInterceptor
An interface that allows custom components to observe and intercept storage, retrieval and removal of content.
Multiple ContentInterceptors can be associated with a single
Namespace. They are typically configured in the
<configuration> section of the domain configuration
file like this:
<content-interceptor class="com.acme.MyContentInterceptor">
<parameter name="myParam1">someValue</parameter>
<parameter name="myParam2">anotherValue</parameter>
</content-interceptor>
As you can see, ContentInterceptors can be configured with
parameters. This is optional, and exactly which parameters are available
depends on the specific ContentInterceptor implementation.
ContentInterceptor implementations must provide a public
constructor without arguments, so that instances of the class can be
instantiated at startup. In addition, implementors should pay attention
to this minimal lifecycle definition:
- When the namespace is being configured,
setParameterswill be called with ajava.util.Hashtablecontaining the parameter names and values as specified in the configuration. - When configuration is completed,
setNamespacewill be called, passing in aNamespaceAccessTokenthan can later be used by theContentInterceptorto perform its deeds (like logging to the namespace logger). - After that, any of the
preXXXandpostXXXmethods will be called as soon as the associated event occurs.
The signatures of the preXXX and postXXX specify
a wide range of exceptions that can be thrown. If such an exception is
thrown it will be propagated up to the the API client. In the case of the
preXXX the started operation will be terminated. So be sure
to handle all exceptions that shouldn't be propagated back into the core
core API - and thus possibly influence success of the operation -
yourself.
| Method Summary | |
void |
postRemoveContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor)
This method will be called just after content has been removed, either of all revisions of a node, or of only one particular revision. |
void |
postRetrieveContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor,
NodeRevisionContent revisionContent)
This method will be called just after retrieving content, or the descriptor of a particular revision. |
void |
postStoreContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor,
NodeRevisionContent revisionContent)
This method will be called just after the content of a node was stored. |
void |
preRemoveContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor)
This method will be called just before content will get removed, either of all revisions of a node, or of only one particular revision. |
void |
preRetrieveContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionNumber revisionNumber,
NodeRevisionDescriptor revisionDescriptor)
This method will be called just before content is retrieved, or the descriptor of a particular revision is retrieved. |
void |
preStoreContent(org.apache.slide.common.SlideToken token,
NodeRevisionDescriptors revisionDescriptors,
NodeRevisionDescriptor revisionDescriptor,
NodeRevisionContent revisionContent)
This method will be called just before the content of a node is stored. |
void |
setNamespace(org.apache.slide.common.NamespaceAccessToken nat)
The setNamespace method will be called during
initialization of the ContextInterceptor. |
void |
setParameters(java.util.Hashtable parameters)
This method is called during initialization of the ContentInterceptor to allow parameterization from the configuration. |
| Method Detail |
preStoreContent
public void preStoreContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just before the content of a node is stored.
postStoreContent
public void postStoreContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just after the content of a node was stored.
preRetrieveContent
public void preRetrieveContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionNumber revisionNumber, NodeRevisionDescriptor revisionDescriptor) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just before content is retrieved, or the
descriptor of a particular revision is retrieved.
postRetrieveContent
public void postRetrieveContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, NodeRevisionContent revisionContent) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just after retrieving content, or the
descriptor of a particular revision.
preRemoveContent
public void preRemoveContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just before content will get removed, either
of all revisions of a node, or of only one particular revision.
postRemoveContent
public void postRemoveContent(org.apache.slide.common.SlideToken token, NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor revisionDescriptor) throws org.apache.slide.security.AccessDeniedException, org.apache.slide.structure.ObjectNotFoundException, org.apache.slide.structure.LinkedObjectNotFoundException, org.apache.slide.lock.ObjectLockedException, org.apache.slide.common.ServiceAccessException
- This method will be called just after content has been removed, either
of all revisions of a node, or of only one particular revision.
setNamespace
public void setNamespace(org.apache.slide.common.NamespaceAccessToken nat)
- The
setNamespacemethod will be called during initialization of the ContextInterceptor.
setParameters
public void setParameters(java.util.Hashtable parameters)
- This method is called during initialization of the ContentInterceptor
to allow parameterization from the configuration. If no parameters have
been specified, the Hashtable will be empty
|
|||||||||
| Home >> All >> org >> apache >> slide >> [ content overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC