This chapter contains the following:
This document describes the PAR file format, and the PAR directory structure for Portal Server. The PAR file format is the file structure that is used by the psadmin import/export command to store portal data. The PAR directory structure is the directory structure from where a PAR file can be generated using the psadmin create-par command. The PAR directory structure describes the file system directories that is similar to the PAR file format with additional mapping properties file.
There are two ways to generate a PAR file:
Extract portal data from a system running Portal using the psadmin export command
Extract portal data from a file system directory structure using the psadmin create-par command
This section contains the following:
The following table describes the PAR file format.
File/Directory under PAR Directory |
Sub Directory |
Description |
---|---|---|
META-INF |
/MANIFEST.MF |
The manifest.mf file describes what is contained in the exported file. |
/dp |
/name.properties |
Contains component service attribute values. |
/name.xml |
Contains display profile document. |
|
/pbfiles |
/providerClassBaseDir |
Contains customized desktop provider classes. |
/templateBaseDir |
Contains desktop JSPs and templates. |
|
/templateBaseDir/classes |
Contains desktop provider resource bundle files. |
|
/communityTemplateBaseDir |
Contains community templates and properties files. |
|
/static |
Static files to be deployed as part of the portal war. This maps to (by default in UNIX platform) /var/opt/SUNWps/portals/portal-ID directory. |
|
/war |
War files to be deployed. This maps to (by default in UNIX platform) /var/opt/SUNWps/portals/portal-ID/war directory. |
|
.jar |
JAR files associated with providers. |
|
Java-class-files |
Class files associated with providers. |
The following table describes the PAR directory structure.
Directory under PAR Directory |
Files and Sub Directories |
Description |
---|---|---|
/dt |
DPMapping.properties |
Mapping file properties contains name -> dn mapping |
/name.properties |
The name should be defined in the DPMapping.properties file. |
|
/name.xml |
There could be multiple files start with the same name, appended by -XXX.xml, files start with same name will be merged into one XML file. The name must be defined in the DPMapping.properties file (with exception of the name global). For example, global-1.xml and global-2.xml will be merged into global.xml, and global should be defined in the DPMapping.properties file. |
|
/pbfiles |
/providerClassBaseDir |
This directory structure maps to (by default on UNIX platform) /var/opt/SUNWps/portals /portal-ID/desktop/classes. Under this directory, you can have customized provider classes in packaged subdirectories. |
/templateBaseDir |
This directory structure maps to (by default on UNIX platform) /var/opt/SUNWps/portals /portal-ID/desktop. Under this directory, you can have anoymous/, default/, sampleportal/ etc. |
|
/communityTemplateBaseDir |
This directory structure maps to (by default on UNIX platform) /var/opt/SUNWps/portals /portal-ID/communitytemplates directory. |
|
/static |
/web-src |
Can contain any customized files in open WAR. The files in this directory will be included in the par/static directory, and will be imported into portal-data-dir/web-src directory. |
/war |
Contains war files. When a par file is generated, it will include all war files located in the /var/opt/SUNWps/portals/ portal-ID/war directory, except the portal.war file. |
This section contains the following:
The following describes properties in the DPMapping.properties file:
The display profile root dn. The value of dpnode can be a dn, or defaultOrganization. If dpnode is not defined, the default organization dn will be assumed.
The dn relative to the dpnode, then dpnode. For example, "o=org1,dpnode".
dp/ global-base.xml, global-desktop.xml, global-map.xml,... node1.xml, node1-default.xml,... node2-default.xml, node2-eng.xml node3.properties DPMapping.properties |
In DPMapping.properties file, it has:
dpnode=dc=red,dc=iplanet,dc=com node1=dpnode node2=cn=eng,dpnode node3=cn=sales,dpnode |
The psadmin create-par command will combine the display profile snippets for all files with the same name before the - into one display profile. In the above example, the end PAR file has:
dp/ global.xml node1.xml node2.xml node3.properties |
The dn mapping will be stored in the PAR manifest file like this:
META-INF MANIFEST.MF: Manifest-Version: V1.0 ... PS-DP-DOCS:global.xml,node1.xml,node2.xml PS-Attributes-Properties:node3.properties PS-AutoExtract: dpnode=dc%3Dred%2Cdc%3Diplanet%2Cdc%3Dcom,entry=global, node1=dpnode,node2=cn%3Deng%2Cdpnode,node3=cn%3Dsales%2Cdpnode |
The DP XML files must contain the full display profile format based on the psdp.dtd. For example:
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd"> <DisplayProfile version="1.0"...> <Properties>...</Properties> <Channels>...</Channels> <Providers>...</Providers> </DisplayProfile> |
The properties files contains name/value pairs for the service attributes. The following is a description of the properties file format:
Property Name |
Property Value |
---|---|
The component service attribute name. The service attribute names can be obtained by using the psadmin list-attributes command. For example, for desktop service attribute names, use the following command: psadmin list-attributes -u adminuser —f passwordfile —p portal-ID –component=desktop |
The service attribute value. The values are separated by the delimiter @@@!!!. A single value will end with the delimiter. For example: EditChannel=JSPEditContainer@@@!!! |
The manifest.mf file describes what is contained in the PAR file and how the files are structured, as well as the export file version information.
The manifest file for the .par file contains the main and entries section, following the JAR manifest convention. The main section contains headers which describe the backup file version number and the top level archive directories. The following headers are included:
The manifest version number
The portal server version number
The backup file version number, the version number is an unique identification number.
The backup version number contains information about the portal domain, portal name, the backup file data type, and the backup version number. The data type can be the following: desktop, provider+channel.
A timestamp on when the backup file is created.
This is only used by the PAR utility.
The root directory in the archive for the property based files. For now, this is the root of the templates and properties file directories.
The root directory in the archive for the display profile documents.
The root for static content in the archive.
The root for the Java classes in the archive. If unspecified, the corresponding files are rooted at the top of the archive.
The root for the WAR files in the archive.
The entries section defines named entries which declare details about the backup file. When there are multiple name entries, each named entry corresponds to one parEntry when the backup target is channels, providers, or display profiles. For other backup data type, there will be only one entry. Each name entry includes the following headers:
The entry name to identify the entry.
This provides information for the import subcommand with the --autoextract option.
A comma separated list of distinguished names. This gives a complete list of which display profile documents are archived in the backup file.
List of included files or directories.
List of attribute properties files
This supplement describes the format of the export files used to specify data to be inserted into a PAR file.
The export file consists of lines containing a keyword, followed by a colon (:) and white space delimited fields. The from: line is required and it must be the first line of the file. Lines beginning with # are treated as comments.
The from line indicates what entity is being exported. The types can be channel, provider, or channel,provider, and channel+provider. The name indicates the channel name, or a provider name if a provider is being exported. The name must be URL encoded if the name contains white space, commas (,), colons (:), semicolons (;), plus signs (+), or percent signs (%).
The file line indicates that a file, based on a property setting, is to be included. The property can come from either the desktop properties file, located by default in /var/opt/SUNWportal/portals/ portalID/config/desktopconfig.properties file. The root specifies the root of the file location and path specifies the path to the rest of the file. The root is a property name that corresponds to a directory (like). If root is given as ., the file is assumed to be static content located at the web server's doc root. You can also specify the types of operation the file is to be associated with, defaulting to channel. The types can be channel, provider, or channel,provider, and channel+provider.
The class line indicates that a class file is to be packaged with the entry, and you may optionally specify the types of operations that the class file are associated with. If not specified, provider is assumed. Types can be channel, provider, or channel,provider, and channel+provider; also, when specifying both channel and provider, you can use a space.
The directory line implies an entire directory search with all non-directory files to be included as if entered as file lines. It includes the capability of specifying a filter that is a directory component which must be present in recursive directory searches. The root specifies the root of the directory, or . to indicate static content. The dir is the directory underneath the root to search from, which can be given as . to start at the root itself. The filter specifies the filter component which must be in the directory, which implies a recursive descent. It can be given as + for a recursive descent with no filter, or . for no recursive descent (just the contents of the actual directory). You can also specify the types of operation, which default to channel. Types can be channel, provider, or channel,provider, and channel+provider.
The entry line specifies the entry name used in the .par file. If not specified, it defaults to the name from the from: line.
Any number of desc lines may appear. These are concatenated together as a user-visible description packaged with the entry.
The Portal Server software uses a View Designer for Sun Java System Portal Server to create and modify the look and feel of your portal. The plug-in allows you to upload a .skin file with your custom themes or download a .skin file that can be modified. This chapter discusses the format of the .skin file.
The .skin file format includes static pages, images, and CSS files. The static pages use the specified style sheets and images. The files are installed as follows:
PortalServer-BaseDir/par-src/theme_support/static/web-src/desktop/themes/heavy/*
PortalServer-BaseDir/par-src/theme_support/static/web-src/desktop/themes/lite/*
For each theme (heavy and lite), the following files are available:
-+-- WEB-INF -|-- web.xml | -|-- index.html | -|-- tabPreferences.html | -|-- pagePreferences.html | -|-- accountPreferences.html | -+-- css -|-- All CSS files in this folder | -+-- images -|-- All images in this folder
This supplement describes the PAR import operations list format.
Each operation (op) on the command line, must be specified as a pipe (|) separated list of keywords that can have values, most of which are optional. The operations are in space separated list. Each operation is in the following format:
dpnode=dn,entry=name,provider[=name],channel[=name],container=name[,avail=name,selected]
Here:
Specifies the distinguished name in the directory server (or the keyword global) for the display profile document that this operation is targeted at. This may not apply if the context it is being specified in has already provided this. For example, if the import subcommand defines the distinguished name, the distinguished name in the file is ignored.
Specifies the entry name in the .par file. This is not needed if the:
.par file only contains one entry, as the operation defaults to that entry
Operation is already associated with an entry such as the auto extract option for an entry.
The utility defaults to the first entry in the file if an entry is not specified.
Indicates that a provider extraction is to take place. If the name is missing, it uses the name packaged with the provider in the .par file.
Indicates that a channel extraction is to take place. If the name is missing, it uses the name provided with the channel in the .par file.
Indicates which container the channel is to be inserted into and applies only to channel extractions. If omitted, the channel is inserted into the channels element at the display profile document root.
Indicates a container whose avail (or available) list is to receive a reference to the new channel and applies only to channel extractions. If omitted, no new channel reference is created.
Indicates that the container whose avail list received a reference, also has a reference placed in its selected list and applies only if avail was used.
If the op information is in both the import subcommand and in the .par file, the command information takes precedence