IBM Support

How to reset portlet preferences for a specific user

Technote (FAQ)


Question

How do you reset the portlet page preferences for a specific user that requests to reset his or her page?

Answer

V6.0

Currently, the only way to do this is to use the XML Configuration Interface, commonly called XMLaccess. To set all of the pages that a user may have accessed, do the following:

1. First, do a full export by using XMLaccess. You must do a full export, or export descendents of the page, because that is the only way to access private pages, which are what a user gets when the user personalizes a portlet.

2. Within that export, search for the distinguished name (DN) of the user you want to reset. You may find a page like this:

<content-node action="update" active="true" allportletsallowed="false" content-parentref="6_11111111111111111111111111111" create-type="implicit" derivation-parentref="6_11111111111111111111111111111" domain="cust" objectid="6_6B683I930O1I502DVOU4O10047" type="page">
<access-control externalized="false" owner="cn=testo=ibm,c=us" private="true"/>
<component action="update" active="true" deletable="undefined" domain="cust" modifiable="undefined" objectid="7_6B683I930O1I502DVOU4O100K2" ordinal="2147483647" shadowref="7_NO2UF4I118ADC026HKQ8KC28B7" type="control" width="undefined">
<portletinstance action="update" domain="cust" objectid="5_6B683I930O1I502DVOU4O100K4" portletref="3_NO2UF4I1186E1026H4BLVI0GK5" shareref="5_6B683I930O1I502DVOU4O100K4">
<parameter name="view_jsp" type="string" update="set"><![CDATA[jsp/oob/html/test.jsp]]></parameter>
</portletinstance>
</component>
</content-node>

The flag private="true" lets you know that this is the personalized page for this user. It appears on the access-control stanza of the Content Node.

3. If you want to reset this page, you create an xml file that looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <request xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" build="wp6011_073" type="update" version="6.0.1.1" xsi:noNamespaceSchemaLocation="PortalConfig_6.0.1.xsd">
    <portal action="locate">
    <content-node action="delete" objectid="6_6B683I930O1I502DVOU4O10047" />
    </portal>
    </request>

4. Then, import that file using XMLaccess.

5. After that, the user settings will go back to the parent page defaults (which is shown by the derivation-parentref attribute of content-node).

Optional step: If you want to back up this page before you reset it, create an xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" build="wp6011_073" type="export" version="6.0.1.1" xsi:noNamespaceSchemaLocation="PortalConfig_6.0.1.xsd">
<portal action="locate">
<content-node action="export" objectid="6_6B683I930O1I502DVOU4O10047" />
</portal>
</request>

This exports the settings, so you can bring back the customized page if necessary after it was deleted.

V 6.1

Currently, the only way to do this is to use the XML Configuration Interface, commonly called XMLaccess. To set all of the pages that a user may have accessed, do the following:

1. First, do a full export by using XMLaccess. You must do a full export, or export descendents of the page, because that is the only way to access private pages, which are what a user gets when the user personalizes a portlet.

2. Within that export, search for the distinguished name (DN) of the user you want to reset. You may find a page like this:

<content-node action="update" active="true" allportletsallowed="true" content-parentref="6_CGAH47L00O2V002N5SQ0US30I3" create-type="explicit" domain="rel" objectid="6_OASNUL5108O250I4DOGK5K20G0" ordinal="500" type="page">
<supported-markup markup="html" update="set"/>
<localedata locale="en">
<title>testpage</title>
</localedata>
<access-control externalized="false" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" private="false"/>
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_OASNUL5108O250I4DOGK5K20G4" ordinal="100" orientation="H" skinref="undefined" type="container" width="undefined">
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_OASNUL5108O250I4DOGK5K20G2" ordinal="100" orientation="V" skinref="undefined" type="container" width="undefined">
<component action="update" active="true" deletable="undefined" domain="rel" modifiable="undefined" objectid="7_OASNUL5108O250I4DOGK5K20G3" ordinal="100" skinref="undefined" type="control" width="undefined">
<portletinstance action="update" domain="rel" objectid="5_OASNUL5108O250I4DOGK5K20G5" portletref="3_CGAH47L0087UA02N52EQA63010"/>
<portletinstance action="update" domain="cust" objectid="5_OASNUL5108O250I4DOGK5K2081" owner="uid=test,o=defaultWIMFileBasedRealm" parentref="5_OASNUL5108O250I4DOGK5K20G5" portletref="3_CGAH47L0087UA02N52EQA63010">
<preferences name="FeedReaderPortlet_feedPrivateCredentials" update="set">
<value><![CDATA[true]]></value>
</preferences>
</portletinstance>
<portletinstance action="update" domain="cust" objectid="5_OASNUL5108O250I4DOGK5K2085" owner="uid=wpsadmin,o=defaultWIMFileBasedRealm" parentref="5_OASNUL5108O250I4DOGK5K20G5" portletref="3_CGAH47L0087UA02N52EQA63010">
<preferences name="FeedReaderPortlet_feedPrivateCredentials" update="set">
<value><![CDATA[true]]></value>
</preferences>
</portletinstance>
</component>
</component>
</component>
</content-node>

The flag domain="cust" lets you know that this is user preferences for the portlet in question. It appears on the portlet-instance stanza of the Content Node. We also observe in this instance there are two such entries, one for the "wpsadmin" user, and one for the "test" user.

3. If you want to reset this page for the test user, you create an xml file that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" build="wp6011_073" type="update" version="6.0.1.1" xsi:noNamespaceSchemaLocation="PortalConfig_6.0.1.xsd">
<portal action="locate">
        <content-node action="update" objectid="6_OASNUL5108O250I4DOGK5K20G0">
            <component action="update" objectid="7_OASNUL5108O250I4DOGK5K20G4">
                    <component action="update" objectid="7_OASNUL5108O250I4DOGK5K20G2">
                            <component action="update" objectid="7_OASNUL5108O250I4DOGK5K20G3">                       
                                <portletinstance action="delete" domain="cust" objectid="5_OASNUL5108O250I4DOGK5K2081" owner="uid=test,o=defaultWIMFileBasedRealm" parentref="5_OASNUL5108O250I4DOGK5K20G5" portletref="3_CGAH47L0087UA02N52EQA63010"/>
                            </component>
                          </component>
                </component>
    </content-node>
</portal>
</request>

4. Then, import that file using XMLaccess.

5. After that, the user settings will go back to the parent page defaults (which is shown by the portlet-instance with domain="rel" attribute of content-node).

Optional step: If you want to back up this page before you reset it, create an xml file like this:

<?xml version="1.0" encoding="UTF-8"?>
<request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" build="wp6011_073" type="export" version="6.0.1.1" xsi:noNamespaceSchemaLocation="PortalConfig_6.0.1.xsd">
<portal action="locate">
<content-node action="export" objectid="6_OASNUL5108O250I4DOGK5K20G0 />
</portal>
</request>

This exports the settings, so you can bring back the customized page if necessary after it was deleted.

Document information

More support for: WebSphere Portal End of Support Products
XML Access/Release Builder

Software version: 6.0, 6.1

Operating system(s): AIX, HP-UX, IBM i, Linux, Solaris, Windows, z/OS

Software edition: Enable, Express, Extend, Server

Reference #: 1307413

Modified date: 16 November 2009


Translate this page: