API Management 10.4 | CentraSite for Developers | API for JAXR | Defining a Service
 
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

Copyright © 2015- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release