Actor redesign.
[policy/models.git] / models-interactions / model-actors / actorServiceProvider / src / main / java / org / onap / policy / controlloop / actorserviceprovider / spi / Actor.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * Actor
4  * ================================================================================
5  * Copyright (C) 2017-2018, 2020 AT&T Intellectual Property. All rights reserved.
6  * Modifications Copyright (C) 2019 Nordix Foundation.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.policy.controlloop.actorserviceprovider.spi;
23
24 import java.util.Collection;
25
26 import java.util.List;
27 import java.util.Map;
28 import java.util.Set;
29 import org.onap.policy.common.capabilities.Configurable;
30 import org.onap.policy.common.capabilities.Startable;
31 import org.onap.policy.controlloop.actorserviceprovider.Operator;
32
33 /**
34  * This is the service interface for defining an Actor used in Control Loop Operational
35  * Policies for performing actions on runtime entities.
36  *
37  * @author pameladragosh
38  *
39  */
40 public interface Actor extends Startable, Configurable<Map<String,Object>> {
41
42     /**
43      * Gets the name of the actor.
44      *
45      * @return the actor name
46      */
47     String getName();
48
49     /**
50      * Gets a particular operator.
51      *
52      * @param name name of the operation of interest
53      * @return the desired operation
54      * @throws IllegalArgumentException if no operation by the given name exists
55      */
56     Operator getOperator(String name);
57
58     /**
59      * Gets the supported operations.
60      *
61      * @return the supported operations
62      */
63     public Collection<Operator> getOperators();
64
65     /**
66      * Gets the names of the supported operations.
67      *
68      * @return the names of the supported operations
69      */
70     public Set<String> getOperationNames();
71
72
73     // TODO old code: remove lines down to **HERE**
74
75     String actor();
76
77     List<String> recipes();
78
79     List<String> recipeTargets(String recipe);
80
81     List<String> recipePayloads(String recipe);
82
83     // **HERE**
84 }