1 | |
package org.apache.maven.scm.provider.synergy; |
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.CommandParameters; |
23 | |
import org.apache.maven.scm.ScmException; |
24 | |
import org.apache.maven.scm.ScmFileSet; |
25 | |
import org.apache.maven.scm.command.add.AddScmResult; |
26 | |
import org.apache.maven.scm.command.changelog.ChangeLogScmResult; |
27 | |
import org.apache.maven.scm.command.checkin.CheckInScmResult; |
28 | |
import org.apache.maven.scm.command.checkout.CheckOutScmResult; |
29 | |
import org.apache.maven.scm.command.edit.EditScmResult; |
30 | |
import org.apache.maven.scm.command.remove.RemoveScmResult; |
31 | |
import org.apache.maven.scm.command.status.StatusScmResult; |
32 | |
import org.apache.maven.scm.command.tag.TagScmResult; |
33 | |
import org.apache.maven.scm.command.update.UpdateScmResult; |
34 | |
import org.apache.maven.scm.provider.AbstractScmProvider; |
35 | |
import org.apache.maven.scm.provider.ScmProviderRepository; |
36 | |
import org.apache.maven.scm.provider.synergy.command.add.SynergyAddCommand; |
37 | |
import org.apache.maven.scm.provider.synergy.command.changelog.SynergyChangeLogCommand; |
38 | |
import org.apache.maven.scm.provider.synergy.command.checkin.SynergyCheckInCommand; |
39 | |
import org.apache.maven.scm.provider.synergy.command.checkout.SynergyCheckOutCommand; |
40 | |
import org.apache.maven.scm.provider.synergy.command.edit.SynergyEditCommand; |
41 | |
import org.apache.maven.scm.provider.synergy.command.remove.SynergyRemoveCommand; |
42 | |
import org.apache.maven.scm.provider.synergy.command.status.SynergyStatusCommand; |
43 | |
import org.apache.maven.scm.provider.synergy.command.tag.SynergyTagCommand; |
44 | |
import org.apache.maven.scm.provider.synergy.command.update.SynergyUpdateCommand; |
45 | |
import org.apache.maven.scm.provider.synergy.repository.SynergyScmProviderRepository; |
46 | |
import org.apache.maven.scm.repository.ScmRepositoryException; |
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | |
|
53 | 0 | public class SynergyScmProvider |
54 | |
extends AbstractScmProvider |
55 | |
{ |
56 | |
|
57 | |
|
58 | |
public ScmProviderRepository makeProviderScmRepository( String scmSpecificUrl, char delimiter ) |
59 | |
throws ScmRepositoryException |
60 | |
{ |
61 | 0 | if (getLogger().isDebugEnabled()) |
62 | |
{ |
63 | 0 | getLogger().debug("Creating SynergyScmProviderRepository..."); |
64 | |
} |
65 | 0 | return new SynergyScmProviderRepository( scmSpecificUrl ); |
66 | |
} |
67 | |
|
68 | |
|
69 | |
public String getScmType() |
70 | |
{ |
71 | 0 | return "synergy"; |
72 | |
} |
73 | |
|
74 | |
|
75 | |
public boolean requiresEditMode() |
76 | |
{ |
77 | 0 | return true; |
78 | |
} |
79 | |
|
80 | |
|
81 | |
public String getScmSpecificFilename() |
82 | |
{ |
83 | 0 | return "_ccmwaid.inf"; |
84 | |
} |
85 | |
|
86 | |
|
87 | |
public AddScmResult add( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
88 | |
throws ScmException |
89 | |
{ |
90 | 0 | SynergyAddCommand command = new SynergyAddCommand(); |
91 | |
|
92 | 0 | command.setLogger( getLogger() ); |
93 | |
|
94 | 0 | return (AddScmResult) command.execute( repository, fileSet, parameters ); |
95 | |
} |
96 | |
|
97 | |
|
98 | |
public RemoveScmResult remove( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
99 | |
throws ScmException |
100 | |
{ |
101 | 0 | SynergyRemoveCommand command = new SynergyRemoveCommand(); |
102 | |
|
103 | 0 | command.setLogger( getLogger() ); |
104 | |
|
105 | 0 | return (RemoveScmResult) command.execute( repository, fileSet, parameters ); |
106 | |
} |
107 | |
|
108 | |
|
109 | |
public ChangeLogScmResult changelog( ScmProviderRepository repository, ScmFileSet fileSet, |
110 | |
CommandParameters parameters ) |
111 | |
throws ScmException |
112 | |
{ |
113 | 0 | SynergyChangeLogCommand command = new SynergyChangeLogCommand(); |
114 | |
|
115 | 0 | command.setLogger( getLogger() ); |
116 | |
|
117 | 0 | return (ChangeLogScmResult) command.execute( repository, fileSet, parameters ); |
118 | |
} |
119 | |
|
120 | |
|
121 | |
public CheckInScmResult checkin( ScmProviderRepository repository, ScmFileSet fileSet, |
122 | |
CommandParameters parameters ) |
123 | |
throws ScmException |
124 | |
{ |
125 | 0 | SynergyCheckInCommand command = new SynergyCheckInCommand(); |
126 | |
|
127 | 0 | command.setLogger( getLogger() ); |
128 | |
|
129 | 0 | return (CheckInScmResult) command.execute( repository, fileSet, parameters ); |
130 | |
} |
131 | |
|
132 | |
|
133 | |
public CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet, |
134 | |
CommandParameters parameters ) |
135 | |
throws ScmException |
136 | |
{ |
137 | 0 | SynergyCheckOutCommand command = new SynergyCheckOutCommand(); |
138 | |
|
139 | 0 | command.setLogger( getLogger() ); |
140 | |
|
141 | 0 | return (CheckOutScmResult) command.execute( repository, fileSet, parameters ); |
142 | |
} |
143 | |
|
144 | |
|
145 | |
public EditScmResult edit( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
146 | |
throws ScmException |
147 | |
{ |
148 | 0 | SynergyEditCommand command = new SynergyEditCommand(); |
149 | |
|
150 | 0 | command.setLogger( getLogger() ); |
151 | |
|
152 | 0 | return (EditScmResult) command.execute( repository, fileSet, parameters ); |
153 | |
} |
154 | |
|
155 | |
|
156 | |
public UpdateScmResult update( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
157 | |
throws ScmException |
158 | |
{ |
159 | 0 | SynergyUpdateCommand command = new SynergyUpdateCommand(); |
160 | |
|
161 | 0 | command.setLogger( getLogger() ); |
162 | |
|
163 | 0 | return (UpdateScmResult) command.execute( repository, fileSet, parameters ); |
164 | |
} |
165 | |
|
166 | |
|
167 | |
public TagScmResult tag( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
168 | |
throws ScmException |
169 | |
{ |
170 | 0 | SynergyTagCommand command = new SynergyTagCommand(); |
171 | |
|
172 | 0 | command.setLogger( getLogger() ); |
173 | |
|
174 | 0 | return (TagScmResult) command.execute( repository, fileSet, parameters ); |
175 | |
} |
176 | |
|
177 | |
|
178 | |
public StatusScmResult status( ScmProviderRepository repository, ScmFileSet fileSet, CommandParameters parameters ) |
179 | |
throws ScmException |
180 | |
{ |
181 | 0 | SynergyStatusCommand command = new SynergyStatusCommand(); |
182 | |
|
183 | 0 | command.setLogger( getLogger() ); |
184 | |
|
185 | 0 | return (StatusScmResult) command.execute( repository, fileSet, parameters ); |
186 | |
} |
187 | |
|
188 | |
} |