Web Application Code Components |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The Web Application module checks the Skin HTTP parameter for all Stateless requests. If this parameter exists, the module tries to open a Named Skin with the specified name, otherwise the Unnamed Skin (for the addressed Domain) is used.
The Web Application module checks the Language HTTP parameter for all Stateless requests. If this parameter exists, the module uses it to selected a non-default Text DataSet for the selected Skin.
The Web Application module places certain data into datasets produced with all Stateless Requests code components. The following list specifies these "generic" dataset elements that can be used with all Stateless WSSP pages:
The following sections specify the Stateless URLs, the name of the code component called, the actions taken by the component, the dataset produced with that component, and the name of the WSSP file used to produce the HTTP response.
these URLs are used to process Login operations.
If the request has the DisableIPWatch parameter, the "Fixed IP Address" security feature will be disabled for this session, even if the Account WebUser preferences enable it.
If the request has the DisableUseCookie parameter, the "Use Cookies" security feature will be disabled for this session, even if the Account WebUser preferences enable it.
If the request has SessionSkin parameter with a string value not equal to *, the session is opened using the Skin specified with this parameter. The Skin is searched in the Domain of the logged-in user (which can be different than the Domain used to display the Login page).
If login operation was successful, the HTTP Redirect response is returned, with the Redirect URL pointing to the StartPage wssp page within a newly created Session. The StartPage is specified as the StartPage (wStartPage for WML sessions) Skin string.
If login operation was successful, but the request contained the restoreSessionPage parameter, the resume.wssp (wresume.wssp for WML sessions) page is displayed (as a Stateless one). The Result Dataset for this page contains:
this URL is used to process Password Recovery operations.
this URL is used to process Auto-Signup operations.
The component checks if the request contains one or more PublicInfo string parameters.
The value of the parameter must be one of the Public Info Attributes specified in the
Directory Integration settings. The component than checks if
there is a non-empty request parameter with this name, and adds the parameter value to the
initial Account settings.
Example: to provide a City field on the Auto-Signup
page, include the <INPUT type="hidden" name="PublicInfo" value="City"> control
and the <INPUT type="text" name="City" value="" size=30 maxLength=255> control into
the Signup.wssp HTML code.
If an Account has been created, a new WebUser Session is created, and a request for the "entry page" is sent to the Session (see above).
this URL is used to retrieve the list of the browsable Domain Mailing Lists.
The code component actually uses the generic Mailbox Code Component.
The component checks if the HTTP request contains the PrevMessage parameter with a numeric value. If it exists, the value is interpreted as the unique message ID in the list archive mailbox, and the component tries to find this message in the selected mailbox "view", and tries to find the previous message in the view.
If the next or previous message is found, its UID is added to the dataset (see below) and the generic Mailbox component is not used for processing.
If no next/previous message is found, the generic Mailbox component is used to process the HTTP request parameters and to compose the resulting dataset.
the generic Mailbox code component is used to generate the rest of the resulting dataset.
The code component actually uses the generic Message Code Component.
|
These WSSP pages are processed using datasets generated for all Stateless requests, with the following additional elements:
The disconnected.wssp page is used when an HTTP request was sent to a WebUser Session, but the session has not been found. The page is processed using a dataset generated for all Stateless requests.
HTTP requests to the "Session realm" (requests with URLs started with /Session/) are processed as Session Requests. The second component of the Session Request URL is a unique Session ID, the HTTP module uses it to find the WebUser session.
If the specified session is not found, or the Session has the Fixed Network Address option set, and the HTTP request did not come from the same IP address as the Login request that started the session, the disconnected.wssp page is displayed (see above).
After the Session is found, the Web Application module processes the rest of the request URL as the "request inside this session realm". If the request URL specifies a regular file, that file is retrieved from the Session Skin, and it is sent back to the user browser.
For each .wssp request a code component is called. It processes the HTTP request parameters and generates a result dataset. Then the .wssp file is retreived from the Skin, and it is used to compose the HTTP response.
If the result dataset does not contain the blockAlerts element, the Web Application module checks if there is a pending Alert for the session user. If one or several pending alerts are found, the Alerts code component is called, and the Alerts.wssp file is used to compose the HTTP response.
The Web Application module checks for certain HTTP request parameters and processes them for all .wssp page requests. The following list specifies these "generic" actions:
The Web Application module places certain data into datasets produced with all Session Requests code components. The following list specifies these "generic" dataset elements that can be used with all Session WSSP pages:
If a .wssp request specifies an unknown code component, but the .wssp file with the specified name can be retrieved from the Session Skin, that .wssp file is processed using the dataset with the "generic" elements only, and the result is sent back to the user browser.
The following sections specify the names of existing code components (names for .wssp requests), the actions taken by these component, and the dataset produced with these components.
The code component results are processed using the .wssp files with the same names as the code component names.
Actions
If the HTTP request contains the Create parameter and the NewName parameter is a non-empty
string, the component tries to create a mailbox with the specified name. If this operation fails,
the errorCode element with the error code text is added to the result dataset. If the mailbox
is created, the messageCode element with MailboxCreated string value is added to
the result dataset, and the created mailbox name is added to the list of subscribed mailboxes, if the
Show Subscribed Mailboxes option is selected in the Account WebUser Preferences.
If the request contains the newClass parameter, then the created mailbox is set to the specified class.
If the HTTP request contains the Filter parameter, only the mailboxes with names containing this parameter value are included into the list.
Result Dataset
The code component creates a list of all account mailboxes and aliases (if the Show All Account Mailboxes option is selected in the Account WebUser Preferences), or the list of all subscribed mailboxes (if the Show Subscribed Mailboxes option is selected). If both options are selected, these two lists are merged into one.
The HTTP request must contain the Mailbox parameter - the name of the mailbox to be displayed.
Actions
For each mailbox, the module creates a session object that contains the mailbox view parameters. When the object is created, these parameters are initiated with the Web User Preferences values.
The HTTP request Msg parameters are interpreted as "message set elements". A request can contain several parameters, and each parameter should have a numeric value - the Unique ID of a mailbox message.
If the HTTP request contains the Forward or Redirect parameter and the RedirectAddresses
parameter is not empty, a "message set" is composed using the Msg parameters, and the message set messages are
forwarded or redirected to the specified addresses.
If the HTTP request contains the ListApprove parameter and the mailbox is an "approval" mailbox for some mailing list,
the request is processed as the Redirect request with the effective address being the mailing list address.
If the operation has been successful,
the messageCode element with the MessagesForwardedInfo or MessagesRedirectedInfo string value
is added to the result dataset. Otherwise, the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the Copy or Move parameter and the MailboxName
parameter contains a name of some selectable mailbox, a "message set" is composed using the Msg parameters,
and the message set messages are copied to the specified mailbox. If the Move parameter was
specified, the message set messages are marked as Deleted, deleted, or moved to Trash - depending on the
WebUser Preferences.
If the operation has been successful,
the messageCode element with the MessagesCopiedInfo string value
is added to the result dataset. Otherwise, the errorCode element with the operation
error code string value is added to the result dataset.
If the WebUser Preferences DeleteMethod option is set to Move To Trash, and the HTTP request contains the Delete parameter, a "message set" is composed using the Msg parameters, the message set messages are copied to the Trash mailbox and deleted. If the Trash mailbox did not exist, it is created.
If the HTTP request contains the DeleteAll parameter, all mailbox messages are deleted, using the method specified with the WebUser Preferences DeleteMethod option.
If the HTTP request contains the read, unread, flag, unflag, delete, or undelete
parameters, a "message set" is composed using the Msg parameters, and
the flags for the message set messages are modified. The delete and undelete parameters
are processed in this way only if the WebUser Preferences DeleteMethod option is not set to Move To Trash.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
If the WebUser Preferences DeleteMethod option is not set to Move To Trash, and
the HTTP request contains the Purge parameter, all mailbox messages with the Deleted
flag are deleted.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the NextMessage parameter with a numeric value, the value is interpreted as the unique ID (UID) of a mailbox message, and the component tries to find the next mailbox message. If such a message is found, its UID is added to the Result Dataset as the messageJump element.
If the HTTP request contains the PrevMessage parameter with a numeric value, the value is interpreted as the UID of a mailbox message, and the component tries to find the previous mailbox message. If such a message is found, its UID is added to the Result Dataset as the messageJump element.
If the HTTP request contains the NextUnread parameter and the mailbox contains an unread message, the UID of that unread message is added to the Result Dataset as the messageJump element.
If the messageJump element was not added to the Result Dataset, the code component uses the generic Mailbox component to process the HTTP request parameters and to compose the resulting dataset.
Result Dataset
The generic Mailbox code component is used to generate the rest of the resulting dataset.
Processed in the same way as the Mailbox page.
Processed in the same way as the Mailbox page.
The HTTP request must contain the Mailbox parameter - the name of a Calendar-type mailbox to be displayed.
Actions
For each mailbox, the module creates a session object that contains the mailbox view parameters. When the object is created, these parameters are initiated with the Web User Preferences values. The object also contains the month number for the "monthly calendar" view. It is initially set to the current month. The object contains the day number that specifies the first day to be displayed in the Calendar view. The object also contains the "byDay" flag that controls how the calendar data is stored in the dataset (by days or by time intervals).
The HTTP request prevMonthlyCalendar parameter can specify the number of months to be substructed from the "monthly calendar" month number.
The HTTP request nextMonthlyCalendar parameter can specify the number of months to be added to the "monthly calendar" month number.
The HTTP request JumpDay parameter can specify the "day number in the epoch" that will become the first day to be displayed in the Calendar view.
The HTTP request byDay parameter can specify the new byDay flag value.
The HTTP request Msg parameters are interpreted as "message set elements". A request can contain several parameters, and each parameter should have a numeric value - the Unique ID of a mailbox message.
If the WebUser Preferences DeleteMethod option is set to Move To Trash, and the HTTP request contains the Delete parameter, a "message set" is composed using the Msg parameters, the message set messages are copied to the Trash mailbox and deleted. If the Trash mailbox did not exist, it is created.
If the HTTP request contains the read, unread, flag, unflag, delete, or undelete
parameters, a "message set" is composed using the Msg parameters, and
the flags for the message set messages are modified. The delete and undelete parameters
are processed in this way only if the WebUser Preferences DeleteMethod option is not set to Move To Trash.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
If the WebUser Preferences DeleteMethod option is not set to Move To Trash, and
the HTTP request contains the Purge parameter, all mailbox messages with the Deleted
flag are deleted.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
Result Dataset
The "Event elements" are:
The HTTP request must contain the Mailbox parameter - the name of a Tasks-type mailbox to be displayed.
Actions
For each mailbox, the module creates a session object that contains the mailbox view parameters. When the object is created, these parameters are initiated with the Web User Preferences values. The object contains the day number that specifies the first day to be displayed in the Tasks view.
The HTTP request JumpDay parameter can specify the "day number in the epoch" that will become the first day to be displayed in the Tasks view.
The HTTP request Msg parameters are interpreted as "message set elements". A request can contain several parameters, and each parameter should have a numeric value - the Unique ID of a mailbox message.
If the WebUser Preferences DeleteMethod option is set to Move To Trash, and the HTTP request contains the Delete parameter, a "message set" is composed using the Msg parameters, the message set messages are copied to the Trash mailbox and deleted. If the Trash mailbox did not exist, it is created.
If the HTTP request contains the read, unread, flag, unflag, delete, or undelete
parameters, a "message set" is composed using the Msg parameters, and
the flags for the message set messages are modified. The delete and undelete parameters
are processed in this way only if the WebUser Preferences DeleteMethod option is not set to Move To Trash.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
If the WebUser Preferences DeleteMethod option is not set to Move To Trash, and
the HTTP request contains the Purge parameter, all mailbox messages with the Deleted
flag are deleted.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
The HTTP request showCompleted parameter can specify the new showCompleted flag value.
Result Dataset
The HTTP request must contain the Mailbox parameter (the name of the mailbox containing the messages to be displayed), and the MSG parameter - the Unique ID of that message in the mailbox.
If the HTTP request contains the Redirect parameter and the RedirectAddresses
parameter is not empty,the message is redirected to the specified addresses.
If the HTTP request contains the ListApprove parameter and the message mailbox is an "approval" mailbox for some mailing list,
the request is processed as the Redirect request with the effective address being the mailing list address.
If the operation has been successful,
the messageCode element with the MessageRedirected string value
is added to the result dataset. Otherwise, the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the TakeAddress parameter the message From: address is added to the Account address book.
If the HTTP request contains the TakeCertificate parameter the certificate from the message digital signature is added to the Account address book.
If the HTTP request contains the StoreFiles parameter and the selectedWebFolder
parameter contains a name of a Personal File Site folder, the file parts of the message (attachments, images) are stored
in the specified File Site folder.
If the operation has been successful,
the messageCode element with the FilesCopied string value
is added to the result dataset. Otherwise, the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the read, unread, flag, unflag, delete, or undelete
parameters, the message flags are modified.
If the operation has not been successful, the errorCode element with the operation
error code string value is added to the result dataset.
Then the code component use the generic Message component to process the HTTP request parameters and the compose the resulting dataset.
The optional Operation HTTP request parameter specifies the type of the
Compose operation and it can have the Reply, ReplyAll, Forward, or EditDraft value.
If this parameter is specified, the OrigMessage parameter (with the UID of the
original message) and the OrigMailbox parameter (with the name of the mailbox containing
the original message) must be specified.
If the HTTP request contains the Operation parameter and it does not contain the filled parameter,
the original message header fields are used to compose the Subject, To, Cc, and the message body data for the new message.
Otherwise, the Subject, To, Cc, Bcc, and Body HTTP request parameters are
used as the new message data.
If the HTTP request contains the AddressBook parameter and it does not contain the CloseBook parameter, or if HTTP request contains the OpenBook parameter the generic AddressBook code component is used to process the request parameters and to form some result dataset elements.
If the HTTP request contains the isEvent parameter, the Calendar Event item is being composed. If the HTTP request contains the isTask parameter, the Calendar Task (ToDo) item is being composed. If the HTTP request contains the isNote parameter, the Note item is being composed.
If the HTTP request contains the Send parameter, the composed message is submitted
to the Server Queue. If the HTTP request contains the Save parameter, the composed
message is stored as a Draft in the selected Drafts mailbox.
In both cases all HTTP request Attachment parameters are added to the message
as attachments.
The following elements are added if the item being composed is a Calendar item:
The HTTP request must contain the Mailbox parameter - the name of the mailbox to manage.
If the HTTP request contains the Rename parameter and the NewName parameters
is not empty, the mailbox is renamed. The NewName parameter value is converted into the "UTF-7 Mailbox Name encoding"
format and is used as the new mailbox name.
If the HTTP request also contains the RenameSub parameter, all mailbox submailboxes
are renamed, too.
If the operation has been successful and the Show Subscribed Mailboxes option is selected
in the WebUser Preferences, the renamed mailbox(es) are renamed in the account subscription list.
If the operation has been successful, the removed element with the Yes string
value is added to the result data set and the code component stops request processing. Otherwise,
the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the Update parameter, the code component retreieves all
Acc parameters from the request. Each Acc parameter should have a numeric value.
For each retreieved Acc parameter value nnn, the Znnn parameter is
retrieved. If it contains a non-empty string, all Knnn request parameters are retrieved,
where K is a mailbox access right letter.
The list of Znnn name strings with their Knnn parameter sets are used to
form and set the new ACL list for the selected mailbox.
If the ACL update operation has been successful,
the messageCode element with the Updated string value
is added to the result dataset. Otherwise, the errorCode element with the operation
error code string value is added to the result dataset.
If the HTTP request contains the DeleteAll parameter, all mailbox messages are deleted, using the method specified with the WebUser Preferences DeleteMethod option. If the operation has been successful, the messageCode element with the MessagesDeleted string value is added to the result dataset.
This code component can be called implicitly, if the Web Application module has detected a pending Alert message.
If the HTTP request contains the returnURL parameter, the parameter value is added to the result dataset (as the returnURL element).
If the HTTP request contains the Update parameter:
If the password has been updated successfully, the messageCode element with the PasswordChanged string value is added to the result dataset. If the password update operation failed, the errorCode element is added to the result dataset.
If the Public Info settings have been updated successfully, the messageCode element with the Updated string value is added to the result dataset. If the password update operation failed, the errorCode element is added to the result dataset.
The code component uses the generic WebSite component to process the HTTP parameters and to form the result dataset. Before the generic component is called, the following elements are added to the result dataset:
If the HTTP request parameter Skip exists, it should have a numeric value. This number is used to set the current first message index - the number of the first message to be displayed on this page.
If the HTTP request contains the parameter Next, then the current first message index is increased by the current Limit value.
If the HTTP request contains the parameter Prev, then the current first message index is decreased by the current Limit value.
If the HTTP request contains the parameter Sort, its numeric value specifies the number of "sorting" column (to sort the mailbox view by the first column, the Sort parameter should be 0).
If the HTTP request contains the parameter SDir, its numeric value specifies the sorting order: the value 1 requests ascending order, the value 0 - descending order, the value -1 reverses the current sorting order.
The generic Message component is used to convert the an RFC822 message into an HTML text. It processes simple and multi-part messages, attachements, digests, inline images and other letter components. To build a HTML presentation, the component uses Code Components for Message Rendering.
Message Rendering code components do not perform any actions.
A Result Dataset produced by every Message Rendering code component includes the following fields:
The following Message Rendering code components are implemented:
This code component is used to render a mail message - a message stored in a mailbox or a message/rfc822 MIME subpart of some other message.
Result Dataset
This code component is used to render an RFC822 mail message header.
Result Dataset
This code component is used to render an image or an attachment. Images and attachments can be separate MIME parts, or can be embedded into text parts using UUENCODE encoding.
Result Dataset
This code component is used to render a message/report MIME subpart.
Result Dataset
This code component is used to render a message/disposition-notification MIME subpart.
Result Dataset
This code component is used to render an encrypted MIME subpart.
Result Dataset
This code component is used to render a signed MIME subpart.
Result Dataset
This code component is used to render an iCalendar subpart.
Result Dataset
This code component is used to render an vCard subpart.
Result Dataset
The Server returns the 301 ("Moved") response code with the Location header containing the specified URL.
The Server also processed the <RELREDIRECT> tag at the beginning of the document. It is processed in the same way as the <REDIRECT> tag, but the URL placed into the Location header is prefixed with the http or https prefix, the server name (and, optionally, port number) retrieved from the request URL.