Set Titles and Descriptions

Portal Model REST services allow you to set titles and descriptions.

To set titles and descriptions of a resource, take the following steps:

  1. Obtain the URI of resource for which you want to modify titles and descriptions.

  2. Perform an HTTP PUT request to the URI that you obtained by the previous step, with a feed in the message body that contains titles and descriptions that you want to set.

  3. Check for response 200 OK from the server.

Please note that you can use the update modes merge or replace:


Example: Feed to modify titles and description for a content node:

<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" 
           xml:base="http://wps128.boeblingen.de.ibm.com:10040/wps/mycontenthandler" 
           xmlns:thr="http://purl.org/syndication/thread/1.0" 
           xmlns:xhtml="http://www.w3.org/1999/xhtml" 
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
           xmlns:portal="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model"    
           xmlns:model="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0.1/portal-model-elements"  
           xmlns:base="http://www.ibm.com/xmlns/prod/websphere/portal/v6.0/ibm-portal-composite-base">
    <atom:author>
        <atom:name>IBM WebSphere Portal/6.1</atom:name>
    </atom:author>
    <atom:title>IBM WebSphere Portal Model Feed</atom:title>
    <atom:id>cm:oid:6_000000000000000000000000A0</atom:id>
    <atom:link href="?uri=cm:oid:6_000000000000000000000000A0&mode=download&levels=1&rep=compact" 
               rel="self" type="application/atom+xml"/>
    <atom:updated>2008-02-26T06:36:02.239Z</atom:updated>
    <atom:entry>
        <atom:title>Content Root</atom:title>
        <atom:id portal:uniquename="wps.content.root">cm:oid:6_000000000000000000000000A0</atom:id>
        <atom:published>2002-05-31T22:00:00.000Z</atom:published>
        <atom:updated>2008-02-26T06:36:02.239Z</atom:updated>
        <atom:content type="application/xml">
            <model:content-label>
                <model:title>
                    <base:nls-string xml:lang="de">Mein neuer Titel</base:nls-string>
                    <base:nls-string xml:lang="en">My new title</base:nls-string>
                </model:title>
                <model:description>
                    <base:nls-string xml:lang="de">Meine neue Beschreibung</base:nls-string>
                    <base:nls-string xml:lang="en">My new description</base:nls-string>
                </model:description>
            </model:content-label>
        </atom:content>
    </atom:entry>
</atom:feed>

Parent: Use cases for modifying resources: wp7
Create Resources: wp7
Putting a portlet on a page: wp7
Delete resources: wp7 August 30, 2010 11:15:11 PM

 


+

Search Tips   |   Advanced Search