Sun Java System Portal Server 7.1 Command Line Reference

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.