Programming with Content Services ES > Accessing Content Services using Web Scripts > Understanding web script root objects

Understanding web script root objects
This section describes root objects that can used within web scripts. Most of these objects are used in the script examples located in this section. (See Creating your first web script.) The following list describes web script root objects:
cache: An array of cache control properties that enable control over how the web script response is cached. This object contains the following fields:
neverCache: A Boolean value that specifies whether the web script response needs to be cached. The value true means never cache. If not set, the default value is specified by the cache control section of the web script definition.
isPublic: A Boolean value that specifies whether the web script response needs to be cached by public caches. If not set, the default value is specified by the cache control section of the web script definition file.
mustRevalidate: A Boolean value that controls whether the cache must revalidate its version of the web script response to ensure an updated version. If not set, the default value is specified by the cache control section of the web script definition file.
maxAge: A long value that specifies the maximum amount of time (in seconds, relative to the time of request) that the response will be considered fresh. If not set, the default value is null.
lastModified: A date value that specifies the time that the content of the response last changed. If not set, the default value is null.
ETag: A string value that specifies a unique identifier that changes each time the content of the response changes. If not set, the default value is null.
companyhome: A script node that represents Company Home.
document: A script node that represents the current document.
formdata: A host object that provides access to multipart/form-data requests that allow file upload from a web script. This object contains the following fields:
hasField: A Boolean value that specifies the existence of a named form field in the multipart request.
fields: An array of formfield values where each element represents a field within the multipart request.
formfield: A host object that provides access to a form field within a multipart/form-data request. This object contains the following fields:
name: The name of the field.
isFile: A Boolean value that specifies whether this field represents a file.
value: A string value that represents the field value.
content: Script content that represents the content of the field.
mimetype: The MIME type of the content (null if isFile is false).
filename: The file name of the source file used to provide the content (or null if isFile is false or a filename was not specified).
person: A script node that represents the current user Person object.
server: An array of metadata properties that describe the server hosting Content Services ES. This object contains the following fields:
versionMajor: A string value that specifies the major version number.
versionMinor: A string value that specifies the minor version number.
versionRevision: A string value that specifies the server revision number.
versionLabel: A string value that specifies the server version label.
versionBuild: A string value that specfies the server build number.
version: A string value that specifies the server version.
edition: A string value that specifies the server edition.
schema: A string value that specifies the server schema.
space: A script node that represents the current space.
status: An array of response status properties that enable control over the status and content of the web script response. This object contains the following fields:
code: The status code (primarily a HTTP status code but can be any number).
codeName: Represents the status code name.
codeDescription: Represents a description of the status code.
message: Represents a message that is associated with the status code.
redirect: A Boolean value that specifies whether to redirect the status reponse template.
exception: Represents an exeption that caused this status.
userhome: A script node that represents the current users home space.
url: A host object that provides access to the URL (or parts of the URL) that invoked the web script. This object contains the following fields:
context: The context path (for example, /contentspace).
serviceContext: The service context path (for example, /contentspace/service).
service: A web script path (for example, /contentspace/service/sample/blog/search).
full: The complete URL used to invoke the web script (for example, /contentspace/service/sample/blog/search?q=company/home).
args: The arguments passed to the web script (for example, q =company/home).
match: The part of the web script URL that matched the web script URL template.
extension: The part of the web script URL that extends beyond the match path (if there is no extension, an empty string is returned).
webscript: An array of metadata properties that describe the web script. This object contains the following fields:
Id: A string value that specifies the web script identifier value.
shortName: A string value that specifies the short name of the web script.
description: A string value that specifies the description of the web script.
defaultFormat: The default response format.
formatStyle: The accepted ways of specifying the format in the web script URL.
URIs: A string array of URL templates.
method: A HTTP method used in the request.
requiredAuthentication: The required level of authentication.
requiredTransaction: The required level of transaction.
storePath : The path of the persistent store where the web script is stored.
scriptPath: The path (within storePath) of the web script implementation files.
descPath : The path (within storePath) of the web script description document.

Programming with Content Services ES > Accessing Content Services using Web Scripts > Understanding web script root objects

Programming with LiveCycle ES (LiveDocs)
Adobe LiveCycle ES Update 1

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/001680.html