org.hippoecm.hst.site.request
Class SiteMapItemHandlerConfigurationImpl

java.lang.Object
  extended by org.hippoecm.hst.site.request.SiteMapItemHandlerConfigurationImpl
All Implemented Interfaces:
SiteMapItemHandlerConfiguration

public class SiteMapItemHandlerConfigurationImpl
extends Object
implements SiteMapItemHandlerConfiguration

The SiteMapItemHandlerConfigurationImpl which is the runtime instance of the SiteMapItemHandlerConfiguration. Note that this object is not thread-safe, and created only once for a HstSiteMapItemHandler and attached to it during init


Field Summary
 HstSiteMapItemHandlerConfiguration handlerConfig
           
 
Constructor Summary
SiteMapItemHandlerConfigurationImpl(HstSiteMapItemHandlerConfiguration handlerConfig)
           
 
Method Summary
<T> Map<String,T>
getProperties(ResolvedSiteMapItem resolvedSiteMapItem, Class<T> mappingClass)
          a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.
<T> T
getProperty(String name, ResolvedSiteMapItem resolvedSiteMapItem, Class<T> mappingClass)
          a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.
<T> Map<String,T>
getRawProperties(Class<T> mappingClass)
          a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.
<T> T
getRawProperty(String name, Class<T> mappingClass)
          a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlerConfig

public HstSiteMapItemHandlerConfiguration handlerConfig
Constructor Detail

SiteMapItemHandlerConfigurationImpl

public SiteMapItemHandlerConfigurationImpl(HstSiteMapItemHandlerConfiguration handlerConfig)
Method Detail

getProperties

public <T> Map<String,T> getProperties(ResolvedSiteMapItem resolvedSiteMapItem,
                                       Class<T> mappingClass)

a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.

Returns all resolved properties of type mappingClass into a map. If the property is of type String and contains a property placeholder, this property placeholder is replaced with it's value. If it cannot be resolved, the property won't be in the map. If the property is of type String[], all properties having a property placeholder are resolved. If a property placeholder cannot be resolved, that item in the array will be null

Specified by:
getProperties in interface SiteMapItemHandlerConfiguration
mappingClass - the class the property values should be of
Returns:
Returns the map of all resolved properties of type T into a map and an empty map if there are no properties of type T or there are only properties with unresolvable placeholders

getProperty

public <T> T getProperty(String name,
                         ResolvedSiteMapItem resolvedSiteMapItem,
                         Class<T> mappingClass)

a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.

Specified by:
getProperty in interface SiteMapItemHandlerConfiguration
mappingClass - the class the property value should be of
Returns:
the property if it is of type mappingClass. If the value is a String or String[] and contains a property placeholder it is resolved with the help of the ResolvedSiteMapItem. If there is a property placeholder that cannot be resolved, null will be returned in case for a String and in case of a String[] the value of the item in the array will be null

getRawProperties

public <T> Map<String,T> getRawProperties(Class<T> mappingClass)

a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.

Returns the map of all unresolved properties of type T into a map and an empty map if there are no properties of type mappingClass

Specified by:
getRawProperties in interface SiteMapItemHandlerConfiguration
Parameters:
mappingClass - the class the property values should be of
Returns:
Returns the map of all unresolved properties of type T into a map and an empty map if there are no properties of type mappingClass

getRawProperty

public <T> T getRawProperty(String name,
                            Class<T> mappingClass)

a property is of type String, Boolean, Long, Double or Calendar or an array of one of these objects.

Returns the unresolved property for name or null when not present or is not of type mappingClass

Specified by:
getRawProperty in interface SiteMapItemHandlerConfiguration
mappingClass - the class the property value should be of
Returns:
Returns the unresolved property for name or null when not present or not of type mappingClass


Copyright © 2008-2012 Hippo. All Rights Reserved.