com.endeca.infront.cartridge
Class RefinementMenuConfig

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by com.endeca.infront.assembler.BasicContentItem
              extended by com.endeca.infront.cartridge.RefinementMenuConfig
All Implemented Interfaces:
ContentItem, Serializable, Cloneable, Map<String,Object>

public class RefinementMenuConfig
extends BasicContentItem

RefinementMenuHandler configuration model.

See Also:
Serialized Form

Nested Class Summary
static class RefinementMenuConfig.RefinementsShown
          An enumeration of valid values for getRefinementsShown()
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
RefinementMenuConfig()
          Creates a ResultsListConfig with the following default settings: showMoreLink = false numRefinements = 10 maxNumRefinements = 1000 showMore = false whyPrecedenceRuleFired = false
RefinementMenuConfig(ContentItem pContentItem)
          Creates a ResultsListConfig with the following default settings: showMoreLink = false numRefinements = 10 maxNumRefinements = 1000 showMore = false whyPrecedenceRuleFired = false
RefinementMenuConfig(String pType)
          Creates a ResultsListConfig with the following default settings: showMoreLink = false numRefinements = 10 maxNumRefinements = 1000 showMore = false whyPrecedenceRuleFired = false
 
Method Summary
 List<DvalSpec> getBoostRefinements()
          Returns a list of DVal Specs.
 List<DvalSpec> getBuryRefinements()
          Returns a list of DVal Specs.
 String getDimensionId()
          Returns the Dimension ID which identifies the Endeca Dimension to be used for this RefinementMenu.
 String getLessLinkText()
          When showMoreLink and isShowMore() is true, this text is used in the creation of the 'less' link.
 int getLimit()
          A helper method for resolving the number of refinements to include.
 int getMaxNumRefinements()
          The maximum number of refinements which will be shown when showMore has a value of "true".
 String getMoreLinkText()
          When showMoreLink is true, and more refinements are available than are included in the RefinementMenu, this text is used in the link creation.
 int getNumRefinements()
          The maximum number of refinements which will be shown when showMore has a value of "false"
 String getRefinementsShown()
          Returns the amount of refinements to show.
 String getSort()
          Returns the specification of sort type which governs how the returned refinements will be ordered in the RefinementMenu.
 boolean getUseShowMoreIdsParam()
          Deprecated. As of release 3.1.1. Returns true if the show more and less actions should use the deprecated showMoreIds parameter. The default value of this property is true.

 boolean isShowMore()
          Deprecated. As of release 3.1.1, replaced by getRefinementsShown().
When this value is false, the number of menu items generated is limited by numRefinements, and a more link will be generated. This value is intended to be overridden by request parameters when a "true" value is required in the link generation for the link generated when showMoreLink is "true". The default value for this property is false.
 boolean isShowMoreLink()
          Enables the generation of a "More..." link as part of the refinement menu if there are more refinements available than the numRefinements variable and isShowMore() is true.
 boolean isWhyPrecedenceRuleFired()
          When true, enables the reporting of 'why precedence rule fired' debug information.
 void setBoostRefinements(List<DvalSpec> boostRefinements)
          Sets the list of DVal Specs to boost.
 void setBuryRefinements(List<DvalSpec> buryRefinements)
          Sets the list of DVal Specs to bury.
 void setDimensionId(String dimensionId)
          Specifies the Dimension ID which identifies the Endeca Dimension to be used for this RefinementMenu.
 void setLessLinkText(String lessLinkText)
          When showMoreLink and isShowMore() is true, this text is used in the creation of the 'less' link.
 void setMaxNumRefinements(int maxNumRefinements)
          The maximum number of refinements which will be shown when showMore has a value of "true".
 void setMoreLinkText(String moreLinkText)
          When showMoreLink is true, and more refinements are available than are included in the RefinementMenu, this text is used in the link creation.
 void setNumRefinements(int numRefinements)
          Sets the maximum number of refinements which will be shown when showMore has a value of "false".
 void setRefinementsShown(String refinementsShown)
          Sets the amount of refinements to show.
 void setShowMore(boolean showMore)
          Deprecated. As of release 3.1.1, replaced by getRefinementsShown().
Sets whether to "show more" refinements. When this value is false, the number of menu items generated is limited by numRefinements, and a more link will be generated. This value is intended to be overridden by request parameters when a "true" value is required in the link generation for the link generated when showMoreLink is "true".
 void setShowMoreLink(boolean showMoreLink)
          Enables the generation of a "More..." link as part of the refinement menu if there are more refinements available than the numRefinements variable and isShowMore() is true.
 void setSort(String sort)
          Sets the sort type which governs how the returned refinements will be ordered in the RefinementMenu.
 void setUseShowMoreIdsParam(boolean useShowMoreIdsParam)
          Deprecated. As of release 3.1.1. Sets whether the deprecated showMoreIds or the navigation refinement menu config parameter should be used. If false, the showMoreIds will be ignored and the expand and collapse action will appear in the RefinementMenu.

 void setWhyPrecedenceRuleFired(boolean whyPrecedenceRuleFired)
          Sets if 'why precedence rule fired' debug information should be enabled.
 
Methods inherited from class com.endeca.infront.assembler.BasicContentItem
getBooleanProperty, getIntProperty, getLongProperty, getType, getTypedProperty, setType
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

RefinementMenuConfig

public RefinementMenuConfig()
Creates a ResultsListConfig with the following default settings:


RefinementMenuConfig

public RefinementMenuConfig(String pType)
Creates a ResultsListConfig with the following default settings:


RefinementMenuConfig

public RefinementMenuConfig(ContentItem pContentItem)
Creates a ResultsListConfig with the following default settings:

Method Detail

getDimensionId

public String getDimensionId()
Returns the Dimension ID which identifies the Endeca Dimension to be used for this RefinementMenu. If no dimension id is present by the time RefinementMenuHandler.preprocess(com.endeca.infront.cartridge.RefinementMenuConfig) is called, a CartridgeHandlerException will be thrown.

Returns:
The Dimension ID for which this RefinementMenu is to be configured.

setDimensionId

public void setDimensionId(String dimensionId)
Specifies the Dimension ID which identifies the Endeca Dimension to be used for this RefinementMenu. If no dimension id is present by the time RefinementMenuHandler.preprocess(com.endeca.infront.cartridge.RefinementMenuConfig) is called, a CartridgeHandlerException will be thrown.

Parameters:
dimensionId - for which this RefinementMenu is to be configured.

getSort

public String getSort()
Returns the specification of sort type which governs how the returned refinements will be ordered in the RefinementMenu. Valid values of this String are "default", "static", and "dynRank". If the value of this property is null, "default" will be assumed by RefinementMenuHandler. If the value of this property is non-null, but not an expected String, a CartridgeHandlerException will be thrown by RefinementMenuHandler.

Returns:
The ordering strategy for refinements in a RefinementMenu.

setSort

public void setSort(String sort)
Sets the sort type which governs how the returned refinements will be ordered in the RefinementMenu. Valid values of this String are "default", "static", and "dynRank". If the value of this property is null, "default" will be assumed by RefinementMenuHandler. If the value of this property is non-null, but not an expected String, a CartridgeHandlerException will be thrown by RefinementMenuHandler.


isShowMoreLink

public boolean isShowMoreLink()
Enables the generation of a "More..." link as part of the refinement menu if there are more refinements available than the numRefinements variable and isShowMore() is true. The default value for showMoreLink is false.

Returns:
Whether generation of a more link is enabled.

setShowMoreLink

public void setShowMoreLink(boolean showMoreLink)
Enables the generation of a "More..." link as part of the refinement menu if there are more refinements available than the numRefinements variable and isShowMore() is true.

Parameters:
showMoreLink - Whether to enable more link generation.

getMoreLinkText

public String getMoreLinkText()
When showMoreLink is true, and more refinements are available than are included in the RefinementMenu, this text is used in the link creation.

Returns:
The display text to render with more link generation.

setMoreLinkText

public void setMoreLinkText(String moreLinkText)
When showMoreLink is true, and more refinements are available than are included in the RefinementMenu, this text is used in the link creation.

Parameters:
moreLinkText - The display text to be used for the more link.

getLessLinkText

public String getLessLinkText()
When showMoreLink and isShowMore() is true, this text is used in the creation of the 'less' link.

Returns:
The display text to be used for the less link.

setLessLinkText

public void setLessLinkText(String lessLinkText)
When showMoreLink and isShowMore() is true, this text is used in the creation of the 'less' link.

Parameters:
lessLinkText - The display text to be used for the less link.

getNumRefinements

public int getNumRefinements()
The maximum number of refinements which will be shown when showMore has a value of "false"

Returns:
the number of refinements to show before expanding. Defaults to 10 if unspecified.

setNumRefinements

public void setNumRefinements(int numRefinements)
Sets the maximum number of refinements which will be shown when showMore has a value of "false".

Parameters:
numRefinements - the number of refinements to show before expanding. Defaults to 10 if unspecified.

getMaxNumRefinements

public int getMaxNumRefinements()
The maximum number of refinements which will be shown when showMore has a value of "true".

Returns:
the maximum number of refinements to show even when refinement is expanded. Defaults to 1000.

setMaxNumRefinements

public void setMaxNumRefinements(int maxNumRefinements)
The maximum number of refinements which will be shown when showMore has a value of "true".

Parameters:
maxNumRefinements - the maximum number of refinements to show even when refinement is expanded. Defaults to 1000.

getBoostRefinements

public List<DvalSpec> getBoostRefinements()
Returns a list of DVal Specs. If present, and the dimension values referenced are present in the specified FilterState, those values will be promoted to the top of the RefinementMenu.

Returns:
list of Dval Specs to be boosted.

setBoostRefinements

public void setBoostRefinements(List<DvalSpec> boostRefinements)
Sets the list of DVal Specs to boost. If present, and the dimension values referenced are present in the specified FilterState, those values will be promoted to the top of the RefinementMenu.

Parameters:
boostRefinements - list of Dval Specs to be boosted.

getBuryRefinements

public List<DvalSpec> getBuryRefinements()
Returns a list of DVal Specs. If present, and the dimension values referenced are present in the specified FilterState, those values will be demoted to the bottom of the RefinementMenu.

Returns:
list of Dval Specs to be buried.

setBuryRefinements

public void setBuryRefinements(List<DvalSpec> buryRefinements)
Sets the list of DVal Specs to bury. If present, and the dimension values referenced are present in the specified FilterState, those values will be demoted to the bottom of the RefinementMenu.

Parameters:
buryRefinements - list of Dval Specs to be buried.

isShowMore

@Deprecated
public boolean isShowMore()
Deprecated. As of release 3.1.1, replaced by getRefinementsShown().
When this value is false, the number of menu items generated is limited by numRefinements, and a more link will be generated. This value is intended to be overridden by request parameters when a "true" value is required in the link generation for the link generated when showMoreLink is "true". The default value for this property is false.

Returns:
Whether to limit by numRefinements or maxNumRefinements.

setShowMore

@Deprecated
public void setShowMore(boolean showMore)
Deprecated. As of release 3.1.1, replaced by getRefinementsShown().
Sets whether to "show more" refinements. When this value is false, the number of menu items generated is limited by numRefinements, and a more link will be generated. This value is intended to be overridden by request parameters when a "true" value is required in the link generation for the link generated when showMoreLink is "true".

Parameters:
showMore - specifies whether more refinements should be shown.

isWhyPrecedenceRuleFired

public boolean isWhyPrecedenceRuleFired()
When true, enables the reporting of 'why precedence rule fired' debug information. The default value for this property is false.

Note: in order for debugging information to be returned, debugging must be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

Returns:
Whether to enable 'why precedence rule fired' debug info
See Also:
setWhyPrecedenceRuleFired(boolean), MdexRequestBroker

setWhyPrecedenceRuleFired

public void setWhyPrecedenceRuleFired(boolean whyPrecedenceRuleFired)
Sets if 'why precedence rule fired' debug information should be enabled. The default value for this property is false.

Note: in order for debugging information to be returned, debugging must be enabled on NavigationRequest. To accomplish this, specify debugEnabled=true when instantiating MdexRequestBroker.

Parameters:
whyPrecedenceRuleFired - true to enable 'why precedence rule fired' debug info
See Also:
isWhyPrecedenceRuleFired(), RefinementMenuRequestParamMarshaller, MdexRequestBroker

getRefinementsShown

public String getRefinementsShown()
Returns the amount of refinements to show. The default value of this property is "some".

Returns:
The amount of refinements to show.

setRefinementsShown

public void setRefinementsShown(String refinementsShown)
Sets the amount of refinements to show. Valid values are: none, some, and ALL.

none - Returns no refinements.

some - Returns up to getNumRefinements() refinements.

all - Returns up to getMaxNumRefinements() ()} refinements.

*

Parameters:
refinementsShown - either "none", "some" or "all".

getUseShowMoreIdsParam

@Deprecated
public boolean getUseShowMoreIdsParam()
Deprecated. As of release 3.1.1. Returns true if the show more and less actions should use the deprecated showMoreIds parameter. The default value of this property is true.

Returns:
Whether to use the showMoreIds or the refinementMenuConfig parameter.

setUseShowMoreIdsParam

@Deprecated
public void setUseShowMoreIdsParam(boolean useShowMoreIdsParam)
Deprecated. As of release 3.1.1. Sets whether the deprecated showMoreIds or the navigation refinement menu config parameter should be used. If false, the showMoreIds will be ignored and the expand and collapse action will appear in the RefinementMenu.

Parameters:
useShowMoreIdsParam - whether to use the showMoreIds parameter or not.

getLimit

public int getLimit()
A helper method for resolving the number of refinements to include. This value depends on the value of getRefinementsShown().

Returns:
The maximum number of refinements that this refinement menu should include.


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.