use of com.emc.vipr.model.catalog.ServiceDescriptorList in project coprhd-controller by CoprHD.
the class ServiceDescriptorService method getServiceDescriptors.
/**
* List service descriptors
*
* @prereq none
* @brief List service descriptors
* @return List of service descriptors
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("")
public ServiceDescriptorList getServiceDescriptors() {
Collection<ServiceDescriptor> descriptors = this.serviceDescriptors.listDescriptors(Locale.getDefault());
descriptors.addAll(workflowServiceDescriptor.listDescriptors());
List<ServiceDescriptorRestRep> serviceDescriptors = Lists.newArrayList();
for (ServiceDescriptor descriptor : descriptors) {
serviceDescriptors.add(map(descriptor));
}
ServiceDescriptorList serviceDescriptorList = new ServiceDescriptorList(serviceDescriptors);
return serviceDescriptorList;
}
Aggregations