org.springframework.extensions.webscripts
Class ScriptSiteData

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

public final class ScriptSiteData
extends ScriptBase

A read-only root-scoped Java object for working with the Web Framework and the Web Framework object model. Using this object, you can query the Web Framework object model, perform read and write operations and configure your web application. Among the things that you can work against in the Web Framework object model are components, page, templates, configurations and associations.

Author:
muzquiano
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.ScriptBase
context, properties
 
Constructor Summary
ScriptSiteData(RequestContext context)
          Constructs a new ScriptSite object around the provided request context
 
Method Summary
 void associateContent(String contentId, String templateId, String assocType, String formatId)
           
 void associateContentType(String contentTypeId, String templateId, String assocType, String formatId)
           
 void associatePage(String sourceId, String destId)
           
 void associateTemplate(String templateId, String pageId)
           
 void associateTemplate(String templateId, String pageId, String formatId)
           
 void bindComponent(ScriptModelObject componentObject, String scope, String regionId, String sourceId)
           
 void bindComponent(String componentId, String scope, String regionId, String sourceId)
           
 ScriptableMap buildProperties()
           
 String decode(String input)
           
 String decode(String input, String encoding)
           
 String encode(String input)
           
 String encode(String input, String encoding)
           
 Object[] findChildPageAssociations(String sourceId, String destId)
          Searches for PageAssociation instances within the Web Application that are of association type 'child' and which match the specified constraints.
 Object[] findChildPages(String sourceId)
          Searches for child pages of the given page.
 Object[] findComponents(String scope, String regionId, String sourceId, String componentTypeId)
          Searches for Component instances within the Web Application that match the provided constraints.
 org.mozilla.javascript.Scriptable findComponentsMap(String scope, String regionId, String sourceId, String componentTypeId)
          Provides a map of ScriptModelObjects that wrap Component instances.
 ScriptModelObject findConfiguration(String sourceId)
          Looks up Configuration instances and returns the first instance that is found for the matching constraints.
 Object[] findContentAssociations(String sourceId, String sourceType, String destId, String assocType, String formatId)
          Searches for ContentAssociation instances within the Web Application that match the specified constraints.
 org.mozilla.javascript.Scriptable findContentAssociationsMap(String sourceId, String sourceType, String destId, String assocType, String formatId)
          Provides a map of ScriptModelObjects that wrap ContentAssociation instances.
 Object[] findPageAssociations(String sourceId, String destId, String associationType)
          Searches for PageAssociation instances within the Web Application that are of association type 'child' and which match the specified constraints.
 org.mozilla.javascript.Scriptable findPageAssociationsMap(String sourceId, String destId, String associationType)
          Provides a map of ScriptModelObjects that wrap PageAssociation instances.
 Object[] findParentPages(String pageId)
          Searches for parent pages of the given page.
 ScriptModelObject findTemplate(String pageId)
          Looks up Template instances and returns the first instance that is found for the matching constraints.
 ScriptModelObject findTemplate(String pageId, String formatId)
          Looks up Template instances and returns the first instance that is found for the matching constraints.
 org.mozilla.javascript.Scriptable findTemplatesMap(String pageId)
          Provides a map of ScriptModelObjects that wrap Template instances.
 Object[] findWebScripts(String family)
          Searches for webscript components with the given family name.
 Object[] getChrome()
           
 ScriptModelObject getChrome(String objectId)
           
 org.mozilla.javascript.Scriptable getChromeMap()
           
 ScriptModelObject getComponent(String objectId)
           
 ScriptModelObject getComponent(String scope, String regionId, String sourceId)
           
 Object[] getComponents()
           
 org.mozilla.javascript.Scriptable getComponentsMap()
           
 ScriptModelObject getComponentType(String objectId)
           
 Object[] getComponentTypes()
           
 org.mozilla.javascript.Scriptable getComponentTypesMap()
           
 ScriptModelObject getConfiguration(String objectId)
           
 Object[] getConfigurations()
           
 org.mozilla.javascript.Scriptable getConfigurationsMap()
           
 ScriptModelObject getContentAssociation(String objectId)
           
 Object[] getContentAssociations()
           
 org.mozilla.javascript.Scriptable getContentAssociationsMap()
           
 ScriptCredentialVault getCredentialVault()
           
 String getFormatDescription(String formatId)
           
 String[] getFormatIds()
           
 String getFormatTitle(String formatId)
           
 Object[] getObjects(String objectTypeId)
           
 org.mozilla.javascript.Scriptable getObjectsMap(String objectTypeId)
           
 String getObjectTypeDescription(String objectTypeId)
           
 String[] getObjectTypeIds()
           
 String getObjectTypeName(String objectTypeId)
           
 ScriptModelObject getPage(String objectId)
           
 ScriptModelObject getPageAssociation(String objectId)
           
 Object[] getPageAssociations()
           
 org.mozilla.javascript.Scriptable getPageAssociationsMap()
           
 Object[] getPages()
           
 org.mozilla.javascript.Scriptable getPagesMap()
           
 ScriptModelObject getPageType(String objectId)
           
 Object[] getPageTypes()
           
 ScriptModelObject getRootPage()
          Provides access to the root page for the web application.
 ScriptModelObject getSiteConfiguration()
          Provides access to the site configuration object for the web application.
 ScriptModelObject getTemplate(String objectId)
           
 Object[] getTemplates()
           
 org.mozilla.javascript.Scriptable getTemplatesMap()
           
 ScriptModelObject getTemplateType(String objectId)
           
 Object[] getTemplateTypes()
           
 org.mozilla.javascript.Scriptable getTemplateTypesMap()
           
 ScriptModelObject getTheme(String objectId)
           
 Object[] getThemes()
           
 org.mozilla.javascript.Scriptable getThemesMap()
           
 void logout()
           
 ScriptModelObject newChrome()
          Creates a new Chrome instance.
 ScriptModelObject newComponent()
          Creates a new Component instance.
 ScriptModelObject newComponent(String componentTypeId)
          Creates a new Component instance of the given component type The id for the instance is generated using the Web Framework's Random GUID generator.
 ScriptModelObject newComponent(String scope, String regionId, String sourceId)
          Creates a new Component instance of the given component type.
 ScriptModelObject newComponent(String componentTypeId, String scope, String regionId, String sourceId)
          Creates a new Component instance of the given component type.
 ScriptModelObject newComponentType()
          Creates a new ComponentType instance.
 ScriptModelObject newConfiguration()
          Creates a new Configuration instance.
 ScriptModelObject newConfiguration(String sourceId)
          Creates a new Configuration instance that is bound to the given sourceId.
 ScriptModelObject newContentAssociation()
          Creates a new ContentAssociation instance.
 String newGUID()
          Constructs a GUID
 ScriptModelObject newObject(String objectTypeId)
          Creates a new object for the given type id
 ScriptModelObject newObject(String objectTypeId, String objectId)
          Creates a new object for the given type id
 ScriptModelObject newPage()
          Creates a new Page instance.
 ScriptModelObject newPage(String id)
          Creates a new Page instance with the specified ID.
 ScriptModelObject newPage(String id, String title, String description)
          Creates a new Page instance with the specified ID.
 ScriptModelObject newPage(String id, String title, String titleId, String description, String descriptionId)
          Creates a new Page instance with the specified ID.
 ScriptModelObject newPageAssociation()
          Creates a new PageAssociation instance.
 ScriptModelObject newPageType(String objectId)
          Creates a new PageType instance.
 void newPreset(String presetId, org.mozilla.javascript.Scriptable tokens)
          Creates model objects based on a given preset id.
 ScriptModelObject newTemplate()
          Creates a new Template instance.
 ScriptModelObject newTemplate(String templateTypeId)
          Creates a new Template instance.
 ScriptModelObject newTemplate(String templateTypeId, String title, String description)
          Creates a new Template instance.
 ScriptModelObject newTemplate(String templateTypeId, String title, String titleId, String description, String descriptionId)
          Creates a new Template instance.
 ScriptModelObject newTemplateType(String objectId)
          Creates a new TemplateType instance.
 ScriptModelObject newTheme(String objectId)
          Creates a new Theme instance.
 void reloadUser()
          Reloads the current user into session
 void removeTemplate(String pageId, String formatId)
          Looks up the given Page and unbinds any Template instances that are bound to the page (keyed by formatId) If you would like to remove the default Template instance, set formatId to null
 void unassociateContent(String contentId, String templateId, String formatId)
           
 void unassociateContentType(String contentTypeId, String templateId, String formatId)
           
 void unassociatePage(String sourceId, String destId)
           
 void unassociateTemplate(String pageId)
           
 void unassociateTemplate(String pageId, String formatId)
           
 void unbindComponent(String componentId)
           
 void unbindComponent(String scope, String regionId, String sourceId)
           
 
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

ScriptSiteData

public ScriptSiteData(RequestContext context)
Constructs a new ScriptSite object around the provided request context

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

buildProperties

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

getRootPage

public ScriptModelObject getRootPage()
Provides access to the root page for the web application. If no root page is defined, null will be returned.

Returns:
The root page to the web application.

getSiteConfiguration

public ScriptModelObject getSiteConfiguration()
Provides access to the site configuration object for the web application. If a site configuration is not defined, null will be returned.

Returns:
The configuration object for the site

getObjectTypeIds

public String[] getObjectTypeIds()

getObjectTypeName

public String getObjectTypeName(String objectTypeId)

getObjectTypeDescription

public String getObjectTypeDescription(String objectTypeId)

getObjects

public Object[] getObjects(String objectTypeId)
Returns:
An array of all objects of the given type

getChrome

public Object[] getChrome()
Returns:
An array of all Chrome instances in the web application

getComponents

public Object[] getComponents()
Returns:
An array of all Component instances in the web application

getComponentTypes

public Object[] getComponentTypes()
Returns:
An array of all ComponentType instances in the web application

getConfigurations

public Object[] getConfigurations()
Returns:
An array of all Configuration instances in the web application

getContentAssociations

public Object[] getContentAssociations()
Returns:
An array of all ContentAssociation instances in the web application

getPages

public Object[] getPages()
Returns:
An array of all Page instances in the web application

getPageTypes

public Object[] getPageTypes()
Returns:
An array of all PageType instances in the web application

getPageAssociations

public Object[] getPageAssociations()
Returns:
An array of all PageAssociation instances in the web application

getTemplates

public Object[] getTemplates()
Returns:
An array of all Template instances in the web application

getTemplateTypes

public Object[] getTemplateTypes()
Returns:
An array of all TemplateType instances in the web application

getThemes

public Object[] getThemes()
Returns:
An array of all Theme instances in the web application

getObjectsMap

public org.mozilla.javascript.Scriptable getObjectsMap(String objectTypeId)
Returns:
A map of all instances of the given type. The map is keyed on object id

getChromeMap

public org.mozilla.javascript.Scriptable getChromeMap()
Returns:
A map of all Chrome instances. The map is keyed on object id

getComponentsMap

public org.mozilla.javascript.Scriptable getComponentsMap()
Returns:
A map of all Component instances. The map is keyed on object id

getComponentTypesMap

public org.mozilla.javascript.Scriptable getComponentTypesMap()
Returns:
A map of all ComponentType instances. The map is keyed on object id

getConfigurationsMap

public org.mozilla.javascript.Scriptable getConfigurationsMap()
Returns:
A map of all Configuration instances. The map is keyed on object id

getContentAssociationsMap

public org.mozilla.javascript.Scriptable getContentAssociationsMap()
Returns:
A map of all Content Association instances. The map is keyed on object id

getPagesMap

public org.mozilla.javascript.Scriptable getPagesMap()
Returns:
A map of all Page instances. The map is keyed on object id

getPageAssociationsMap

public org.mozilla.javascript.Scriptable getPageAssociationsMap()
Returns:
A map of all PageAssociation instances. The map is keyed on object id

getTemplatesMap

public org.mozilla.javascript.Scriptable getTemplatesMap()
Returns:
A map of all Template instances. The map is keyed on object id

getTemplateTypesMap

public org.mozilla.javascript.Scriptable getTemplateTypesMap()
Returns:
A map of all TemplateType instances. The map is keyed on object id

getThemesMap

public org.mozilla.javascript.Scriptable getThemesMap()
Returns:
A map of all Theme instances. The map is keyed on on object id

newObject

public ScriptModelObject newObject(String objectTypeId)
Creates a new object for the given type id

Parameters:
objectTypeId -
Returns:
A ScriptModelObject representing the new instance

newObject

public ScriptModelObject newObject(String objectTypeId,
                                   String objectId)
Creates a new object for the given type id

Parameters:
objectTypeId -
objectId -
Returns:
A ScriptModelObject representing the new instance

newChrome

public ScriptModelObject newChrome()
Creates a new Chrome instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newComponent

public ScriptModelObject newComponent()
Creates a new Component instance. The id for the instance is generated using the Web Framework's Random GUID generator. The scope, region and sourceId parameters should be explicitly set before the component is persisted!

Returns:
A ScriptModelObject representing the new instance

newComponent

public ScriptModelObject newComponent(String componentTypeId)
Creates a new Component instance of the given component type The id for the instance is generated using the Web Framework's Random GUID generator. The scope, region and sourceId parameters should be explicitly set before the component is persisted!

Parameters:
componentTypeId - The id of the ComponentType which describes the type of this component
Returns:
A ScriptModelObject representing the new instance

newComponent

public ScriptModelObject newComponent(String scope,
                                      String regionId,
                                      String sourceId)
Creates a new Component instance of the given component type. The ID is generated from the supplied scope, region and sourceId parameters.

Parameters:
scope - Scope - one of "global", "template" or "page"
regionId - The id of the region to bind too
sourceId - The source ID for the given scope
Returns:
A ScriptModelObject representing the new instance

newComponent

public ScriptModelObject newComponent(String componentTypeId,
                                      String scope,
                                      String regionId,
                                      String sourceId)
Creates a new Component instance of the given component type. The ID is generated from the supplied scope, region and sourceId parameters.

Parameters:
componentTypeId - The id of the ComponentType which describes the type of this component.
scope - Scope - one of "global", "template" or "page"
regionId - The id of the region to bind too
sourceId - The source ID for the given scope
Returns:
A ScriptModelObject representing the new instance

newComponentType

public ScriptModelObject newComponentType()
Creates a new ComponentType instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newConfiguration

public ScriptModelObject newConfiguration()
Creates a new Configuration instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newConfiguration

public ScriptModelObject newConfiguration(String sourceId)
Creates a new Configuration instance that is bound to the given sourceId. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
sourceId - The value to assign to the sourceId property
Returns:
A ScriptModelObject representing the new instance

newContentAssociation

public ScriptModelObject newContentAssociation()
Creates a new ContentAssociation instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newPage

public ScriptModelObject newPage()
Creates a new Page instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newPage

public ScriptModelObject newPage(String id)
Creates a new Page instance with the specified ID.

Parameters:
id - The id of the page instance
Returns:
A ScriptModelObject representing the new instance

newPage

public ScriptModelObject newPage(String id,
                                 String title,
                                 String description)
Creates a new Page instance with the specified ID.

Parameters:
id - The id of the page instance
title - The title of the page instance
description - The description of the page instance
Returns:
A ScriptModelObject representing the new instance

newPage

public ScriptModelObject newPage(String id,
                                 String title,
                                 String titleId,
                                 String description,
                                 String descriptionId)
Creates a new Page instance with the specified ID.

Parameters:
id - The id of the page instance
title - The title of the page instance
titleId - Message bundle key used to look up the title of the page instance
description - The description of the page instance
descriptionId - Message bundle key used to look up the description of the page instance
Returns:
A ScriptModelObject representing the new instance

newPageAssociation

public ScriptModelObject newPageAssociation()
Creates a new PageAssociation instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newPageType

public ScriptModelObject newPageType(String objectId)
Creates a new PageType instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newTemplate

public ScriptModelObject newTemplate()
Creates a new Template instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Returns:
A ScriptModelObject representing the new instance

newTemplate

public ScriptModelObject newTemplate(String templateTypeId)
Creates a new Template instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
templateTypeId - The id of the TemplateType object that describes the type of this template
Returns:
A ScriptModelObject representing the new instance

newTemplate

public ScriptModelObject newTemplate(String templateTypeId,
                                     String title,
                                     String description)
Creates a new Template instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
templateTypeId - The id of the TemplateType which describes the type of this template.
title - The name of the Template instance
description - The description of the Template instance
Returns:
A ScriptModelObject representing the new instance

newTemplate

public ScriptModelObject newTemplate(String templateTypeId,
                                     String title,
                                     String titleId,
                                     String description,
                                     String descriptionId)
Creates a new Template instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
templateTypeId - The id of the TemplateType which describes the type of this template.
title - The name of the Template instance
titleId - Message bundle key used to look up the title of the Template instance
description - The description of the Template instance
descriptionId - Message bundle key used to look up the description of the Template instance
Returns:
A ScriptModelObject representing the new instance

newTemplateType

public ScriptModelObject newTemplateType(String objectId)
Creates a new TemplateType instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
objectId - The id of the TemplateType
Returns:
A ScriptModelObject representing the new instance

newTheme

public ScriptModelObject newTheme(String objectId)
Creates a new Theme instance. The id for the instance is generated using the Web Framework's Random GUID generator.

Parameters:
objectId - The id of the Theme
Returns:
A ScriptModelObject representing the new instance

newPreset

public void newPreset(String presetId,
                      org.mozilla.javascript.Scriptable tokens)
Creates model objects based on a given preset id. The preset is looked up and processed by the PresetManager bean. The various objects found in the preset will be generated using the supplied name/value map of tokens.

Parameters:
presetId - ID of the preset to generate
tokens - Token name/value map

findComponents

public Object[] findComponents(String scope,
                               String regionId,
                               String sourceId,
                               String componentTypeId)
Searches for Component instances within the Web Application that match the provided constraints. If a constraint is set to null, it is not considered as part of the search.

Parameters:
scope - The value of the "scope" property of the instance
regionId - The value of the "region" property of the instance
sourceId - The value of the "sourceId" property of the instance
componentTypeId - The value of the "componentTypeId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the Component results of the search

findWebScripts

public Object[] findWebScripts(String family)
Searches for webscript components with the given family name.

Parameters:
family - the family
Returns:
An array of webscripts that match the given family name

findChildPageAssociations

public Object[] findChildPageAssociations(String sourceId,
                                          String destId)
Searches for PageAssociation instances within the Web Application that are of association type 'child' and which match the specified constraints. If a constraint is set to null, it is not considered as part of the search.

Parameters:
scopeId - The value of the "scopeId" property of the instance
destId - The value of the "destId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the PageAssociation results of the search

findPageAssociations

public Object[] findPageAssociations(String sourceId,
                                     String destId,
                                     String associationType)
Searches for PageAssociation instances within the Web Application that are of association type 'child' and which match the specified constraints. If a constraint is set to null, it is not considered as part of the search.

Parameters:
scopeId - The value of the "scopeId" property of the instance
destId - The value of the "destId" property of the instance
associationType - The value of the "associationType" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the PageAssociation results of the search

findChildPages

public Object[] findChildPages(String sourceId)
Searches for child pages of the given page. This is a shortcut method - the alternative is to look up associations directly and then look up their corresponding page objects

Parameters:
sourceId -
Returns:

findParentPages

public Object[] findParentPages(String pageId)
Searches for parent pages of the given page. This is a shortcut method - the alternative is to look up associations directly and then look up their corresponding page objects

Parameters:
sourceId -
Returns:

findContentAssociations

public Object[] findContentAssociations(String sourceId,
                                        String sourceType,
                                        String destId,
                                        String assocType,
                                        String formatId)
Searches for ContentAssociation instances within the Web Application that match the specified constraints. If a constraint is set to null, it is not considered as part of the search.

Parameters:
sourceId - The value of the "sourceId" property of the instance
sourceType - The value of "sourceType" property of the instance
destId - The value of the "destId" property of the instance
assocType - The value of the "assocType" property of the instance
formatId - The value of the "formatId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the ContentAssociation results of the search

findComponentsMap

public org.mozilla.javascript.Scriptable findComponentsMap(String scope,
                                                           String regionId,
                                                           String sourceId,
                                                           String componentTypeId)
Provides a map of ScriptModelObjects that wrap Component instances. The map is keyed by Component object id.

Parameters:
scope - The value of the "source" property of the instance
regionId - The value of the "regionId" property of the instance
sourceId - The value of the "sourceId" property of the instance
componentTypeId - The value of the "componentTypeId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the Component results of the search

findPageAssociationsMap

public org.mozilla.javascript.Scriptable findPageAssociationsMap(String sourceId,
                                                                 String destId,
                                                                 String associationType)
Provides a map of ScriptModelObjects that wrap PageAssociation instances. The map is keyed by PageAssociation object id.

Parameters:
sourceId - The value of the "sourceId" property of the instance
destId - The value of the "destId" property of the instance
associationType - The value of the "associationType" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the PageAssociation results of the search

findContentAssociationsMap

public org.mozilla.javascript.Scriptable findContentAssociationsMap(String sourceId,
                                                                    String sourceType,
                                                                    String destId,
                                                                    String assocType,
                                                                    String formatId)
Provides a map of ScriptModelObjects that wrap ContentAssociation instances. The map is keyed by ContentAssociation object id.

Parameters:
sourceId - The value of the "sourceId" property of the instance
sourceType - The value of the "sourceType" property of the instance
destId - The value of the "destId" property of the instance
assocType - The value of the "assocType" property of the instance
formatId - The value of the "formatId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the ContentAssociation results of the search

findTemplatesMap

public org.mozilla.javascript.Scriptable findTemplatesMap(String pageId)
Provides a map of ScriptModelObjects that wrap Template instances. The map is keyed by format id.

Parameters:
pageId - The value of the "pageId" property of the instance
Returns:
An array of ScriptModelObject instances that wrap the Template instance results of the search

findConfiguration

public ScriptModelObject findConfiguration(String sourceId)
Looks up Configuration instances and returns the first instance that is found for the matching constraints.

Parameters:
sourceId - The value of the "sourceId" property
Returns:
A ScriptModelObject instance that wraps the Configuration instance

findTemplate

public ScriptModelObject findTemplate(String pageId)
Looks up Template instances and returns the first instance that is found for the matching constraints.

Parameters:
pageId - The value of the "pageId" property
Returns:
A ScriptModelObject instance that wraps the Template instance

findTemplate

public ScriptModelObject findTemplate(String pageId,
                                      String formatId)
Looks up Template instances and returns the first instance that is found for the matching constraints.

Parameters:
pageId - The value of the "pageId" property
formatId - The value of the "formatId" property
Returns:
A ScriptModelObject instance that wraps the Template instance

removeTemplate

public void removeTemplate(String pageId,
                           String formatId)
Looks up the given Page and unbinds any Template instances that are bound to the page (keyed by formatId) If you would like to remove the default Template instance, set formatId to null

Parameters:
pageId - The id of the Page
formatId - The format

bindComponent

public void bindComponent(String componentId,
                          String scope,
                          String regionId,
                          String sourceId)

bindComponent

public void bindComponent(ScriptModelObject componentObject,
                          String scope,
                          String regionId,
                          String sourceId)

unbindComponent

public void unbindComponent(String componentId)

unbindComponent

public void unbindComponent(String scope,
                            String regionId,
                            String sourceId)

associateTemplate

public void associateTemplate(String templateId,
                              String pageId)

associateTemplate

public void associateTemplate(String templateId,
                              String pageId,
                              String formatId)

unassociateTemplate

public void unassociateTemplate(String pageId)

unassociateTemplate

public void unassociateTemplate(String pageId,
                                String formatId)

associatePage

public void associatePage(String sourceId,
                          String destId)

unassociatePage

public void unassociatePage(String sourceId,
                            String destId)

associateContent

public void associateContent(String contentId,
                             String templateId,
                             String assocType,
                             String formatId)

unassociateContent

public void unassociateContent(String contentId,
                               String templateId,
                               String formatId)

associateContentType

public void associateContentType(String contentTypeId,
                                 String templateId,
                                 String assocType,
                                 String formatId)

unassociateContentType

public void unassociateContentType(String contentTypeId,
                                   String templateId,
                                   String formatId)

encode

public String encode(String input)

encode

public String encode(String input,
                     String encoding)

decode

public String decode(String input)

decode

public String decode(String input,
                     String encoding)

logout

public void logout()

reloadUser

public void reloadUser()
Reloads the current user into session


getCredentialVault

public ScriptCredentialVault getCredentialVault()

getChrome

public ScriptModelObject getChrome(String objectId)

getComponent

public ScriptModelObject getComponent(String objectId)

getComponent

public ScriptModelObject getComponent(String scope,
                                      String regionId,
                                      String sourceId)

getComponentType

public ScriptModelObject getComponentType(String objectId)

getConfiguration

public ScriptModelObject getConfiguration(String objectId)

getContentAssociation

public ScriptModelObject getContentAssociation(String objectId)

getPage

public ScriptModelObject getPage(String objectId)

getPageType

public ScriptModelObject getPageType(String objectId)

getPageAssociation

public ScriptModelObject getPageAssociation(String objectId)

getTemplate

public ScriptModelObject getTemplate(String objectId)

getTemplateType

public ScriptModelObject getTemplateType(String objectId)

getTheme

public ScriptModelObject getTheme(String objectId)

newGUID

public String newGUID()
Constructs a GUID

Returns:

getFormatIds

public String[] getFormatIds()

getFormatTitle

public String getFormatTitle(String formatId)

getFormatDescription

public String getFormatDescription(String formatId)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.