1 package org.apache.maven.scm.command.checkin;
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
36
37 public abstract class AbstractCheckInCommand
38 extends AbstractCommand
39 {
40 public static final String NAME = "check-in";
41
42 protected abstract CheckInScmResult executeCheckInCommand( ScmProviderRepository repository, ScmFileSet fileSet,
43 String message, ScmVersion scmVersion )
44 throws ScmException;
45
46 public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
47 CommandParameters parameters )
48 throws ScmException
49 {
50 String message = parameters.getString( CommandParameter.MESSAGE );
51
52 ScmVersion scmVersion = parameters.getScmVersion( CommandParameter.SCM_VERSION, null );
53
54 return executeCheckInCommand( repository, fileSet, message, scmVersion );
55 }
56 }