Methods to access metadata
There are two way to access metadata of a theme:
1. WebDAV "themelist" entry point
2. XML Access
WebDAV uses a property file to represent metadata information for a theme. The metadata.properties file represents the metadata which is located in the root folder of the theme in the "/themelist" entry point of WebDAV.
Out-of-box the location of the metadata for the Portal 8.5 theme is:
Here is a sample metadata.propeties file:
#Mon Apr 23 12:37:36 EDT 2012
You can add or modify metadata values by directly editing this file and saving it back to WebDAV to persist the change to the model.
Certain metadata values are hidden from view using the WebDAV access, such as most of the values that start with the prefix "com.ibm.portal". You can still modify these values by setting the metadata key=value in the file and saving it. The new values will persist, but when you reopen the file, the metadata will still be hidden from view.
The XML Access configuration client interface included with WebSphere Portal allows exporting entire or partial configuration settings as an XML file and recreating configurations by importing the XML file. This interface can also be used as an alternative to performing metadata updates to the theme.
To export the entire theme configuration use this XML Access script:
<?xml version="1.0" encoding="UTF-8"?>
<theme action="export" objectid="*" />
From the exported file you will be able to view all metadata for each theme defined in Portal. The metadata that is hidden from view in the WebDAV interface will be displayed in the export.
Metadata in XML Access format looks like this:
<parameter name="<parameter name>" type="string" update="set"><![CDATA[<parameter value>]]></parameter>
You can edit this file directly and change the metadata for a specific theme or add metadata for a theme. Once you are done with your modifications and additions, you can import this file back to the Portal using the command line.
Command line format for running xml access to run a configuration script:
xmlaccess.bat -in <xml file to import> -url http://<server>:<port>/wps/config -user <admin username>
-pwd <admin password> -out <xml file to output results>