Making the extension point class available
To make the extension point class available to IBM® Product Master, you need to load the .class file to the document store. Or, you need to make the .class file available using a .JAR file in the class path of the Product Master instance.
Before you begin
About this task
- Use one of the following methods to make the extension point class
available to Product Master:
- Load the .class file directly to the document store. You can use a simple
Java™ class, which is based on Product Master
Java API, to upload a .class file to the
document store. The class can be loaded under a subfolder in the document store as well. The file
system can be used as a document store in Product Master. The same file system location can be used
as a repository of .class files. Note: When the .class files are directly loaded to the document store, users are individually working on a particular extension point. This approach might be suitable when you develop the extension point implementation code but is not suited for production environments where there is a need to deploy multiple extension point implementations. Since typically a Product Master deployment has multiple extension points that are implemented, by using a single JAR file to bundle all these classes and deploy them is less error prone compared to handling them individually.
- Approach® 1: Mount the file system as docstore
- By using a file system-mounted docstore, the local file system can be used as a repository of Java API extension point classes. After the file system is mounted, the .class files can be directly copied to that location.
- Approach 2: Use Java APIs to load the .class into docstore
- This approach uses a Java API-based application to upload the .class file. In the following sample code, the .class file gets loaded into the /uploaded_java_classes directory area of the document store. This code segment can be used in a stand-alone Java program, which is compiled and run as Java application. This program can be further updated to clean up all of the classes in the docstore before you upload and can be made to upload more than one .class file.
- Use the custom or user JAR mechanism. You can use the custom or user .jar mechanism to make an extension point implementation class available to the Product Master system. With this mechanism, all of the extension point implementation classes are bundled into a JAR file and the JAR file is made available to Product Master. This approach is suitable when there are several extension point implementation classes.
- Load the .class file directly to the document store. You can use a simple
Java™ class, which is based on Product Master
Java API, to upload a .class file to the
document store. The class can be loaded under a subfolder in the document store as well. The file
system can be used as a document store in Product Master. The same file system location can be used
as a repository of .class files.