import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import javax.ws.rs.core.MediaType;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
import org.onap.aai.modelloader.config.ModelLoaderConfig;
import org.onap.aai.modelloader.restclient.AaiRestClient;
import org.onap.aai.modelloader.service.ModelLoaderMsgs;
import org.onap.aai.modelloader.util.GizmoTranslator;
-import org.onap.aai.restclient.client.OperationResult;
import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
public abstract class AbstractModelArtifact extends Artifact implements IModelArtifact {
protected boolean pushToGizmo(AaiRestClient aaiClient, ModelLoaderConfig config, String distId) {
try {
String gizmoPayload = GizmoTranslator.translate(getPayload());
- OperationResult postResponse = aaiClient.postResource(config.getAaiBaseUrl().trim(), gizmoPayload, distId,
- MediaType.APPLICATION_JSON_TYPE);
+ // TODO: Use correct responseType here
+ ResponseEntity<String> postResponse = aaiClient.postResource(config.getAaiBaseUrl().trim(), gizmoPayload, distId,
+ MediaType.APPLICATION_JSON, String.class);
- if (postResponse.getResultCode() != HttpStatus.OK.value()) {
+ if (postResponse.getStatusCode() != HttpStatus.OK) {
return false;
}
} catch (IOException e) {