|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JiveInterceptor
A jive interceptor encapsulates an action that is invoked on a jive object immediately before or after it is added to the system and also when the object's subject or body is being edited. These types of actions fall into two broad communities:
JiveInterceptor.Type.TYPE_PRE.
Each interceptor can have properties that are configurable by end-users. These should be exposed through a BeanInfo class.
All interceptor implementations must have two public constructors. One should be a default constructor (no parameters), and the other should have following signature: (int objectType, long objectID). These paramaters tell the interceptor instance if it is installed globally or in a community. In the case of a global interceptor, the objectType is JiveConstants.SYSTEM and the objectID is -1. Note that the default implementation of the code that invokes interceptors will detect cyclic calls to interceptors so it is safe to recall methods that called the interceptor. For example, the comment.setBody(body) method will fire interceptor using theJiveInterceptor.Type.TYPE_EDIT type. If
an interceptor wants to modify that body and call comment.setBody(body) again with the modified
body the implementation will detect the second cyclical call to invoke interceptors and not
execute any interceptors in that circumstance.
InterceptorManager| Nested Class Summary | |
|---|---|
static class |
JiveInterceptor.Type
Represents the different ways a JiveInterceptor may be run |
| Method Summary | |
|---|---|
List<JiveInterceptor.Type> |
getTypes()
Returns the interception types the interceptor supports. |
void |
invokeInterceptor(JiveObject jiveObject,
JiveInterceptor.Type type)
Invokes the interceptor on the specified jive object. |
| Method Detail |
|---|
List<JiveInterceptor.Type> getTypes()
void invokeInterceptor(JiveObject jiveObject,
JiveInterceptor.Type type)
throws RejectedException
JiveInterceptor.Type.TYPE_PRE interceptor can throw an
exception.
jiveObject - the jive object to take action on.type - the type of interceptor to run
RejectedException - if the object should be prevented from being created/posted.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||