use of org.wso2.carbon.apimgt.rest.api.publisher.v1.dto.MockResponsePayloadListDTO in project carbon-apimgt by wso2.
the class APIMappingUtil method fromMockPayloadsToListDTO.
/**
* This method creates the list of MockPayloadDTO objects for resetting inline prototyping scripts.
*
* @param mockPayloads APIResourceMediationPolicy List
* @return mockResponsePayloadListDTO (list of MockPayloadDTO)
* @throws APIManagementException
*/
public static MockResponsePayloadListDTO fromMockPayloadsToListDTO(List<APIResourceMediationPolicy> mockPayloads) throws APIManagementException {
MockResponsePayloadListDTO mockResponsePayloadListDTO = new MockResponsePayloadListDTO();
List<MockResponsePayloadInfoDTO> mockResponsePayloadInfoDTOS = mockResponsePayloadListDTO.getList();
for (APIResourceMediationPolicy apiResourceMediationPolicy : mockPayloads) {
mockResponsePayloadInfoDTOS.add(fromMockPayloadToDTO(apiResourceMediationPolicy));
}
return mockResponsePayloadListDTO;
}
Aggregations