JCR API is a Java platform specification for accessing content repositories in a uniform manner. JCR is an Object Database tailored for storage, search, and retrieval of hierarchical data. This article explains how to develop a CMS client using JCR and integrate it with FrameMaker 10 using FDK 10.
2.0 Related documentation
- JCR documentation:
- Introducing the JCR APIs:
- FDK documentation:
- JCR API documentation:
3.0 Using JCR APIs to create a session to a CMS
- Create a Java Project.
- Add the following required libraries as external to the project:
- jackrabbit-core: Jackrabbit content repository core implementation of JSR-170
- jcr: A set of interfaces conforming to the JSR-170
- log4j: A runtime logging library
- slf4j (Simple logging facade for Java): Intended to serve as a simple facade for various logging APIs allowing the user to plug in the desired implementation at deployment time
- Create session using JNDI (Java Naming and Directory Interface):
For more information, See: http://www.ibm.com/developerworks/java/library/j-jcr/ (Listing 3 and 4)
- For user interactions, create a UI. (If user interaction is in Java, use showOptionDialog.)
4.0 Implementing FDK client
Use any FDK sample as a reference to create a Sample Connector that interacts with CMS client using process. You can add CMS features such as Create Session, Check out, and Check in as FrameMaker Menu Commands to a menu that interacts with the Java code.
To create a sample FDK client, complete the following steps:
- Using F_ApiDefineAndAddMenu, add a menu (for example CMS) to MakerMainMenu, BookMainMenu, and DitamapMainMenu.
- Using F_ApiDefineAndAddCommand, add commands such as Create Session, Check out, Check in, and Delete to the menus.
- Write the handling of the comment using one of the following two approaches:
JNI (Java Native Interface): Call jmethodID directly with the applicable arguments. For more information on JNI, see http://download.oracle.com/javase/1.5.0/docs/guide/jni/spec/jniTOC.html.
Java executable as a process: Call Java executable as a process. Run a process for each Menu command or run with command ID as argument.
- If user interaction is required, use FDK to add the UI. For more information, see F_ApiOpenResource in FDK Programmer's Reference (fdkref.pdf).
5.0 A sample implementation
A sample implementation has been created using Day CRX as the CMS. Click here to know more about the sample implementation and to download sample code.