atg.commerce.search.refinement.admin
Class PropertyRefinementConfigurationContainer

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

public class PropertyRefinementConfigurationContainer
extends java.lang.Object
implements RefinementConfigurationContainer

An implementation of RefinementConfigurationContainer that, given an item descriptor, an id of an item with that descriptor, and a property name of that item, will retrieve the item with the given id, and return the value of the property with the given name, which must be a refineConfig item. For example, with itemDescriptor = category, repositoryId = cat10001, and propertyName = refineConfig, this container will return the refineConfig associated with category cat10001.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  RepositoryItemDescriptor mItemDescriptor
           
static ApplicationLoggingImpl mLogger
          Logger
protected  java.lang.String mPropertyName
           
protected  java.lang.String mRepositoryId
           
 
Constructor Summary
PropertyRefinementConfigurationContainer(RepositoryItem pItem, java.lang.String pPropertyName, java.lang.String pRepositoryId, int pSpecificity)
          Create a new refinement configuration container whose item is referenced from the property of the item of the given descriptor.
 
Method Summary
 boolean equals(java.lang.Object pOther)
          Test to see of the other object has the same item descriptor, id, and property name
protected  RepositoryItem getContainingItem()
          Get the item that contains the refinement configuration property.
 RepositoryItemDescriptor getItemDescriptor()
          Gets the descriptor of the item that contains the refinement configuration.
 java.lang.String getMappingValue()
          Returns the repository id of the containing item.
 java.lang.String getName()
           
 java.lang.String getPropertyName()
          Gets the name of the property whose value is the refinement configuration.
 RepositoryItem getRefinementConfigurationItem()
          Gets the refinement configuration by retrieving the repository item with the given item descriptor and id, and getting the value of the given property.
 java.lang.String getRepositoryId()
          Gets the repository id of the item that contains the refinement configuration.
 RepositoryItem getSourceItem()
           
 int getSpecificity()
           
 int hashCode()
          Gets the hashCode of this container.
 void setName(java.lang.String pName)
           
 void setSourceItem(RepositoryItem pSourceItem)
           
 void setSpecificity(int pSpecificity)
           
 java.lang.String toString()
          Return a string containing the values of this container.
 
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


mLogger

public static ApplicationLoggingImpl mLogger
Logger


mItemDescriptor

protected RepositoryItemDescriptor mItemDescriptor

mPropertyName

protected java.lang.String mPropertyName

mRepositoryId

protected java.lang.String mRepositoryId
Constructor Detail

PropertyRefinementConfigurationContainer

public PropertyRefinementConfigurationContainer(RepositoryItem pItem,
                                                java.lang.String pPropertyName,
                                                java.lang.String pRepositoryId,
                                                int pSpecificity)
Create a new refinement configuration container whose item is referenced from the property of the item of the given descriptor.

Method Detail

getItemDescriptor

public RepositoryItemDescriptor getItemDescriptor()
Gets the descriptor of the item that contains the refinement configuration.


getPropertyName

public java.lang.String getPropertyName()
Gets the name of the property whose value is the refinement configuration.


getRepositoryId

public java.lang.String getRepositoryId()
Gets the repository id of the item that contains the refinement configuration.


setName

public void setName(java.lang.String pName)
Specified by:
setName in interface RefinementConfigurationContainer

getName

public java.lang.String getName()
Specified by:
getName in interface RefinementConfigurationContainer

setSpecificity

public void setSpecificity(int pSpecificity)

getSpecificity

public int getSpecificity()

setSourceItem

public void setSourceItem(RepositoryItem pSourceItem)

getSourceItem

public RepositoryItem getSourceItem()

getRefinementConfigurationItem

public RepositoryItem getRefinementConfigurationItem()
                                              throws RepositoryException
Gets the refinement configuration by retrieving the repository item with the given item descriptor and id, and getting the value of the given property.

Specified by:
getRefinementConfigurationItem in interface RefinementConfigurationContainer
Throws:
RepositoryException

getMappingValue

public java.lang.String getMappingValue()
Returns the repository id of the containing item.

Specified by:
getMappingValue in interface RefinementConfigurationContainer

getContainingItem

protected RepositoryItem getContainingItem()
                                    throws RepositoryException
Get the item that contains the refinement configuration property.

Throws:
RepositoryException

equals

public boolean equals(java.lang.Object pOther)
Test to see of the other object has the same item descriptor, id, and property name

Overrides:
equals in class java.lang.Object

hashCode

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

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Return a string containing the values of this container.

Overrides:
toString in class java.lang.Object