|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hippoecm.hst.mock.configuration.components.MockHstComponentConfiguration
public class MockHstComponentConfiguration
Mock implementation of HstComponentConfiguration.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.hippoecm.hst.configuration.components.HstComponentConfiguration |
|---|
HstComponentConfiguration.Type |
| Field Summary |
|---|
| Fields inherited from interface org.hippoecm.hst.configuration.components.HstComponentConfiguration |
|---|
PARAMETER_PREFIX_NAME_DELIMITER |
| Constructor Summary | |
|---|---|
MockHstComponentConfiguration(String id)
|
|
| Method Summary | |
|---|---|
HstComponentConfiguration |
addChild(HstComponentConfiguration config)
|
void |
addChildren(MockHstComponentConfiguration... config)
|
String |
getCanonicalIdentifier()
Returns the identifier of the backing stored component configuration. |
String |
getCanonicalStoredLocation()
Returns the canonical (real physical) location of the stored configuration of this HstComponentConfiguration |
HstComponentConfiguration |
getChildByName(String name)
Returns the child HstComponentConfiguration by its name, or null if it doens't exist |
SortedMap<String,HstComponentConfiguration> |
getChildren()
Implementations should return an unmodifiable linked map, for example Collections.UnmodifiableMap to avoid
client code changing configuration |
String |
getComponentClassName()
|
String |
getComponentFilterTag()
The filter tag (see HstRequestContext.getComponentFilterTags()) for this component. |
HstComponentConfiguration.Type |
getComponentType()
|
String |
getIconPath()
|
String |
getId()
Returns the id for this component configuration. |
String |
getLabel()
|
String |
getLocalParameter(String name)
Returns the parameter value without inheritance for the parameter name and null if not present. |
Map<String,String> |
getLocalParameters()
see HstComponentConfiguration.getParameter(String), but now only parameters directly present on the HstConfigurationItem are returned. |
String |
getName()
Return the name of this component configuration. |
String |
getNamedRenderer()
|
String |
getNamedResourceServer()
|
String |
getPageErrorHandlerClassName()
|
String |
getParameter(String name)
Returns the parameter value for the parameter name and null if not present. |
Map<String,String> |
getParameters()
Returns the map of all parameters. |
HstComponentConfiguration |
getParent()
Returns the parent HstComponentConfiguration for this this component or null if a root component. |
String |
getReferenceName()
Return the referenceName of this HstComponentConfiguration. |
String |
getRenderPath()
|
String |
getServeResourcePath()
|
String |
getXType()
|
boolean |
isInherited()
|
boolean |
isStandalone()
|
void |
setCanonicalIdentifier(String canonicalIdentifier)
|
void |
setCanonicalStoredLocation(String canonicalStoredLocation)
|
void |
setComponentClassName(String componentClassName)
|
void |
setComponentType(HstComponentConfiguration.Type componentType)
|
void |
setIconPath(String iconPath)
|
void |
setInherited(boolean inherited)
|
void |
setLabel(String label)
|
void |
setLocalParameter(String name,
String value)
|
void |
setName(String name)
|
void |
setNamedRenderer(String namedRenderer)
|
void |
setNamedResourceServer(String namedResourceServer)
|
void |
setPageErrorHandlerClassName(String pageErrorHandlerClassName)
|
void |
setParameter(String name,
String value)
|
void |
setParent(HstComponentConfiguration parent)
|
void |
setReferenceName(String referenceName)
|
void |
setRenderPath(String renderPath)
|
void |
setServeResourcePath(String serveResourcePath)
|
void |
setStandalone(boolean standalone)
|
void |
setXType(String xType)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockHstComponentConfiguration(String id)
| Method Detail |
|---|
public HstComponentConfiguration getChildByName(String name)
HstComponentConfiguration
getChildByName in interface HstComponentConfigurationname - the name of the child HstComponentConfigurationpublic SortedMap<String,HstComponentConfiguration> getChildren()
HstComponentConfigurationCollections.UnmodifiableMap to avoid
client code changing configuration
getChildren in interface HstComponentConfigurationHstComponentConfiguration children in order they were added, and an empty Map if no children presentpublic HstComponentConfiguration addChild(HstComponentConfiguration config)
public void addChildren(MockHstComponentConfiguration... config)
public String getCanonicalStoredLocation()
HstComponentConfiguration
getCanonicalStoredLocation in interface HstComponentConfigurationpublic void setCanonicalStoredLocation(String canonicalStoredLocation)
public String getLocalParameter(String name)
HstComponentConfigurationname and null if not present.
It returns the parameters configured directly on this HstComponentConfiguration, without the merged parameters from parent
components (which have precedence, see HstComponentConfiguration.getParameter(String))
getLocalParameter in interface HstComponentConfigurationname - the name of the parameter
name and null if not existing
public void setLocalParameter(String name,
String value)
public Map<String,String> getLocalParameters()
HstComponentConfigurationHstComponentConfiguration.getParameter(String), but now only parameters directly present on the HstConfigurationItem are returned. Thus,
no inheritance by parents involved
getLocalParameters in interface HstComponentConfigurationpublic String getParameter(String name)
HstComponentConfigurationname and null if not present. Note that
from the HstComponentConfiguration always 'raw' parameters are returned. 'Raw' as in unresolved with respect
to property placeholders. So, a value might be ${year} or ${1}. In a HstComponent
instance, the implementation might have implemented some resolving for these values.
Parameters are inherited from ancestor configurations. Parameters that are configured in an ancestor override parameters
configured in this component. Ancestors have precedence. Note that this is opposite to HstSiteMapItem.getParameter(String)
getParameter in interface HstComponentConfigurationname - the name of the parameter
name and null if not existing
public void setParameter(String name,
String value)
public Map<String,String> getParameters()
HstComponentConfigurationHstComponentConfiguration.getParameter(String).
Implementations should return an unmodifiable map, for example Collections.UnmodifiableMap to avoid
client code changing configuration
Parameters are inherited from ancestor configurations. Parameters that are configured in an ancestor override parameters
configured in this component. Ancestors have precedence. Note that this is opposite to HstSiteMapItem.getParameters()
getParameters in interface HstComponentConfigurationpublic HstComponentConfiguration getParent()
HstComponentConfigurationHstComponentConfiguration for this this component or null if a root component.
getParent in interface HstComponentConfigurationpublic void setParent(HstComponentConfiguration parent)
public String getReferenceName()
HstComponentConfigurationHstComponentConfiguration. It must be unique amongst sibling HstComponentConfiguration's.
The value returned by this method, is the value that will occur as part of the referencePath in request parameter names
getReferenceName in interface HstComponentConfigurationpublic void setReferenceName(String referenceName)
public String getRenderPath()
getRenderPath in interface HstComponentConfigurationnull when HstComponentConfiguration.getNamedRenderer() does not return nullHstComponentConfiguration.getNamedRenderer()public void setRenderPath(String renderPath)
public String getServeResourcePath()
getServeResourcePath in interface HstComponentConfigurationHstComponentpublic void setServeResourcePath(String serveResourcePath)
public String getComponentClassName()
getComponentClassName in interface HstComponentInfoHstComponent interfacepublic void setComponentClassName(String componentClassName)
public String getId()
HstComponentInfoHstComponentsConfiguration,
or null if it is not needed to be directly accessed by the
HstComponentsConfiguration through HstComponentsConfiguration.getComponentConfiguration(String).
Every HstComponentConfiguration that can be referred to from within a
HstSiteMapItem must have an id.
getId in interface HstComponentInfonull if no id setpublic String getName()
HstComponentInfoHstComponent instance.
getName in interface HstComponentInfopublic void setName(String name)
public String getCanonicalIdentifier()
HstComponentConfigurationHstComponentConfiguration's can share the same
canonical identifier due to inheritance. Also, multiple subsites can share the same backing configuration, and thus share the same canonical identifiers
getCanonicalIdentifier in interface HstComponentConfigurationpublic void setCanonicalIdentifier(String canonicalIdentifier)
public HstComponentConfiguration.Type getComponentType()
getComponentType in interface HstComponentConfigurationHstComponentConfiguration.Type of this componentpublic String getComponentFilterTag()
HstComponentConfigurationHstRequestContext.getComponentFilterTags()) for this component.
getComponentFilterTag in interface HstComponentConfigurationpublic void setComponentType(HstComponentConfiguration.Type componentType)
public String getNamedRenderer()
getNamedRenderer in interface HstComponentConfigurationnull when HstComponentConfiguration.getRenderPath() does not return nullHstComponentConfiguration.getRenderPath()public void setNamedRenderer(String namedRenderer)
public String getNamedResourceServer()
getNamedResourceServer in interface HstComponentConfigurationnull when HstComponentConfiguration.getServeResourcePath() does not return nullHstComponentConfiguration.getServeResourcePath()public void setNamedResourceServer(String namedResourceServer)
public String getPageErrorHandlerClassName()
getPageErrorHandlerClassName in interface HstComponentConfigurationPageErrorHandler or null when not configuredpublic void setPageErrorHandlerClassName(String pageErrorHandlerClassName)
public String getXType()
getXType in interface HstComponentConfigurationnull if the component does not have an xtypepublic void setXType(String xType)
public boolean isInherited()
isInherited in interface HstComponentConfigurationtrue when the backing provider (HstNode) of this HstComponentConfiguration is inheritedpublic void setInherited(boolean inherited)
public boolean isStandalone()
isStandalone in interface HstComponentInfotrue when this HstComponentConfiguration is configured to be rendered standalone in case of HstURL.COMPONENT_RENDERING_TYPEpublic void setStandalone(boolean standalone)
public String getLabel()
getLabel in interface HstComponentConfigurationnull otherwisepublic void setLabel(String label)
public String getIconPath()
getIconPath in interface HstComponentConfigurationnull otherwise. The iconPath should be a path relative
to the site webapppublic void setIconPath(String iconPath)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||