* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2023 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.controlloop.actor.sdnc;
+import jakarta.ws.rs.client.Entity;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure;
import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
* @param config configuration for this operation
* @param propertyNames names of properties required by this operation
*/
- public SdncOperation(ControlLoopOperationParams params, HttpConfig config, List<String> propertyNames) {
+ protected SdncOperation(ControlLoopOperationParams params, HttpConfig config, List<String> propertyNames) {
super(params, config, SdncResponse.class, propertyNames);
}
- /**
- * Starts the GUARD.
- */
- @Override
- protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
- return startGuardAsync();
- }
-
@Override
protected CompletableFuture<OperationOutcome> startOperationAsync(int attempt, OperationOutcome outcome) {
protected boolean isSuccess(Response rawResponse, SdncResponse response) {
return response.getResponseOutput() != null && "200".equals(response.getResponseOutput().getResponseCode());
}
-
- /**
- * Gets an optional property, first checking the properties, then checking the
- * enrichment data.
- *
- * @param propName property name
- * @param enrichmentName property name within the enrichment data
- * @return the property's value, or {@code null} if it is not found
- */
- protected String getOptProperty(String propName, String enrichmentName) {
- if (containsProperty(propName)) {
- // return the value, even if it's null
- return getProperty(propName);
- }
-
- return params.getContext().getEnrichment().get(enrichmentName);
- }
}