atg.commerce.search.refinement
Class CatalogRefineElementMap

java.lang.Object
  extended by java.beans.FeatureDescriptor
      extended by atg.beans.SerializableFeatureDescriptor
          extended by atg.repository.dp.DerivationMethodImpl
              extended by atg.commerce.search.refinement.CatalogRefineElementMap
All Implemented Interfaces:
atg.repository.dp.Constants, atg.repository.dp.DerivationMethod, java.io.Serializable

public class CatalogRefineElementMap
extends atg.repository.dp.DerivationMethodImpl

Derivation method that returns a Map of catalog ids to lists of refinement elements. The list of refinement elements represents the elements the category will appear to have, when viewed within the context of the catalog.

   <property name="catalogRefineElementMap"  data-type="map"  queryable="false" 
             writable="false" component-data-type="list">
     <derivation user-method="atg.commerce.search.refinement.CatalogRefineElementMap">
       <expression>catalogs</expression>
     </derivation>

     <attribute name="catalogRefineElementsProperty"  value="derivedRefineElements"/>
     <attribute name="categoryRefineElementsProperty" value="derivedRefineElements"/>
   </property>
 

See Also:
Serialized Form

Field Summary
protected static java.lang.String CAN_INHERIT_FROM_CATALOG_PROPERTY_ATTRIBUTE_NAME
           
protected static java.lang.String CATALOG_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME
           
protected static java.lang.String CATEGORY_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME
           
static java.lang.String CLASS_VERSION
          Class version string
protected static java.lang.String DEBUG_ATTRIBUTE_NAME
           
protected static java.lang.String DERIVATION_NAME
           
protected static java.lang.String DISPLAY_NAME
           
protected static java.lang.String SHORT_DESCRIPTION
           
protected static java.lang.String sResourceName
           
 
Fields inherited from class atg.repository.dp.DerivationMethodImpl
COMPARISON_QUERY, INCLUDES_ALL_QUERY, INCLUDES_ANY_QUERY, INCLUDES_ITEM_QUERY, INCLUDES_QUERY, IS_NULL_QUERY, PATTERN_MATCH_QUERY, sZero, TEXT_SEARCH_QUERY
 
Fields inherited from class atg.beans.SerializableFeatureDescriptor
BUNDLE_ATTRIBUTE_NAME, LOCALE_ATTRIBUTE_NAME
 
Fields inherited from interface atg.repository.dp.Constants
ATTR_METHOD, ATTR_OVERRIDE_PROPERTY, ATTR_USER_METHOD, DEFAULT_METHOD_NAME, DEFAULT_RECURSION_DEPTH, DP_COUNT_ATTR_NAME, ERR_COLLECTION_EXPRESSION_TYPE, ERR_COLLECTION_ITEM_TYPE, ERR_DP_EXP_NOT_ARRAY, ERR_DP_EXP_NOT_COLLECTION, ERR_DP_EXP_NOT_SET_LIST, ERR_DP_EXP_REFERENCES_DP, ERR_DP_QUERYABLE_OP_NOT, ERR_DP_READABLE_OP_NOT, ERR_DP_WRITABLE_OP_NOT, ERR_DP_WRITABLE_WITH_NULL_OP, ERR_EMPTY_EXPRESSION, ERR_EXACTLY_ONE_EXPRESSION, ERR_INCOMPATIBLE_DP_EXP, ERR_INCOMPATIBLE_OP, ERR_INVALID_OVERRIDE_PROPERTY_NAME, ERR_INVALID_PROPERTY, ERR_METHOD_AND_USER_METHOD, ERR_NO_DP, ERR_NO_EXP, ERR_NO_EXPRESSION, ERR_NO_METHOD, ERR_NO_PROPERTY_FOR_LOCALE, ERR_NO_PROPERTY_TYPE, ERR_NO_SET_LIST, ERR_NULL_ITEM_DESCRIPTOR, ERR_OP_SAME_AS_DP, ERR_PROP_COLLECTION_TYPE, ERR_SET_NOT_WRITABLE, PROPERTY_SEPARATOR, RECURSION_DEPTH_ATTR_NAME, RESOURCE_BUNDLE_NAME, TAG_DERIVATION, TAG_EXPRESSION
 
Constructor Summary
CatalogRefineElementMap()
          Set the derivation method's name and description.
 
Method Summary
protected  Query createQuery(int pQueryType, boolean pDerivedPropertyOnLeft, boolean pCountDerivedProperty, QueryExpression pOther, int pOperator, boolean pIgnoreCase, QueryExpression pMinScore, QueryExpression pSearchStringFormat, Query pItemQuery, QueryBuilder pBuilder, atg.repository.query.PropertyQueryExpression pParentProperty, java.util.List pChildPropertyList)
          Create a query for this derivation.
 java.lang.Object derivePropertyValue(java.lang.Object pBean)
          Derive the value of the property for the given object, using the algorithm described in the class documentation above.
 java.lang.Object derivePropertyValue(RepositoryItemImpl pItem)
           
protected  boolean getCanInheritFromCatalog(java.lang.Object pBean)
           
protected  java.lang.String getCatalogRefineElementsPropertyAttribute()
          Returns the name of the catalog property that contains refinement elements.
protected  java.lang.String getCategoryRefineElementsPropertyAttribute()
          Returns the name of the category property that contains refinement elements.
protected  boolean isLoggingDebug()
          Returns the value of the debug attribute.
 boolean isQueryable()
          Properties that use this derivation method are not queryable.
protected  void logDebug(java.lang.String pDebug)
          Log a debug message to System.out
 
Methods inherited from class atg.repository.dp.DerivationMethodImpl
createComparisonQuery, createExpression, createIncludesAllQuery, createIncludesAnyQuery, createIncludesItemQuery, createIncludesQuery, createIsNullQuery, createPatternMatchQuery, createQuery, createReferencedByQuery, createTextSearchQuery, getAllowNoExpressions, getDerivation, getFeatureDescriptor, getPropertyDescriptor, getPropertyOrigin, getPropertyOrigin, getPropertyOrigin, getPropertyOrigin, isEmpty, isWritable, rebuildExpression, setDerivation, setFrom, setPropertyDescriptor, setPropertyValue, setPropertyValue, validate, wrap
 
Methods inherited from class atg.beans.SerializableFeatureDescriptor
copyFeatureDescriptor, getDisplayName, getDisplayNameResource, getDisplaySortString, getResourceBundle, getShortDescription, getShortDescriptionResource, getSortString, setDisplayNameResource, setShortDescriptionResource, toString
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getName, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


sResourceName

protected static final java.lang.String sResourceName
See Also:
Constant Field Values

DERIVATION_NAME

protected static final java.lang.String DERIVATION_NAME
See Also:
Constant Field Values

DISPLAY_NAME

protected static final java.lang.String DISPLAY_NAME

SHORT_DESCRIPTION

protected static final java.lang.String SHORT_DESCRIPTION

CATALOG_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME

protected static final java.lang.String CATALOG_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME
See Also:
Constant Field Values

CATEGORY_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME

protected static final java.lang.String CATEGORY_REFINE_ELEMENTS_PROPERTY_ATTRIBUTE_NAME
See Also:
Constant Field Values

CAN_INHERIT_FROM_CATALOG_PROPERTY_ATTRIBUTE_NAME

protected static final java.lang.String CAN_INHERIT_FROM_CATALOG_PROPERTY_ATTRIBUTE_NAME
See Also:
Constant Field Values

DEBUG_ATTRIBUTE_NAME

protected static final java.lang.String DEBUG_ATTRIBUTE_NAME
See Also:
Constant Field Values
Constructor Detail

CatalogRefineElementMap

public CatalogRefineElementMap()
Set the derivation method's name and description.

Method Detail

getCatalogRefineElementsPropertyAttribute

protected java.lang.String getCatalogRefineElementsPropertyAttribute()
Returns the name of the catalog property that contains refinement elements.


getCategoryRefineElementsPropertyAttribute

protected java.lang.String getCategoryRefineElementsPropertyAttribute()
Returns the name of the category property that contains refinement elements.


isLoggingDebug

protected boolean isLoggingDebug()
Returns the value of the debug attribute.


getCanInheritFromCatalog

protected boolean getCanInheritFromCatalog(java.lang.Object pBean)
                                    throws PropertyNotFoundException,
                                           RepositoryException
Throws:
PropertyNotFoundException
RepositoryException

createQuery

protected Query createQuery(int pQueryType,
                            boolean pDerivedPropertyOnLeft,
                            boolean pCountDerivedProperty,
                            QueryExpression pOther,
                            int pOperator,
                            boolean pIgnoreCase,
                            QueryExpression pMinScore,
                            QueryExpression pSearchStringFormat,
                            Query pItemQuery,
                            QueryBuilder pBuilder,
                            atg.repository.query.PropertyQueryExpression pParentProperty,
                            java.util.List pChildPropertyList)
                     throws RepositoryException
Create a query for this derivation. Since this derivation is not queryable, this returns null.

Specified by:
createQuery in class atg.repository.dp.DerivationMethodImpl
Throws:
RepositoryException

isQueryable

public boolean isQueryable()
Properties that use this derivation method are not queryable.


derivePropertyValue

public java.lang.Object derivePropertyValue(RepositoryItemImpl pItem)
                                     throws RepositoryException
Throws:
RepositoryException
See Also:
derivePropertyValue(Object)

derivePropertyValue

public java.lang.Object derivePropertyValue(java.lang.Object pBean)
                                     throws RepositoryException
Derive the value of the property for the given object, using the algorithm described in the class documentation above.

Throws:
RepositoryException

logDebug

protected void logDebug(java.lang.String pDebug)
Log a debug message to System.out