Package org.hippoecm.hst.core.container
Interface HstComponentWindow
public interface HstComponentWindow
HST Component Window.
This interface represents a fragment window of a page which is generated by a HstComponent.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a component exceptions during initialization or runtime.void
bindResponseState
(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse parentResponse) Creates and binds theHstResponseState
to thisHstComponentWindow
.void
Adds a component exceptions during initialization or runtime.getAttribute
(String name) getChildWindow
(String name) The child component window which can be accessed by the name.getChildWindowByReferenceName
(String referenceName) The child component window which can be accessed by the reference name.The child component windows contained in this component window.The child component window names contained in this component window.The actual HstComponent instance.The component exceptions during initialization or runtime.The metadata of the actual HstComponent class.The HstComponent name.getLocalParameter
(String paramName) getName()
The name of the component window.getParameter
(String name) The parent component window containing this component window.The reference name of the component window.The reference namespace of the component window.The dispatching path path to render this component window.Returns the response state of this component window.The dispatching path path to serve resource in this component window.boolean
Whether it has component exceptions or notboolean
When this method returnstrue
, the
HstComponentWindow
is still part of the hierarchy ofHstComponentWindow
s, but the doBeforeRender of thegetComponent()
and dispatched from theHstResponse
will be skipped.removeAttribute
(String name) void
removeChildWindow
(HstComponentWindow window) removes thewindow
from the child windows if exists and otherwise does nothingvoid
setAttribute
(String name, Object value) void
setVisible
(boolean visible)
-
Method Details
-
getName
String getName()The name of the component window.- Returns:
- the name of the component window
-
getReferenceName
String getReferenceName()The reference name of the component window.- Returns:
- the reference name of the component window
-
getReferenceNamespace
String getReferenceNamespace()The reference namespace of the component window.- Returns:
- the reference namespace of the component window
-
getComponentName
String getComponentName()The HstComponent name. Normally the component name is fully qualified class name.- Returns:
- the HstComponent name
-
getParametersInfoClassName
String getParametersInfoClassName()- Returns:
- if configured, the fully-qualified class name of the interface representing
ParametersInfo
for a component, and otherwisenull
.
-
getComponent
HstComponent getComponent()The actual HstComponent instance.- Returns:
- the actual HstComponent instance
-
getComponentMetadata
HstComponentMetadata getComponentMetadata()The metadata of the actual HstComponent class.- Returns:
- the metadata of the actual HstComponent class.
-
hasComponentExceptions
boolean hasComponentExceptions()Whether it has component exceptions or not -
getComponentExceptions
List<HstComponentException> getComponentExceptions()The component exceptions during initialization or runtime.- Returns:
- the possible component exception list
-
addComponentExcpetion
Adds a component exceptions during initialization or runtime. -
clearComponentExceptions
void clearComponentExceptions()Adds a component exceptions during initialization or runtime. -
getRenderPath
String getRenderPath()The dispatching path path to render this component window.- Returns:
- the dispatching path to render this component window
-
getNamedRenderer
String getNamedRenderer()- Returns:
- the name of the renderer, when using named servlet. Returns
null
whengetRenderPath()
does not returnnull
- See Also:
-
getServeResourcePath
String getServeResourcePath()The dispatching path path to serve resource in this component window.- Returns:
- the dispatching path to serve resource in this component window
-
getNamedResourceServer
String getNamedResourceServer()- Returns:
- the name of the resource server, when using named servlet. Returns
null
whengetServeResourcePath()
does not returnnull
- See Also:
-
getParameter
- Parameters:
name
- the name of the parameter- Returns:
- the configured parameter value for this
name
andnull
if not existing - See Also:
-
getLocalParameter
- Parameters:
paramName
- the name of the parameter- Returns:
- the configured parameter value for this
name
andnull
if not existing - See Also:
-
getParentWindow
HstComponentWindow getParentWindow()The parent component window containing this component window.- Returns:
- the component window containing this component window, or
null
when there is no parent window
-
getChildWindowMap
Map<String,HstComponentWindow> getChildWindowMap()The child component windows contained in this component window.- Returns:
- the component windows contained in this component window
-
getChildWindowNames
The child component window names contained in this component window.- Returns:
- the component window names contained in this component window
-
getChildWindow
The child component window which can be accessed by the name.- Parameters:
name
- the name of the child component window- Returns:
- the child component window which has the referenceName
-
getChildWindowByReferenceName
The child component window which can be accessed by the reference name.- Parameters:
referenceName
- the referenceName of the child component window- Returns:
- the child component window which has the referenceName
-
bindResponseState
void bindResponseState(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse parentResponse) Creates and binds theHstResponseState
to thisHstComponentWindow
. After this method has been invoked,getResponseState()
will return the boundHstResponseState
. IfbindResponseState(HttpServletRequest, HttpServletResponse)
gets invoked for a second (or more) time, the method won't change any state and directly return- Parameters:
request
- the HttpServletRequest requestparentResponse
- the HttpServletResponse response of the parent window or in case of the root window the http response of the container
-
getResponseState
HstResponseState getResponseState()Returns the response state of this component window. -
getComponentInfo
HstComponentInfo getComponentInfo() -
getAttribute
-
setAttribute
-
removeAttribute
-
getAttributeNames
Enumeration<String> getAttributeNames() -
getPageErrorHandlerClassName
String getPageErrorHandlerClassName()- Returns:
- the fully classified className of the class implementing
PageErrorHandler
-
isVisible
boolean isVisible()When this method returnstrue
, the
HstComponentWindow
is still part of the hierarchy ofHstComponentWindow
s, but the doBeforeRender of thegetComponent()
and dispatched from theHstResponse
will be skipped.- Returns:
true
when thisHstComponentWindow
should be visible,false
otherwise
-
setVisible
void setVisible(boolean visible) - Parameters:
visible
- sets whether thisHstComponentWindow
is visible or not. Setting thisHstComponentWindow
visibility to false, automatically sets all descendantHstComponentWindow
s visibility to false as well
-
removeChildWindow
removes thewindow
from the child windows if exists and otherwise does nothing- Parameters:
window
- the window to remove
-