View Javadoc
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&oslash;l</a>
31   *
32   */
33  public class UpdateScmResult
34      extends ScmResult
35  {
36      private static final long serialVersionUID = -1578149496089492585L;
37  
38      private List<ScmFile> updatedFiles;
39  
40      private List<ChangeSet> changes;
41  
42      public UpdateScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
43      {
44          super( commandLine, providerMessage, commandOutput, success );
45      }
46  
47      public UpdateScmResult( String commandLine, List<ScmFile> updatedFiles )
48      {
49          super( commandLine, null, null, true );
50  
51          this.updatedFiles = updatedFiles;
52  
53      }
54  
55      public UpdateScmResult( List<ScmFile> updatedFiles, List<ChangeSet> changes, ScmResult result )
56      {
57          super( result );
58  
59          this.updatedFiles = updatedFiles;
60  
61          this.changes = changes;
62      }
63  
64      /**
65       *
66       * @return List of {@link ScmFile}
67       */
68      public List<ScmFile> getUpdatedFiles()
69      {
70          return updatedFiles;
71      }
72  
73      /**
74       * @return {@link List} of {@link ChangeSet}
75       */
76      public List<ChangeSet> getChanges()
77      {
78          if ( changes == null )
79          {
80              return new ArrayList<ChangeSet>();
81          }
82          return changes;
83      }
84  
85      public void setChanges( List<ChangeSet> changes )
86      {
87          this.changes = changes;
88      }
89  }