diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2020-02-21 15:37:22 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-21 15:37:22 +0000 |
commit | 5e83ac6cd9c5276bfe861010b7879615da255fdb (patch) | |
tree | 3da47ae68758073782fc1ecd344bb158678cfe68 /models-interactions/model-actors/actor.aai/src/main | |
parent | 4d99fa993f76b9bc271dff7dbe336b281800403e (diff) | |
parent | 467247c7970f9ae83464d78929ed970bbf03c593 (diff) |
Merge "More actor clean-up"
Diffstat (limited to 'models-interactions/model-actors/actor.aai/src/main')
3 files changed, 17 insertions, 17 deletions
diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java index df427c32c..a65a000ed 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiActorServiceProvider.java @@ -23,25 +23,25 @@ package org.onap.policy.controlloop.actor.aai; import org.onap.policy.aai.AaiConstants; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpActor; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator; +import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpActorParams; /** * A&AI Actor. */ -public class AaiActorServiceProvider extends HttpActor { +public class AaiActorServiceProvider extends HttpActor<HttpActorParams> { public static final String NAME = AaiConstants.ACTOR_NAME; /** * Constructs the object. */ public AaiActorServiceProvider() { - super(NAME); + super(NAME, HttpActorParams.class); - addOperator(HttpOperator.makeOperator(NAME, AaiCustomQueryOperation.NAME, - AaiCustomQueryOperation::new)); + addOperator(new HttpOperator(NAME, AaiCustomQueryOperation.NAME, AaiCustomQueryOperation::new)); // add all "get" operators for (String operation : AaiGetOperation.OPERATIONS) { - addOperator(HttpOperator.makeOperator(NAME, operation, AaiGetOperation::new)); + addOperator(new HttpOperator(NAME, operation, AaiGetOperation::new)); } } } diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java index 427701505..6b0287101 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiCustomQueryOperation.java @@ -32,8 +32,8 @@ import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation; -import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; +import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,10 +56,10 @@ public class AaiCustomQueryOperation extends HttpOperation<String> { * Constructs the object. * * @param params operation parameters - * @param operator operator that created this operation + * @param config configuration for this operation */ - public AaiCustomQueryOperation(ControlLoopOperationParams params, HttpOperator operator) { - super(params, operator, String.class); + public AaiCustomQueryOperation(ControlLoopOperationParams params, HttpConfig config) { + super(params, config, String.class); } /** @@ -91,7 +91,7 @@ public class AaiCustomQueryOperation extends HttpOperation<String> { // @formatter:off return handleResponse(outcome, url, - callback -> getOperator().getClient().put(callback, makePath(), entity, headers)); + callback -> getClient().put(callback, makePath(), entity, headers)); // @formatter:on } diff --git a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java index dd3a4d6c0..408c1a0b1 100644 --- a/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java +++ b/models-interactions/model-actors/actor.aai/src/main/java/org/onap/policy/controlloop/actor/aai/AaiGetOperation.java @@ -31,8 +31,8 @@ import org.onap.policy.common.endpoints.utils.NetLoggerUtil.EventType; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperation; -import org.onap.policy.controlloop.actorserviceprovider.impl.HttpOperator; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; +import org.onap.policy.controlloop.actorserviceprovider.parameters.HttpConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -68,11 +68,11 @@ public class AaiGetOperation extends HttpOperation<StandardCoderObject> { * Constructs the object. * * @param params operation parameters - * @param operator operator that created this operation + * @param config configuration for this operation */ - public AaiGetOperation(ControlLoopOperationParams params, HttpOperator operator) { - super(params, operator, StandardCoderObject.class); - this.propertyPrefix = operator.getFullName() + "."; + public AaiGetOperation(ControlLoopOperationParams params, HttpConfig config) { + super(params, config, StandardCoderObject.class); + this.propertyPrefix = getFullName() + "."; } /** @@ -98,7 +98,7 @@ public class AaiGetOperation extends HttpOperation<StandardCoderObject> { // @formatter:off return handleResponse(outcome, url, - callback -> getOperator().getClient().get(callback, makePath(), headers)); + callback -> getClient().get(callback, makePath(), headers)); // @formatter:on } @@ -109,7 +109,7 @@ public class AaiGetOperation extends HttpOperation<StandardCoderObject> { @Override public String makePath() { - return (getOperator().getPath() + "/" + params.getTargetEntity()); + return (getPath() + "/" + params.getTargetEntity()); } /** |