Jwma

dtw.webmail.model
Interface JwmaHtmlHelper

All Known Implementing Classes:
JwmaHtmlHelperImpl

public interface JwmaHtmlHelper

An interface defining the contract for interaction with the JwmaHtmlHelper model.

The JwmaHtmlHelper helps a view programmer constructing certain reuseable HTML elements on one hand, and to obtain information important for views on the other hand (i.e. the controller URL).

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger

Method Summary
 java.lang.String displayPartInlined(javax.servlet.http.HttpSession session, JwmaMessagePart part, JwmaPreferences prefs, java.util.ResourceBundle viewcontent)
          Returns a String representing a HTML tag for embedding the message parts into the view.
 java.lang.String getAlphabeticFilter(JwmaContacts contacts, java.util.ResourceBundle viewcontent)
          Returns a String representing a HTML list of all first characters of the contact's lastnames.
 java.lang.String getCategoriesSelect(JwmaContact ct, java.lang.String[] categories, java.util.ResourceBundle viewcontent)
          Returns a String representing a category select in HTML.
 java.lang.String getCategoryFilterSelect(JwmaContacts ctdb, java.lang.String eventhandler, java.util.ResourceBundle viewcontent)
          Returns a String representing a category filter select in HTML.
 java.lang.String getContactsControllerUrl()
          Returns a String representing the URL of the ContactsController.
 java.lang.String getControllerUrl()
          Returns a String representing the URL of the main controller.
 java.lang.String getDateFormatSelect(JwmaPreferences prefs)
          Returns a String representing a DateFormat select in HTML.
 java.lang.String getDestinationsSelect(JwmaFolder[] folders)
          Returns a JwmaFolder[]containing a destination select in HTML.
 java.lang.String getFolderDisplayAction(JwmaFolder folder)
          Returns a String representing the installation specific reference URL for displaying the given folder.
 java.lang.String getFolderDisplayAction(JwmaInboxInfo info)
          Convenience method returning the URL for displaying the inbox folder.
 java.lang.String getFolderDisplayAction(JwmaTrashInfo info)
          Convenience method returning the URL for displaying the trash folder.
 java.lang.String getFrequentSelect(JwmaContacts contacts, java.lang.String eventhandler)
          Returns a String representing a frequent recipient select in HTML.
 java.lang.String getGroupMembersSelect(JwmaContactGroup group)
          Returns a String representing a group members select in HTML.
 java.lang.String getLanguageSelect(JwmaPreferences prefs)
          Returns a String representing a proper language select in HTML.
 java.lang.String getMailIdentitySelect(JwmaPreferences prefs)
          Returns a String representing a MailIdentity select in HTML.
 java.lang.String getMessageProcessorSelect(JwmaPreferences prefs)
          Returns a String representing a MessageProcessor select in HTML.
 java.lang.String getNonMembersSelect(JwmaContactGroup group, JwmaContacts ctdb)
          Returns a String representing a non group members select in HTML.
 java.lang.String getPartDescription(JwmaMessagePart part, java.util.ResourceBundle viewcontent)
          Returns a String representing a message part description in HTML.
 java.lang.String getPathHierarchyNavigator(JwmaStoreInfo storeinfo, JwmaFolder folder)
          Returns a String representing a path navigator in HTML.
 java.lang.String getPostOfficeSelect(java.lang.String postoffice)
          Returns a selection of configured post offices.
 java.lang.String getRandomAppendTypesSelect(JwmaPreferences prefs, JwmaMailIdentity mid)
          Returns a String representing a random append types select in HTML.
 java.lang.String getSendMailControllerUrl()
          Returns a String representing the URL of the SendMailController.
 java.lang.String getSizeString(int size)
          Returns a String representing the size in human readable form.
 java.lang.String getSortCriteriaSelect(JwmaPreferences prefs, java.lang.String eventhandler, java.util.ResourceBundle viewcontent)
          Returns a String representing a proper sorting criteria select in HTML.
 

Method Detail

getControllerUrl

public java.lang.String getControllerUrl()
Returns a String representing the URL of the main controller.

The URL is installation specific, this helper method allows to make views more "portable".

Returns:
the URL of the main controller as String.

getSendMailControllerUrl

public java.lang.String getSendMailControllerUrl()
Returns a String representing the URL of the SendMailController.

The URL is installation specific, this helper method allows to make views more "portable".

Returns:
the URL of the SendMailController as String.

getContactsControllerUrl

public java.lang.String getContactsControllerUrl()
Returns a String representing the URL of the ContactsController.

The URL is installation specific, this helper method allows to make views more "portable".

Returns:
the URL of the ContactsController as String.

getPostOfficeSelect

public java.lang.String getPostOfficeSelect(java.lang.String postoffice)
Returns a selection of configured post offices.

This routine constructs a select with all given post office names for the view programmer, and is supposed to be used for selecting a post office on login.

Returns:
a post offices select (HTML) as String.
See Also:
JwmaConfiguration, PostOffice

getPathHierarchyNavigator

public java.lang.String getPathHierarchyNavigator(JwmaStoreInfo storeinfo,
                                                  JwmaFolder folder)
Returns a String representing a path navigator in HTML.

This routine allows to navigate a more complex folder tree very fast and efficient. It handles the path using the actual folder separator char.

Parameters:
storeinfo - a reference to the actual store info instance.
Returns:
a path navigator (HTML) as String.

getFolderDisplayAction

public java.lang.String getFolderDisplayAction(JwmaFolder folder)
Returns a String representing the installation specific reference URL for displaying the given folder.

The String will not include the anchor tag, but represent the href attribute value.
This method is supposed to help making views more portable and simple to write.

Parameters:
folder - the JwmaFolder to be used for the display action.
Returns:
the URL for displaying the folder as String.
See Also:
JwmaFolder

getFolderDisplayAction

public java.lang.String getFolderDisplayAction(JwmaInboxInfo info)
Convenience method returning the URL for displaying the inbox folder.

Returns:
the URL for displaying the folder as String.
See Also:
getFolderDisplayAction(JwmaFolder), JwmaInboxInfo

getFolderDisplayAction

public java.lang.String getFolderDisplayAction(JwmaTrashInfo info)
Convenience method returning the URL for displaying the trash folder.

Returns:
the URL for displaying the folder as String.
See Also:
getFolderDisplayAction(JwmaFolder), JwmaInboxInfo

getDestinationsSelect

public java.lang.String getDestinationsSelect(JwmaFolder[] folders)
Returns a JwmaFolder[]containing a destination select in HTML.

This routine constructs a select with all given paths for the view programmer, and is supposed to be used for selecting a destination for certain folder, mailbox or message move operations.
Lists of paths of move targets can be obtained from JwmaStoreInfo.

Parameters:
folders - a JwmaFolder[] to be used as options for the select.
Returns:
a destinations select (HTML) as String.
See Also:
JwmaFolder, JwmaStoreInfo.listFolderMoveTargets(), JwmaStoreInfo.listMessageMoveTargets()

getFrequentSelect

public java.lang.String getFrequentSelect(JwmaContacts contacts,
                                          java.lang.String eventhandler)
Returns a String representing a frequent recipient select in HTML.

This routine constructs a select with all given frequent recipient nicks for the view programmer, and is supposed to be used for selecting a frequent recipient very quick.

Parameters:
contacts - the JwmaContacts instance.
eventhandler - added to the select.
Returns:
a frequent recipient select (HTML) as String.
See Also:
JwmaContacts

getCategoriesSelect

public java.lang.String getCategoriesSelect(JwmaContact ct,
                                            java.lang.String[] categories,
                                            java.util.ResourceBundle viewcontent)
Returns a String representing a category select in HTML.

This routine constructs a select with all given categories for the view programmer, and is supposed to be used for selecting a (user defined) category for a contact.
If the user did not define any category, the select will only have the new category option.

Parameters:
categories - the categories to be listed as options.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
a categories select (HTML) as String.
See Also:
JwmaContacts

getLanguageSelect

public java.lang.String getLanguageSelect(JwmaPreferences prefs)
Returns a String representing a proper language select in HTML.

This routine constructs a select with all available languages.

Parameters:
prefs - the users preferences as JwmaPreferences.
Returns:
a language select (HTML) as String.

getSortCriteriaSelect

public java.lang.String getSortCriteriaSelect(JwmaPreferences prefs,
                                              java.lang.String eventhandler,
                                              java.util.ResourceBundle viewcontent)
Returns a String representing a proper sorting criteria select in HTML.

This routine constructs a select with all available message sorting criterias.

Parameters:
prefs - the users preferences as JwmaPreferences.
eventhandler - added to the select.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
a sorting criteria select (HTML) as String.

getMailIdentitySelect

public java.lang.String getMailIdentitySelect(JwmaPreferences prefs)
Returns a String representing a MailIdentity select in HTML.

This routine constructs a select with the users available mail identities, the default selected.

Parameters:
prefs - the users preferences as JwmaPreferences.
Returns:
a mail identity select (HTML) as String.

getMessageProcessorSelect

public java.lang.String getMessageProcessorSelect(JwmaPreferences prefs)
Returns a String representing a MessageProcessor select in HTML.

This routine constructs a select with the available message processors, with the user's one selected.

Parameters:
prefs - the users preferences as JwmaPreferences.
Returns:
a message processor select (HTML) as String.

getDateFormatSelect

public java.lang.String getDateFormatSelect(JwmaPreferences prefs)
Returns a String representing a DateFormat select in HTML.

This routine constructs a select with date format patterns, with the user's one selected.

Parameters:
prefs - the users preferences as JwmaPreferences.
Returns:
a date format select (HTML) as String.

getRandomAppendTypesSelect

public java.lang.String getRandomAppendTypesSelect(JwmaPreferences prefs,
                                                   JwmaMailIdentity mid)
Returns a String representing a random append types select in HTML.

This routine constructs a select with the available random append types, with the user's one selected.

Parameters:
prefs - the users preferences as JwmaPreferences.
mid - a JwmaMailIdentity instance.
Returns:
a random append type select (HTML) as String.

getGroupMembersSelect

public java.lang.String getGroupMembersSelect(JwmaContactGroup group)
Returns a String representing a group members select in HTML.

This routine constructs a select with all contacts which are in the given contact group.

Parameters:
group - the JwmaContactGroup instance.
Returns:
a group members select (HTML) as String.
See Also:
JwmaContactGroup

getNonMembersSelect

public java.lang.String getNonMembersSelect(JwmaContactGroup group,
                                            JwmaContacts ctdb)
Returns a String representing a non group members select in HTML.

This routine constructs a select with all contacts which are not in the given contact group.

Parameters:
group - the JwmaContactGroup instance.
ctdb - the contact database.
Returns:
a non members contact select (HTML) as String.
See Also:
JwmaContactGroup, JwmaContacts

getPartDescription

public java.lang.String getPartDescription(JwmaMessagePart part,
                                           java.util.ResourceBundle viewcontent)
Returns a String representing a message part description in HTML.

This routine constructs a description with all given information about the part for the view programmer, and is supposed to simplify writing a view.

Parameters:
part - the part to be described in HTML.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
a message part description (HTML) as String.
See Also:
JwmaMessagePart

getSizeString

public java.lang.String getSizeString(int size)
Returns a String representing the size in human readable form.

Parameters:
size - the size (in bytes) to be described in human readable form.
Returns:
the human readable size as String.

displayPartInlined

public java.lang.String displayPartInlined(javax.servlet.http.HttpSession session,
                                           JwmaMessagePart part,
                                           JwmaPreferences prefs,
                                           java.util.ResourceBundle viewcontent)
Returns a String representing a HTML tag for embedding the message parts into the view.

This routine constructs an inline view of all given message parts in HTML. Unknown content types will be output in form of a description, others inlined by adding a proper HTML tag.

Parameters:
session - the session to store possible contact import.
prefs - the user's preferences.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
a HTML document part inlining the parts as String.
See Also:
getPartDescription(JwmaMessagePart part, ResourceBundle viewcontent), JwmaMessagePart

getAlphabeticFilter

public java.lang.String getAlphabeticFilter(JwmaContacts contacts,
                                            java.util.ResourceBundle viewcontent)
Returns a String representing a HTML list of all first characters of the contact's lastnames. The selected character will be used for the filter, as well as displayed non-selectable; an option to remove the filter is appended (ALL).

Parameters:
contacts - the actual session's contact database as JwmaContacts.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
the filter list as String (HTML).

getCategoryFilterSelect

public java.lang.String getCategoryFilterSelect(JwmaContacts ctdb,
                                                java.lang.String eventhandler,
                                                java.util.ResourceBundle viewcontent)
Returns a String representing a category filter select in HTML.

This routine constructs a select with all used categories.

Parameters:
eventhandler - added to the select.
viewcontent - the ResourceBundle containing the localized view content strings.
Returns:
a sorting criteria select (HTML) as String.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)