com.endeca.portal.data.functions
Class ExposeRefinement

java.lang.Object
  extended by com.endeca.portal.data.functions.QueryFunction
      extended by com.endeca.portal.data.functions.QueryConfig
          extended by com.endeca.portal.data.functions.ExposeRefinement
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class ExposeRefinement
extends QueryConfig

Expose a refinement in a query.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.endeca.portal.data.functions.QueryConfig
id
 
Fields inherited from class com.endeca.portal.data.functions.QueryFunction
CLASS_PROPERTY, operator
 
Constructor Summary
protected ExposeRefinement()
           
  ExposeRefinement(com.endeca.mdex.conversation.RefinementExposeOperator operator)
           
  ExposeRefinement(java.lang.String dimValId)
           
  ExposeRefinement(java.lang.String dimValId, java.lang.String dimensionId)
           
 
Method Summary
 void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
          Apply this function to a Request.
 void applyToENEQuery(com.endeca.navigation.ENEQuery query)
          Apply this function to an ENEQuery.
 java.lang.String getDimensionId()
           
 java.lang.String getDimValId()
           
 boolean getExposeAll()
           
 java.util.List<java.lang.reflect.Method> getGetters()
          Return the list of property getters on this function.
 java.math.BigInteger getMaxRefinements()
          Returns the maximum number of refinements to return for dimensions and navigable properties.
 java.lang.String getOwnerId()
          Only relevant to discovery service data sources.
 java.util.List<java.lang.reflect.Method> getSetters()
          Return the list of property setters on this function.
 boolean isDimExposed()
           
 boolean isNavigableProp()
           
 void setDimensionId(java.lang.String dimensionId)
           
 void setDimExposed(boolean dimExposed)
           
 void setDimExposed(java.lang.String dimExposed)
           
 void setDimValId(java.lang.String dimValId)
           
 void setExposeAll(boolean exposeAll)
           
 void setExposeAll(java.lang.String exposeAll)
           
 void setMaxRefinements(java.math.BigInteger maxRefinements)
          Sets the maximum number of refinements to return for dimensions and navigable properties.
 void setMaxRefinements(int maxRefinements)
          Convenience method to set the maximum number of refinements to return for dimensions and navigable properties using an int.
 void setMaxRefinements(java.lang.String maxRefinements)
          String setter for the maximum number of refinements to return for dimensions and navigable properties for JSON init.
 void setOwnerId(java.lang.String ownerId)
          Set the ownerID of this function.
 java.lang.String toString()
          This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.
 
Methods inherited from class com.endeca.portal.data.functions.QueryConfig
getId, setId
 
Methods inherited from class com.endeca.portal.data.functions.QueryFunction
clone, equals, equals, getInstance, getInstance, getName, getOperator, hashCode, init, setName, setOperator, setOperator, toJSON, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExposeRefinement

protected ExposeRefinement()

ExposeRefinement

public ExposeRefinement(java.lang.String dimValId)

ExposeRefinement

public ExposeRefinement(java.lang.String dimValId,
                        java.lang.String dimensionId)

ExposeRefinement

public ExposeRefinement(com.endeca.mdex.conversation.RefinementExposeOperator operator)
Method Detail

getDimValId

public java.lang.String getDimValId()

setDimValId

public void setDimValId(java.lang.String dimValId)

getDimensionId

public java.lang.String getDimensionId()

setDimensionId

public void setDimensionId(java.lang.String dimensionId)

isDimExposed

public boolean isDimExposed()

setDimExposed

public void setDimExposed(boolean dimExposed)

setDimExposed

public void setDimExposed(java.lang.String dimExposed)

getExposeAll

public boolean getExposeAll()

setExposeAll

public void setExposeAll(boolean exposeAll)

setExposeAll

public void setExposeAll(java.lang.String exposeAll)

getOwnerId

public java.lang.String getOwnerId()
Only relevant to discovery service data sources.

Returns:
the owning NavConfig's id.

setOwnerId

public void setOwnerId(java.lang.String ownerId)
Set the ownerID of this function. This property should be equal to the id property of a NavConfig instance that is on the same QueryState. Not required: if never set, this function, when applied to a request, will assume this expose should be applied to the default NavConfig. Only relevant to discovery service data sources.

Parameters:
ownerId -

getMaxRefinements

public java.math.BigInteger getMaxRefinements()
Returns the maximum number of refinements to return for dimensions and navigable properties. Only relevant to discovery service data sources

Returns:

setMaxRefinements

public void setMaxRefinements(java.math.BigInteger maxRefinements)
Sets the maximum number of refinements to return for dimensions and navigable properties. Only relevant to discovery service data sources

Parameters:
maxRefinements -

setMaxRefinements

public void setMaxRefinements(int maxRefinements)
Convenience method to set the maximum number of refinements to return for dimensions and navigable properties using an int. Only relevant to discovery service data sources.

Parameters:
maxRefinements -

setMaxRefinements

public void setMaxRefinements(java.lang.String maxRefinements)
String setter for the maximum number of refinements to return for dimensions and navigable properties for JSON init. Only relevant to discovery service data sources.

Parameters:
maxRefinements -

getSetters

public java.util.List<java.lang.reflect.Method> getSetters()
Description copied from class: QueryFunction
Return the list of property setters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your setter methods follow standard Java naming conventions (e.g. "setPropertyName(PropertyType)"). All you should need to write is:
 private static List setters = Reflection.getSetters(MyFunctionClass.class);
 \@Override
 public List getSetters() {
        return setters;
 }
 

Specified by:
getSetters in class QueryFunction
Returns:
the list of setters

getGetters

public java.util.List<java.lang.reflect.Method> getGetters()
Description copied from class: QueryFunction
Return the list of property getters on this function. Must be implemented by subclass. Required for correct JSON serialization/deserialization support. For most subclasses, implementing this method should be simple, as long as your getter methods follow standard Java naming conventions (e.g. "getPropertyName()"). All you should need to write is:
 private static List getters = Reflection.getGetters(MyFunctionClass.class);
 \@Override
 public List getGetters() {
        return getters;
 }
 

Specified by:
getGetters in class QueryFunction
Returns:
the list of getters

applyToENEQuery

public void applyToENEQuery(com.endeca.navigation.ENEQuery query)
Description copied from class: QueryFunction
Apply this function to an ENEQuery. Must be implemented by subclass.

Specified by:
applyToENEQuery in class QueryFunction

applyToDiscoveryServiceQuery

public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
                                  throws QueryFunctionUnsupportedException
Description copied from class: QueryFunction
Apply this function to a Request. Must be implemented by subclass.

Specified by:
applyToDiscoveryServiceQuery in class QueryFunction
Throws:
QueryFunctionUnsupportedException

isNavigableProp

public boolean isNavigableProp()

toString

public java.lang.String toString()
Description copied from class: QueryFunction
This class' toString is abstract: all concrete subclasses are expected to provide an implementation. toString is used in comparing QueryFunction instances for equality, so if you implement a QueryFunction subclass it is important that your toString implementation be consistent and deterministic.

Specified by:
toString in class QueryFunction