diff options
author | Jim Hahn <jrh3@att.com> | 2020-07-13 16:06:57 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-07-13 16:07:54 -0400 |
commit | c88676ec64c4c870252502bc1cfaa8990c8fd964 (patch) | |
tree | d88ec0ac29d5c3066fab025392df4a69256cf288 /models-interactions/model-actors/actorServiceProvider/src | |
parent | e4e7d15db6d2f79658e3a5f9e8326ea092afcfab (diff) |
Remove legacy actor code from models
Deleted legacy actor code. That includes deleting most of the
XxxManager classes.
Issue-ID: POLICY-2559
Change-Id: I1ef1b900ca1d23e88da64b2c95a18986feb1b765
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actorServiceProvider/src')
4 files changed, 0 insertions, 135 deletions
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/ActorImpl.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/ActorImpl.java index c3c815e80..336860ecb 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/ActorImpl.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/impl/ActorImpl.java @@ -21,8 +21,6 @@ package org.onap.policy.controlloop.actorserviceprovider.impl; import java.util.Collection; -import java.util.Collections; -import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -220,28 +218,4 @@ public class ActorImpl extends StartConfigPartial<Map<String, Object>> implement "failed to shutdown operation {}.{}", actorName, oper.getName())); // @formatter:on } - - // TODO old code: remove lines down to **HERE** - - @Override - public String actor() { - return null; - } - - @Override - public List<String> recipes() { - return Collections.emptyList(); - } - - @Override - public List<String> recipeTargets(String recipe) { - return Collections.emptyList(); - } - - @Override - public List<String> recipePayloads(String recipe) { - return Collections.emptyList(); - } - - // **HERE** } diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java index 52d1a5a9a..ff1ed1798 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java +++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java @@ -22,7 +22,6 @@ package org.onap.policy.controlloop.actorserviceprovider.spi; import java.util.Collection; -import java.util.List; import java.util.Map; import java.util.Set; import org.onap.policy.common.capabilities.Configurable; @@ -75,17 +74,4 @@ public interface Actor extends Startable, Configurable<Map<String, Object>> { * @return the actor sequence number */ public int getSequenceNumber(); - - - // TODO old code: remove lines down to **HERE** - - String actor(); - - List<String> recipes(); - - List<String> recipeTargets(String recipe); - - List<String> recipePayloads(String recipe); - - // **HERE** } diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java deleted file mode 100644 index abf156b58..000000000 --- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * TestActorServiceProvider - * ================================================================================ - * Copyright (C) 2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. - * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.controlloop.actorserviceprovider; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; -import org.onap.policy.controlloop.actorserviceprovider.spi.Actor; - -// TODO combine this with ActorServiceTest - -public class ActorServiceProviderTest { - - private static final String DOROTHY = "Dorothy"; - - @Test - public void testActorServiceProvider() { - ActorService actorService = new ActorService(); - - assertTrue(actorService.getActors().size() >= 1); - - Actor dummyActor = actorService.getActor(DummyActor.class.getSimpleName()); - - assertEquals("DummyActor", dummyActor.actor()); - - assertEquals(2, dummyActor.recipes().size()); - assertEquals(DOROTHY, dummyActor.recipes().get(0)); - assertEquals("Wizard", dummyActor.recipes().get(1)); - - assertEquals(2, dummyActor.recipeTargets(DOROTHY).size()); - assertEquals(2, dummyActor.recipePayloads(DOROTHY).size()); - - // verify that we get a new actor object if we create a new service - Actor dummyActor2 = new ActorService().getActor(DummyActor.class.getSimpleName()); - assertNotNull(dummyActor2); - assertNotSame(dummyActor, dummyActor2); - } -} diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java index 76cadffa6..f10694de6 100644 --- a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java +++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java @@ -22,8 +22,6 @@ package org.onap.policy.controlloop.actorserviceprovider; -import java.util.ArrayList; -import java.util.List; import org.onap.policy.controlloop.actorserviceprovider.impl.ActorImpl; public class DummyActor extends ActorImpl { @@ -31,36 +29,4 @@ public class DummyActor extends ActorImpl { public DummyActor() { super(DummyActor.class.getSimpleName()); } - - @Override - public String actor() { - return this.getClass().getSimpleName(); - } - - @Override - public List<String> recipes() { - List<String> recipeList = new ArrayList<>(); - recipeList.add("Dorothy"); - recipeList.add("Wizard"); - - return recipeList; - } - - @Override - public List<String> recipeTargets(String recipe) { - List<String> recipeTargetList = new ArrayList<>(); - recipeTargetList.add("Wicked Witch"); - recipeTargetList.add("Wizard of Oz"); - - return recipeTargetList; - } - - @Override - public List<String> recipePayloads(String recipe) { - List<String> recipePayloadList = new ArrayList<>(); - recipePayloadList.add("Dorothy"); - recipePayloadList.add("Toto"); - - return recipePayloadList; - } } |