The atg.endeca.assembler.navigation.filter.SiteFilterBuilder class constructs a filter that restricts the set of records returned to only those associated with specified sites. For example, if there are three sites, site A, site B, and site C, the filter might specify that only records associated with site A or site C should be returned. (Note that a record associated with site B may still be returned if it is also associated with site A or site C.)

Note that the SiteFilterBuilder class offers similar functionality to the site filters you can create when you define a site for an EAC application. A site filter limits the records that are returned for a site to only those that are specified in the filter. This filtering is applied to all queries made to the site. By contrast, the SiteFilterBuilder class provides you with an additional measure of control over the site data that gets filtered out. For example, your application may need to support off-site spotlights or off-site searches. In this case, your application needs to query for results from the current site but also from other sites. To support this scenario, your application can request all records from the MDEX and then filter out the records for the unneeded sites using the SiteFilterBuilder class.

A second distinction between a site filter and the filters provided by the SiteFilterBuilder class is that the site filter is an application filter, while the filters created by the SiteFilterBuilder class are added to the request as URL filters. Application filters happen implicitly, at an application level, every time a request is made, while URL filters are passed along with the request URL and are only executed for the current request. URL filters are combined with application filters before the results are returned from the MDEX.

Note: For more information on site filters and defining sites, see the Oracle Commerce Guided Search Administrator’s Guide.

SiteFilterBuilder has a number of properties that it uses to determine which sites to include when it constructs the filter, described below.

siteIds

An array of the site IDs of the sites to include. Typically the value of this property is set through a form handler in a JSP, based on user interface elements, such as a set of checkboxes that the customer selects to indicate the sites to search.

siteScope

If siteIds is null, the siteScope property is used to determine the set of sites to include. It can be any of the following values:

includeInactiveSites

If true, any inactive sites specified in the siteIds property or determined via the siteScope property are included. If false (the default), inactive sites are omitted.

includeDisabledSites

If true, any disabled sites specified in the siteIds property or determined via the siteScope property are included. If false (the default), disabled sites are omitted.

sitePropertyName

The name of the site ID property in Guided Search records to use for filtering. This is typically set to:

sitePropertyName=product.siteId
siteManager

The component of class atg.multisite.SiteManager used to determine which sites are enabled and active. This is typically set to /atg/multisite/SiteManager.

siteGroupManager

The component of class atg.multisite.SiteGroupManager used to determine which sites share with the current site the shareable type specified in the siteScope property. This is typically set to /atg/multisite/SiteGroupManager.


Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices