on 03-18-2009 4:30 AM
I need to develop a component which will accept a KM folder name as an input field from UI (for eg : \documents\folder1) and will display all the subfolders and files inside that KM folder along with its details. Need info on how i can implement this and if anyone has already done something similar please help.
Regards
Shabeer
Edited by: Mohammed Shabeer on Mar 18, 2009 5:31 AM
Hi,
The below document will help you
Regards
Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can achieve this using KM API's.
Assuming your folder location is /documents/xxx. chekc the sample code below.
IUser user = request.getUser(); //You can use cmadmin service as alternate option//
String location = "/documents/xxx";
IResourceContext resourceContext = new ResourceContext(user);
RID rid = RID.getRID(location);
IResource resource = ResourceFactory.getInstance().getResource(rid,resourceContext);
ICollection collection = (ICollection) resource;
IResourceList resourceList = collection.getChildren(); //Gives list of files and folders inside the KM location//
for(int i=0;i<resourceList.size();i++) {
IResource res = resourceList.get(i);
//Get the required info from the resource object and display
}
For further details, check the link below
http://help.sap.com/javadocs/NW04S/current/km/index.html
Regards,
Yoga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.