Console module schemas
Descriptors for a console module
Console modules are packaged as portal application archives (PAA). A portal application archive is similar to a standard JSR 168 portlet WAR file - it includes one or more portlets plus the servlet and portlet descriptors (web.xml and portlet.xml) However, the portal application archive includes two additional descriptors:
- ibm-portal-topology.xml
- Defines the console module and its components, page layout, and location in the navigation. Based on the schema definitions in ibm-portal-topology.xsd.
- ibm-portal-security.xml
- Describes portal application security, such as application roles and access control. Based on the schema definitions in ibm-portal-security.xsd.
When a console module is deployed, Integrated Solutions Console reads these descriptors and uses that information to add the console module to the installation. The XML descriptor files must be well-formed and validate with the associated schemas. If the file is not valid, deployment ends and an error message is generated. A copy of the schema files (with descriptive comments embedded) is in the app_server_root/properties/schemas directory. Not all elements and attributes in the schemas are supported, however. Only elements and attributes that are documented in the following sections are supported:
Base schema
The topology and security schemas reference the base schema for portal application archives, ibm-portal-base.xsd. The following complex type element definitions from the base schema are used most often in the topology and security descriptors. These elements can be used within any other element in the descriptor that requires a localized string to be displayed, for example, in the title or description elements.
- NlsString
- specifies localized strings to be displayed. This tag is intended to be used during development before the application has been updated to support multiple languages through resource bundles. The xml:lang attribute enables a programmer to get started with the code without having to define a resource bundle right at the start. The value of the xml:lang attribute should adhere to RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt). The default value of the xml:lang attribute is English(en).
<base:nls-string lang="locale">string</base:nls-string>- NlsRef
- specifies localized strings that are maintained in a Java resource bundle. Include the location of the resource bundle and the name of the key for lookup.
<base:nls-ref key="key_name" locationName="path_to_resource_bundle"/>where path_to_resource_bundle specifies a path relative to the /WEB-INF directory of the module's WAR file. For example, if the resource bundle is located in /WEB-INF/classes/nls/myresources.properties, specify /classes/nls/myresources.
If the resource bundle cannot be located, the key name is returned. That is, if the property string that could not be found is intended to be displayed in the console, the key name would be displayed instead.
- Preference
- Used to describe name/value pairs used by the application. The preference name is specified as an attribute and the preference value is specified as a subelement.
<preference name="preference_name"> <base:value> <base:string>preference_value</base:string> </base:value> </preference>The preference value can be specified as a string, NlsString, or NlsRef.
Displaying version information in the Welcome portlet
To display the minor version of a product in the Welcome portlet without redeploying, add a Preference attribute to the ibm-portal-topology.xml file of your product. Then provide your own JSP to output the version string. Your JSP will be able to access any class in any of the WAS-embedded JAR files and return the version string.
This method will supersede the versionString specified under ApplicationDefinition element in the ibm-portal-topology.xml file. That method of specifying the version number is also supported.
When using the ibm-portal-topology.xml file to display the minor version of a product, add the preference attribute with name="versionInfoJSP". When you subsequently deploy your application, the component.xml file will be updated to include this information as described below. You would also need to create a JSP, using any name, to contain the version number. For example, if your JSP is under abc.war/jsp/xyz.jsp, the ibm-portal-topology.xml file would read as follows:
<preference name="versionInfoJSP"> <base:value> <base:string>jsp/xyz.jsp</base:string> </base:value> </preference>The component.xml file would read as follows:<registry:preference name="versionInfoJSP"> <base:value> <base:string>jsp/xyz.jsp</base:string> </base:value>The contents of xyz.jsp might read as follows:<%@ page contentType="text/html; charset=UTF-8" %> <%@ page session="false" buffer="none"%> 1.0.0
Sub-topics
Portal topology schema
Example: Portal security schema
Related information
Creating the descriptors for the console module
XML 1.0 Specification
Reference topic