1 package org.apache.maven.scm.command.export;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.scm.CommandParameter;
23 import org.apache.maven.scm.CommandParameters;
24 import org.apache.maven.scm.ScmException;
25 import org.apache.maven.scm.ScmFileSet;
26 import org.apache.maven.scm.ScmResult;
27 import org.apache.maven.scm.ScmVersion;
28 import org.apache.maven.scm.command.AbstractCommand;
29 import org.apache.maven.scm.provider.ScmProviderRepository;
30
31
32
33
34
35 public abstract class AbstractExportCommand
36 extends AbstractCommand
37 {
38 protected abstract ExportScmResult executeExportCommand( ScmProviderRepository repository, ScmFileSet fileSet,
39 ScmVersion scmVersion, String outputDirectory )
40 throws ScmException;
41
42
43 protected ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
44 CommandParameters parameters )
45 throws ScmException
46 {
47 ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
48
49 String outputDirectory = parameters.getString( CommandParameter.OUTPUT_DIRECTORY, null );
50
51 return executeExportCommand( repository, fileSet, scmVersion, outputDirectory );
52 }
53 }