|
||||||||||
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 HstComponentConfiguration
name
- the name of the child HstComponentConfigurationpublic SortedMap<String,HstComponentConfiguration> getChildren()
HstComponentConfiguration
Collections.UnmodifiableMap
to avoid
client code changing configuration
getChildren
in interface HstComponentConfiguration
HstComponentConfiguration
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 HstComponentConfiguration
public void setCanonicalStoredLocation(String canonicalStoredLocation)
public String getLocalParameter(String name)
HstComponentConfiguration
name
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 HstComponentConfiguration
name
- the name of the parameter
name
and null
if not existingpublic void setLocalParameter(String name, String value)
public Map<String,String> getLocalParameters()
HstComponentConfiguration
HstComponentConfiguration.getParameter(String)
, but now only parameters directly present on the HstConfigurationItem are returned. Thus,
no inheritance by parents involved
getLocalParameters
in interface HstComponentConfiguration
public String getParameter(String name)
HstComponentConfiguration
name
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 HstComponentConfiguration
name
- the name of the parameter
name
and null
if not existingpublic void setParameter(String name, String value)
public Map<String,String> getParameters()
HstComponentConfiguration
HstComponentConfiguration.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 HstComponentConfiguration
public HstComponentConfiguration getParent()
HstComponentConfiguration
HstComponentConfiguration
for this this component or null if a root component.
getParent
in interface HstComponentConfiguration
public void setParent(HstComponentConfiguration parent)
public String getReferenceName()
HstComponentConfiguration
HstComponentConfiguration
. 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 HstComponentConfiguration
public void setReferenceName(String referenceName)
public String getRenderPath()
getRenderPath
in interface HstComponentConfiguration
null
when HstComponentConfiguration.getNamedRenderer()
does not return null
HstComponentConfiguration.getNamedRenderer()
public void setRenderPath(String renderPath)
public String getServeResourcePath()
getServeResourcePath
in interface HstComponentConfiguration
HstComponent
public void setServeResourcePath(String serveResourcePath)
public String getComponentClassName()
getComponentClassName
in interface HstComponentInfo
HstComponent
interfacepublic void setComponentClassName(String componentClassName)
public String getId()
HstComponentInfo
HstComponentsConfiguration
,
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 HstComponentInfo
null
if no id setpublic String getName()
HstComponentInfo
HstComponent
instance.
getName
in interface HstComponentInfo
public void setName(String name)
public String getCanonicalIdentifier()
HstComponentConfiguration
HstComponentConfiguration
'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 HstComponentConfiguration
public void setCanonicalIdentifier(String canonicalIdentifier)
public HstComponentConfiguration.Type getComponentType()
getComponentType
in interface HstComponentConfiguration
HstComponentConfiguration.Type
of this componentpublic String getComponentFilterTag()
HstComponentConfiguration
HstRequestContext.getComponentFilterTags()
) for this component.
getComponentFilterTag
in interface HstComponentConfiguration
public void setComponentType(HstComponentConfiguration.Type componentType)
public String getNamedRenderer()
getNamedRenderer
in interface HstComponentConfiguration
null
when HstComponentConfiguration.getRenderPath()
does not return null
HstComponentConfiguration.getRenderPath()
public void setNamedRenderer(String namedRenderer)
public String getNamedResourceServer()
getNamedResourceServer
in interface HstComponentConfiguration
null
when HstComponentConfiguration.getServeResourcePath()
does not return null
HstComponentConfiguration.getServeResourcePath()
public void setNamedResourceServer(String namedResourceServer)
public String getPageErrorHandlerClassName()
getPageErrorHandlerClassName
in interface HstComponentConfiguration
PageErrorHandler
or null
when not configuredpublic void setPageErrorHandlerClassName(String pageErrorHandlerClassName)
public String getXType()
getXType
in interface HstComponentConfiguration
null
if the component does not have an xtypepublic void setXType(String xType)
public boolean isInherited()
isInherited
in interface HstComponentConfiguration
true
when the backing provider (HstNode
) of this HstComponentConfiguration
is inheritedpublic void setInherited(boolean inherited)
public boolean isStandalone()
isStandalone
in interface HstComponentInfo
true
when this HstComponentConfiguration
is configured to be rendered standalone in case of HstURL.COMPONENT_RENDERING_TYPE
public void setStandalone(boolean standalone)
public String getLabel()
getLabel
in interface HstComponentConfiguration
null
otherwisepublic void setLabel(String label)
public String getIconPath()
getIconPath
in interface HstComponentConfiguration
null
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 |