1 package org.apache.continuum.scm;
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.ScmException;
23 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
24 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
25 import org.apache.maven.scm.command.update.UpdateScmResult;
26 import org.apache.maven.scm.manager.NoSuchScmProviderException;
27 import org.apache.maven.scm.repository.ScmRepositoryException;
28
29 import java.io.IOException;
30
31 /**
32 * Component that manages SCM interactions and checkouts within Continuum.
33 *
34 * @version $Id: ContinuumScm.java 1372260 2012-08-13 04:29:09Z brett $
35 */
36 public interface ContinuumScm
37 {
38 /**
39 * Check out a working copy for a project.
40 *
41 * @param configuration the configuration for the working copy and SCM
42 * @return the result of the check out
43 * @throws IOException if there is a problem writing to the working copy location
44 * @throws NoSuchScmProviderException if there is a problem with the configuration
45 * @throws ScmRepositoryException if there is a problem with the configuration
46 * @throws ScmException if there is a problem checking out
47 */
48 CheckOutScmResult checkout( ContinuumScmConfiguration configuration )
49 throws IOException, ScmRepositoryException, NoSuchScmProviderException, ScmException;
50
51 /**
52 * Update a working copy for a project.
53 *
54 * @param config the configuration for the working copy and SCM
55 * @return the result of the update
56 * @throws NoSuchScmProviderException if there is a problem with the configuration
57 * @throws ScmRepositoryException if there is a problem with the configuration
58 * @throws ScmException if there is a problem updating
59 */
60 UpdateScmResult update( ContinuumScmConfiguration config )
61 throws ScmRepositoryException, NoSuchScmProviderException, ScmException;
62
63 /**
64 * Get change log for a project
65 *
66 * @param config the configuration for the working copy and SCM
67 * @return the result of the change log
68 * @throws ScmRepositoryException if there is a problem with the configuration
69 * @throws NoSuchScmProviderException if there is a problem with the configuration
70 * @throws ScmException if there is a problem getting the change log
71 */
72 ChangeLogScmResult changeLog( ContinuumScmConfiguration config )
73 throws ScmRepositoryException, NoSuchScmProviderException, ScmException;
74 }