com.arsdigita.search
Interface MetadataProvider


public interface MetadataProvider

The interface defining an adapter between a domain object and the search index metadata. Any domain object which wishes to make itself searchable should register an instance of this interface with the MetadataProviderRegistry

See Also:
MetadataProviderRegistry, ContentProvider

Method Summary
 ContentProvider[] getContent(DomainObject dobj, ContentType type)
          Gets the content for the DomainObject.
 Date getCreationDate(DomainObject dobj)
          Gets the (optional) creation date of the DomainObject
 Party getCreationParty(DomainObject dobj)
          Gets the (optional) creating party of the DomainObject
 Date getLastModifiedDate(DomainObject dobj)
          Gets the (optional) last modification date of the DomainObject
 Party getLastModifiedParty(DomainObject dobj)
          Gets the (optional) last modifying party of the DomainObject
 Locale getLocale(DomainObject dobj)
          Gets the locale to which this object belongs
 String getSummary(DomainObject dobj)
          Gets the (optional) summary of the DomainObject
 String getTitle(DomainObject dobj)
          Gets the Title property for the DomainObject
 String getTypeSpecificInfo(DomainObject dobj)
          Gets an opaque fragment of object type specific metadata.
 

Method Detail

getTypeSpecificInfo

public String getTypeSpecificInfo(DomainObject dobj)
Gets an opaque fragment of object type specific metadata. This method is a short term workaround for limitations in our Lucene implementation. ie for c.a.cms.ContentPage it lets us distinguish between live and draft items. It will likely be removed in the near future.

Parameters:
dobj - the domain object
Returns:
the type specific metadata

getLocale

public Locale getLocale(DomainObject dobj)
Gets the locale to which this object belongs

Parameters:
dobj - the domain object
Returns:
the locale of the object

getTitle

public String getTitle(DomainObject dobj)
Gets the Title property for the DomainObject

Parameters:
dobj - the domain object
Returns:
title of the object

getSummary

public String getSummary(DomainObject dobj)
Gets the (optional) summary of the DomainObject

Parameters:
dobj - the domain object
Returns:
the object summary, or null

getCreationDate

public Date getCreationDate(DomainObject dobj)
Gets the (optional) creation date of the DomainObject

Parameters:
dobj - the domain object
Returns:
the creation date, or null

getCreationParty

public Party getCreationParty(DomainObject dobj)
Gets the (optional) creating party of the DomainObject

Parameters:
dobj - the domain object
Returns:
the creation party, or null

getLastModifiedDate

public Date getLastModifiedDate(DomainObject dobj)
Gets the (optional) last modification date of the DomainObject

Parameters:
dobj - the domain object
Returns:
the modification date, or null

getLastModifiedParty

public Party getLastModifiedParty(DomainObject dobj)
Gets the (optional) last modifying party of the DomainObject

Parameters:
dobj - the domain object
Returns:
the modification party, or null

getContent

public ContentProvider[] getContent(DomainObject dobj,
                                    ContentType type)
Gets the content for the DomainObject. Content can be returned in multiple formats. To see which the current indexer supports use Search.getConfig().allowsXXXContent()

Parameters:
dobj - the domain object
Returns:
array of content for this object, or an empty array


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC