Free community discussion board for IBM® WebSphere® Portal
and Lotus Web Content Management™
(WCM / ILWWCM / LWWCM / WWCM) products.
You are not logged in.
Pages: 1
Hi All,
I am working in lotus Quickr and got to know the components in it like Wikis, Blogs, Ask the expert, Suggestion scheme and Discussion forum use WCM as their repository.
I am trying to get the latest entries(say one week older) in the above mentioned components, which means I should use the WCM API to get the content. Please correct me if I am wrong here.
I have used the WCM api's workspace.findContentModifiedSince(Date) method to get the entries, but this approach didn't provide the expected result. Below is the code snippet and the output that i get
when iterating through the DocumentIdIterator.
Please provide me your valuable suggestion on get the content from WCM.
private void getWCMComponentsData(PortletRequest request, PortletResponse response){
Workspace workspace = WCM_API.getRepository().getWorkspace(request.getUserPrincipal());
workspace.useLiveAccess(true);
Calendar CALENDAR = Calendar.getInstance();
CALENDAR.add(Calendar.DAY_OF_YEAR, -1000);
System.out.println(" test for date : "+CALENDAR.getTime());
DocumentIdIterator docIdItr = workspace.findContentModifiedSince(CALENDAR.getTime());
//System.out.println("test for docidItr : "+docIdItr.nextId().getId());
ArrayList whatsNewAList = new ArrayList();
while(docIdItr.hasNext()){
DocumentId docIdObj= docIdItr.nextId();
Document docObj = workspace.getById(docIdObj);
System.out.println("TItle "+docObj.getTitle()+" ModifiedDate: "+docObj.getModifiedDate());
whatsNewAList.add("WCM::- "+docObj.getTitle()+" -- "+docObj.getModifiedDate());
} }
Output of the above code
Title ModifiedDate
@nls@blog.management.title@ Wed May 13 14:40:15 EDT 2009
@nls@richtext.title@ Wed May 13 14:40:15 EDT 2009
@nls@team.blog.title@ Wed May 13 14:40:15 EDT 2009
@nls@team.discussion.title@ Wed May 13 14:41:20 EDT 2009
@nls@wiki.list.view.title@ Wed May 13 14:40:15 EDT 2009
@nls@wiki.welcome.title@ Wed May 13 14:40:15 EDT 2009
Announcements Wed May 13 14:40:15 EDT 2009
CalendarDefaultContent Wed May 13 14:40:59 EDT 2009
Comments - New Wed May 13 14:40:15 EDT 2009
Comments - Update Wed May 13 14:40:15 EDT 2009
Contact Wed May 13 14:40:15 EDT 2009
HTML Wed May 13 14:40:15 EDT 2009
Project Task Wed May 13 14:40:15 EDT 2009
Reference Links Wed May 13 14:40:15 EDT 2009
Setup Task Wed May 13 14:40:15 EDT 2009
Sorry for the lengthy post.. Please let me know your suggestion on achieving this.
Thanks for your response,
Vignesh
Offline
Pages: 1