com.arsdigita.search.ui
Class QueryComponent

java.lang.Object
  extended bycom.arsdigita.bebop.Completable
      extended bycom.arsdigita.bebop.SimpleComponent
          extended bycom.arsdigita.bebop.TextStylable
              extended bycom.arsdigita.bebop.BlockStylable
                  extended bycom.arsdigita.bebop.SimpleContainer
                      extended bycom.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.


Field Summary
 
Fields inherited from class com.arsdigita.bebop.SimpleContainer
versionId
 
Fields inherited from class com.arsdigita.bebop.BlockStylable
ABSBOTTOM, ABSMIDDLE, BASELINE, BOTTOM, CENTER, FULL_WIDTH, INSERT, LEFT, MIDDLE, RIGHT, TEXTTOP, TOP
 
Fields inherited from class com.arsdigita.bebop.SimpleComponent
m_attr
 
Fields inherited from interface com.arsdigita.bebop.Component
BEBOP_XML_NS, CLASS, ID, ON_CLICK, STYLE
 
Constructor Summary
QueryComponent(String name)
           
 
Method Summary
protected abstract  FilterSpecification[] getFilters(PageState state)
          Returns the current filter specifications
 QuerySpecification getQuerySpecification(PageState state)
          Returns the current query specification
protected abstract  String getTerms(PageState state)
          Returns the current query terms
 boolean hasQuery(PageState state)
          Determine if a query specification is available
 
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.BlockStylable
setBorder, setBorder, setBorderColor, setHorizontalAlignment, setMargin, setMargin, setPadding, setPadding, setVerticalAlignment
 
Methods inherited from class com.arsdigita.bebop.TextStylable
setBackgroundColor, setColor
 
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 class com.arsdigita.bebop.Completable
addCompletionListener, fireCompletionEvent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.arsdigita.bebop.Component
getClassAttr, getIdAttr, getKey, getStyleAttr, isVisible, register, register, respond, setClassAttr, setIdAttr, setKey, setStyleAttr, setVisible
 
Methods inherited from interface com.arsdigita.util.Lockable
isLocked, lock
 

Constructor Detail

QueryComponent

public QueryComponent(String name)
Method Detail

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 21 2004:2337 UTC