Initial TCA commit into DCAEGEN2
[dcaegen2/analytics/tca.git] / dcae-analytics-common / src / test / java / org / openecomp / dcae / apod / analytics / common / service / processor / TestProcessorContext.java
1 /*
2  * ===============================LICENSE_START======================================
3  *  dcae-analytics
4  * ================================================================================
5  *    Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  *  Licensed under the Apache License, Version 2.0 (the "License");
8  *  you may not use this file except in compliance with the License.
9  *   You may obtain a copy of the License at
10  *
11  *          http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *  Unless required by applicable law or agreed to in writing, software
14  *  distributed under the License is distributed on an "AS IS" BASIS,
15  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *  See the License for the specific language governing permissions and
17  *  limitations under the License.
18  *  ============================LICENSE_END===========================================
19  */
20
21 package org.openecomp.dcae.apod.analytics.common.service.processor;
22
23 import java.util.LinkedList;
24 import java.util.List;
25
26 /**
27  *
28  * @author Rajiv Singla . Creation Date: 11/8/2016.
29  */
30 public class TestProcessorContext implements ProcessorContext {
31
32     private String message;
33     private boolean continueProcessingFlag;
34     private String result;
35     private List<? super MessageProcessor<? extends ProcessorContext>> messageProcessors;
36
37     public TestProcessorContext(String message, boolean continueProcessingFlag) {
38         this.message = message;
39         this.continueProcessingFlag = continueProcessingFlag;
40         this.messageProcessors = new LinkedList<>();
41     }
42
43     @Override
44     public String getMessage() {
45         return message;
46     }
47
48     @Override
49     public boolean canProcessingContinue() {
50         return continueProcessingFlag;
51     }
52
53     @Override
54     public void setProcessingContinueFlag(boolean canProcessingContinue) {
55         this.continueProcessingFlag = canProcessingContinue;
56     }
57
58     @Override
59     public List<? super MessageProcessor<? extends ProcessorContext>> getMessageProcessors() {
60         return messageProcessors;
61     }
62
63
64     public void setMessage(String message) {
65         this.message = message;
66     }
67
68     public boolean isContinueProcessingFlag() {
69         return continueProcessingFlag;
70     }
71
72     public void setContinueProcessingFlag(boolean continueProcessingFlag) {
73         this.continueProcessingFlag = continueProcessingFlag;
74     }
75
76     public String getResult() {
77         return result;
78     }
79
80     public void setResult(String result) {
81         this.result = result;
82     }
83
84 }