587
|
1 |
/*
|
628
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
587
|
17 |
|
|
18 |
package com.nokia.maven.scm.provider;
|
|
19 |
|
|
20 |
import java.io.File;
|
|
21 |
|
|
22 |
import org.apache.maven.scm.CommandParameters;
|
|
23 |
import org.apache.maven.scm.ScmException;
|
|
24 |
import org.apache.maven.scm.ScmFileSet;
|
|
25 |
import org.apache.maven.scm.ScmResult;
|
|
26 |
import org.apache.maven.scm.repository.ScmRepository;
|
|
27 |
|
628
|
28 |
import com.nokia.maven.scm.command.info.InfoScmResult;
|
587
|
29 |
import com.nokia.maven.scm.command.pull.PullScmResult;
|
|
30 |
import com.nokia.maven.scm.command.tags.TagsScmResult;
|
|
31 |
|
|
32 |
/**
|
628
|
33 |
* This interface describe additional functionalities provider could implement compare to the
|
|
34 |
* default ScmProvider interface
|
|
35 |
*
|
587
|
36 |
*/
|
|
37 |
public interface ScmProviderExt {
|
|
38 |
|
|
39 |
/**
|
|
40 |
* Create a new repository.
|
628
|
41 |
*
|
587
|
42 |
* @param repository the repository to create.
|
|
43 |
* @return ScmResult result.
|
|
44 |
* @throws ScmException
|
|
45 |
*/
|
|
46 |
ScmResult init(ScmRepository repository) throws ScmException;
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Pull changes, this function is target for distributed SCM file Hg or Git.
|
628
|
50 |
*
|
587
|
51 |
* @param repository
|
|
52 |
* @param path the location of the checkout.
|
|
53 |
* @return a PullScmResult result object.
|
|
54 |
* @throws ScmException
|
|
55 |
*/
|
628
|
56 |
PullScmResult pull(ScmRepository repository, File path) throws ScmException;
|
587
|
57 |
|
|
58 |
/**
|
|
59 |
* Get a list of tags from a repository.
|
628
|
60 |
*
|
587
|
61 |
* @param repository the repository
|
|
62 |
* @param fileSet
|
|
63 |
* @param parameters
|
|
64 |
* @return a TagsScmResult with the list of tags if successful.
|
|
65 |
* @throws ScmException
|
|
66 |
*/
|
|
67 |
TagsScmResult tags(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters)
|
628
|
68 |
throws ScmException;
|
587
|
69 |
|
|
70 |
/**
|
|
71 |
* Get information about current revision.
|
628
|
72 |
*
|
587
|
73 |
* @param repository
|
|
74 |
* @param fileSet
|
|
75 |
* @param parameters
|
|
76 |
* @return a InfoScmResult with current revision if successful.
|
|
77 |
* @throws ScmException
|
|
78 |
*/
|
|
79 |
InfoScmResult info(ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters)
|
628
|
80 |
throws ScmException;
|
587
|
81 |
}
|