public class MockHstComponentWindow extends Object implements HstComponentWindow
Constructor and Description |
---|
MockHstComponentWindow() |
Modifier and Type | Method and Description |
---|---|
void |
addComponentExcpetion(HstComponentException e)
Adds a component exceptions during initialization or runtime.
|
void |
bindResponseState(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse parentResponse)
Creates and binds the
HstResponseState to this HstComponentWindow . |
void |
clearComponentExceptions()
Adds a component exceptions during initialization or runtime.
|
Object |
getAttribute(String name) |
Enumeration<String> |
getAttributeNames() |
HstComponentWindow |
getChildWindow(String name)
The child component window which can be accessed by the name.
|
HstComponentWindow |
getChildWindowByReferenceName(String referenceName)
The child component window which can be accessed by the reference name.
|
Map<String,HstComponentWindow> |
getChildWindowMap()
The child component windows contained in this component window.
|
List<String> |
getChildWindowNames()
The child component window names contained in this component window.
|
HstComponent |
getComponent()
The actual HstComponent instance.
|
List<HstComponentException> |
getComponentExceptions()
The component exceptions during initialization or runtime.
|
HstComponentInfo |
getComponentInfo() |
HstComponentMetadata |
getComponentMetadata()
The metadata of the actual HstComponent class.
|
String |
getComponentName()
The HstComponent name.
|
String |
getLocalParameter(String name) |
String |
getName()
The name of the component window.
|
String |
getNamedRenderer() |
String |
getNamedResourceServer() |
String |
getPageErrorHandlerClassName() |
String |
getParameter(String name) |
HstComponentWindow |
getParentWindow()
The parent component window containing this component window.
|
String |
getReferenceName()
The reference name of the component window.
|
String |
getReferenceNamespace()
The reference namespace of the component window.
|
String |
getRenderPath()
The dispatching path path to render this component window.
|
HstResponseState |
getResponseState()
Returns the response state of this component window.
|
String |
getServeResourcePath()
The dispatching path path to serve resource in this component window.
|
boolean |
hasComponentExceptions()
Whether it has component exceptions or not
|
boolean |
isVisible()
When this method returns
true |
Object |
removeAttribute(String name) |
void |
removeChildWindow(HstComponentWindow window)
removes the
window from the child windows if exists and otherwise does nothing |
void |
setAttribute(String name,
Object value) |
void |
setComponent(HstComponent component) |
void |
setComponentInfo(HstComponentInfo componentInfo) |
void |
setComponentMetadata(HstComponentMetadata componentMetadata) |
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 |
setParentWindow(HstComponentWindow parentWindow) |
void |
setReferenceName(String referenceName) |
void |
setReferenceNamespace(String referenceNamespace) |
void |
setRenderPath(String renderPath) |
void |
setResponseState(HstResponseState responseState) |
void |
setServeResourcePath(String serveResourcePath) |
void |
setVisible(boolean visible) |
public void addComponentExcpetion(HstComponentException e)
HstComponentWindow
addComponentExcpetion
in interface HstComponentWindow
public void clearComponentExceptions()
HstComponentWindow
clearComponentExceptions
in interface HstComponentWindow
public HstComponentWindow getChildWindow(String name)
HstComponentWindow
getChildWindow
in interface HstComponentWindow
name
- the name of the child component windowpublic HstComponentWindow getChildWindowByReferenceName(String referenceName)
HstComponentWindow
getChildWindowByReferenceName
in interface HstComponentWindow
referenceName
- the referenceName of the child component windowpublic Map<String,HstComponentWindow> getChildWindowMap()
HstComponentWindow
getChildWindowMap
in interface HstComponentWindow
public List<String> getChildWindowNames()
HstComponentWindow
getChildWindowNames
in interface HstComponentWindow
public HstComponent getComponent()
HstComponentWindow
getComponent
in interface HstComponentWindow
public void setComponent(HstComponent component)
public HstComponentMetadata getComponentMetadata()
HstComponentWindow
getComponentMetadata
in interface HstComponentWindow
public void setComponentMetadata(HstComponentMetadata componentMetadata)
public String getComponentName()
HstComponentWindow
getComponentName
in interface HstComponentWindow
public List<HstComponentException> getComponentExceptions()
HstComponentWindow
getComponentExceptions
in interface HstComponentWindow
public String getName()
HstComponentWindow
getName
in interface HstComponentWindow
public void setName(String name)
public HstComponentWindow getParentWindow()
HstComponentWindow
getParentWindow
in interface HstComponentWindow
null
when there is no parent windowpublic void setParentWindow(HstComponentWindow parentWindow)
public String getReferenceName()
HstComponentWindow
getReferenceName
in interface HstComponentWindow
public void setReferenceName(String referenceName)
public String getReferenceNamespace()
HstComponentWindow
getReferenceNamespace
in interface HstComponentWindow
public void setReferenceNamespace(String referenceNamespace)
public String getRenderPath()
HstComponentWindow
getRenderPath
in interface HstComponentWindow
public void setRenderPath(String renderPath)
public String getNamedRenderer()
getNamedRenderer
in interface HstComponentWindow
null
when HstComponentWindow.getRenderPath()
does not return null
HstComponentWindow.getRenderPath()
public void setNamedRenderer(String namedRenderer)
public HstResponseState getResponseState()
HstComponentWindow
getResponseState
in interface HstComponentWindow
public void setResponseState(HstResponseState responseState)
public void bindResponseState(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse parentResponse)
HstComponentWindow
HstResponseState
to this HstComponentWindow
. After this method has been
invoked, HstComponentWindow.getResponseState()
will return the bound HstResponseState
.
If HstComponentWindow.bindResponseState(HttpServletRequest, HttpServletResponse)
gets invoked for a second (or more) time,
the method won't change any state and directly returnbindResponseState
in interface HstComponentWindow
request
- the HttpServletRequest requestparentResponse
- the HttpServletResponse response of the parent window or in case of the root window the http
response of the containerpublic String getServeResourcePath()
HstComponentWindow
getServeResourcePath
in interface HstComponentWindow
public void setServeResourcePath(String serveResourcePath)
public String getNamedResourceServer()
getNamedResourceServer
in interface HstComponentWindow
null
when HstComponentWindow.getServeResourcePath()
does not return null
HstComponentWindow.getServeResourcePath()
public void setNamedResourceServer(String namedResourceServer)
public String getPageErrorHandlerClassName()
getPageErrorHandlerClassName
in interface HstComponentWindow
PageErrorHandler
public void setPageErrorHandlerClassName(String pageErrorHandlerClassName)
public String getParameter(String name)
getParameter
in interface HstComponentWindow
name
- the name of the parametername
and null
if not existingHstComponentConfiguration.getParameter(String)
public String getLocalParameter(String name)
getLocalParameter
in interface HstComponentWindow
name
- the name of the parametername
and null
if not existingHstComponentConfiguration.getLocalParameter(String)
public boolean hasComponentExceptions()
HstComponentWindow
hasComponentExceptions
in interface HstComponentWindow
public HstComponentInfo getComponentInfo()
getComponentInfo
in interface HstComponentWindow
public void setComponentInfo(HstComponentInfo componentInfo)
public Object getAttribute(String name)
getAttribute
in interface HstComponentWindow
public void setAttribute(String name, Object value)
setAttribute
in interface HstComponentWindow
public Object removeAttribute(String name)
removeAttribute
in interface HstComponentWindow
public Enumeration<String> getAttributeNames()
getAttributeNames
in interface HstComponentWindow
public boolean isVisible()
HstComponentWindow
true, the HstComponentWindow
is still part of the hierarchy of HstComponentWindow
s, but
the doBeforeRender of the HstComponentWindow.getComponent()
and dispatched from the HstResponse
will be skipped.
isVisible
in interface HstComponentWindow
true
when this HstComponentWindow
should be visible, false
otherwisepublic void setVisible(boolean visible)
setVisible
in interface HstComponentWindow
visible
- sets whether this HstComponentWindow
is visible or not. Setting this HstComponentWindow
visibility to false, automatically sets all descendant HstComponentWindow
s visibility to false as wellpublic void removeChildWindow(HstComponentWindow window)
HstComponentWindow
window
from the child windows if exists and otherwise does nothingremoveChildWindow
in interface HstComponentWindow
window
- the window to removeCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.