The xmlpropfile.xml
file is located in
SAS-config-directory/Levn/Web/Applications/SASBIPortlets<version>/PortletDeploymentTool/src/
. The format of the xmlpropfile.xml file is as follows:
<webapps server-type="server-type" work-dir="working-directory" >
<webapp
servlet-context-name="context-name"
web-app-name="Web-application-name"
portlet-ear-file-name="filename"
portlet-ear-file-path="fully-qualified-filename"
default-supported-portlet-modes="modes-value" >
<portlets>
<portlet name="portlet-name" supported-portlet-modes="modes-value" >
<locales>
<locale name="locale-code"
title="portlet-title"
description="portlet-description"
/>
</locales>
</portlet>
</portlets>
</webapp>
</webapps>
The file contains one
<webapps> element, with a <webapp> element inside it for
each Web application that you will add. The TestPortlet Scripting
Facility configures each portlet as a separate Web application.
- <webapps>
-
specifies the properties
that are common to all of the Web applications in the file. You must
specify the following attributes:
- server-type
-
specifies the type
of Java application server where the BI Portlets Web application is
deployed. Specify either jboss
, weblogic
, or websphere
.
- work-dir
-
specifies the working
directory where the PDT places temporary files.
- <webapp>
-
specifies properties
for a specific Web application. You must specify the following attributes:
- servlet-context-name
-
specifies the context
name for the portlet. The value of this parameter must match the value
of the <context-root> element value in the application.xml file
in the portlet source.
Note: If you use the Testportlet
Scripting Facility, then the <context-root> value in application.xml
is obtained from the webapp.testportlet.contextroot parameter in the
custom.properties file.
- web-app-name
-
specifies the name
of the WAR file for the portlet, without the .war extension. For example,
if the WAR file for your portlet is named sample.hellouser.jsr168.war,
then specify the value sample.hellouser.jsr168
.
- portlet-ear-file-name
-
specifies the name
of the EAR file for the portlet.
- portlet-ear-file-path
-
specifies the full
path to the EAR file for the portlet, including the filename. You
must use the forward slash (/) character to delimit the directories
in your path (for example, C:/SAS/EntBIServer/Lev1/Web/Staging/myportlet.ear
).
- default-supported-portlet-modes
-
specifies which portlet
modes are supported by default for the portlets in this Web application.
Specify one of the following values:
all |
specifies that the view, edit, and help modes are
supported.
|
edit |
specifies that the view and edit modes are supported. |
help |
specifies that the view and help modes are supported. |
If you do not specify
a value, then only the view mode is supported.
Each <webapp>
element can contain an optional <portlets> element. The <portlets>
element contains one or more <portlet> elements:
- <portlet>
-
specifies the properties
for a portlet. You can specify the following attributes:
- name
-
specifies the name
of the portlet.
- supported-portlet-modes
-
specifies which portlet
modes are supported by this portlet. Specify one of the following
values:
all |
specifies that the view, edit, and help modes are
supported
|
edit |
specifies that the view and edit modes are supported |
help |
specifies that the view and help modes are supported |
If you do not specify
a value, then only the view mode is supported.
Note: The supported-portlet-modes
attribute is optional. If you specify a value or a null value, then
the supported-portlet-modes attribute overrides the value of the default-supported-portlet-modes
attribute on the <webapp> element.
Each <portlet>
element can contain an optional <locales> element. The <locales>
element contains one or more <locale> elements:
- <locale>
-
specifies the properties
for a locale. You must specify the following values:
- name
-
specifies the name
for the locale.
- title
-
specifies the locale-specific
title for the portlet. The value of this attribute is an escaped-UTF-8
ASCII string.
The value of the title
attribute corresponds to the "portlet.description" entry in the locale-specific
portletDisplayResources_
locale-name.properties file in the portlet's generated PAR file.
- description
-
specifies the locale-specific
description for the portlet. The value of this attribute is an escaped-UTF-8
ASCII string.
The value of the description
attribute corresponds to the "portlet.description" entry in the locale-specific
portletDisplayResources_
locale-name.properties file in the portlet's generated PAR file.
For example, the following
file deploys two portlets and specifies localization options for the
second portlet:
<webapps server-type="websphere" work-dir="c:/temp/pdt-test" >
<webapp
servlet-context-name="HelloUserJSR168PortletSample"
web-app-name="sample.hellouser.jsr168"
portlet-ear-file-name="sample.hellouser.jsr168.ear"
portlet-ear-file-path="C:/SAS/EBI/Lev1/Web/Staging/sample.hellouser.jsr168.ear"
default-supported-portlet-modes="all" >
</webapp>
<webapp
servlet-context-name="HelloUserJSR168PortletSample2"
web-app-name="sample2.hellouser.jsr168"
portlet-ear-file-name="sample2.hellouser.jsr168.ear"
portlet-ear-file-path="C:/SAS/EBI/Lev1/Web/Staging/sample2.hellouser.jsr168.ear"
default-supported-portlet-modes="all" >
<portlets>
<portlet name="HelloUserSample2"
supported-portlet-modes="view help">
<locales>
<locale name="zh_CN"
title="\u4e66\u7b7e"
description="\u7528\u6765\u7ba1\u7406\u4e66\u7b7e\u7684 Portlet" />
<locale name="en"
title="CheckWindowStateNormalTestPortlet"
description="The HelloUserSample 2 portlet" />
</locales>
</portlet>
</portlets>
</webapp>
</webapps>