org.springframework.extensions.webscripts
Class ScriptBase
java.lang.Object
org.springframework.extensions.webscripts.ScriptBase
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ScriptForm, ScriptFormData, ScriptImporter, ScriptLinkBuilder, ScriptModelObject, ScriptRenderContext, ScriptRenderingInstance, ScriptResource, ScriptResourceContent, ScriptResources, ScriptSiteData, ScriptUser, ScriptWebApplication
public abstract class ScriptBase
- extends Object
- implements Serializable
Base class for all Web Framework Root-Scope and Script Model objects
This class can accept a binding to a RenderContext (for convenience).
The RenderContext object is the primary interface to the request
for the Java API.
- Author:
- muzquiano
- See Also:
- Serialized Form
context
protected final RequestContext context
properties
protected ScriptableMap<String,Serializable> properties
ScriptBase
public ScriptBase(RequestContext context)
- Instantiates a new web framework script base
- Parameters:
context
- the context
ScriptBase
public ScriptBase()
getRequestContext
public final RequestContext getRequestContext()
- Gets the request context.
- Returns:
- the request context
getObject
public final ScriptModelObject getObject(String objectTypeId,
String objectId)
- Retrieves a model object from the underlying store and hands it back
wrapped as a ScriptModelObject. If the model object cannot be found,
null will be returned.
- Parameters:
id
- the id
- Returns:
- the script model object
getProperties
public ScriptableMap<String,Serializable> getProperties()
getModel
public final Model getModel()
getConfig
public final WebFrameworkConfigElement getConfig()
toString
public String toString()
- Overrides:
toString
in class Object
buildProperties
protected abstract ScriptableMap<String,Serializable> buildProperties()
Copyright © 2009 SpringSource, Inc. All Rights Reserved.