Creating a content URL generation filter class
A content URL generation filter is used to customize the URLs that are generated by a web content viewer. By creating a plug-in that implements a content URL generation filter, you can tailor the URLs to content items.
About this task
The web content viewer generates a content URL whenever there is a URL to web content within content that the viewer is displaying.
- Process any request to generate a URL that target a web content item.
- Create a URL based on the configuration of the web content viewer and any parameters set on the URL generation tags, such as the URLCmpnt tag.
You can customize the content URL generation filter chain by creating custom filters. These filters are registered with the portal through the Eclipse plug-in framework with the extension ID com.ibm.workplace.wcm.api.ContentUrlGenerationFilter. The sequence of filters in the filter chain is specified by a weight value that is associated with each filter plug-in. To insert custom filters into the filter chain before the default filters, you can use the weight attribute in the plugin.xml file. If the weight attribute is not present, filter sequence is determined by the getFilterChainWeight method of each custom filter factory.
- Modify parameters before you call the default URL generation filters.
- Modify the URL that is generated by the default filters.
- Handle exceptions that are generated by the default filters.
- Determine whether the default filters are started.
- Modify the content path that is used as input for the default URL generation filters.
- Generate any type of URL without using the default URL generation filters.
- A content URL generation filter that is used to create URLs.
- A content URL generation filter factory that is used to create new instances of the filter.