Search in sources :

Example 1 with ServiceInfo

use of org.onap.so.db.catalog.beans.ServiceInfo in project so by onap.

the class ToscaResourceInstaller method createServiceInfo.

private void createServiceInfo(ToscaResourceStructure toscaResourceStruct, Service service) {
    if (!service.getServiceInfos().isEmpty()) {
        return;
    }
    List<ServiceInfo> serviceInfos = new ArrayList<>();
    ServiceInfo serviceInfo = new ServiceInfo();
    String serviceInput = getServiceInput(toscaResourceStruct);
    serviceInfo.setServiceInput(serviceInput);
    String serviceProperties = getServiceProperties(toscaResourceStruct);
    serviceInfo.setServiceProperties(serviceProperties);
    serviceInfo.setService(service);
    serviceInfos.add(serviceInfo);
    service.setServiceInfos(serviceInfos);
}
Also used : ServiceInfo(org.onap.so.db.catalog.beans.ServiceInfo) ArrayList(java.util.ArrayList)

Example 2 with ServiceInfo

use of org.onap.so.db.catalog.beans.ServiceInfo in project so by onap.

the class QueryServiceInfoTest method createList.

private List<ServiceInfo> createList() {
    Service service = mock(Service.class);
    ServiceInfo serviceInfo = new ServiceInfo();
    serviceInfo.setId(1);
    serviceInfo.setService(service);
    serviceInfo.setServiceInput(null);
    serviceInfo.setServiceProperties(null);
    List<ServiceInfo> serviceInfos = new ArrayList<>();
    serviceInfos.add(serviceInfo);
    return serviceInfos;
}
Also used : ServiceInfo(org.onap.so.db.catalog.beans.ServiceInfo) ArrayList(java.util.ArrayList) Service(org.onap.so.db.catalog.beans.Service)

Aggregations

ArrayList (java.util.ArrayList)2 ServiceInfo (org.onap.so.db.catalog.beans.ServiceInfo)2 Service (org.onap.so.db.catalog.beans.Service)1