org.springframework.extensions.webscripts
Class ScriptResources

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

public final class ScriptResources
extends ScriptBase

Provides an interface to resources as stored on a model object. var objectId = resources.get("abc").objectId; var endpointId = resources.get("abc").endpointId;

Author:
muzquiano
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.ScriptBase
context, properties
 
Constructor Summary
ScriptResources(RequestContext context, ModelObject modelObject)
          Instantiates a new resources object
 
Method Summary
 ScriptResource add(String name, String resourceId)
           
 ScriptResource add(String name, String protocolId, String endpointId, String objectId)
           
protected  ScriptableMap buildProperties()
           
 ScriptResource get(String name)
           
 ModelObject getModelObject()
          Returns the model object
 String[] getNames()
           
 void remove(String name)
           
 
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

ScriptResources

public ScriptResources(RequestContext context,
                       ModelObject modelObject)
Instantiates a new resources object

Parameters:
context - the request context
modelObject - the model object
Method Detail

buildProperties

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

getModelObject

public ModelObject getModelObject()
Returns the model object

Returns:

get

public ScriptResource get(String name)

remove

public void remove(String name)

add

public ScriptResource add(String name,
                          String resourceId)

add

public ScriptResource add(String name,
                          String protocolId,
                          String endpointId,
                          String objectId)

getNames

public String[] getNames()


Copyright © 2009 SpringSource, Inc. All Rights Reserved.