View Javadoc
1   package org.apache.maven.scm.command.mkdir;
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 java.util.List;
23  
24  import org.apache.maven.scm.ScmFile;
25  import org.apache.maven.scm.ScmResult;
26  
27  /**
28   * Result of making directories in SCM.
29   * 
30   * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
31   *
32   */
33  public class MkdirScmResult
34      extends ScmResult
35  {
36  
37      private static final long serialVersionUID = -8717329738246682608L;
38  
39      private String revision;
40      
41      private List<ScmFile> createdDirs;
42     
43      public MkdirScmResult( ScmResult scmResult )
44      {
45          super( scmResult );
46      }
47  
48      public MkdirScmResult( String commandLine, String providerMessage, String commandOutput, boolean success )
49      {
50          super( commandLine, providerMessage, commandOutput, success );
51      }
52  
53      public MkdirScmResult( String commandLine, String revision )
54      {
55          this( commandLine, null, null, true );
56  
57          this.revision = revision;
58      }
59      
60      public MkdirScmResult( String commandLine, List<ScmFile> createdDirs )
61      {
62          this( commandLine, null, null, true );
63          
64          this.createdDirs = createdDirs;
65      }
66  
67      public MkdirScmResult( String revision, ScmResult result )
68      {
69          super( result );
70  
71          this.revision = revision;
72      }
73      
74      public MkdirScmResult( List<ScmFile> createdDirs, ScmResult result )
75      {
76          super( result );
77          
78          this.createdDirs = createdDirs;
79      }
80  
81      public String getRevision()
82      {
83          return revision;
84      }
85      
86      public List<ScmFile> getCreatedDirs()
87      {
88          return createdDirs;
89      }
90  }