Namespace: Consultingwerk.Web
Class 
WebUtilities Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:WebUtilities
Purpose:Wrapper to web-util methods (WebSpeed API)
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Fri May 25 22:25:55 CEST 2012



Top Method Summary
Options Name Purpose
+ CHARACTER GetCookie (character) Given a cookie name, returns one or more matching values.
+ CHARACTER GetField (character) Retrieves the associated value for the specified form field.
+ CHARACTER GetUserField (character) Retrieves the associated value for the specified user field that was set with set-user-field().
+ CHARACTER GetValue (character) Retrieves the first available value for a user field, field or cookie
+ OutLong (memptr) Writes a BLOB to the WebStream
+ OutputMetaHttpEquiv (ListNameValuePair) Outputs a list of meta http-equiv tags (usually in the html header)
+ OutputMetaHttpEquiv (NameValuePair) Outputs a single meta http-equiv tag (usually in the html header)
+ RunPageObject (character) Runs an object oriented web object
+ RunWebObject (character) Runs a procedural web object
+ CHARACTER SetCookie (character, character, date, integer, character, character, character) Outputs an HTTP Set-Cookie header with specified options
+ SetUserField (character, character) Set's a value for a user field
+ CHARACTER UrlEncode (character, UrlEncodeTypeEnum) Encodes unsafe characters in a URL as per RFC 1738 section 2.2. http://ds.internic.net/rfc/rfc1738.txt, 2.2
+ CHARACTER UrlToDataObject (Class) Returns an absolute URL to a json data source
+ CHARACTER UrlToPageObject (Page) Returns an absolute URL to a Page object
+ CHARACTER UrlToPageObject (Class) Returns an absolute URL to a web object

Top Constructor Summary
Options Name Purpose
WebUtilities () Static constructor for the WebUtilities class
- WebUtilities () Disallow instance creation


Method Detail
Top

PUBLIC CHARACTER GetCookie (character)

Purpose: Given a cookie name, returns one or more matching values.
Notes: If more than one value matches, all are returned delimited by the
value of SelDelim, normally a comma. If ? is specified for the
name, the output will be a list of all the cookie names.

Parameters:
pcCookieName CHARACTER
The name of the cookie
Returns CHARACTER
The cookie value
Top

PUBLIC CHARACTER GetField (character)

Purpose: Retrieves the associated value for the specified form field.
Notes:

Parameters:
pcFieldName CHARACTER
Name of field or ?
Returns CHARACTER
Value of field or blank if invalid field name. If ? was specified for the name, the list of fields is returned.
Top

PUBLIC CHARACTER GetUserField (character)

Purpose: Retrieves the associated value for the specified user field
that was set with set-user-field().
Notes:

Parameters:
pcFieldName CHARACTER
Name of user field or ?
Returns CHARACTER
Value of user field or blank if invalid name. If ? was specified for the name, the list of user fields is returned.
Top

PUBLIC CHARACTER GetValue (character)

Purpose: Retrieves the first available value for a user field, field or cookie
Notes:

Parameters:
pcFieldName CHARACTER
Name of user field or ?
Returns CHARACTER
Value of user field, form field or Cookie in that order or blank if an invalid name. If ? was specified for the name, a comma separated list of all user fields, fields and cookies is returned.
Top

PUBLIC OutLong (memptr)

Purpose: Writes a BLOB to the WebStream
Notes:

Parameters:
pmObject MEMPTR
The MEMPTR for the WebStream to export
Top

PUBLIC OutputMetaHttpEquiv (ListNameValuePair)

Purpose: Outputs a list of meta http-equiv tags (usually in the html header)
Notes:

Parameters:
poNameValues Consultingwerk.ListNameValuePair
A list of pairs of name and the value to output
Top

PUBLIC OutputMetaHttpEquiv (NameValuePair)

Purpose: Outputs a single meta http-equiv tag (usually in the html header)
Notes:

Parameters:
poNameValue Consultingwerk.NameValuePair
The pair of name and the value to output
Top

PUBLIC RunPageObject (character)

Purpose: Runs an object oriented web object
Notes:

Parameters:
pcPageObject CHARACTER
The web page object to run (Consultingwerk.Web.Widgets.IPage)
Top

PUBLIC RunWebObject (character)

Purpose: Runs a procedural web object
Notes:

Parameters:
pcWebObject CHARACTER
The web object to run (procedure)
Top

PUBLIC CHARACTER SetCookie (character, character, date, integer, character, character, character)

Purpose: Outputs an HTTP Set-Cookie header with specified options
Notes: Cookie will be send to web-stream and returned by this method

Parameters:
pcName CHARACTER
The Cookie Name, must be specified
pcValue CHARACTER
The Cookie Value, can be blank which is typically used when deleting a cookie
pdDate DATE
Expires date is an optional parameter expression evaluating to a DATE data type. This is used to set an expiration time on a cookie. For instance, TODAY + 1 = tomorrow; TODAY + 365 = same day next year; TODAY - 1 = yesterday. If the cookie should only persist for the duration of the browser session, specify ?
piTime INTEGER
Expires time is an optional parameter expression evaluating to an INTEGER data type to the number of seconds since midnight. This is only meaningful if an expression other than ? is specified for the Expires date. The expression can be a very large or small number (greater or less than the number of seconds in a day) which will be normalized to fit within a day. In this case, the Expires date will be incremented or decremented as appropriate. Specifying small numbers into the future e.g. TIME + 5 * 60 (five minutes from now) may not expire when desired due to differences in the clock of the user's machine running the browser vs. the clock of the machine running the application. Specify ? if setting an expiration time is not desired.
pcPath CHARACTER
Path is the URL path below which the Cookie will be sent. If ? is specified, the default is the value of the AppURL global variable unless the Cookie Path configuration option is set in which case it will be used instead. which is the URL common to all programs within an application. To delete a cookie, this value must be the same as it was when the cookie was set.
pcDomain CHARACTER
Domain is an optional parameter with the internet domain, i.e. ".progress.com". If ? is specified, the domain will be the current host or if specified, the value of the Cookie Domain configuration option. To delete a cookie, this value must be the same as it was when the cookie was set.
pcOptions CHARACTER
Comma-delimited options: "SECURE" - If specified, the web browser will only send the Cookie back when on a secure (SSL) connection (using https). "UTC" - Assume date and time are UTC based elimitating any conversion that would otherwise be required from local time to UTC time. "LOCAL" - (Default) Assume date and time are based on local time and need conversion to UTC. The "SECURE" option can be combined with either the "UTC" or "LOCAL" options, i.e. "SECURE,UTC".
Returns CHARACTER
The cookie value
Top

PUBLIC SetUserField (character, character)

Purpose: Set's a value for a user field
Notes:

Parameters:
pcName CHARACTER
The name of the user field to set
pcValue CHARACTER
The value for the user field
Top

PUBLIC CHARACTER UrlEncode (character, UrlEncodeTypeEnum)

Purpose: Encodes unsafe characters in a URL as per RFC 1738 section 2.2.
http://ds.internic.net/rfc/rfc1738.txt, 2.2
Notes:

Parameters:
pcValue CHARACTER
Character string to encode
poEncoding Consultingwerk.Web.UrlEncodeTypeEnum
Encoding option where "query", "cookie", "default" or any specified string of characters are valid.
Returns CHARACTER
The encoded character string
Top

PUBLIC CHARACTER UrlToDataObject (Class)

Purpose: Returns an absolute URL to a json data source
Notes:

Parameters:
poClass Progress.Lang.Class
The reference to the Class of the web object who's URL is required
Returns CHARACTER
The absolute URL to the web object
Top

PUBLIC CHARACTER UrlToPageObject (Page)

Purpose: Returns an absolute URL to a Page object
Notes:

Parameters:
poPage Consultingwerk.Web.Widgets.Page
The reference to the Page object who's URL is required
Returns CHARACTER
The absolute URL to the Page object
Top

PUBLIC CHARACTER UrlToPageObject (Class)

Purpose: Returns an absolute URL to a web object
Notes:

Parameters:
poClass Progress.Lang.Class
The reference to the Class of the web object who's URL is required
Returns CHARACTER
The absolute URL to the web object


Constructor Detail
Top

STATIC WebUtilities ()

Purpose: Static constructor for the WebUtilities class
Notes:

Top

PRIVATE WebUtilities ()

Purpose: Disallow instance creation
Notes:



©2006-2019 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       08.08.2019 23:58:37