CentraSite 10.5 | CentraSite Developer's Guide | API for JAXR | Service with Additional Information
 
Service with Additional Information
Each JAXR-based object instance may be supplied with arbitrary additional information. JAXR uses the slot mechanism to provide this kind of extensibility.
Note:
JAXR allows arbitrary strings as slot names. The CentraSite implementation stores a slot by creating an XML element whose tag name is the slot name. Consequently, a slot name should be a valid XML QName. If a QName has a non-null URI, the lexical representation of the slotname is the URI enclosed in curly braces, followed by the local-name, for example {myUri}mySlotname.
The following code snippet shows how to add a slot to a service object:
Service service = ...;
 
Slot slot = lcManager.createSlot("{myUri}mySlotName", "slotValue", null);
service.addSlot(slot);
 
ArrayList serviceList = new ArrayList();
serviceList.add(service);
lcManager.saveServices(serviceList);