View Javadoc

1   /**
2    * Copyright 2010-2013 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.common.util.execute;
17  
18  import java.io.File;
19  
20  public class CopyFileResult {
21  
22  	public static final boolean DEFAULT_OVERWRITTEN_VALUE = false;
23  	public static final long DEFAULT_ELAPSED_VALUE = -1;
24  
25  	long elapsed = DEFAULT_ELAPSED_VALUE;
26  	boolean overwritten = DEFAULT_OVERWRITTEN_VALUE;
27  	File source;
28  	File destination;
29  
30  	public CopyFileResult() {
31  		this(null, null, DEFAULT_OVERWRITTEN_VALUE);
32  	}
33  
34  	public CopyFileResult(File source, File destination, boolean overwritten) {
35  		this(source, destination, overwritten, DEFAULT_ELAPSED_VALUE);
36  	}
37  
38  	public CopyFileResult(File source, File destination, boolean overwritten, long elapsed) {
39  		super();
40  		this.source = source;
41  		this.destination = destination;
42  		this.overwritten = overwritten;
43  		this.elapsed = elapsed;
44  	}
45  
46  	public File getDestination() {
47  		return destination;
48  	}
49  
50  	public void setDestination(File destination) {
51  		this.destination = destination;
52  	}
53  
54  	public boolean isOverwritten() {
55  		return overwritten;
56  	}
57  
58  	public void setOverwritten(boolean overwritten) {
59  		this.overwritten = overwritten;
60  	}
61  
62  	public long getElapsed() {
63  		return elapsed;
64  	}
65  
66  	public void setElapsed(long elapsed) {
67  		this.elapsed = elapsed;
68  	}
69  
70  	public File getSource() {
71  		return source;
72  	}
73  
74  	public void setSource(File source) {
75  		this.source = source;
76  	}
77  
78  }