Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
UpdateScmResult |
|
| 1.3333333333333333;1,333 |
1 | package org.apache.maven.scm.command.update; | |
2 | ||
3 | /* | |
4 | * Licensed to the Apache Software Foundation (ASF) under one | |
5 | * or more contributor license agreements. See the NOTICE file | |
6 | * distributed with this work for additional information | |
7 | * regarding copyright ownership. The ASF licenses this file | |
8 | * to you under the Apache License, Version 2.0 (the | |
9 | * "License"); you may not use this file except in compliance | |
10 | * with the License. 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, | |
15 | * software distributed under the License is distributed on an | |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
17 | * KIND, either express or implied. See the License for the | |
18 | * specific language governing permissions and limitations | |
19 | * under the License. | |
20 | */ | |
21 | ||
22 | import org.apache.maven.scm.ChangeSet; | |
23 | import org.apache.maven.scm.ScmFile; | |
24 | import org.apache.maven.scm.ScmResult; | |
25 | ||
26 | import java.util.ArrayList; | |
27 | import java.util.List; | |
28 | ||
29 | /** | |
30 | * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a> | |
31 | * @version $Id: UpdateScmResult.java 1054126 2010-12-31 15:18:11Z olamy $ | |
32 | */ | |
33 | public class UpdateScmResult | |
34 | extends ScmResult | |
35 | { | |
36 | ||
37 | private static final long serialVersionUID = 1L; | |
38 | ||
39 | private List<ScmFile> updatedFiles; | |
40 | ||
41 | private List<ChangeSet> changes; | |
42 | ||
43 | public UpdateScmResult( String commandLine, String providerMessage, String commandOutput, boolean success ) | |
44 | { | |
45 | 0 | super( commandLine, providerMessage, commandOutput, success ); |
46 | 0 | } |
47 | ||
48 | public UpdateScmResult( String commandLine, List<ScmFile> updatedFiles ) | |
49 | { | |
50 | 0 | super( commandLine, null, null, true ); |
51 | ||
52 | 0 | this.updatedFiles = updatedFiles; |
53 | ||
54 | 0 | } |
55 | ||
56 | public UpdateScmResult( List<ScmFile> updatedFiles, List<ChangeSet> changes, ScmResult result ) | |
57 | { | |
58 | 0 | super( result ); |
59 | ||
60 | 0 | this.updatedFiles = updatedFiles; |
61 | ||
62 | 0 | this.changes = changes; |
63 | 0 | } |
64 | ||
65 | /** | |
66 | * | |
67 | * @return List of {@link ScmFile} | |
68 | */ | |
69 | public List<ScmFile> getUpdatedFiles() | |
70 | { | |
71 | 0 | return updatedFiles; |
72 | } | |
73 | ||
74 | /** | |
75 | * @return {@link List} of {@link ChangeSet} | |
76 | */ | |
77 | public List<ChangeSet> getChanges() | |
78 | { | |
79 | 0 | if ( changes == null ) |
80 | { | |
81 | 0 | return new ArrayList<ChangeSet>(); |
82 | } | |
83 | 0 | return changes; |
84 | } | |
85 | ||
86 | public void setChanges( List<ChangeSet> changes ) | |
87 | { | |
88 | 0 | this.changes = changes; |
89 | 0 | } |
90 | } |