on 06-13-2008 9:38 AM
How can I delete KM Contents which already retrieved to a Collection?
Only one file is getting deleted. here is the code..
try {
IWDClientUser wdclientuser = WDClientUser.getCurrentUser();
IUser sapuser = wdclientuser.getSAPUser();
com.sapportals.portal.security.usermanagement.IUser ep5user =
WPUMFactory.getUserFactory().getEP5User(sapuser);
ResourceContext context = new ResourceContext(ep5user);
RID rid = null;
for (int i = 0; i <= wdContext.nodeDocs().size(); i++) {
rid = RID.getRID(wdContext.currentDocsElement().getName());
IResource res =
com
.sapportals
.wcm
.repository
.ResourceFactory
.getInstance()
.getResource(
rid,
context);
if (res != null) {
res.delete();
}
}
} catch (Exception e) {
e.printStackTrace();
}
Please give me some hints
nikhil
sorry experts. plz don't mind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi nikhil,
use the following code
IResourceFactory resourseFactory2 = ResourceFactory.getInstance();
IResource collection2 =
resourseFactory2.getResource(
rid,
context);
collection2.delete();
Regards,
P.Manivannan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.