Sun Java System Portal Server 7.1 Command Line Reference

Chapter 8 Portlet Subcommands

This chapter describes the following subcommands:

psadmin deploy-portlet

Description

Deploys the portlet web application into the Portal Server. It deploys the portlet WAR file and inserts the provider into display profile.

Syntax

Long Format

psadmin deploy-portlet --adminuser uid --passwordfile password-filename --dn dn | --global [--rolesfile roles-file] [--continue false] [--instance instance-port] [--userinfofile user-info-file] --portal portal-ID portletwarfile [--locale]

Short Format

psadmin deploy-portlet -u uid -f password-filename -d dn [-r roles-file] [-c false] [-i instance-port] [-n user-info-file] -p portal-ID [-g] portletwarfile [-l]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name.

[--dn | -d] dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-ID

Specifies the portal ID.

The following options are optional:

[--global | -g]

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

[--rolesfile | -r] roles-file

Specifies the file containing the Access Manager software and portlet application role mapping information.

[--userinfofile | -n] user-info-file

Specifies the file containing the user information mapping information.

[--continue | -c]

Returns with error if deployment fails on any single portal instance. Default is True. Deployment continues to other instances if it fails on one instance.

[--instance | -i]

Specifies the portal instance where the portlet is to be deployed. If it is not specified, deploys on all the instances of the portal.


Note –

If you are in the cluster environment, be sure to specify the portal instance id which is installed on the cluster using this option. However, if you are not in the cluster environment, it is recommended to use this option ONLY in a development environment, since using this option will cause inconsistency between Portal Server Instances.


Operands

portletwarfile

Specifies the path to the WAR file.

Example


Example 8–1 psadmin deploy-portlet

psadmin deploy-portlet -u admin-user -f password -g --rolesfile /tmp/rolesfile -p portal1 portlet.war

Where the content of the rolesfile is:


cn\=AsAdminRole,o\=DeveloperSample,dc\=x,dc\=y,dc\=com=portletAsAdminRole
cn\=DevRole,o\=DeveloperSample,dc\=x,dc\=y,dc\=com=portletDevRole

AsAdminRole and DevRole are the roles that are created through the Access Manager and the roles file creates a logical mapping to the AsAdminRole with portletAsAdminRole and DevRole with portletDevRole. The portletAsAdminRole and the portletDevRole can be used in the portlets.


psadmin undeploy-portlet

Description

Removes the portlet application from the portal server. It also removes the providers associated with portlets from display profile.

Syntax

Long Format

psadmin undeploy-portlet --adminuser uid --passwordfile password-filename --dn dn | --global --portal portal-ID [--continue false] [--instance instance-port] portletwebapp [--locale]

Short Format

psadmin undeploy-portlet -u uid -f password-filename -d dn -p portal-ID [-g] [-c false] [-i instance-port] portletwebapp [-l]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name.

[--dn | -d] dn

Specifies the distinguished name in the LDAP node to access the display profile document. The -d or -g option is required.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portal | -p] portal-ID

Specifies the portal ID.

The following option is optional:

[--global | -g]

Specifies the global level node in LDAP to access the display profile document. The -d or -g option is required.

[--continue | -c]

Returns with error if deployment fails on any single portal instance. Default is True. Deployment continues to other instances if it fails on one instance.

[--instance | -i]

Specifies the portal instance where the portlet is to be deployed. If it is not specified, deploys on all the instances of the portal.


Note –

If you are in the cluster environment, be sure to specify the portal instance id which is installed on the cluster using this option. However, if you are not in the cluster environment, it is recommended to use this option ONLY in a development environment, since using this option will cause inconsistency between Portal Server Instances.


Operands

portletwebapp

Name of the portlet application which needs to be undeployed.

Example


Example 8–2 psadmin undeploy-portlet

psadmin undeploy-portlet -u admin-user -f password -g -p portal1 portletname

For example, if portlet war file that needs to be undeployed is test.war, then the portlet name for the undeploy-portlet cli should be "test."