As discussed earlier, creating objects using the BusinessObjects Enterprise SDK requires first instantiating an object factory called the plugin manager. In programming, a factory provides users a place for instantiating several types of objects. The IPluginMgr factory uses a method named getPluginInfo that takes the object's internal program ID identifier type. This is the PROG_ID property found in every object. As noted earlier, objects may be created, but not submitted, individually to the InfoStore. An InfoObject collection must be created first and then new objects can be added to it. The ID of the object is available immediately after it is added to the collection using the standard getID() accessor method. Most objects require setting their title (name) and parent object identifier. Some, such as users and groups, do not. Please consult the documentation before creating new document typesmany require implementing interfaces that are beyond the scope of this book. Listing 30.5 shows how to create a new folder object using the PluginMgr and capture its unique identifier. Listing 30.5. Creating a Folder
|