Sun Java System Portal Server 7.1 Command Line Reference

psadmin modify-dp

Description

Changes the value for an existing display profile object.

Syntax

Long Format

psadmin modify-dp --parent parent --adminuser uid --passwordfile password-filename --dn dn --portalid portal-ID [--global] [--dry-run] [--combine] [--output output-file] dp-document

Short Format

psadmin modify-dp -P parent -u uid -f password-filename -d dn -p portal-ID [-g] [-r] [-m] [-o output-file] dp-document

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name.

[--dn | -d] dn

Distinguished name of the target node. This is mutually exclusive to -g option.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--portalId | -p] portal-ID

Specifies the portal ID, if this is not supplied, the default is be used.

The following options are optional:

[--combine | -m]

Combine with the existing display profile object. For example, use this option to add a channel specified in the existing XML file to a container's existing selected list. By default, this is false. This option is not supported for provider.

[--dry-run | -r]

Attempt to execute command without writing out to LDAP. Default is false.

[--global | -g]

Global display profile. Default is false. This is mutually exclusive to -d option.

[--output | -o] output-file

Specifies a file for output.

[--parent | -P] parent

Name of the parent display object. If omitted, assumes the node to be modified is under root.

Operands

Specifies one or more files which contain XML fragments.

Example 1


Example 2–3 psadmin modify-dp

./psadmin modify-dp -u amadmin -f ps_password -P JSPTabContainer/bookmark2 -d cn=hr_role,o=Developersample,dc=country,dc=sun,dc=com" -p myPortal1 -m modify.xml

In the above example, the value of the channel, bookmark2, under the container, JSPTabContainer, is changed by the modify-dp subcommand. The data is supplied to the modify-dp command either from one or more input files or from a standard input in the form of an XML fragment that follows the command. The modify.xml file contains the following:


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">
<Properties>
<String name="title" value="My Bookmarks"/>
<String name="refreshTime" value="600"/>
<Collection name="targets">
<String value="Sun home page|http://www.sun.com"/>
<String value="Everything you want to know about Portal
...|http://www.iplanet.com/products/iplanet_portal/home_portal.html"/>
<String value="iPlanet home page|http://www.iplanet.com"/>
</Collection>
</Properties>

The semantics of the modify sub command vary based on the type of the display profile being modified. When combine option is specified, the new properties are combined with the existing display profile object, rather than replacing them.

Different variations of modify sub command are provided below:

Using the list-dp subcommand, you can view the way the bookmark2 channel is changed:./psadmin list-dp -u amadmin -f ps_password -p myPortal1 -d "cn=hr_role,o=Developersample,dc=country,dc=sun,dc=com" -n "JSPTabContainer/bookmark2"

The result is displayed below:


<Channel name="bookmark3" provider="BookmarkProvider">
    <Properties>
        <String name="title" value="My Bookmarks"/>
        <String name="refreshTime" value="600"/>
        <Collection name="targets">
            <String value="Sun home page|http://www.sun.com"/>
            <String value="Everything you want to know about Portal ...|
					http://www.iplanet.com/products/iplanet_portal/home_portal.html"/>
            <String value="iPlanet home page|http://www.iplanet.com"/>
        </Collection>
    </Properties>
</Channel>


Example 2–4 Example 2

If you need to remove a property, <String value="Everything you want to know about Portal ...| http://www.iplanet.com/products/iplanet_portal/home_portal.html"/> from bookmark3 explained in Example1, you can use the modify command.

Create a modify file as follows.


<Channel name="bookmark3" provider="BookmarkProvider">
    <Properties>
        <String name="title" value="My Bookmarks"/>
        <String name="refreshTime" value="600"/>
        <Collection name="targets">
            <String value="Sun home page|http://www.sun.com"/>
            <String value="iPlanet home page|http://www.iplanet.com"/>
        </Collection>
    </Properties>
</Channel>

Now run the following command:

./psadmin modify-dp -u amadmin -f ps_password -P JSPTabContainer/bookmark2 -d cn=hr_role,o=Developersample,dc=country,dc=sun,dc=com" -p myPortal1 modify.xml

In this example, you are replacing the entire properties section.