View Javadoc

1   /*
2    * Copyright 2006-2012 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 de.smartics.maven.plugin.buildmetadata.scm;
17  
18  import org.apache.maven.scm.ScmFileSet;
19  
20  /**
21   * Provides means to fetch the revision number.
22   * <p>
23   * The implementation requires to provide access to the SCM.
24   * </p>
25   *
26   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
27   * @version $Revision:591 $
28   */
29  public interface RevisionNumberFetcher
30  {
31    // ********************************* Fields *********************************
32  
33    // --- constants ------------------------------------------------------------
34  
35    // ****************************** Initializer *******************************
36  
37    // ****************************** Inner Classes *****************************
38  
39    // ********************************* Methods ********************************
40  
41    // --- get&set --------------------------------------------------------------
42  
43    // --- business -------------------------------------------------------------
44  
45    /**
46     * Returns the latest revision number from the SCM.
47     *
48     * @return the latest revision number from the SCM, <code>null</code> if none
49     *         can be found.
50     * @throws ScmException if the revision number cannot be fetched.
51     */
52    Revision fetchLatestRevisionNumber() throws ScmException;
53  
54    /**
55     * Checks if the local source files are in-sync with the repository or not.
56     *
57     * @param fileSet the file set to check.
58     * @return the status of the files.
59     * @throws ScmException on any problem checking the up-to-date status.
60     */
61    LocallyModifiedInfo containsModifications(ScmFileSet fileSet)
62        throws ScmException;
63  
64    // --- object basics --------------------------------------------------------
65  
66  }