Professional Documents
Culture Documents
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Applies to:
SAP Net Weaver Developer Studio (NWDS) version 7.0.11 and SAP Web Application Server (WAS) version 7.0.
Summary
Knowledge Management permits common access to unstructured information and documents in a distributed storage landscape. The repositories are directly linked to the portal with preconfigured or programmable connectors. Knowledge Management provides various repository managers for different types of data and data sources. For example, data can be stored in a file system, or made available through a WebDAV server. To be able to use Knowledge Management functions on this data, you must configure a suitable repository manager for each data source. Using this tutorial you can create, copy and move any type of resources from one repository to another repository using Knowledge Management API. Author(s): Syed Rahamat Ali Company: HCL Technologies Ltd, Kolkata Created on: 08 November 2007
Author Bio
Syed Rahamat Ali is working in HCL Technologies Ltd, Kolkata as a NetWeaver Consultant.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Table of Contents
Applies to: ........................................................................................................................................ 1 Summary.......................................................................................................................................... 1 Author Bio ........................................................................................................................................ 1 Abbreviation used ............................................................................................................................ 2 Pre-Requisites ................................................................................................................................. 2 Knowledge Requirements: ........................................................................................................... 2 System Requirements:................................................................................................................. 2 Implementation: ............................................................................................................................... 2 Related Content............................................................................................................................. 10 Disclaimer and Liability Notice....................................................................................................... 11
Abbreviation used
NWDS SAP Net Weaver Developer Studio WAS SAP Web Application Server KM Knowledge Management
Pre-Requisites
Knowledge Requirements: You should have good knowledge in KM Repository Framework. System Requirements: JDK 1.4.2_15, NWDS 7.0.11
Implementation:
Step1: First Create a Portal Application workspace.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Step2: Then create an Abstract Portal Component (APC) object using NWDS (You can use jspdynpage, webdynpro, and simple servlet).
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Steps3: Write the code given below in doContent() method to create a repository under a KM repository.
IUser epUser = (IUser)request.getUser().getUser(); ResourceContext ctx = new ResourceContext(epUser); String repository = "/documents"; RID rid=RID.getRID(repository); ICollection collectiona =(ICollection) (ResourceFactory.getInstance().getResource(rid, ctx)); collectiona.createCollection(folder_name,null); Here a folder is created under the document folder.
Step4: To copy a resource from one repository to another repository, write the code given below in doContent() method.
IUser epUser = (IUser)request.getUser().getUser(); ResourceContext ctx = new ResourceContext(epUser); String repository = "/documents/syed"; RID rid = RID.getRID(repository); IResource resource = (ResourceFactory.getInstance().getResource(rid, ctx)); resource.copy(RID.getRID(/documents/test),null);
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Here all the resource under document/syed folder is copied to document/test folder. Here before copy the test folder does not exist in documents. If you want to copy in an existing folder write the code given below ICopyParameter param = new CopyParameter(true); Resource.copy(RID.getRID(/documents/test), param);
Step5: To move a resource from one repository to another repository, write the code given below in doContent() method.
IUser epUser = (IUser)request.getUser().getUser(); ResourceContext ctx = new ResourceContext(epUser); String repository = "/documents/syed"; RID rid = RID.getRID(repository); IResource resource= (ResourceFactory.getInstance().getResource(rid, ctx)); resource.move(RID.getRID(/documents/test),null);
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.
Related Content
SDN Help SAP Help
How to Create, Copy, and Move, Resources in the Knowledge Management Repository Using Knowledge Management API.