Search in sources :

Example 1 with ListResponse

use of org.entando.entando.aps.system.services.api.model.ListResponse in project entando-core by entando.

the class ServicesResponseResult method getResult.

@XmlElement(name = "services", required = false)
public ListResponse getResult() {
    if (this.getMainResult() instanceof Collection) {
        List<ServiceInfo> services = new ArrayList<ServiceInfo>();
        services.addAll((Collection<ServiceInfo>) this.getMainResult());
        ListResponse listResponse = new ListResponse(services) {
        };
        return listResponse;
    }
    return null;
}
Also used : ServiceInfo(org.entando.entando.aps.system.services.api.model.ServiceInfo) ListResponse(org.entando.entando.aps.system.services.api.model.ListResponse) ArrayList(java.util.ArrayList) Collection(java.util.Collection) XmlElement(javax.xml.bind.annotation.XmlElement)

Aggregations

ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 XmlElement (javax.xml.bind.annotation.XmlElement)1 ListResponse (org.entando.entando.aps.system.services.api.model.ListResponse)1 ServiceInfo (org.entando.entando.aps.system.services.api.model.ServiceInfo)1