|
XPlanner Customization
Modifying XPlanner appearance.CSS style sheetXPlanner CSS styling information is in a file called default.css. Many aspects of XPlanner appearance can be modified using this file. Header, footer, page layoutXPlanner uses the Struts Tiles framework for page layout. The header and footer JSP files are in WEB-INF/jsp/common. The Tiles page layout template is in WEB-INF/jsp/layout. This template can be modified, for example, to add a side-menu or add other site-specific content to the XPlanner pages.Custom wiki-style linking to external applications.XPlanner provides a simple mechanism for integrating with external applications such as shared, collaborative workspaces, bug tracking systems, etc. When text in a story, task, or note includes a URL, a hyperlink is automatically created. XPlanner knows to do this conversion because of the URL scheme (usually the protocol) like http, mailto, ftp, etc. You can define custom schemes in XPlanner by editing the resources/xplanner.properties file before building your WAR file. To demonstrate the use of custom schemes, a few examples are already included. twiki.scheme.sourceforge=http://sourceforge.net/projects/$1 twiki.scheme.sfbug=http://sourceforge.net/projects/$1 This example configuration defines two schemes: sourceforge and sfbug. For example, in story description one could type "sourceforge:xplanner" and the formatted text would show sourceforge:xplanner (a link to that project). Any value typed after the scheme (in this case "xplanner") will replace the $1 in the scheme definition. We've used this mechanism to integrate XPlanner with Jira, Bugzilla, TWiki, and ViewCVS, for example. Creating wiki adaptersThe simple wiki linking doesn't give any indication of whether a wiki word is defined in the external wiki or not. A wiki adapter can be used to provide somewhat better integration with the external wiki. The interface is very simple. package com.technoetic.xplanner.wiki;
public interface ExternalWikiAdapter {
String formatWikiWord(String wikiWord);
}
The typical formatting for a known wiki word is to create a link to the wiki page associated with the word. Unknown words are usually formatted with a "?" link that allows a user to define the word. However, the behavior depends completely on the adapter implementation. For example the SimpleWikiAdapter that implements the simple scheme-based formatting (using the twiki.scheme.wiki property) always formats the word as a link whether the word is defined or not. XPlanner provides a GenericWikiAdapter which is suitable for the most common wiki integration needs. This adapter uses several properties from xplanner.properties to implement the wiki integration. The properties are shown in the following table.
Once a wiki word is know to exist, this information is cached for performance purposes. Adapters that add features for specific wiki implementations can extend this class. For example, XPlanner includes an adapter for the TWiki wiki that supports subwiki names. Customize authentication behaviorXPlanner performs authentication using servlet filters. Several filters are included in XPlanner.
Look at the web.xml and the implementation of the security filters to see how to install them and what initialization properties they support. Creating a custom login moduleThe security filters customize the servlet container authentication behavior but the actual authentication is performed with a login module (com.technoetic.xplanner.security.LoginModule). Subclasses of the login module interface implement various authentication mechanisms. The default XPlanner login module uses the XPlanner database for authentication. There is also a JNDI login module (LDAP) and a JAAS login module adapter for using JAAS authentication modules (experimental). When the login module attempts to authenticate a user, it will add a security subject to the servlet session if the authentication is successful. It will throw an AuthenticationException if not. The module also indicates whether it supports modification of passwords. If it is capable, the module implements the password modification. Customize chartsThe display of charts can be customized using properties. See the xplanner.properties file for the related properties. Override the properties in an xplanner-custom.properties. The size of the charts can also be configured through properties. The charts are updated every night at midnight by default. This is configured in the xplanner.properties file under the property xplanner.datasampling.job. It follows the Quartz cron job format described here. To change the frequency or the time, add the property to your xplanner-custom.properties file. ### Quartz Configuration ### Customize Progress Bar Rendering The HTML progress bars have served well in providing a lightweight representation. However, some browsers do not render the bars well (or at all) when the page is printed. We added a new image progress bar that prints well (it will be grayscale in the printing version of each page) and includes the actual time in the bar (therefore saving the actual column space). However since it will require a round trip for each progress bar it might be too much overhead for some low bandwidth connections. To switch the progress bar rendering to image, add the following property to your xplanner-custom.properties file. # implementation can be either 'html' or 'image'. |