on 07-10-2008 9:51 PM
Hello - Does anyone have any tips for accessing KM documents in a web dynpro application? I have tried some of the examples found here but several of the methods were deprecated. Any help would be appreciated. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Refer this sample code. unfortunately that page is not opening directly.
public void getAllStores( )
{
//@@begin getAllStores()
String prefix = "/documents/Public Documents/Store Data/";
wdContext.nodeStoreTable().invalidate();
IPrivateDocManageView.IStoreTableElement contentElement;
try {
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser ep5user =
WPUMFactory.getUserFactory().getEP5User(sapUser);
IResourceContext resourceontext = new ResourceContext(ep5user);
IResourceFactory resourcefactory =
com.sapportals.wcm.repository.ResourceFactory.getInstance();
RID pathRID = RID.getRID(prefix);
com.sapportals.wcm.repository.IResource resource =
resourcefactory.getResource(pathRID, resourceontext);
ICollection collection = (ICollection) resource;
IResourceList resoucelist = collection.getChildren();
IResourceListIterator resourelistiterator =
resoucelist.listIterator();
while (resourelistiterator.hasNext()) {
String store = null;
com.sapportals.wcm.repository.IResource tempresouce =
resourelistiterator.next();
if (tempresouce.getName().equals(
wdContext.currentFilterDataElement().getFromStore())) {
contentElement = wdContext.createStoreTableElement();
contentElement.setObjectName(
prefix + tempresouce.getName());
wdContext.nodeStoreTable().addElement(contentElement);
tempresouce = resourelistiterator.next();
while (!tempresouce.getName().equals(
wdContext.currentFilterDataElement().getToStore())) {
contentElement = wdContext.createStoreTableElement();
contentElement.setObjectName(
prefix + tempresouce.getName());
wdContext.nodeStoreTable().addElement(contentElement);
tempresouce = resourelistiterator.next();
}
tempresouce = resourelistiterator.next();
break;
}
} // while iterate
} catch (Exception e) {
e.printStackTrace();
}
Mandeep Virk
Hi,
While using KM API ,
com.sapportals.portal.security.usermanagement.IUser ,WPUMFactory.getUserFactory().getEP5User() and com.sapportals.portal.security.usermanagement.UserManagementException
are depricated classes and methods , but there is no alternative to to get EP5 user to access KM Resource Context.
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check these links
/thread/98041 [original link is broken]
/thread/190201 [original link is broken]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.