Clean up license text in appc-sequence-generator
[appc.git] / appc-sequence-generator / appc-sequence-generator-bundle / src / main / java / org / onap / appc / seqgen / objects / Constants.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Copyright (C) 2017 Amdocs
8  * =============================================================================
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  * ============LICENSE_END=========================================================
23  */
24
25 package org.onap.appc.seqgen.objects;
26
27 public class Constants {
28     public static final String RETRY_COUNT = "retry-count";
29     public static final String WAIT_TIME = "wait-time";
30     public static final Integer WAIT_TIME_VALUE = 60;
31     public static final Integer RETRY_COUNT_VALUE = 4;
32     public static final String STRATEGY = "strategy";
33     public static final String VNFC_TYPE = "vnfc-type";
34
35     public enum CapabilityLevel{
36         VNF("vnf"),VNFC("vnfc"),VM("vm");
37         private String level;
38         CapabilityLevel(String level) {
39             this.level=level;
40         }
41
42         public String getLevel() {
43             return level;
44         }
45     }
46
47     public enum Capabilties{
48         START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication");
49         private String capability;
50
51         Capabilties(String capability) {
52             this.capability=capability;
53         }
54         public String getCapability(){
55             return capability;
56         }
57     }
58
59     public enum ResponseMessage{
60         HEALTHY("healthy"),UNHEALTHY("unhealthy"),SUCCESS("success"),FAILURE("failure");
61
62         public String getResponse() {
63             return response;
64         }
65
66         private String response;
67         ResponseMessage(String response){
68             this.response=response;
69         }
70
71     }
72
73     public enum ResponseAction{
74         STOP("stop"),RETRY("retry"),IGNORE("ignore"),WAIT("wait"),CONTINUE("Continue"),JUMP("jump");
75
76         ResponseAction(String action) {
77             this.action=action;
78         }
79
80         private String action;
81
82         public String getAction() {
83             return action;
84         }
85
86     }
87
88     public enum Action{
89         START("Start"),START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication"),STOP("Stop");
90
91         Action(String actionType) {
92             this.actionType=actionType;
93         }
94
95         public String getActionType() {
96             return actionType;
97         }
98
99         private String actionType;
100
101     }
102     public enum ActionLevel{
103         VM("vm"),VNFC("vnfc"),VNF("vnf"),VF_MODULE("vf-module");
104         private String action;
105         ActionLevel(String action){
106             this.action=action;
107         }
108
109         public String getAction() {
110             return action;
111         }
112
113         public static ActionLevel findByString(String actoinLevel) {
114             for (ActionLevel acnlevel : ActionLevel.values()) {
115                 if (acnlevel.name().equals(actoinLevel))
116                     return acnlevel;
117             }
118             return  null;
119         }
120     }
121
122     public enum PreCheckOperator{
123         ANY("any"),ALL("all");
124
125         PreCheckOperator(String operator){
126             this.operator=operator;
127         }
128
129         public String getOperator() {
130             return operator;
131         }
132
133         private String operator;
134
135     }
136 }