CreateTagsAndRatings.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. =================================================================
  4. * Licensed Materials - Property of IBM
  5. * (c) Copyright IBM Corp. 2009. All rights reserved.
  6. *
  7. * US Government Users Restricted Rights - Use, duplication or
  8. * disclosure restricted by GSA ADP Schedule Contract with IBM
  9. * Corp.
  10. *
  11. * DISCLAIMER OF WARRANTIES. The following [enclosed] code is
  12. * sample code created by IBM Corporation. This sample code is
  13. * not part of any standard or IBM product and is provided to you
  14. * solely for the purpose of assisting you in the development of
  15. * your applications. The code is provided "AS IS", without
  16. * warranty of any kind. IBM shall not be liable for any damages
  17. * arising out of your use of the sample code, even if they have
  18. * been advised of the possibility of such damages.
  19. *
  20. =================================================================
  21. -->
  22. <request
  23. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  24. xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd"
  25. type="update">
  26. <!-- This sample creates ratings and tags.
  27. Related sample files:
  28. ExportTagsAndRatings.xml
  29. DeleteTagsAndRatings.xml
  30. NOTE: This sample file needs to be modified before execution.
  31. Update the value of the 'owner' attributes of the 'access-control',
  32. 'rating', and 'tag' tags, and specify an existing user.
  33. -->
  34. <portal action="locate">
  35. <!-- uid must match uid attribute of portlet-app in portlet.xml -->
  36. <web-app action="locate" domain="rel" uid="BlurbPortlet.3088d83ae7690017105c9e64cce97eb8">
  37. <servlet action="locate" domain="rel" referenceid="Portlet_1"/>
  38. <portlet-app action="locate" domain="rel" name="Information Portlet Application" uid="BlurbPortlet.3088d83ae7690017105c9e64cce97eb8.1">
  39. <!-- uniquename must match with portlet uniquename -->
  40. <portlet action="locate" domain="rel" name="Welcome to WebSphere Portal" objectid="portlet1" uniquename="wps.p.Welcome To WebSphere Portal"/>
  41. </portlet-app>
  42. </web-app>
  43. <!-- Parent element under which a new page for this sample is inserted. -->
  44. <content-node action="locate" objectid="parentPage" uniquename="ibm.portal.Home"/>
  45. <!-- A new empty page to which a tag and rating are assigned. -->
  46. <content-node action="update" objectid="samplePageOID" uniquename="ibm.portal.SamplePage.TagsAndRatings" ordinal="last" content-parentref="parentPage" active="true" create-type="explicit" type="staticpage">
  47. <supported-markup markup="html" update="set"/>
  48. <localedata locale="en">
  49. <title>Sample page for tag and rating creation</title>
  50. </localedata>
  51. <!-- The content of static page are read from zip file.
  52. attribute markup can be set to one of portal server supported markups
  53. attribute display-option can be set to "inline" or "iframe" or "ajax".-->
  54. <pagecontents markup="html" display-option="inline">
  55. <url>file:///$server_root$/base/wp.xml/doc/xml-samples/index1.zip</url>
  56. </pagecontents>
  57. <!-- this parameter must match the name of static page -->
  58. <parameter name="com.ibm.portal.static.page.file.name.html" type="string" update="set"><![CDATA[index1.html]]></parameter>
  59. <access-control externalized="false" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" private="false" />
  60. <component action="update" active="true" domain="rel" ordinal="100" orientation="V" type="container">
  61. <component action="update" active="true" domain="rel" ordinal="100" orientation="V" type="container">
  62. <!-- this parameter must match the portlet-container name in the static page -->
  63. <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[portletContainer1]]></parameter>
  64. <component action="update" active="true" domain="rel" ordinal="100" type="control">
  65. <!-- this parameter must match the portlet-window name in the static page -->
  66. <parameter name="com.ibm.portal.layoutnode.localname" type="string" update="set"><![CDATA[portletWindow1]]></parameter>
  67. <portletinstance action="update" domain="rel" portletref="portlet1" />
  68. </component>
  69. </component>
  70. </component>
  71. </content-node>
  72. <!-- A custom resource can be used to assign tags and ratings to resources that are not managed by XMLAccess, but can be identified by an URI -->
  73. <custom-resource action="update" objectid="ZCH_B1L68B1A00DO80IG7PCV0I1000" uri="book:mySampleBookURI">
  74. <category-instance action="update" name="cookbook"/>
  75. <category-instance action="update" name="hardcover"/>
  76. </custom-resource>
  77. <!-- Assignment of a rating value of 5 by user wpsadmin to the sample page -->
  78. <rating action="update" objectid="ZCJ_B1L68B1A00DO80IG7PCV0I2000" resourceref="samplePageOID" domain="comm" value="5" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" />
  79. <!-- Assignment of a rating value of 5 to the custom resource -->
  80. <rating action="update" objectid="ZCJ_B1L68B1A00DO80IG7PCV0I3000" resourceref="ZCH_B1L68B1A00DO80IG7PCV0I1000" domain="comm" value="5" owner="uid=wpsadmin,o=defaultwimfilebasedrealm"/>
  81. <!-- Assignment of the tag 'sample' to the sample page -->
  82. <tag action="update" objectid="ZCI_B1L68B1A00DO80IG7PCV0I4000" resourceref="samplePageOID" domain="comm" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" locale="en">sample</tag>
  83. <!-- Assignment of the tag 'sample' to the custom resource -->
  84. <tag action="update" objectid="ZCI_B1L68B1A00DO80IG7PCV0I5000" resourceref="ZCH_B1L68B1A00DO80IG7PCV0I1000" domain="comm" owner="uid=wpsadmin,o=defaultwimfilebasedrealm" locale="en">sample</tag>
  85. </portal>
  86. </request>