Link Manager Filters Managing Linked Content with Link Manager

2-32 Application Administrators Guide for Content Server A link is stored in the ManagedLinks table if the pattern engine successfully processes it and determines that the link is acceptable. Each link in the table is assigned a unique class id dLkClassId and each row in the table has a unique GUID dLkGUID. A single link may consist of multiple rows in the table if multiple resources define the link and each resource can independently break the link. This is especially true for Site Studio links where a single link may be defined by both a node and a content item. If the node is missing, the link breaks. If the content item is missing, the link breaks. In this case, there are two resources that do not depend on each other and each can break the link. Consequently, each resource is managed separately in the ManagedLinks table. For additional information about Site Studio links, see Site Studio Integration on page 2-33.

2.6.4.2 LinkReferenceCount Table

The LinkReferenceCount table maps the content items to the number of times each is referenced in the ManagedLinks table. A content item in this table might not be a content item that is currently managed by Content Server. If there is an entry for a content item in this table, it only indicates that a link in the ManagedLinks table, as parsed by the pattern engine, has referenced the content item as a doc resource.

2.6.5 Link Manager Filters

The Link Manager component provides filters for parts of the pattern engine that allow customization of some very specific behavior. In general, the rules of the pattern engine are the most likely to be modified. However, in certain circumstances, Link Manager explicitly creates and uses filters to augment its standard behavior. This section covers the following topics: ■ extractLinks Filter on page 2-33 ■ linkParseService Filter on page 2-33 ■ sortAndDecodeLinks Filter on page 2-33 Important: To improve query execution performance, standard indices were added to the dDocName and dLkResource columns in the ManagedLinks table. System administrators are responsible for adjusting these indices to accommodate specific database tuning requirements in various system environments. Note: When a content item is checked in and a link references it, the link is marked as valid. When a link references a deleted content item, the link is marked as invalid. Notice that the dLkState column indicates the link’s status as Y valid or N invalid. Managing Repository Content 2-33

2.6.5.1 extractLinks Filter

The extractLinks filter is used during the Link Extraction Process when the extraction engine parses the accepted URL links. As links are extracted, Link Manager looks for specific HTML tags. However, you may decide that other HTML tags might also contain relevant links. In this case, you can use this filter to extract these additional links. The tag is passed to the filter as a cached object with the key HtmlTag. The value or link is passed back to the parse with the key HtmlValue. If the filter extracts extra information, you should be aware that the passed-in binder is flushed before being passed to the pattern engine. The service.setCachedObject and service.getCachedOject methods should pass and retrieve the extra information, respectively.

2.6.5.2 linkParseService Filter

The linkParseService filter is used during the Link Extraction Process when the pattern engine evaluates links. Specifically, the links that are identified to use the IdcService parameter. After evaluation, the link binder and service are provided for the linkParseService filter. The service contains the binder for the parsed URL and information map. You may choose to customize the values in the parsed URL binder by adjusting certain parameters. Or, you may decide to customize the information map which tells the parseService method what parameters to extract from the URL binder and how to map the data to resource types.

2.6.5.3 sortAndDecodeLinks Filter

The sortAndDecodeLinks filter is only available from the refresh option. That is, it is only called when users are refreshing the links. For more information about Link Manager refresh options, refer to Managed Links Administration Page on page 2-35. The service contains the LinkSetMap which includes a sorted list of links contained in the ManagedLinks table. The refresh validates the Site Studio links and the existence of all links referring to doc resources. However, you may decide to create a component that augments the standard validation.

2.6.6 Site Studio Integration