Service Registry 3 2005Q4 Developer's Guide

Adding Slots to Objects

Slots are arbitrary attributes, so the API provides maximum flexibility for you to create them. You can provide a name, one or more values, and a type. The name and type are String objects. The value or values are stored as a Collection of String objects, but the LifeCycleManager.createSlot method has a form that allows you to specify a single String value. For example, the following code fragment creates a slot using a String value, then adds the slot to the object.

String slotName = "Branch";
String slotValue = "Paris";
String slotType = "City";
Slot slot = blcm.createSlot(slotName, slotValue, slotType);
org.addSlot(slot);

The example <INSTALL>/registry/samples/publish-object/src/JAXRPublishObject.java, described in Adding Classifications: Example, also adds a slot to an object.