pureweb

The pureweb namespace is the root for all other namespaces in the JavaScript client API.

Method Summary

canJoinPlatformSession
Returns a Boolean value that indicates whether the URI contains a collaboration token.
connectToPlatform
Connect a client to the platform with a given SAT (Session access token) jwt token.
connectToServer
Connects the HTML5 client (via a standalone Tomcat server) to the service application.
disconnect
Disconnects using the client of the default framework.
getClient
Returns the client of the default framework.
getFramework
Returns the default instance of Framework, which provides a one-to-one correspondence with a remote application.
getServiceAppName
Returns the name of the service application from the specified connection URI.
isPlatformEndpoint
Tests the provided URL to see if it is a valid end point for a PureWeb platform.
joinPlatformSession
Joins a collaborative platform session using the specifiec collaboration token.
joinPlatformSessionFromUri
Joins collaborative platform session using the specified URI.
joinServerSession
Joins collaborative server (standalone Tomcat PureWeb server) session.
listen
Adds an event listener for a specific event on a DOM Node or an object.
reportException
The exception event.
unlisten
Removes an event listener which was added with listen.

Classes

IllegalArgumentException
InvalidOperationException
NullArgumentException
PureWebColor
PurewebException

Namespaces

client
events
util
xml

Members

<static> PureWebKnownColorpureweb.PureWebColor

Enumeration of the cross-platform canonical colors used by PureWeb acetate tools.
Properties:
Name Type Default Description
ALICE_BLUE pureweb.PureWebColor
sample
ANTIQUE_WHITE pureweb.PureWebColor
sample
AQUA pureweb.PureWebColor
sample
AQUAMARINE pureweb.PureWebColor
sample
AZURE pureweb.PureWebColor
sample
BEIGE pureweb.PureWebColor
sample
BISQUE pureweb.PureWebColor
sample
BLACK pureweb.PureWebColor
sample
BLANCHED_ALMOND pureweb.PureWebColor
sample
BLUE pureweb.PureWebColor
sample
BLUE_VIOLET pureweb.PureWebColor
sample
BROWN pureweb.PureWebColor
sample
BURLY_WOOD pureweb.PureWebColor
sample
CADET_BLUE pureweb.PureWebColor
sample
CHARTREUSE pureweb.PureWebColor
sample
CHOCOLATE pureweb.PureWebColor
sample
CORAL pureweb.PureWebColor
sample
CORNFLOWER_BLUE pureweb.PureWebColor
sample
CORNSILK pureweb.PureWebColor
sample
CRIMSON pureweb.PureWebColor
sample
CYAN pureweb.PureWebColor
sample
DARK_BLUE pureweb.PureWebColor
sample
DARK_CYAN pureweb.PureWebColor
sample
DARK_GOLDENROD pureweb.PureWebColor
sample
DARK_GRAY pureweb.PureWebColor
sample
DARK_GREEN pureweb.PureWebColor
sample
DARK_KHAKI pureweb.PureWebColor
sample
DARK_MAGENTA pureweb.PureWebColor
sample
DARK_OLIVE_GREEN pureweb.PureWebColor
sample
DARK_ORANGE pureweb.PureWebColor
sample
DARK_ORCHID pureweb.PureWebColor
sample
DARK_RED pureweb.PureWebColor
sample
DARK_SALMON pureweb.PureWebColor
sample
DARK_SEA_GREEN pureweb.PureWebColor
sample
DARK_SLATE_BLUE pureweb.PureWebColor
sample
DARK_SLATE_GRAY pureweb.PureWebColor
sample
DARK_TURQUOISE pureweb.PureWebColor
sample
DARK_VIOLET pureweb.PureWebColor
sample
DEEP_PINK pureweb.PureWebColor
sample
DEEP_SKY_BLUE pureweb.PureWebColor
sample
DIM_GRAY pureweb.PureWebColor
sample
DODGER_BLUE pureweb.PureWebColor
sample
FIREBRICK pureweb.PureWebColor
sample
FLORAL_WHITE pureweb.PureWebColor
sample
FOREST_GREEN pureweb.PureWebColor
sample
FUCHSIA pureweb.PureWebColor
sample
GAINSBORO pureweb.PureWebColor
sample
GHOST_WHITE pureweb.PureWebColor
sample
GOLD pureweb.PureWebColor
sample
GOLDENROD pureweb.PureWebColor
sample
GRAY pureweb.PureWebColor
sample
GREEN pureweb.PureWebColor
sample
GREEN_YELLOW pureweb.PureWebColor
sample
HONEYDEW pureweb.PureWebColor
sample
HOT_PINK pureweb.PureWebColor
sample
INDIAN_RED pureweb.PureWebColor
sample
INDIGO pureweb.PureWebColor
sample
IVORY pureweb.PureWebColor
sample
KHAKI pureweb.PureWebColor
sample
LAVENDER pureweb.PureWebColor
sample
LAVENDER_BLUSH pureweb.PureWebColor
sample
LAWN_GREEN pureweb.PureWebColor
sample
LEMON_CHIFFON pureweb.PureWebColor
sample
LIGHT_BLUE pureweb.PureWebColor
sample
LIGHT_CORAL pureweb.PureWebColor
sample
LIGHT_CYAN pureweb.PureWebColor
sample
LIGHT_GOLDENROD_YELLOW pureweb.PureWebColor
sample
LIGHT_GRAY pureweb.PureWebColor
sample
LIGHT_GREEN pureweb.PureWebColor
sample
LIGHT_PINK pureweb.PureWebColor
sample
LIGHT_SALMON pureweb.PureWebColor
sample
LIGHT_SEA_GREEN pureweb.PureWebColor
sample
LIGHT_SKY_BLUE pureweb.PureWebColor
sample
LIGHT_SLATE_GRAY pureweb.PureWebColor
sample
LIGHT_STEEL_BLUE pureweb.PureWebColor
sample
LIGHT_YELLOW pureweb.PureWebColor
sample
LIME pureweb.PureWebColor
sample
LIME_GREEN pureweb.PureWebColor
sample
LINEN pureweb.PureWebColor
sample
MAGENTA pureweb.PureWebColor
sample
MAROON pureweb.PureWebColor
sample
MEDIUM_AQUAMARINE pureweb.PureWebColor
sample
MEDIUM_BLUE pureweb.PureWebColor
sample
MEDIUM_ORCHID pureweb.PureWebColor
sample
MEDIUM_PURPLE pureweb.PureWebColor
sample
MEDIUM_SEA_GREEN pureweb.PureWebColor
sample
MEDIUM_SLATE_BLUE pureweb.PureWebColor
sample
MEDIUM_SPRING_GREEN pureweb.PureWebColor
sample
MEDIUM_TURQUOISE pureweb.PureWebColor
sample
MEDIUM_VIOLET_RED pureweb.PureWebColor
sample
MIDNIGHT_BLUE pureweb.PureWebColor
sample
MINT_CREAM pureweb.PureWebColor
sample
MISTY_ROSE pureweb.PureWebColor
sample
MOCCASIN pureweb.PureWebColor
sample
NAVAJO_WHITE pureweb.PureWebColor
sample
NAVY pureweb.PureWebColor
sample
OLD_LACE pureweb.PureWebColor
sample
OLIVE pureweb.PureWebColor
sample
OLIVE_DRAB pureweb.PureWebColor
sample
ORANGE pureweb.PureWebColor
sample
ORANGE_RED pureweb.PureWebColor
sample
ORCHID pureweb.PureWebColor
sample
PALE_GOLDENROD pureweb.PureWebColor
sample
PALE_GREEN pureweb.PureWebColor
sample
PALE_TURQUOISE pureweb.PureWebColor
sample
PALE_VIOLET_RED pureweb.PureWebColor
sample
PAPAYA_WHIP pureweb.PureWebColor
sample
PEACH_PUFF pureweb.PureWebColor
sample
PERU pureweb.PureWebColor
sample
PINK pureweb.PureWebColor
sample
PLUM pureweb.PureWebColor
sample
POWDER_BLUE pureweb.PureWebColor
sample
PURPLE pureweb.PureWebColor
sample
RED pureweb.PureWebColor
sample
ROSY_BROWN pureweb.PureWebColor
sample
ROYAL_BLUE pureweb.PureWebColor
sample
SADDLE_BROWN pureweb.PureWebColor
sample
SALMON pureweb.PureWebColor
sample
SANDY_BROWN pureweb.PureWebColor
sample
SEA_GREEN pureweb.PureWebColor
sample
SEA_SHELL pureweb.PureWebColor
sample
SIENNA pureweb.PureWebColor
sample
SILVER pureweb.PureWebColor
sample
SKY_BLUE pureweb.PureWebColor
sample
SLATE_BLUE pureweb.PureWebColor
sample
SLATE_GRAY pureweb.PureWebColor
sample
SNOW pureweb.PureWebColor
sample
SPRING_GREEN pureweb.PureWebColor
sample
STEEL_BLUE pureweb.PureWebColor
sample
TAN pureweb.PureWebColor
sample
TEAL pureweb.PureWebColor
sample
THISTLE pureweb.PureWebColor
sample
TOMATO pureweb.PureWebColor
sample
TRANSPARENT pureweb.PureWebColor
sample
TURQUOISE pureweb.PureWebColor
sample
VIOLET pureweb.PureWebColor
sample
WHEAT pureweb.PureWebColor
sample
WHITE pureweb.PureWebColor
sample
WHITE_SMOKE pureweb.PureWebColor
sample
YELLOW pureweb.PureWebColor
sample
YELLOW_GREEN pureweb.PureWebColor
sample

<static> RemoteImageFormat → string

An enumeration of the possible remote image formats.
Properties:
Name Type Default Description
JPEG string Jpeg JPEG image format.
PNG string Png PNG image format.
BASE64_JPEG string Base64Jpeg Base64 encoded JPEG image format.
BASE64_PNG string Base64Png Base64 encoded PNG image format.

<static> SupportedEncoderMimeType → string

A list of the supported mime types for image encoding. It is also possible to use the H.264 mime type for videos. See H264Renderer.
Properties:
Name Type Default Description
JPEG string image/jpeg JPEG mime type.
PNG string image/png PNG mime type.
BASE64_JPEG string image/jpeg;base64 Base64 encoded JPEG mime type.
BASE64_PNG string image/png;base64 Base64 encoded PNG mime type.

<static> version → string

The current version of the PureWeb JavaScript API.

Method Detail

<static> canJoinPlatformSession(uri) → {boolean}

Returns a Boolean value that indicates whether the URI contains a collaboration token. meaning that this URI can be used in webclient.joinPlatformSessionFromUri(). Will return true if it does, or false otherwise.
Parameters:
Name Type Description
uri string The URI that possibly contains a collaboration token.

<static> connectToPlatform(uri, token, opt_connectSessionParams)

Connect a client to the platform with a given SAT (Session access token) jwt token. If no token is provided and setauthAppKey and setAuthSecretKey have been set the client will obtain the token itself and connect
Parameters:
Name Type Argument Description
uri string The URI to connect to.
token string <optional>
token to connect with, if token is null and setauthAppKey and setAuthSecretKey have been called we will obtain the ST token on your behalf
opt_connectSessionParams Object <optional>
Additional query parameters to pass when connecting, if any. have been called we will obtain the ST token on your behalf

<static> connectToServer(uri, authinfo, opt_logoutOnClose, opt_connectSessionParams)

Connects the HTML5 client (via a standalone Tomcat server) to the service application.
Parameters:
Name Type Argument Description
uri string The URL of the service application to which the client will connect.
authinfo Object <optional>
Authentication information (username and password), if available.
opt_logoutOnClose boolean <optional>
Indicates whether to terminate The logged-in session when this connection ends.
opt_connectSessionParams Object <optional>
Additional query parameters to pass when connecting, if any.
Throws:

<static> disconnect()

Disconnects using the client of the default framework. This is a helper function.

<static> getClient() → {pureweb.client.WebClient}

Returns the client of the default framework. This is a helper function.

<static> getFramework() → {pureweb.client.Framework}

Returns the default instance of Framework, which provides a one-to-one correspondence with a remote application. This is a helper function.

<static> getServiceAppName(uri) → {string}

Returns the name of the service application from the specified connection URI.
Parameters:
Name Type Description
uri string The connection URI.

<static> isPlatformEndpoint(url, callback)

Tests the provided URL to see if it is a valid end point for a PureWeb platform. it does not say anything about service availailbility or permissions, only that the URL points to an active PureWeb platform endpoint. The boolean result will be returned in the parameters of the provided callback.
Parameters:
Name Type Argument Description
url string The URL to test.
callback function <optional>
The call back function.
Throws:
If URL is not valid
pureweb.IllegalArgumentException

<static> joinPlatformSession(collaborationToken, password)

Joins a collaborative platform session using the specifiec collaboration token.
Parameters:
Name Type Description
collaborationToken string The collaboration token.
password string The session password.

<static> joinPlatformSessionFromUri(uri, password)

Joins collaborative platform session using the specified URI.
Parameters:
Name Type Description
uri string The URI containing the collaboration token.
password string The session password.

<static> joinServerSession(uri, password)

Joins collaborative server (standalone Tomcat PureWeb server) session.
Parameters:
Name Type Description
uri string The connection URI.
password string The session password.

<static> listen(src, type, listener, opt_capture, opt_handler)

Adds an event listener for a specific event on a DOM Node or an object. A listener can only be added once to an object; if it is added again, the key for the listener is returned.
Parameters:
Name Type Argument Description
src pureweb.events.EventTarget The node on which to listen to events.
type string | Array.<string> A single event type, or an array of event types.
listener function The callback method, or an object with a handleEvent function.
opt_capture boolean <optional>
A Boolean value indicating whether to fire in capture phase (defaults to false).
opt_handler Object <optional>
The element in whose scope to call the listener.

<static> reportException()

The exception event.

<static> unlisten(src, type, listener, opt_capture, opt_handler) → {boolean}

Removes an event listener which was added with listen.
Returns a Boolean value that indicates whether the listener was there to remove.
Parameters:
Name Type Argument Description
src pureweb.events.EventTarget The target on which to stop listening to events.
type string | Array.<string> The name of the event, without the 'on' prefix.
listener function The callback method, or an object with a handleEvent function.
opt_capture boolean <optional>
A Boolean value that indicates whether the listener is fired during the capture or bubble phase of the event; this only applies to DOM-compliant browsers.
opt_handler Object <optional>
The element in whose scope to call the listener.