1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.scm.command.checkin;
20
21 import org.apache.maven.scm.CommandParameter;
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.ScmVersion;
27 import org.apache.maven.scm.command.AbstractCommand;
28 import org.apache.maven.scm.provider.ScmProviderRepository;
29
30
31
32
33
34
35
36 public abstract class AbstractCheckInCommand extends AbstractCommand {
37 public static final String NAME = "check-in";
38
39 protected abstract CheckInScmResult executeCheckInCommand(
40 ScmProviderRepository repository, ScmFileSet fileSet, String message, ScmVersion scmVersion)
41 throws ScmException;
42
43 public ScmResult executeCommand(ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters)
44 throws ScmException {
45 String message = parameters.getString(CommandParameter.MESSAGE);
46
47 ScmVersion scmVersion = parameters.getScmVersion(CommandParameter.SCM_VERSION, null);
48
49 return executeCheckInCommand(repository, fileSet, message, scmVersion);
50 }
51 }