atg.repository.search.refinement
Class RefinementFacet

java.lang.Object
  extended by atg.repository.search.refinement.Facet
      extended by atg.repository.search.refinement.RefinementFacet
Direct Known Subclasses:
CatalogFacet

public class RefinementFacet
extends Facet

Represents a refinement element that exists in the refinement repository. Extends the Facet class, providing a lazy lookup method to get the underlying repository item for a refinement element


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  FacetManager mFacetManager
           
protected  java.lang.String mId
           
protected  Refinement mRefinement
           
protected  RefinementElement mRefinementElement
           
 
Constructor Summary
RefinementFacet(Refinement pRefinement, FacetManager pFacetManager)
          Constructor method
RefinementFacet(RepositoryItem pItem, FacetManager pFacetManager)
          Constructor method that can be used when we already have the repository item for the facet.
RefinementFacet(java.lang.String pId, FacetManager pFacetManager)
          Constructor method
 
Method Summary
 java.lang.String getDebug()
          If this is not null then it returns the reason why the facet isn't valid in the response.
 FacetManager getFacetManager()
           
 java.lang.String getId()
          Gets the ID of the facet
 java.lang.String getLabel()
          Gets the display name label for the facet
 Refinement getRefinement()
          Getter for refinement
 RefinementElement getRefinementElement()
           
protected  RefinementElement getRefinementElement(RepositoryItem pItem)
           
protected  RepositoryItem getRepositoryItem()
           
protected  void setFacetManager(FacetManager pFacetManager)
           
protected  void setId(java.lang.String pId)
           
 void setRefinement(Refinement pRefinement)
          Setter for refinement
protected  void setRefinementElement(RefinementElement pRefinementElement)
           
 
Methods inherited from class atg.repository.search.refinement.Facet
equals, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mId

protected java.lang.String mId

mRefinementElement

protected RefinementElement mRefinementElement

mFacetManager

protected FacetManager mFacetManager

mRefinement

protected Refinement mRefinement
Constructor Detail

RefinementFacet

public RefinementFacet(java.lang.String pId,
                       FacetManager pFacetManager)
Constructor method

Parameters:
pId - The ID of the refineElement RepositoryItem
pFacetManager - The FacetManager instance used to query the repository.

RefinementFacet

public RefinementFacet(Refinement pRefinement,
                       FacetManager pFacetManager)
Constructor method

Parameters:
pRefinement - The Refinement from a search response of the refineElement
pFacetManager - The FacetManager instance can be used to query the repository.

RefinementFacet

public RefinementFacet(RepositoryItem pItem,
                       FacetManager pFacetManager)
                throws FacetException
Constructor method that can be used when we already have the repository item for the facet.

Parameters:
pItem - refineElement Repository Item
pFacetManager - The FacetManager instance used to query the repository.
Throws:
FacetException - for problems getting the RefinementElement
Method Detail

getId

public java.lang.String getId()
Description copied from class: Facet
Gets the ID of the facet

Specified by:
getId in class Facet
Returns:
The repository ID of the facet.
See Also:
Gets the repository ID of the facet.

setId

protected void setId(java.lang.String pId)

getFacetManager

public FacetManager getFacetManager()

setFacetManager

protected void setFacetManager(FacetManager pFacetManager)

getRefinementElement

public RefinementElement getRefinementElement()
                                       throws FacetException
Throws:
FacetException

setRefinementElement

protected void setRefinementElement(RefinementElement pRefinementElement)

getLabel

public java.lang.String getLabel()
                          throws FacetException
Description copied from class: Facet
Gets the display name label for the facet

Specified by:
getLabel in class Facet
Returns:
The label for this facet.
Throws:
FacetException - for problems getting the label.
See Also:
Gets the label for the facet

setRefinement

public void setRefinement(Refinement pRefinement)
Setter for refinement

Parameters:
pRefinement - Refinement

getRefinement

public Refinement getRefinement()
Getter for refinement

Returns:
Refinement

getDebug

public java.lang.String getDebug()
If this is not null then it returns the reason why the facet isn't valid in the response. This will only come back in search testing where facet details mode is turned on for the query.

Overrides:
getDebug in class Facet
Returns:
String with reason why facet is invalid, e.g. refineMax

getRepositoryItem

protected RepositoryItem getRepositoryItem()
                                    throws FacetException
Throws:
FacetException

getRefinementElement

protected RefinementElement getRefinementElement(RepositoryItem pItem)
                                          throws FacetException
Throws:
FacetException