com.arsdigita.search.ui
Class QueryComponent
java.lang.Object
com.arsdigita.bebop.Completable
com.arsdigita.bebop.SimpleComponent
com.arsdigita.bebop.TextStylable
com.arsdigita.bebop.BlockStylable
com.arsdigita.bebop.SimpleContainer
com.arsdigita.search.ui.QueryComponent
- All Implemented Interfaces:
- Cloneable, Component, Container, Lockable, QueryGenerator
- Direct Known Subclasses:
- BaseQueryComponent
- public abstract class QueryComponent
- extends SimpleContainer
- implements QueryGenerator
A base class for generating a query specification
from the state. Subclasses must implement two
methods, one for getting the query tmers,
the other for gettting a set of filter specs.
Fields inherited from class com.arsdigita.bebop.BlockStylable |
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP |
Methods inherited from class com.arsdigita.bebop.SimpleContainer |
add, add, children, contains, generateChildrenXML, generateParent, generateXML, get, getNamespace, getTag, indexOf, isEmpty, setNamespace, setTag, size |
Methods inherited from class com.arsdigita.bebop.SimpleComponent |
clone, exportAttributes, getAttribute, getClassAttr, getIdAttr, getKey, getMetaDataAttribute, getStyleAttr, hasAttributes, isLocked, isVisible, lock, register, register, respond, setAttribute, setClassAttr, setIdAttr, setKey, setMetaDataAttribute, setStyleAttr, setVisible |
Methods inherited from interface com.arsdigita.bebop.Component |
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible |
QueryComponent
public QueryComponent(String name)
hasQuery
public boolean hasQuery(PageState state)
- Determine if a query specification is available
- Specified by:
hasQuery
in interface QueryGenerator
- Returns:
- true if the user has entered some search terms
getQuerySpecification
public QuerySpecification getQuerySpecification(PageState state)
- Returns the current query specification
- Specified by:
getQuerySpecification
in interface QueryGenerator
- Returns:
- the query spec
getTerms
protected abstract String getTerms(PageState state)
- Returns the current query terms
- Returns:
- the query terms, or null
getFilters
protected abstract FilterSpecification[] getFilters(PageState state)
- Returns the current filter specifications
- Returns:
- the list of filter specs
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC