Skip to Content
Author's profile photo Pankaj Kumar

Mass Creation of Portal Content – Generic Creator

Consider these scenarios

  • In your portal implementation you need to integrate a lot of websites. So you find yourself creating a lot of similar URL-based iViews. After creating a few you are getting impatient and you want the higher gods to help you avoid this boredom.


There can be more scenarios like this but you get the basic picture. There are repetitive tasks to be performed during the content creation and you want to automate this. Your prayers have been answered and now we have a robust(at least I think) implementation of the Generic Creator in the latest portal releases. What is even better is that there is a HOWTO telling you the guts of this component. Please download it and feel the love.

It would be bad of me to end this blog without giving some examples. So here is the XML code you can use for the above mentioned two scenarios: creating a folder hierarchy, and creating URL iViews. As always you will be doing it at your own risk.

For uploading the given XML code, create an XML file with the given code and then visit the following:

System Administration -> Transport -> Upload Content and Actions


image


<Context parent=”portal_content” name=”$.general”  objectClass=”com.sap.portal.pcd.gl.GlContext”  title=”General” >

     <Context  name=”$.general.iviews” objectClass=”com.sap.portal.pcd.gl.GlContext”  title=”iViews” />
     <Context  name=”$.general.pages” objectClass=”com.sap.portal.pcd.gl.GlContext”  title=”Pages” />
     <Context  name=”$
.general.worksets” objectClass=”com.sap.portal.pcd.gl.GlContext”  title=”Worksets” />
     <Context  name=”$.general.roles” objectClass=”com.sap.portal.pcd.gl.GlContext”  title=”Roles” />

</Context>

</GenericCreator>
</textarea>
<p>
After this you should see something like this in the Portal Content Studio
<p>
image

<p><b>
Creating a URL iView</b>
<p>
This creates a URL-based iView in General/iViews created above.
<p>
<textarea rows=”10″ cols=”90″>
<GenericCreator author=”Pankaj Kumar” version=”Portal Content 1.0″ mode=”execute” createMode=”1″ log.level=”success” default.locale=”en” ignore=”false”>

     <Property name=”namespace” value=”com.mycompany.pct”/>
     <Property name=”locale” value=”en”/>

<Context parent=”portal_content/$.general/$.general.iviews” create_as=”0″ name=”$.general.iviews.Google”  objectClass=”com.sapportals.portal.iview”  title=”Google” template=”portal_content/templates/iviews/urliview” >
       
image


I have tested this code on EP 6.0 SP7 on WAS 6.40 SP8 in a Windows environment.

Assigned tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Hallo Pankaj,

      thank's for the very good and detailed summary. This still works fine on Stack 12, which we have.

      Best regards

      Frank Keidel

      Author's profile photo Former Member
      Former Member
      Great article!

      Your example works like a rock. When I am trying to import folders and iviews (both definitions in one xml file) into the portal, the portal seems to hang...

      Are there limitations? I am trying to import 10 folders and 20 iviews at once. This does not work.

      When I import the 10 folders separate it works. When I try to import the 20 iviews it works as well...

      But when I try to import the complete xml file, the portal hangs (even no failure message, a reboot is required to solve the crash).

      Maybe there are more guideliness 🙂

      Author's profile photo Pankaj Kumar
      Pankaj Kumar
      Blog Post Author
      Hello N Hendrikx

      Great that you found my post useful. Few things might have changed in the APIs for Generic Creator. For the latest and greatest on Mass content creation guideline I would recommend to read the the following Howto

      https://websmp102.sap-ag.de/~form/sapnet?_SHORTKEY=00200797470000073623&_OBJECT=011000358700003443012004E

      Author's profile photo Noël Hendrikx
      Noël Hendrikx
      To share the solution for my problem:

      We had a database problem, it had nothing to do with the xml 🙂

      cheers,

      Noel