on 10-28-2009 9:07 AM
Hi,
Please let me know how to delete the files in KM using WebDynpro Java (I am using NetWeaver 7.0).
Regards,
Umapathi
This should get you running.. (I just did this out of my head, so some changes could be needed)
import com.sap.security.api.IUser;
import com.sapportals.portal.prt.resource.IResource;
import com.sapportals.wcm.repository.IResourceFactory;
import com.sapportals.wcm.repository.ResourceContext;
import com.sapportals.wcm.repository.ResourceFactory;
import com.sapportals.wcm.util.uri.RID;
import com.sapportals.wcm.util.usermanagement.WPUMFactory;
IUser currentUser = WDClientUser.getCurrentUser().getSAPUser();
IResourceFactory factory = ResourceFactory.getInstance();
ResourceContext cmAdmincontext = new ResourceContext(WPUMFactory.getUserFactory().getEP5User(currentUser));
IResource KMResource = factory.getResource(RID.getRID(path + "/" + resourcename), cmAdmincontext);
KMResource.delete();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
How can I copy files in KM without overwrite the content?
I think the copy() method of IResource, overwrite content...
i.e.:
There is a source folder with FileA & FileB.
The destination folder has FileA.
I need to copy just FileB, no overwrite FileA.
It's possible? This is an example, in my case I will copy hyndreds of files and I need this validation.
Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.