Document migration, version 5.1 to 6.1
As of version 6.1, Document Manager is no longer available in WebSphere Portal. After migrating your primary data, replace Web content previously stored as documents in a document library with either file resource components or file resource elements stored in authoring templates, content items, sites or site areas.
Saving your documents as file resource elements and components
To save your documents as file resource elements or components you:
- migrate your 5.1 data to your 6.1 server.
- identify which documents need to be saved as file resource elements or components by running the document list portlet on your version 6.1 server.
- open your document library on your version 5.1 server and save your documents to a temporary directory on your server.
- create file resource elements and components on your version 6.1 server and upload your documents from the temporary directory on your version 5.1 server.
Install the document list portlet
After migrating your data, install the document list portlet on your version 6.1 server. The document list portlet is used to identify your document manager elements and components, and what items reference your document manager elements and components. This will assist you to convert your documents to file resource elements and components.
- Login to WebSphere Portal as an administrator.
- Go to the Administration view and then Portlet Management.
- Select Web Modules.
- Click Install.
- Click Browse.
- Select the file called ilwwcm-pdmdoclist.war from the portal_server_root\wcm\prereq.wcm\installableApps folder of your version 6.1 server.
- Click Open.
- Click Next.
- Click Finish.
Use the document list portlet
When migrating data on your primary server:After migrating your primary data, replace Web content previously stored as documents in a document library with either file resource components or file resource elements stored in authoring templates, content items, sites or site areas.
- Documents stored in document libraries in previous versions of WebSphere Portal will not be migrated.
- Document Manager elements and components are migrated unchanged, but you can no longer select or replace documents.
- Web content tags that reference Document Manager elements or components are left unchanged in presentation templates and element designs. When rendered on a Web page, a message will be displayed showing the basic information of the document previously referenced.
- Create a new portal page on the server you have migrated your primary data to and add the document list portlet to the page.
- Select a library to analyze.
- Select an analysis type:
- Document Manager components
- Display a list of Document Manager components in the selected library. A list of items that reference each Document Manager component are also listed. Replace each Document Manager component with a file resource component, and replace each reference to the Document Manager component with a reference to the new file resource component.
- Document Manager elements
- Display a list of sites, site areas, content items and authoring templates that contain a Document Manager element in the selected library. Replace each Document Manager element with a file resource element. This option may take longer to run than the options as it will search every site, site area, content item and authoring template in the selected library.
- Document Manager tags
- Display a list of presentation templates and components that contain a Document Manager element tag. Replace each Document Manager element tag with an element tag pointing to the file resource elements you created when using the "Document Manager elements" option.
Document replacement strategies
There are three ways to replace the use of Document Manager documents:
- As a file resource component
- The simplest way to replace Document Manager documents is by importing them into file resource components. The strategy is suitable if you only need to display a basic set of file attributes, or to create a downloadable link to a file.
- As a file resource element stored in a site, site area or content item
- The benefit of this strategy is that you can add elements to an item to store additional metadata not available in a file resource component. Downloadable links can only be used when displaying content from a site, site area or content item. You cannot create a download link directly to the file resource element.
- As a file resource component referenced in a site, site area or content item using a component reference element
- This strategy combines elements of the first two strategies. Additional metadata can be stored in a site, site area or content item, and downloadable links can be used both when displaying content from a site, site area or content item, and by linking directly to the file resource component.
Storing images:
In some cases, where you don't want users to be able to download an image file but only want to render an image on a page, you could store the image in an image component or image element instead of using a file resource component or element.
Create a download link to a file resource component
If you store a document in a file resource component, you use a component tag to create a download link:
<a href="<component name="FileResource" />">Link Text</a>This code can be referenced in any presentation template, component design or element design.
Create a download link to a file resource element
If you store a document in a file resource element, you use an element tag to create a download link. For example, to create a link to a file resource element stored in a content item:
<a href="<element type="content" context="current" key="FileResource" />">Link Text</a>This link will only be displayed when the currently displayed content item contains a file resource element named "FileResource".
Displaying the attributes of file resource components and elements
Previously it was possible to display a range of attributes of documents stored in document libraries when displayed within Web pages. When you migrate your documents to file resource components or elements not all attributes will be available. Create your own attribute fields in an authoring template, content item, site or site area to replace the document attributes:
Table 1. Attributes Document attribute File resource component File resource element stored in a site, site area, authoring template or content item authors Add authors to the author field in the file resource element. Use an idcmpnt tag to render the authors. Add authors to the author field in the authoring template, content item, site or site area. Use an idcmpnt tag to render the authors. categories Not available. Create a taxonomy to replace the categories used by your old document library. You then enable profiling and then assign a category to the site, site area or content item that the file resource element is stored in. Use a profilecmpnt tag to render the profile of the content item, site or site area.
created Use a historycmpnt tag to render the creation date of the file resource component. Use a historycmpnt tag to render the creation date of the content item, site or site area. creators Use a historycmpnt tag to render the creator of the file resource component. Use a historycmpnt tag to render the creator of the content item, site or site area. data Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
dataLength Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
dataMimeType Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
description Enter text in the description field of the file resource element. Use an idcmpnt tag to render the description. Enter text in the description field of the authoring template, content item, site or site area. Use an idcmpnt tag to render the description. drafts Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
effectiveDate Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
hidden Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
id Use an idcmpnt tag to render the ID of the file resource component. Use an idcmpnt tag to render the ID of the content item, site or site area. isdoc Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
label Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
language Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
lastModified Use a historycmpnt tag to render the last modified date of the file resource component. Use a historycmpnt tag to render the last modified date of the content item, site or site area. lastModifier Use a historycmpnt tag to render the last modifier of the file resource component. Use a historycmpnt tag to render the last modifier of the content item, site or site area. mimeType Use a component tag to display the mime type of the file. Use an element tag to display the mime type of the file. owners Add owners to the owners field in the file resource element. Use an idcmpnt tag to render the owners. Add owners to the owners field in the authoring template, content item, site or site area. Use an idcmpnt tag to render the owners. path Use a pathcmpnt tag to render the path to the file resource component. Use a pathcmpnt tag to render the path to the content item, site or site area. permission Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
proxy Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
renditions Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
revision Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
searchable Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
size Use a component tag to display the size of the file. Use an element tag to display the size of the file. systemCreated Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
systemLastModified Not available. Not available. You can use an element, such as a text element, to store this information and then use an element tag to display this information.
title Enter text in the title field of the file resource element. Use an idcmpnt tag to render the title. Enter text in the title field of the authoring template, content item, site or site area. Use an idcmpnt tag to render the title.
Displaying the content of file resource components and elements
File resource elements and components cannot be dynamically converted to HTML and displayed on a Web page. The following strategies can be used to display the contents of a document as HTML:
- Convert your document to HTML and store it as an HTML component
- Go to the document library on your 5.1 server and save your document to your file system.
- Open the file and convert it to HTML. For example, if you are converting a Microsoft Word file, open it in Microsoft Word and save it as HTML.
- Create a new HTML component on your 6.1 server and import the HTML you created in step 2 using the Import button in the HTML component.
- Use a component tag to reference the HTML component in any presentation template, component design or element design. For example:
<component name="ComponentName" />Images in your HTML
If your HTML contains images you will need to import your images into your HTML component separately using the button. Alternatively, you could use a Rich Text component instead of an HTML component and the images will automatically be imported when you import your HTML.
- Convert your document to HTML and store it as an HTML element
- Go to the document library on your 5.1 server and save your document to your file system.
- Open the file and convert it to HTML. For example, if you are converting a Microsoft Word file, open it in Microsoft Word and save it as HTML.
- Create a new HTML element in a site, site area or content item on your 6.1 server and import the HTML you created in step 2 using the Import button in the HTML element.
- Use an element tag to reference the HTML element in any presentation template, component design or element design. For example:
<element type="content" context="current" key="ElementName" />Images in your HTML
If your HTML contains images you will need to import your images into your HTML element separately using the button. Alternatively, you could use a Rich Text element instead of an HTML element and the images will automatically be imported when you import your HTML.
- Use a third-party application to dynamically convert a file to HTML
- Use code stored in a JSP component to call a third-party application that can dynamically convert the file to HTML before rendering on a page. In this case you would reference your file resource element or component in some JSP and use the third-party application to convert the file resource to HTML before it is rendered.