atg.commerce.search.refinement.admin
Class KeyedRefinementConfigurationContainer

java.lang.Object
  extended by atg.commerce.search.refinement.admin.PropertyRefinementConfigurationContainer
      extended by atg.commerce.search.refinement.admin.KeyedRefinementConfigurationContainer
All Implemented Interfaces:
RefinementConfigurationContainer

public class KeyedRefinementConfigurationContainer
extends PropertyRefinementConfigurationContainer

An extension of the PropertyRefinementConfigurationContainer that uses a key to find the correct refinement configuration item in a map. For example, given an item descriptor "category" that has a property "categoryInfos", which is a Map whose keys are catalog ids, and whose values are items of type "category-info". "category-info" has a property called "refineConfig", which is the item that will be returned by this container. In this example, the itemDescriptor is category, the property name is "categoryInfos", the repository id is the id of the category, the key is the id of the catalog, and the mapPropertyName is "refineConfig".


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String MAPPING_VALUE_DELIMITER
           
protected  java.lang.String mKey
          Gets the key of the mapped item to find in the map.
protected  java.lang.String mMapPropertyName
           
 
Fields inherited from class atg.commerce.search.refinement.admin.PropertyRefinementConfigurationContainer
mItemDescriptor, mLogger, mPropertyName, mRepositoryId
 
Constructor Summary
KeyedRefinementConfigurationContainer(RepositoryItem pItem, java.lang.String pPropertyName, java.lang.String pRepositoryId, java.lang.String pKey, java.lang.String pMapPropertyName, int pSpecificity)
          Create a new refinement configuration container whose item is a property value of an item of a map, which itself is a property value of another item.
 
Method Summary
 boolean equals(java.lang.Object pOther)
          Tests the equailty of another container
 java.lang.String getKey()
           
 java.lang.String getMappingValue()
          Returns a value in the form "itemId:key"
 java.lang.String getMapPropertyName()
          Gets the property name of the refinement configuration item within the mapped item
 RepositoryItem getRefinementConfigurationItem()
          Gets the refinement configuration item by first finding a map property of the given item, then looking up a subitem by key, and returning the refinement configuration property of that subitem.
 int hashCode()
          Gets the hashCode of this container.
 java.lang.String toString()
          Returns a string representation of this item.
 
Methods inherited from class atg.commerce.search.refinement.admin.PropertyRefinementConfigurationContainer
getContainingItem, getItemDescriptor, getName, getPropertyName, getRepositoryId, getSourceItem, getSpecificity, setName, setSourceItem, setSpecificity
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


MAPPING_VALUE_DELIMITER

public static java.lang.String MAPPING_VALUE_DELIMITER

mMapPropertyName

protected java.lang.String mMapPropertyName

mKey

protected java.lang.String mKey
Gets the key of the mapped item to find in the map.

Constructor Detail

KeyedRefinementConfigurationContainer

public KeyedRefinementConfigurationContainer(RepositoryItem pItem,
                                             java.lang.String pPropertyName,
                                             java.lang.String pRepositoryId,
                                             java.lang.String pKey,
                                             java.lang.String pMapPropertyName,
                                             int pSpecificity)
Create a new refinement configuration container whose item is a property value of an item of a map, which itself is a property value of another item.

Method Detail

getMapPropertyName

public java.lang.String getMapPropertyName()
Gets the property name of the refinement configuration item within the mapped item


getKey

public java.lang.String getKey()

getRefinementConfigurationItem

public RepositoryItem getRefinementConfigurationItem()
                                              throws RepositoryException
Gets the refinement configuration item by first finding a map property of the given item, then looking up a subitem by key, and returning the refinement configuration property of that subitem.

Specified by:
getRefinementConfigurationItem in interface RefinementConfigurationContainer
Overrides:
getRefinementConfigurationItem in class PropertyRefinementConfigurationContainer
Throws:
RepositoryException

getMappingValue

public java.lang.String getMappingValue()
Returns a value in the form "itemId:key"

Specified by:
getMappingValue in interface RefinementConfigurationContainer
Overrides:
getMappingValue in class PropertyRefinementConfigurationContainer

equals

public boolean equals(java.lang.Object pOther)
Tests the equailty of another container

Overrides:
equals in class PropertyRefinementConfigurationContainer

hashCode

public int hashCode()
Gets the hashCode of this container.

Overrides:
hashCode in class PropertyRefinementConfigurationContainer

toString

public java.lang.String toString()
Returns a string representation of this item.

Overrides:
toString in class PropertyRefinementConfigurationContainer