org.springframework.extensions.webscripts
Class ScriptBase

java.lang.Object
  extended by 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

Field Summary
protected  RequestContext context
           
protected  ScriptableMap<String,Serializable> properties
           
 
Constructor Summary
ScriptBase()
           
ScriptBase(RequestContext context)
          Instantiates a new web framework script base
 
Method Summary
protected abstract  ScriptableMap<String,Serializable> buildProperties()
           
 WebFrameworkConfigElement getConfig()
           
 Model getModel()
           
 ScriptModelObject getObject(String objectTypeId, String objectId)
          Retrieves a model object from the underlying store and hands it back wrapped as a ScriptModelObject.
 ScriptableMap<String,Serializable> getProperties()
           
 RequestContext getRequestContext()
          Gets the request context.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

protected final RequestContext context

properties

protected ScriptableMap<String,Serializable> properties
Constructor Detail

ScriptBase

public ScriptBase(RequestContext context)
Instantiates a new web framework script base

Parameters:
context - the context

ScriptBase

public ScriptBase()
Method Detail

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.