If you use Interceptors in your Jive instance you've probably noticed one frustrating limitation: it is only possible to configure interceptors in the Admin Console in Spaces. While the feature works great there, it does not apply in Social Groups, Personal Blogs or Private Content.
The good news: it IS possible to configure Interceptors to work globally using System Properties. Let's examine how to do this.
The Hidden UI
You can actually navigate to a "hidden" page in the Admin UI to configure these Global Interceptors. To access this page, navigate to the URL http://<your URL here>/admin/interceptors.jsp?communityID=-1 and proceed to configure your Interceptors through the usual process. Changes made through the UI do not require a restart to take effect.
For our example, let's choose a Keyword Interceptor as this is one of the most commonly used Interceptor types. A Keyword Interceptor can be used to prevent users from posting specific terms that may be inappropriate for use in your community. Before we work on our Global Interceptor, let's first take a look at how we might configure this for a Space:
In this case we've set up a Keyword Interceptor that will detect occurrences of the term "figgles" in most content types and prevent users from posting it to the community. Here's what end users will see if they attempt to post content with the blocked terms:
Note that Interceptors are persisted in the Jive database as Extended Properties of the Space. To view a Space's Extended Properties navigate to Spaces > Settings > Extended Properties for the Space in the Admin Console. After configuring the Interceptor listed above you'll see these properties:
jive.interceptor.interceptor0.className = com.jivesoftware.community.interceptor.KeywordInterceptor jive.interceptor.interceptor0.properties.blockError = You can't say figgles in here! jive.interceptor.interceptor0.properties.blockQueryString = figgles jive.interceptor.interceptor0.properties.stemmingEnabled = true jive.interceptor.interceptorCount = 1
Hopefully the properties' names and values are obvious enough because we'll need them for the next step. Now we're ready to create our Global Keyword Interceptor.
There's no UI for creating a Global Interceptor so instead we'll have to add properties manually to the System Properties table (System > Management > System Properties). The properties won't exist at first so you'll need to use the "Add New Property" dialog at the bottom of that page. The property names follow a similar pattern:
interceptor.system.interceptor0.className = com.jivesoftware.community.interceptor.KeywordInterceptor interceptor.system.interceptor0.properties.blockError = You can't say figgles ANYWHERE! interceptor.system.interceptor0.properties.blockQueryString = figgles interceptor.system.interceptor0.properties.stemmingEnabled = true interceptor.system.interceptorCount = 1
If you configure the interceptors through system properties a restart will be required to take effect. After the restart your Global Interceptor should be in effect:
Adding Additional Interceptors
Adding additional Interceptors is as simple as adding the first one. Just note that you'll need to update the number in interceptor.system.interceptorX.* for the new interceptor and increment the interceptor.system.interceptorCount variable. We recommend making changes to a Space's Interceptor settings first, then review the Space's Extended Properties to understand how you'll want to configure the new Global Interceptors.
At this time, Interceptors do not apply to Status Updates or Direct Messages.
Also, please note that a Global Interceptor will take precedence over any Space level Interceptors that might also apply to a particular piece of content.