วันศุกร์ที่ 27 พฤศจิกายน พ.ศ. 2552
Creating an IBM Lotus Web Content Management site structure with one click
Introduction
If you work with IBM Lotus Web Content Management, one of your recurring tasks is defining site structure. This task by its nature is time-consuming and repetitive; you are required to take more than 10 distinct steps to create a single site or site area. Moreover, site structures are not portable by design; you cannot export your site structure from one library on one server to a different library on a different server. Instead, you need to recreate the entire site structure manually.
Because the number of sites and site areas that make up a single site structure can reach the thousands, you need a method to automate the process of defining the site structure and to make it easier to move, export, and import. In this article, you can learn a simple way to define your site structure as an XML file and deploy it accordingly.
Back to top
Prerequisites
You should be familiar with these technologies:
* IBM WebSphere® Portal V6.0 and later, its administration, and its components
* IBM Lotus Web Content Management
* XML
To demonstrate how you can create a site structure in Lotus Web Content Management without manually creating all the sites and site areas, this article uses Lotus Web Content Management APIs and an XML file that contains the site structure. You can create the XML file containing the structure by validating it against the XML schema provided in the Downloads section of this article. The XML schema validates the structure and mandatory fields to prevent runtime errors.
You can define many sites, site areas, and default contents to create the site structure in the XML document that contains the complete site structure. First, create these prerequisites:
* Lotus Web Content Management library
* Authoring templates to be used in the site structure
* Presentation templates to be used in the site structure
* Users to be used in the security settings section
* Workflows, workflow actions, and workflow stages to be used in the authoring templates
You then define the site structure in the form of an XML file, specifying the library, sites, site areas, and so on. To ensure that the provided information is sufficient to create a site in Lotus Web Content Management , the XML file is based on the schema defined in the XSD file provided in the Downloads section of this article. The XSD file contains all the validations required to create a complete site structure, with default contents containing some fields.
You then create a JSP component to parse the XML file and create the site areas defined in it.
Back to top
Implementation
In this section, we describe the steps that you take to implement the solution. We start by discussing the creation of the XML file and the XSD file, and then we move on to the JSP component that parses this file.
XML creation
The XML file contains all the information needed to create the site structure. It contains the library name, the site structure, the site area structure, and the default contents. An XML file needs to be defined in a structure that corresponds to your requirements. See the XML example in listing 1, which corresponds to the site structure shown in figure 1.
Figure 1. Site structure
Site structure
The site is made up of a single site area; that single site area, in turn, is made up of another site area.
Listing 1. XML example used in the creation of the site structure
Figure 2 shows a sample mapping between the XML elements and the output created after you implement the solution.
Figure 2. Mapping between the XML and Lotus Web Content Management objects and sections
Mapping between the XML and Lotus Web Content Management objects and sections
As you can see, the mapping from the actual site structure to the XML file is straightforward with a root element representing the library. This root element then contains another element that corresponds to the site, defining its name and display name. Site areas are defined in a nesting fashion in the XML file to obtain the required site structure.
Every site and site area contains a settings section that holds the security settings and template mapping sections. The following are restrictions that need to considered: Security settings and template mapping can be created for each site or site area in its respective element or in the highest site or site area in the tree, with its child elements inheriting them.
Content security settings and workflows are added in the authoring template component, not in the default content section in the XML file.
Authoring templates and presentation templates used in the template mapping and in the creation of the default content have to be created previously.
Default content can be reused in multiple site areas by defining its name. After you define a complete default content element in the XML file, you can then use it by defining a default content tag with only the name element. This feature of reusing the default content in different and multiple places can also be used if the default content already exists for that library.
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น