Defining a Service
A service is provided by an organization. It should have a name and a description, and the details are specified by service bindings, which are further detailed by specification links. The following code snippet, which assumes that the providing organization is known, shows how to create a new service:
Organization providingOrganization = ...;
Service service = m_lcManager.createService("service name");
service.setProvidingOrganization(providingOrganization);
InternationalString description =
lcManager.createInternationalString("service description");
service.setDescription(description);
ServiceBinding serviceBinding = ...;
// create service binding with specification links
service.addServiceBinding(serviceBinding);
ArrayList serviceList = new ArrayList();
serviceList.add(service);
lcManager.saveServices(serviceList);
// save service and related modified objects