com.endeca.infront.cartridge
Class RecordSpotlightConfig

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.RecordSpotlightConfig
All Implemented Interfaces:
ContentItem, Serializable, Cloneable, Map<String,Object>

public class RecordSpotlightConfig
extends BasicContentItem

RecordSpotlightHandler configuration model.

See Also:
Serialized Form

Nested Class Summary
 
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
RecordSpotlightConfig()
          Creates a RecordSpotlightConfig with the following default settings: maxNumRecords = 10 showSeeAllLink = false
RecordSpotlightConfig(ContentItem pContentItem)
          Creates a copy of the specified ContentItem, and returns it as an instance of RecordSpotlightConfig.
RecordSpotlightConfig(String type)
          Creates a RecordSpotlightConfig with the following default settings: maxNumRecords = 10 showSeeAllLink = false
 
Method Summary
 List<String> getFieldNames()
          Returns the record fields that will be returned in the ContentItem.
 int getMaxNumRecords()
          The maximum number of records that will be returned.
 RecordSpotlightSelection getRecordSelection()
          A record selection that could contain a navigation state.
 String getSeeAllLinkText()
          Gets the text to display for the See All Action returned by RecordSpotlight.getSeeAllLink().
 boolean getShowSeeAllLink()
          Gets whether to display the See All Action returned by RecordSpotlight.getSeeAllLink().
 List<String> getSubRecordFieldNames()
          Returns the sub-record fields (of aggregate records) that will be returned in the ContentItem.
 void setFieldNames(List<String> fieldNames)
          Specifies which record fields will be passed through from the records to the resulting ContentItem.
 void setMaxNumRecords(int maxNumRecords)
          Sets the maximum number of records to be returned.
 void setRecordSelection(RecordSpotlightSelection recordSelection)
          Sets the record selection for this cartridge handler.
 void setSeeAllLinkText(String pLink)
          Sets the text for display in the See All Action returned by RecordSpotlight.getSeeAllLink().
 void setShowSeeAllLink(boolean showSeeAll)
          Sets whether to display the See All Action returned by RecordSpotlight.getSeeAllLink().
 void setSubRecordFieldNames(List<String> fieldNames)
          Specifies which sub-record fields (of aggregate records) will be passed through to the resulting ContentItem.
 
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

RecordSpotlightConfig

public RecordSpotlightConfig()
Creates a RecordSpotlightConfig with the following default settings:


RecordSpotlightConfig

public RecordSpotlightConfig(String type)
Creates a RecordSpotlightConfig with the following default settings:

The input argument as set as the type.

Parameters:
type - a value that will be used as the type
See Also:
BasicContentItem.getType()

RecordSpotlightConfig

public RecordSpotlightConfig(ContentItem pContentItem)
Creates a copy of the specified ContentItem, and returns it as an instance of RecordSpotlightConfig. If maxNumRecords has not been set, a default of 10 will be used. If showSeeAllLink has not been set, a default of false will be used.

Method Detail

getMaxNumRecords

public int getMaxNumRecords()
The maximum number of records that will be returned. This value is used if the recordSelection (setRecordSelection(com.endeca.infront.cartridge.RecordSpotlightSelection)) has a record limit of either 0 or a value that is greater than maxNumRecords. The default is 10.

See Also:
setMaxNumRecords(int)

setMaxNumRecords

public void setMaxNumRecords(int maxNumRecords)
Sets the maximum number of records to be returned.

See Also:
getMaxNumRecords()

getRecordSelection

public RecordSpotlightSelection getRecordSelection()
A record selection that could contain a navigation state. If null, the RecordSpotlightHandler.preprocess(com.endeca.infront.cartridge.RecordSpotlightConfig) method will throw a CartridgeHandlerException.

See Also:
setRecordSelection(RecordSpotlightSelection)

setRecordSelection

public void setRecordSelection(RecordSpotlightSelection recordSelection)
Sets the record selection for this cartridge handler. If null, the RecordSpotlightHandler.preprocess(com.endeca.infront.cartridge.RecordSpotlightConfig) method will throw a CartridgeHandlerException.

See Also:
getRecordSelection()

getSeeAllLinkText

public String getSeeAllLinkText()
Gets the text to display for the See All Action returned by RecordSpotlight.getSeeAllLink(). May be null.

See Also:
RecordSpotlight.getSeeAllLink()

setSeeAllLinkText

public void setSeeAllLinkText(String pLink)
Sets the text for display in the See All Action returned by RecordSpotlight.getSeeAllLink().


getShowSeeAllLink

public boolean getShowSeeAllLink()
Gets whether to display the See All Action returned by RecordSpotlight.getSeeAllLink(). The default is false.

See Also:
RecordSpotlight.getSeeAllLink()

setShowSeeAllLink

public void setShowSeeAllLink(boolean showSeeAll)
Sets whether to display the See All Action returned by RecordSpotlight.getSeeAllLink().

See Also:
RecordSpotlight.getSeeAllLink()

setFieldNames

public void setFieldNames(List<String> fieldNames)
Specifies which record fields will be passed through from the records to the resulting ContentItem. If null, the default set of field names configured for the MDEX (from render_config.xml) will be returned.

If aggregation is enabled, this list is used to specify the record field names for the aggregated records, and the subRecordFieldNames list is used to specify the record field names for the sub-records (child) records.

If aggregation is disabled and a subRecordFieldNames list is also specified, it will be combined with this list.

See Also:
getFieldNames(), getSubRecordFieldNames()

getFieldNames

public List<String> getFieldNames()
Returns the record fields that will be returned in the ContentItem.

Returns:
record fields to return. May be null, in which all configured record fields will be returned.
See Also:
setFieldNames(java.util.List), setSubRecordFieldNames(java.util.List)

setSubRecordFieldNames

public void setSubRecordFieldNames(List<String> fieldNames)
Specifies which sub-record fields (of aggregate records) will be passed through to the resulting ContentItem.

If aggregation is enabled and this list is null, all field names configured for the MDEX (from render_config.xml) will be returned on the sub-records (child records). The field names specified by setFieldNames(java.util.List) will be used to determine the field names returned on the aggregated records.

If aggregation is disabled and this list is non-null, its field names will be combined with the field names specified by setFieldNames(java.util.List); the combined list will be used to determine the field names that should be returned on the non-aggregated records.

See Also:
getSubRecordFieldNames(), getFieldNames()

getSubRecordFieldNames

public List<String> getSubRecordFieldNames()
Returns the sub-record fields (of aggregate records) that will be returned in the ContentItem. If aggregation is disabled, this list is combined with the fieldNames.

Returns:
sub-record fields to return. May be null, in which all configured sub-record fields will be returned.
See Also:
setSubRecordFieldNames(java.util.List), setFieldNames(java.util.List)


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