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
 
Constructor Summary
protected ExposeRefinement()
           
  ExposeRefinement(java.lang.String dimensionId)
           
  ExposeRefinement(java.lang.String dimValId, java.lang.String dimensionId)
           
  ExposeRefinement(java.lang.String dimValId, java.lang.String dimensionId, java.lang.String groupKey)
           
 
Method Summary
 void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
          In this method we always use RefinementConfig elements to manage the exposure and closure of properties and dimensions.
 java.lang.String getDimensionId()
           
 java.lang.String getDimValId()
           
 boolean getExposeAll()
           
 java.lang.String getGroupKey()
          This property is required when using ExposeRefinement with Discovery Service-enabled datasources.
 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.
 boolean isDimExposed()
           
 boolean isGroupExposed()
           
 boolean isNavigableProp()
           
 void parseMaxRefinements(java.lang.String maxRefinements)
          String parser for the maximum number of refinements to return for dimensions and navigable properties for JSON init.
 void setDimensionId(java.lang.String dimensionId)
           
 void setDimExposed(boolean dimExposed)
           
 void setDimValId(java.lang.String dimValId)
           
 void setExposeAll(boolean exposeAll)
           
 void setGroupExposed(boolean groupExposed)
           
 void setGroupKey(java.lang.String groupKey)
          This property is required when using ExposeRefinement with Discovery Service-enabled datasources.
 void setMaxRefinements(java.math.BigInteger maxRefinements)
          Sets the maximum number of refinements to return for dimensions and navigable properties.
 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
beforeQueryStateAdd, clone, equals, equals, getName, hashCode, initializeFromJSON, setName
 
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 dimensionId)

ExposeRefinement

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

ExposeRefinement

public ExposeRefinement(java.lang.String dimValId,
                        java.lang.String dimensionId,
                        java.lang.String groupKey)
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)

getGroupKey

public java.lang.String getGroupKey()
This property is required when using ExposeRefinement with Discovery Service-enabled datasources.

Returns:
the group key

setGroupKey

public void setGroupKey(java.lang.String groupKey)
This property is required when using ExposeRefinement with Discovery Service-enabled datasources.

Parameters:
groupKey -

isGroupExposed

public boolean isGroupExposed()
Returns:
isGroupExposed

setGroupExposed

public void setGroupExposed(boolean groupExposed)
Parameters:
groupExposed -

isDimExposed

public boolean isDimExposed()

setDimExposed

public void setDimExposed(boolean dimExposed)

getExposeAll

public boolean getExposeAll()

setExposeAll

public void setExposeAll(boolean 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:
the maximum number of refinements

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 -

parseMaxRefinements

public void parseMaxRefinements(java.lang.String maxRefinements)
String parser 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 -

applyToDiscoveryServiceQuery

public void applyToDiscoveryServiceQuery(com.endeca.mdex.conversation.Request query)
                                  throws QueryFunctionUnsupportedException
In this method we always use RefinementConfig elements to manage the exposure and closure of properties and dimensions. The RefinementExposeOperator isn't used because a RefinementConfig element is required even when that operator is present (which makes the operator fairly useless).

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