|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--dtw.webmail.model.JwmaHtmlHelperImpl
Class implementing the JwmaHtmlHelper.
Actually represents an utility class that helps to keep complex logic out of the views.
Constructor Summary | |
JwmaHtmlHelperImpl()
|
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 info,
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JwmaHtmlHelperImpl()
Method Detail |
public java.lang.String getControllerUrl()
JwmaHtmlHelper
The URL is installation specific, this helper method allows to make views more "portable".
getControllerUrl
in interface JwmaHtmlHelper
public java.lang.String getSendMailControllerUrl()
JwmaHtmlHelper
The URL is installation specific, this helper method allows to make views more "portable".
getSendMailControllerUrl
in interface JwmaHtmlHelper
public java.lang.String getContactsControllerUrl()
JwmaHtmlHelper
The URL is installation specific, this helper method allows to make views more "portable".
getContactsControllerUrl
in interface JwmaHtmlHelper
public java.lang.String getPostOfficeSelect(java.lang.String postoffice)
JwmaHtmlHelper
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.
getPostOfficeSelect
in interface JwmaHtmlHelper
JwmaConfiguration
,
PostOffice
public java.lang.String getPathHierarchyNavigator(JwmaStoreInfo info, JwmaFolder folder)
JwmaHtmlHelper
This routine allows to navigate a more complex folder tree very fast and efficient. It handles the path using the actual folder separator char.
getPathHierarchyNavigator
in interface JwmaHtmlHelper
info
- a reference to the actual store info instance.
public java.lang.String getFolderDisplayAction(JwmaFolder folder)
JwmaHtmlHelper
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.
getFolderDisplayAction
in interface JwmaHtmlHelper
folder
- the JwmaFolder to be used for the
display action.
JwmaFolder
public java.lang.String getFolderDisplayAction(JwmaInboxInfo info)
JwmaHtmlHelper
getFolderDisplayAction
in interface JwmaHtmlHelper
JwmaHtmlHelper.getFolderDisplayAction(JwmaFolder)
,
JwmaInboxInfo
public java.lang.String getFolderDisplayAction(JwmaTrashInfo info)
JwmaHtmlHelper
getFolderDisplayAction
in interface JwmaHtmlHelper
JwmaHtmlHelper.getFolderDisplayAction(JwmaFolder)
,
JwmaInboxInfo
public java.lang.String getDestinationsSelect(JwmaFolder[] folders)
JwmaHtmlHelper
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.
getDestinationsSelect
in interface JwmaHtmlHelper
folders
- a JwmaFolder[] to be used as
options for the select.
JwmaFolder
,
JwmaStoreInfo.listFolderMoveTargets()
,
JwmaStoreInfo.listMessageMoveTargets()
public java.lang.String getLanguageSelect(JwmaPreferences prefs)
JwmaHtmlHelper
This routine constructs a select with all available
languages.
getLanguageSelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.
public java.lang.String getSortCriteriaSelect(JwmaPreferences prefs, java.lang.String eventhandler, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
This routine constructs a select with all available
message sorting criterias.
getSortCriteriaSelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.eventhandler
- added to the select.viewcontent
- the ResourceBundle containing the
localized view content strings.
public java.lang.String getFrequentSelect(JwmaContacts contacts, java.lang.String eventhandler)
JwmaHtmlHelper
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.
getFrequentSelect
in interface JwmaHtmlHelper
contacts
- the JwmaContacts instance.eventhandler
- added to the select.
JwmaContacts
public java.lang.String getCategoriesSelect(JwmaContact ct, java.lang.String[] categories, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
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.
getCategoriesSelect
in interface JwmaHtmlHelper
categories
- the categories to be listed as options.viewcontent
- the ResourceBundle containing the
localized view content strings.
JwmaContacts
public java.lang.String getMessageProcessorSelect(JwmaPreferences prefs)
JwmaHtmlHelper
This routine constructs a select with the available
message processors, with the user's one selected.
getMessageProcessorSelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.
public java.lang.String getRandomAppendTypesSelect(JwmaPreferences prefs, JwmaMailIdentity mid)
JwmaHtmlHelper
This routine constructs a select with the available
random append types, with the user's one selected.
getRandomAppendTypesSelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.mid
- a JwmaMailIdentity instance.
public java.lang.String getDateFormatSelect(JwmaPreferences prefs)
JwmaHtmlHelper
This routine constructs a select with date format
patterns, with the user's one selected.
getDateFormatSelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.
public java.lang.String getMailIdentitySelect(JwmaPreferences prefs)
JwmaHtmlHelper
This routine constructs a select with the users available
mail identities, the default selected.
getMailIdentitySelect
in interface JwmaHtmlHelper
prefs
- the users preferences as JwmaPreferences.
public java.lang.String getGroupMembersSelect(JwmaContactGroup group)
JwmaHtmlHelper
This routine constructs a select with all contacts which are in the given contact group.
getGroupMembersSelect
in interface JwmaHtmlHelper
group
- the JwmaContactGroup instance.
JwmaContactGroup
public java.lang.String getNonMembersSelect(JwmaContactGroup group, JwmaContacts ctdb)
JwmaHtmlHelper
This routine constructs a select with all contacts which are not in the given contact group.
getNonMembersSelect
in interface JwmaHtmlHelper
group
- the JwmaContactGroup instance.ctdb
- the contact database.
JwmaContactGroup
,
JwmaContacts
public java.lang.String displayPartInlined(javax.servlet.http.HttpSession session, JwmaMessagePart part, JwmaPreferences prefs, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
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.
displayPartInlined
in interface JwmaHtmlHelper
session
- the session to store possible contact import.prefs
- the user's preferences.viewcontent
- the ResourceBundle containing the
localized view content strings.
JwmaHtmlHelper.getPartDescription(JwmaMessagePart part, ResourceBundle viewcontent)
,
JwmaMessagePart
public java.lang.String getPartDescription(JwmaMessagePart part, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
This routine constructs a description with all given information about the part for the view programmer, and is supposed to simplify writing a view.
getPartDescription
in interface JwmaHtmlHelper
part
- the part to be described in HTML.viewcontent
- the ResourceBundle containing the
localized view content strings.
JwmaMessagePart
public java.lang.String getSizeString(int size)
JwmaHtmlHelper
getSizeString
in interface JwmaHtmlHelper
size
- the size (in bytes) to be described in
human readable form.
public java.lang.String getAlphabeticFilter(JwmaContacts contacts, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
getAlphabeticFilter
in interface JwmaHtmlHelper
contacts
- the actual session's contact database as
JwmaContacts.viewcontent
- the ResourceBundle containing the
localized view content strings.
public java.lang.String getCategoryFilterSelect(JwmaContacts ctdb, java.lang.String eventhandler, java.util.ResourceBundle viewcontent)
JwmaHtmlHelper
This routine constructs a select with all used
categories.
getCategoryFilterSelect
in interface JwmaHtmlHelper
eventhandler
- added to the select.viewcontent
- the ResourceBundle containing the
localized view content strings.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |