Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.search.bean
Interface Searchable  view Searchable download Searchable.java

All Superinterfaces:
com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable

public interface Searchable
extends com.RuntimeCollective.webapps.bean.EntityBean

A javabean must implement this interface to be searchable. The responsibility for adding this javabean to the search index is entirely down to the implementing class. A standard way of doing this would be put the following line in the save method:

((SearchIndex)RuntimeParameters.getSearchIndex()).addSearchable(this)
and in the delete method:

((SearchIndex)RuntimeParameters.getSearchIndex()).removeSearchable(this)
This will put the bean in the search index when it's saved, and remove it when it's deleted.

Version:
$Id: Searchable.java,v 1.5 2003/09/30 15:12:57 joe Exp $

Field Summary
static java.lang.String searchCategory
          The category, or section name, to "file" this object under in the search index.
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
DATABASE_TABLE, INTERFACE_BEAN, NULL_ID
 
Method Summary
 java.util.Collection getFields()
          Get a Collection of Strings, for every Field that can be searched for on this object.
 java.lang.String getLink()
          Get a link that will display this object (ok, so this is a bit of a hack - there must be a better way)
 java.lang.String getSearchSummary()
          Get a short, one paragraph summary for this searchable object.
 java.lang.String getSearchText()
          Get all text for this object that will be searched on.
 java.lang.String getSearchTitle()
          Get a one-line title for this searchable object.
 Searchable[] populateIndex()
          Return all Searchable objects of this class that should be added to the search index, given an empty index to populate.
 
Methods inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
delete, getId, save, setId
 

Field Detail

searchCategory

public static final java.lang.String searchCategory
The category, or section name, to "file" this object under in the search index.

See Also:
Constant Field Values
Method Detail

getSearchTitle

public java.lang.String getSearchTitle()
Get a one-line title for this searchable object.


getSearchSummary

public java.lang.String getSearchSummary()
Get a short, one paragraph summary for this searchable object.


getSearchText

public java.lang.String getSearchText()
Get all text for this object that will be searched on.


getFields

public java.util.Collection getFields()
Get a Collection of Strings, for every Field that can be searched for on this object.


getLink

public java.lang.String getLink()
Get a link that will display this object (ok, so this is a bit of a hack - there must be a better way)


populateIndex

public Searchable[] populateIndex()
                           throws com.RuntimeCollective.search.SearchException
Return all Searchable objects of this class that should be added to the search index, given an empty index to populate. Note: This would normally be a static method, but it's defined in the Searchable *interface*.