org.hippoecm.hst.utils
Class ParameterUtils

java.lang.Object
  extended by org.hippoecm.hst.utils.ParameterUtils

public class ParameterUtils
extends Object


Field Summary
static String PARAMETERS_INFO_ATTRIBUTE
           
 
Constructor Summary
ParameterUtils()
           
 
Method Summary
static
<T> T
getParametersInfo(HstComponent component, ComponentConfiguration componentConfig, HstRequest request)
          Returns a proxy ParametersInfo object for the component class which resolves parameter from HstComponentConfiguration : resolved means that possible property placeholders like ${1} or ${year}, where the first refers to the first wildcard matcher in a resolved sitemap item, and the latter to a resolved parameter in the resolved HstSiteMapItem

NOTE: Because the returned ParametersInfo proxy instance is bound to the current request, you MUST NOT store the returned object in a member variable or session.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETERS_INFO_ATTRIBUTE

public static final String PARAMETERS_INFO_ATTRIBUTE
Constructor Detail

ParameterUtils

public ParameterUtils()
Method Detail

getParametersInfo

public static <T> T getParametersInfo(HstComponent component,
                                      ComponentConfiguration componentConfig,
                                      HstRequest request)
Returns a proxy ParametersInfo object for the component class which resolves parameter from HstComponentConfiguration : resolved means that possible property placeholders like ${1} or ${year}, where the first refers to the first wildcard matcher in a resolved sitemap item, and the latter to a resolved parameter in the resolved HstSiteMapItem

NOTE: Because the returned ParametersInfo proxy instance is bound to the current request, you MUST NOT store the returned object in a member variable or session. You should retrieve that per request.

The parameter map used has inherited parameters from ancestor components, which have precedence over child components)

Parameters:
component - the HST component with a ParameterInfo annotation
componentConfig - the HST component configuration
request - the HST request
Returns:
the resolved parameter value for this name, or null if not present


Copyright © 2008-2012 Hippo. All Rights Reserved.