Software AG Products 10.5 | CentraSite for Developers | Customizing CentraSite | Customization of CentraSite Control | Customizing the Welcome Page | Installing the Customized Welcome Page
 
Installing the Customized Welcome Page
The Welcome page is implemented as a CentraSite Control extension point in the context of CentraSite's pluggable UI architecture. To install the customized Welcome page, you have to modify CentraSite Control's pluggable UI configuration in the Software AG Runtime environment.
1. Stop Software AG Runtime.
2. Update the plugin.xml configuration file.
The standard plugin.xml configuration file delivered with the CentraSite kit contains all the names of the CentraSite Control extension points, including the extension point for the Welcome page. You must update this file to contain the definition of the customized Welcome page. The configuration file is located in the folder <RuntimeDir>\workspace\webapps\PluggableUI\CentraSiteControl.
There are two elements in the standard plugin.xml file that refer to the Welcome page. The first part defines the name of the extension point to be used for the Welcome page.
<extension-point id="welcomePage">
</extension-point>
The second part defines the Java class that implements the Welcome page.
<!-- Welcome Page -->
<extension
point="com.centrasite.control.welcomePage"
id="welcomePage"
class="com.centrasite.control.ext.welcome.standard.WelcomePage">
</extension>
The point attribute of the extension element in the second part must match the name given by the id attribute of the plugin element (usually in the first line in the plugin.xml file) concatenated with a dot and the id attribute of the extension-point element in the first part. For example, if the id attribute of the plugin element is com.centrasite.control and the id attribute of the extension-point element is welcomePage, then the value of point attribute of the extension element must be com.centrasite.control.welcomePage. The Java class identified by the class attribute of the extension element must implement the interface IWelcomePage. To use the customized Welcome page instead of the standard Welcome page, set the class attribute to the customized Java class that implements the interface IWelcomePage. The changes that you make in plugin.xml take effect the next time Software AG Runtime is started.
Note:
Instead of overwriting the standard element in plugin.xml, you may want to retain a copy of the original element and comment it out. This helps when you want to revert to the original Welcome page.
3. Deploy the new Java classes to the PluggableUI environment.
You have to copy the Java classes for your customized Welcome page to the CentraSite Control location in Software AG Runtime. There are two ways of doing this:
*Create a jar file containing the class files for the customized Welcome page, and copy the jar file to the CentraSiteControl\lib folder in Software AG Runtime.
*Copy the class files to the CentraSiteControl\classes folder and its subfolders, according to the naming convention of the Java package that contains the classes. For example, if your package name is com.centrasite.control.ext.welcome.sample, then copy the classes to the CentraSiteControl\classes\com\centrasite\control\ext\welcome\sample folder.
You can also combine these methods and define some classes using a jar file in the lib folder and some classes as class files in the appropriate subfolder of the classes folder. If you have defined a class in both lib and a subfolder of classes, the class in the CentraSiteControl\classes subfolder will be used. If you have defined new icons for the customized Welcome page, you have to copy the icons to the appropriate location under the CentraSiteControl folder. If, for example, your code contains the definition public String getImage() { return "images/my_welcome_icon.png"; }, ensure that the icon my_welcome_icon.png is copied to CentraSiteControl\images.
4. Start Software AG Runtime.
The changes you have made should now be visible when you view the Welcome Page.