org.olat.core.gui.components.htmlsite
Class HtmlStaticPageComponent

java.lang.Object
  extended by org.olat.core.gui.components.Component
      extended by org.olat.core.gui.components.htmlsite.HtmlStaticPageComponent
All Implemented Interfaces:
AsyncMediaResponsible

public class HtmlStaticPageComponent
extends Component
implements AsyncMediaResponsible

Author:
Felix Jost

Field Summary
static java.lang.String OLAT_CMD_PREFIX
           
 
Constructor Summary
HtmlStaticPageComponent(java.lang.String name, VFSContainer rootContainer)
          Constructor for an displaying an html page.
 
Method Summary
 MediaResource getAsyncMediaResource(UserRequest ureq)
           
 java.lang.String getExtendedDebugInfo()
           
 java.lang.String getHtmlContent()
           
 java.lang.String getHtmlHead()
           
 ComponentRenderer getHTMLRendererSingleton()
           
 java.lang.String getJsOnLoad()
           
 java.lang.String getWrapperCssStyle()
          Get the wrapper css style or NULL if no wrapper css is defined
static boolean isFileTypeSupported(java.lang.String filePath)
          Check if a certain file-type (html,htm,txt) is supported.
 void setCurrentURI(java.lang.String currentURI)
          Sets the start html page, may be null
 void setWrapperCssStyle(java.lang.String wrapperCssStyle)
          Set some CSS styles on the element.
 void validate(UserRequest ureq, ValidationResult vr)
          called just before the rendering of the -whole tree- takes place, so e.g.
 
Methods inherited from class org.olat.core.gui.components.Component
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OLAT_CMD_PREFIX

public static final java.lang.String OLAT_CMD_PREFIX
See Also:
Constant Field Values
Constructor Detail

HtmlStaticPageComponent

public HtmlStaticPageComponent(java.lang.String name,
                               VFSContainer rootContainer)
Constructor for an displaying an html page.

Parameters:
name - The component name
the - root folder which contains the files
Method Detail

getAsyncMediaResource

public MediaResource getAsyncMediaResource(UserRequest ureq)
Specified by:
getAsyncMediaResource in interface AsyncMediaResponsible
Returns:
See Also:
AsyncMediaResponsible.getAsyncMediaResource(org.olat.core.gui.UserRequest)

setCurrentURI

public void setCurrentURI(java.lang.String currentURI)
Sets the start html page, may be null

Parameters:
currentURI - The currentURI to set

getHtmlHead

public java.lang.String getHtmlHead()
Returns:
Returns the html header from the current page

getJsOnLoad

public java.lang.String getJsOnLoad()
Returns:
Returns the onload java script calls from the current page

getHtmlContent

public java.lang.String getHtmlContent()
Returns:
Returns the html content from the current page (html body)

getExtendedDebugInfo

public java.lang.String getExtendedDebugInfo()
Overrides:
getExtendedDebugInfo in class Component
Returns:
Returns the current URI as debugginf information

validate

public void validate(UserRequest ureq,
                     ValidationResult vr)
Description copied from class: Component
called just before the rendering of the -whole tree- takes place, so e.g. lazy fetching can be implemented, or issueing a request for a new moduleUri (e.g. for CPComponent, so that the browser loads images correctly). only called when the component is visible

Overrides:
validate in class Component
See Also:
Component.validate(org.olat.core.gui.UserRequest, org.olat.core.gui.render.ValidationResult)

getHTMLRendererSingleton

public ComponentRenderer getHTMLRendererSingleton()
Specified by:
getHTMLRendererSingleton in class Component

isFileTypeSupported

public static boolean isFileTypeSupported(java.lang.String filePath)
Check if a certain file-type (html,htm,txt) is supported.

Parameters:
filePath - Full file path, can be null.
Returns:
true: File-type is supported

setWrapperCssStyle

public void setWrapperCssStyle(java.lang.String wrapperCssStyle)
Set some CSS styles on the element.

Parameters:
wrapperCssStyle - CSS rules or NULL to not use them

getWrapperCssStyle

public java.lang.String getWrapperCssStyle()
Get the wrapper css style or NULL if no wrapper css is defined

Returns: