Smart Catalog Session Pattern

A catalog that narrows its own view — apply a persistent query and sort order to filter what the catalog exposes.

Overview

A smart catalog session wraps an ordinary catalog and applies a saved [OsidObject]Query and [OsidObject]SearchOrder to narrow the set of objects the catalog presents. Every lookup and query session opened against the smart catalog sees only the filtered view. Override apply[OsidObject]Query to persist the active query to your back-end.

Javadoc Reference

net.okapia.osid.jamocha.spi

Class Declaration Pattern

public abstract class AbstractSmartOsidObjectCatalog
extends AbstractOsidSession
implements SmartOsidObjectCatalog

Constructor Pattern

AbstractSmartOsidObjectCatalog(OsidObjectManager manager, Id catalogId)
ParameterTypeDescription
manager OsidObjectManager the manager that opened this session
catalogId Id the smart catalog being managed

Key Override Pattern

public void applyOsidObjectQuery(OsidObjectQuery query) throws OperationFailedException
public void applyOsidObjectSearchOrder(OsidObjectSearchOrder searchOrder) throws OperationFailedException