WebSphere Portal Server - findContentByAuthoringTemplate(authID) doesn't return published

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > November 2007 > findContentByAuthoringTemplate(authID) doesn't return published





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author findContentByAuthoringTemplate(authID) doesn't return published
sheetal.mahajan@wipro.com

2007-11-28, 1:46 am

If the content are in published stage then findContentByAuthoringTemplate returns content Id as null.<br />
<br />
If the content are in Draft stage then findContentByAuthoringTemplate returns content Id is not null.<br />
<p />
Workspace workspace = WCM_API.getRepository().getWorkspace(ShiftSwapperConstants.WPSName,ShiftSwapperConstants.WPSPASSWORD);<br />
workspace.setCurrentDocumentLibrary(workspace. getDocumentLibrary(ShiftSwapperConstants
.LIBRARY_NAME));<br />
DocumentIdIterator authoringTemplates = workspace.findByNameDocumentTypes.AuthoringTemplate,ShiftSwapperConstants.AUTHORING_TEMPLATE);<br />
if(authoringTemplates.hasNext()){<br />
DocumentId authId=(DocumentId)authoringTemplates.next();<br />
DocumentIdIterator contIter=workspace.findContentByAuthoringTemplate(authId);<br />
while(contIter.hasNext()){<br />
DocumentId contentId=(DocumentId)contIter.next();<br />
Content content=(Content)workspace.getById(contentId);<br />
}<br />
<br />
what is reason for this?<br />
<br />
how to get published content Id's using findContentByAuthoringTemplate();
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com