Sun Java System Communications Express 6 2004Q2 Customization Guide |
Chapter 9
Customizing Communications Express for a Specific DomainCommunications Express allows you to customize all the three components namely Mail, Calendar and Address Book for a specific domain. The sections contained in this chapter are,
Customizing Calendar for a Specific DomainCustomizing Calendar for a Specific Domain
The default user options that will be used for a first-time user can be configured on a per-domain basis. This means that it can exist under each domain directory. All these option values can be configured in the uwcdomainconfig.properties file.
When the user customizes a common component, then the changes will be reflected in all corresponding parent views.
Calendar can be configured and customized at two levels namely,
a) Configuring Domain Preferences
The default domain preferences for Communications Express are stored in the uwcdomain.properties which is located in <domain-dir>/domain directory. If you need to set separate preferences for each domain, you need to do the following.
b) Changing the skin under themes at the domain level
- Create a directory with the name same as the domain name in <domain-dir>/domain directory.
- Copy uwcdomain.properties file from <domain-dir>/domain directory to the newly created directory and make the following change uwc-user-attr-sunUCTheme=<name of the theme>
- Restart the web server to apply the changes
Customizing Mail for a Specific DomainThis section describes how to customize the Communications Express client interface for each domain.
To add or change a new domain name, open the default.html file
Code Example 9-1 shows the default code before changing or adding a new domain name.
Code Example 9-2 shows the change in code to change the domain example.com to siroe.net.
Code Example 9-2 Code for Changing Domains from domain example.com to siroe.net
value="example.com">example.com</option>
<option value="siroe.vsnl.net">siroe.vsnl.net </option>
Code Example 9-3 shows how to add domain siroe.net along with example.com
Code Example 9-3 Adding the domain siroe.net with example.com
value="example.com">example.com</option>
<option value="siroe.net">siroe.net </option>
You can perform the following tasks to customize the client interface:
- Create a directory for mail with the domain name under msg_svr_base/html directory.
- Populate this directory with the customized versions of the files from the default directory hierarchy.
For example, assume that you have a domain called siroe. To change the icon for siroe domain, add a new icon in the imx directory of siroe.com and change the reference to it in the main.js file. The following is the directory structure for the domain siroe.com
Table 9-1 Directory Structure for the Domain siroe.com
html/...
// default interface
html/imx/...
// default interface
html/en/...
// default interface
html/siroe.com/main.js
// refers to imx/bottle.gif
html/siroe.com/imc/bottle.gif
// refers to imx/bottle.gif
- After login, the server refers the user agent to pick the main.html file that is located in the domain/lang directory. The main.html file contains the relative references to the rest of the interface. The client requests all the files in the directory to make the interface. If these files exist in the domain/lang directory they are displayed, otherwise the default setup files from html/en/ are displayed.
If you have many domains and only a few distinct ‘brands’ then you can use links to make the server point to the correct brand:
Table 9-2 Linking Multiple Domains to few distinct brands
html/...
// default interface
html/sesta.com/...
// customized interface for brand 1
html/varrius.com -> sesta.com
// default interface
Domain From URL
The server listens to all IP addresses and presents a customized interface before the authentication occurs. The server does this by looking at the URL and determines if it contains a known domain and presents the per domain Login screen for the domain.
For example, for the per domain Login screen: http://webmail.sesta.com/, the server presents the page from the location: html/sesta.com/en/default.html.
In this case a user does not have to suffix @domain to the username to login.
Customizing Address Book for a Specific Domain and a LocaleIn address book, all UI related source files (xml/xsl) are located under <uwcinstall>/WEB-INF/ui/html/abs directory by default. To customize the UI for a domain, follow these steps.
Although all images are located under <uwcinstall>/absimx by default, you may create a directory with a domain name (e.g. <uwcinstall/absimx/sireo.com) under it and include the icons that are customizable under the newly created domain directory. Also ensure that the path reference to the newly created directory is updated in <uwcinstall>/WEB-INF/ui/html/<domain> search-images.xsl and commonimages.xsl.