Service Registry 3 2005Q4 Developer's Guide

Using Create Methods for Objects

The LifeCycleManager interface supports create methods for all types of RegistryObject (except AuditableEvent and Notification, which can be created only by the Registry itself).

In addition, you can use the LifeCycleManager.createObject factory method to create an object of a particular type. This method takes a String argument consisting of one of the static fields supported by the LifeCycleManager interface. In the following code fragment, blcm is the BusinessLifeCycleManager object:

Organization org = (Organization)
    blcm.createObject(blcm.ORGANIZATION);

The object-specific create methods usually take one or more parameters that set some of the attributes of the object. For example, the createOrganization method sets the name of the organization:

Organization org = blcm.createOrganization("MyOrgName");

On the other hand, the createExtrinsicObject method normally takes a DataHandler argument that sets the repository item for the extrinsic object.