|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.ScriptBase org.springframework.extensions.webscripts.ScriptSiteData
public final class ScriptSiteData
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.
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 |
---|
public ScriptSiteData(RequestContext context)
context
- The RenderContext instance for the current requestMethod Detail |
---|
public ScriptableMap buildProperties()
buildProperties
in class ScriptBase
public ScriptModelObject getRootPage()
public ScriptModelObject getSiteConfiguration()
public String[] getObjectTypeIds()
public String getObjectTypeName(String objectTypeId)
public String getObjectTypeDescription(String objectTypeId)
public Object[] getObjects(String objectTypeId)
public Object[] getChrome()
public Object[] getComponents()
public Object[] getComponentTypes()
public Object[] getConfigurations()
public Object[] getContentAssociations()
public Object[] getPages()
public Object[] getPageTypes()
public Object[] getPageAssociations()
public Object[] getTemplates()
public Object[] getTemplateTypes()
public Object[] getThemes()
public org.mozilla.javascript.Scriptable getObjectsMap(String objectTypeId)
public org.mozilla.javascript.Scriptable getChromeMap()
public org.mozilla.javascript.Scriptable getComponentsMap()
public org.mozilla.javascript.Scriptable getComponentTypesMap()
public org.mozilla.javascript.Scriptable getConfigurationsMap()
public org.mozilla.javascript.Scriptable getContentAssociationsMap()
public org.mozilla.javascript.Scriptable getPagesMap()
public org.mozilla.javascript.Scriptable getPageAssociationsMap()
public org.mozilla.javascript.Scriptable getTemplatesMap()
public org.mozilla.javascript.Scriptable getTemplateTypesMap()
public org.mozilla.javascript.Scriptable getThemesMap()
public ScriptModelObject newObject(String objectTypeId)
objectTypeId
-
public ScriptModelObject newObject(String objectTypeId, String objectId)
objectTypeId
- objectId
-
public ScriptModelObject newChrome()
public ScriptModelObject newComponent()
public ScriptModelObject newComponent(String componentTypeId)
componentTypeId
- The id of the ComponentType which describes
the type of this component
public ScriptModelObject newComponent(String scope, String regionId, String sourceId)
scope
- Scope - one of "global", "template" or "page"regionId
- The id of the region to bind toosourceId
- The source ID for the given scope
public ScriptModelObject newComponent(String componentTypeId, String scope, String regionId, String sourceId)
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 toosourceId
- The source ID for the given scope
public ScriptModelObject newComponentType()
public ScriptModelObject newConfiguration()
public ScriptModelObject newConfiguration(String sourceId)
sourceId
- The value to assign to the sourceId property
public ScriptModelObject newContentAssociation()
public ScriptModelObject newPage()
public ScriptModelObject newPage(String id)
id
- The id of the page instance
public ScriptModelObject newPage(String id, String title, String description)
id
- The id of the page instancetitle
- The title of the page instancedescription
- The description of the page instance
public ScriptModelObject newPage(String id, String title, String titleId, String description, String descriptionId)
id
- The id of the page instancetitle
- The title of the page instancetitleId
- Message bundle key used to look up the title of the page instancedescription
- The description of the page instancedescriptionId
- Message bundle key used to look up the description of the page instance
public ScriptModelObject newPageAssociation()
public ScriptModelObject newPageType(String objectId)
public ScriptModelObject newTemplate()
public ScriptModelObject newTemplate(String templateTypeId)
templateTypeId
- The id of the TemplateType object that describes
the type of this template
public ScriptModelObject newTemplate(String templateTypeId, String title, String description)
templateTypeId
- The id of the TemplateType which describes
the type of this template.title
- The name of the Template instancedescription
- The description of the Template instance
public ScriptModelObject newTemplate(String templateTypeId, String title, String titleId, String description, String descriptionId)
templateTypeId
- The id of the TemplateType which describes
the type of this template.title
- The name of the Template instancetitleId
- Message bundle key used to look up the title of the Template instancedescription
- The description of the Template instancedescriptionId
- Message bundle key used to look up the description of the Template instance
public ScriptModelObject newTemplateType(String objectId)
objectId
- The id of the TemplateType
public ScriptModelObject newTheme(String objectId)
objectId
- The id of the Theme
public void newPreset(String presetId, org.mozilla.javascript.Scriptable tokens)
presetId
- ID of the preset to generatetokens
- Token name/value mappublic Object[] findComponents(String scope, String regionId, String sourceId, String componentTypeId)
scope
- The value of the "scope" property of the instanceregionId
- The value of the "region" property of the instancesourceId
- The value of the "sourceId" property of the instancecomponentTypeId
- The value of the "componentTypeId" property of the instance
public Object[] findWebScripts(String family)
family
- the family
public Object[] findChildPageAssociations(String sourceId, String destId)
scopeId
- The value of the "scopeId" property of the instancedestId
- The value of the "destId" property of the instance
public Object[] findPageAssociations(String sourceId, String destId, String associationType)
scopeId
- The value of the "scopeId" property of the instancedestId
- The value of the "destId" property of the instanceassociationType
- The value of the "associationType" property of the instance
public Object[] findChildPages(String sourceId)
sourceId
-
public Object[] findParentPages(String pageId)
sourceId
-
public Object[] findContentAssociations(String sourceId, String sourceType, String destId, String assocType, String formatId)
sourceId
- The value of the "sourceId" property of the instancesourceType
- The value of "sourceType" property of the instancedestId
- The value of the "destId" property of the instanceassocType
- The value of the "assocType" property of the instanceformatId
- The value of the "formatId" property of the instance
public org.mozilla.javascript.Scriptable findComponentsMap(String scope, String regionId, String sourceId, String componentTypeId)
scope
- The value of the "source" property of the instanceregionId
- The value of the "regionId" property of the instancesourceId
- The value of the "sourceId" property of the instancecomponentTypeId
- The value of the "componentTypeId" property of the instance
public org.mozilla.javascript.Scriptable findPageAssociationsMap(String sourceId, String destId, String associationType)
sourceId
- The value of the "sourceId" property of the instancedestId
- The value of the "destId" property of the instanceassociationType
- The value of the "associationType" property of the instance
public org.mozilla.javascript.Scriptable findContentAssociationsMap(String sourceId, String sourceType, String destId, String assocType, String formatId)
sourceId
- The value of the "sourceId" property of the instancesourceType
- The value of the "sourceType" property of the instancedestId
- The value of the "destId" property of the instanceassocType
- The value of the "assocType" property of the instanceformatId
- The value of the "formatId" property of the instance
public org.mozilla.javascript.Scriptable findTemplatesMap(String pageId)
pageId
- The value of the "pageId" property of the instance
public ScriptModelObject findConfiguration(String sourceId)
sourceId
- The value of the "sourceId" property
public ScriptModelObject findTemplate(String pageId)
pageId
- The value of the "pageId" property
public ScriptModelObject findTemplate(String pageId, String formatId)
pageId
- The value of the "pageId" propertyformatId
- The value of the "formatId" property
public void removeTemplate(String pageId, String formatId)
pageId
- The id of the PageformatId
- The formatpublic void bindComponent(String componentId, String scope, String regionId, String sourceId)
public void bindComponent(ScriptModelObject componentObject, String scope, String regionId, String sourceId)
public void unbindComponent(String componentId)
public void unbindComponent(String scope, String regionId, String sourceId)
public void associateTemplate(String templateId, String pageId)
public void associateTemplate(String templateId, String pageId, String formatId)
public void unassociateTemplate(String pageId)
public void unassociateTemplate(String pageId, String formatId)
public void associatePage(String sourceId, String destId)
public void unassociatePage(String sourceId, String destId)
public void associateContent(String contentId, String templateId, String assocType, String formatId)
public void unassociateContent(String contentId, String templateId, String formatId)
public void associateContentType(String contentTypeId, String templateId, String assocType, String formatId)
public void unassociateContentType(String contentTypeId, String templateId, String formatId)
public String encode(String input)
public String encode(String input, String encoding)
public String decode(String input)
public String decode(String input, String encoding)
public void logout()
public void reloadUser()
public ScriptCredentialVault getCredentialVault()
public ScriptModelObject getChrome(String objectId)
public ScriptModelObject getComponent(String objectId)
public ScriptModelObject getComponent(String scope, String regionId, String sourceId)
public ScriptModelObject getComponentType(String objectId)
public ScriptModelObject getConfiguration(String objectId)
public ScriptModelObject getContentAssociation(String objectId)
public ScriptModelObject getPage(String objectId)
public ScriptModelObject getPageType(String objectId)
public ScriptModelObject getPageAssociation(String objectId)
public ScriptModelObject getTemplate(String objectId)
public ScriptModelObject getTemplateType(String objectId)
public ScriptModelObject getTheme(String objectId)
public String newGUID()
public String[] getFormatIds()
public String getFormatTitle(String formatId)
public String getFormatDescription(String formatId)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |