org.springframework.extensions.webscripts
Class ScriptRenderContext

java.lang.Object
  extended by org.springframework.extensions.webscripts.ScriptBase
      extended by org.springframework.extensions.webscripts.ScriptRenderContext
All Implemented Interfaces:
Serializable

public final class ScriptRenderContext
extends ScriptBase

A root-scoped Java object that wraps the Render Context object.

Author:
muzquiano
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.ScriptBase
context, properties
 
Constructor Summary
ScriptRenderContext(RenderContext context)
          Constructs a new ScriptRequestContext object.
 
Method Summary
protected  ScriptableMap buildProperties()
           
 boolean getAuthenticated()
          Returns whether the current user is authenticated If there is no curren tuesr, this will return false.
 String getContentId()
          Gets the id of the content instance If a content instance is not bound, null is returned.
 boolean getExternalAuthentication()
           
 String getFormatId()
          Gets the format id.
 String getFrameworkTitle()
           
 String getFrameworkVersion()
           
 String getId()
          Gets the id.
 ScriptLinkBuilder getLinkBuilder()
          Gets the link builder helper object
 ScriptModelObject getPage()
          Gets the page.
 String getPageId()
          Gets the id of the page
 String getPreviewStoreId()
           
 String getPreviewWebappId()
           
 ScriptResource getResource()
          Gets the content instance.
 ScriptModelObject getRootPage()
           
 ScriptModelObject getTemplate()
          Gets the template.
 String getTemplateId()
          Gets the id of the template
 ScriptModelObject getTheme()
          Gets the theme.
 String getThemeId()
          Gets the theme id.
 String getUri()
           
 ScriptUser getUser()
          Gets the user.
 String getWebsiteTitle()
           
 ScriptResource loadResource(String resourceId)
           
 ScriptResource loadResource(String protocolId, String endpointId, String objectId)
           
 void setValue(String key, Object value)
           
 
Methods inherited from class org.springframework.extensions.webscripts.ScriptBase
getConfig, getModel, getObject, getProperties, getRequestContext, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptRenderContext

public ScriptRenderContext(RenderContext context)
Constructs a new ScriptRequestContext object.

Parameters:
context - The RenderContext instance for the current request
Method Detail

buildProperties

protected ScriptableMap buildProperties()
Specified by:
buildProperties in class ScriptBase

setValue

public void setValue(String key,
                     Object value)

getContentId

public String getContentId()
Gets the id of the content instance If a content instance is not bound, null is returned.


getResource

public ScriptResource getResource()
Gets the content instance.

Returns:
the content instance

getFormatId

public String getFormatId()
Gets the format id.

Returns:
the format id

getId

public String getId()
Gets the id.

Returns:
the id

getPageId

public String getPageId()
Gets the id of the page

Returns:
the id

getPage

public ScriptModelObject getPage()
Gets the page.

Returns:
the page

getTemplateId

public String getTemplateId()
Gets the id of the template

Returns:
the id

getTemplate

public ScriptModelObject getTemplate()
Gets the template.

Returns:
the template

getThemeId

public String getThemeId()
Gets the theme id.

Returns:
the theme id

getTheme

public ScriptModelObject getTheme()
Gets the theme.

Returns:
the theme

getUser

public ScriptUser getUser()
Gets the user.

Returns:
the user

getAuthenticated

public boolean getAuthenticated()
Returns whether the current user is authenticated If there is no curren tuesr, this will return false.

Returns:
whether the user is authenticated

getExternalAuthentication

public boolean getExternalAuthentication()
Returns:
true if external authentication is being used to manage the user

getLinkBuilder

public ScriptLinkBuilder getLinkBuilder()
Gets the link builder helper object

Returns:
the link builder

getWebsiteTitle

public String getWebsiteTitle()

getUri

public String getUri()

getRootPage

public ScriptModelObject getRootPage()

getPreviewWebappId

public String getPreviewWebappId()

getPreviewStoreId

public String getPreviewStoreId()

getFrameworkTitle

public String getFrameworkTitle()

getFrameworkVersion

public String getFrameworkVersion()

loadResource

public ScriptResource loadResource(String resourceId)

loadResource

public ScriptResource loadResource(String protocolId,
                                   String endpointId,
                                   String objectId)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.