Search in sources :

Example 1 with InstanceStateApiData

use of org.eclipse.winery.repository.rest.resources.apiData.InstanceStateApiData in project winery by eclipse.

the class InstanceStatesResource method getInstanceStates.

@GET
@Produces(MediaType.APPLICATION_JSON)
public List<InstanceStateApiData> getInstanceStates() {
    List<TInstanceState> instanceStates = this.instanceStates;
    ArrayList<InstanceStateApiData> states = new ArrayList<>(instanceStates.size());
    for (TInstanceState instanceState : instanceStates) {
        states.add(new InstanceStateApiData(instanceState.getState()));
    }
    return states;
}
Also used : ArrayList(java.util.ArrayList) InstanceStateApiData(org.eclipse.winery.repository.rest.resources.apiData.InstanceStateApiData) TInstanceState(org.eclipse.winery.model.tosca.TInstanceState) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

ArrayList (java.util.ArrayList)1 GET (javax.ws.rs.GET)1 Produces (javax.ws.rs.Produces)1 TInstanceState (org.eclipse.winery.model.tosca.TInstanceState)1 InstanceStateApiData (org.eclipse.winery.repository.rest.resources.apiData.InstanceStateApiData)1