The SearchFormHandler class and subclasses such as atg.commerce.catalog.custom.CatalogSearchFormhandler define several properties that let you constrain search results to repository items that belong to one or more sites:

Property

Description

siteIds

Constrains the search to the list of site IDs, returns only items that belong to the specified sites.

siteScope

Constrains the scope of searched sites, set to one of the following values:

current
(default) Returns matching repository items from the current site only.

all
Returns all matching repository items and does not filter based on site context. The result set can include items that do not belong to any site.

any
Returns matching repository items that belong to any site.

none
Returns matching repository items that do not belong to any site.

shareable-type-ID
Returns matching repository items that belong to any sites that are in a sharing group with the current site, as defined by the ShareableType component ID. For example, you can return items that belong to sites that share a shopping cart with the current site.

includeInactiveSites

A Boolean property, specifies whether to include active sites in the search. By default, only active sites are returned.

includeDisabledSites

A Boolean property, specifies whether to include disabled sites in the search. Set this property and includeDisabledSites to true in order to allow the search to return sites that are both inactive and disabled. By default, only enabled sites are returned.

The siteIds property has precedence over siteScope; if the first is set, the second is ignored. The SearchFormHandler method generateResultSet() adds multisite constraints to the generated query, as set by these properties.

See the ATG Multisite Administration Guide for examples of search forms that use multisite criteria to filter results.


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