View Javadoc

1   /**
2    * Copyright 2011-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.maven.plugins.jenkins.context;
17  
18  import java.util.List;
19  
20  /**
21   * <p>
22   * Holds the result of executing an external process
23   * </p>
24   *
25   * context - holds the executable, arguments, and any input provided to the process<br>
26   * exitValue - the return value of the process - by convention zero means success<br>
27   * output - holds anything written to standard out by the process<br>
28   * outputLines - same content as 'output' but split up into individual lines<br>
29   * start - the time the process started (millis since the epoch)<br>
30   * stop - the time the process finished (millis since the epoch)<br>
31   * elapsed - the total elapsed time in millis for the process<br>
32   *
33   * @author jeffcaddel
34   */
35  
36  public class ProcessResult {
37      ProcessContext context;
38      int exitValue;
39      String output;
40      List<String> outputLines;
41      long start;
42      long stop;
43      long elapsed;
44  
45      public ProcessContext getContext() {
46          return context;
47      }
48  
49      public void setContext(ProcessContext context) {
50          this.context = context;
51      }
52  
53      public int getExitValue() {
54          return exitValue;
55      }
56  
57      public void setExitValue(int exitValue) {
58          this.exitValue = exitValue;
59      }
60  
61      public List<String> getOutputLines() {
62          return outputLines;
63      }
64  
65      public void setOutputLines(List<String> outputLines) {
66          this.outputLines = outputLines;
67      }
68  
69      public String getOutput() {
70          return output;
71      }
72  
73      public void setOutput(String output) {
74          this.output = output;
75      }
76  
77      public long getStart() {
78          return start;
79      }
80  
81      public void setStart(long start) {
82          this.start = start;
83      }
84  
85      public long getStop() {
86          return stop;
87      }
88  
89      public void setStop(long stop) {
90          this.stop = stop;
91      }
92  
93      public long getElapsed() {
94          return elapsed;
95      }
96  
97      public void setElapsed(long elapsed) {
98          this.elapsed = elapsed;
99      }
100 }