gluu
静的公開メンバ関数 | 非公開メンバ関数 | 全メンバ一覧
org.gluu.oxtrust.util.svn.SvnHelper クラス
org.gluu.oxtrust.util.svn.SvnHelper 連携図
Collaboration graph

静的公開メンバ関数

static void setupLibrary (String url)
 
static SVNClientManager getSVNClientManager (String userName, String password) throws SVNException
 
static SVNCommitInfo makeDirectory (SVNClientManager clientManager, SVNURL url, String commitMessage) throws SVNException
 
static SVNCommitInfo importDirectory (SVNClientManager clientManager, File localPath, SVNURL dstURL, String commitMessage, boolean isRecursive) throws SVNException
 
static SVNCommitInfo commit (SVNClientManager clientManager, File wcPath, boolean keepLocks, String commitMessage) throws SVNException
 
static long checkout (SVNClientManager clientManager, SVNURL url, SVNRevision revision, File destPath, boolean isRecursive) throws SVNException
 
static long update (SVNClientManager clientManager, File wcPath, SVNRevision updateToRevision, boolean isRecursive) throws SVNException
 
static long switchToURL (SVNClientManager clientManager, File wcPath, SVNURL url, SVNRevision updateToRevision, boolean isRecursive) throws SVNException
 
static void getStatus (SVNClientManager clientManager, File wcPath, boolean isRecursive, boolean isRemote, boolean isReportAll, boolean isIncludeIgnored, boolean isCollectParentExternals, ISVNStatusHandler statusHandler) throws SVNException
 
static SVNStatus getStatus (SVNClientManager clientManager, File wcPath, boolean isRemote) throws SVNException
 
static void showInfo (SVNClientManager clientManager, File wcPath, SVNRevision revision, boolean isRecursive, ISVNInfoHandler infoHandler) throws SVNException
 
static void add (SVNClientManager clientManager, File wcPath) throws SVNException
 
static void lock (SVNClientManager clientManager, File wcPath, boolean isStealLock, String lockComment) throws SVNException
 
static void delete (SVNClientManager clientManager, File wcPath, boolean force) throws SVNException
 
static SVNCommitInfo copy (SVNClientManager clientManager, SVNURL srcURL, SVNURL dstURL, boolean isMove, String commitMessage) throws SVNException
 
static SVNRepository getSVNRepository (SVNClientManager svnClientManager, SVNURL repositoryURL) throws SVNException
 
static SVNNodeKind exist (SVNRepository svnRepository, String path) throws SVNException
 
static void addNewFiles (final SVNClientManager clientManager, File dir) throws SVNException
 

非公開メンバ関数

 SvnHelper ()
 

詳解

著者
Yuriy Movchan Date: 11.26.2010

構築子と解体子

◆ SvnHelper()

org.gluu.oxtrust.util.svn.SvnHelper.SvnHelper ( )
inlineprivate
35  {
36  }

関数詳解

◆ add()

static void org.gluu.oxtrust.util.svn.SvnHelper.add ( SVNClientManager  clientManager,
File  wcPath 
) throws SVNException
inlinestatic
379  {
380  clientManager.getWCClient().doAdd(wcPath, false, false, false, SVNDepth.INFINITY, false, false);
381  }

◆ addNewFiles()

static void org.gluu.oxtrust.util.svn.SvnHelper.addNewFiles ( final SVNClientManager  clientManager,
File  dir 
) throws SVNException
inlinestatic
478  {
479  clientManager.getWCClient().doAdd(dir, true, false, false, SVNDepth.INFINITY, false, false);
480  }

◆ checkout()

static long org.gluu.oxtrust.util.svn.SvnHelper.checkout ( SVNClientManager  clientManager,
SVNURL  url,
SVNRevision  revision,
File  destPath,
boolean  isRecursive 
) throws SVNException
inlinestatic
198  {
199 
200  SVNUpdateClient updateClient = clientManager.getUpdateClient();
201  /*
202  * sets externals not to be ignored during the checkout
203  */
204  updateClient.setIgnoreExternals(false);
205  /*
206  * returns the number of the revision at which the working copy is
207  */
208  return updateClient.doCheckout(url, destPath, revision, revision, SVNDepth.fromRecurse(isRecursive), false);
209  }

◆ commit()

static SVNCommitInfo org.gluu.oxtrust.util.svn.SvnHelper.commit ( SVNClientManager  clientManager,
File  wcPath,
boolean  keepLocks,
String  commitMessage 
) throws SVNException
inlinestatic
164  {
165  /*
166  * Returns SVNCommitInfo containing information on the new revision
167  * committed (revision number, etc.)
168  */
169  return clientManager.getCommitClient().doCommit(new File[] { wcPath }, keepLocks, commitMessage, null, null, false, false,
170  SVNDepth.INFINITY);
171  }

◆ copy()

static SVNCommitInfo org.gluu.oxtrust.util.svn.SvnHelper.copy ( SVNClientManager  clientManager,
SVNURL  srcURL,
SVNURL  dstURL,
boolean  isMove,
String  commitMessage 
) throws SVNException
inlinestatic
460  {
461  /*
462  * SVNRevision.HEAD means the latest revision. Returns SVNCommitInfo
463  * containing information on the new revision committed (revision
464  * number, etc.)
465  */
466  return clientManager.getCopyClient().doCopy(new SVNCopySource[] { new SVNCopySource(SVNRevision.HEAD, SVNRevision.HEAD, srcURL) },
467  dstURL, isMove, true, false, commitMessage, null);
468  }

◆ delete()

static void org.gluu.oxtrust.util.svn.SvnHelper.delete ( SVNClientManager  clientManager,
File  wcPath,
boolean  force 
) throws SVNException
inlinestatic
419  {
420  clientManager.getWCClient().doDelete(wcPath, force, false);
421  }

◆ exist()

static SVNNodeKind org.gluu.oxtrust.util.svn.SvnHelper.exist ( SVNRepository  svnRepository,
String  path 
) throws SVNException
inlinestatic
474  {
475  return svnRepository.checkPath(path, -1);
476  }

◆ getStatus() [1/2]

static void org.gluu.oxtrust.util.svn.SvnHelper.getStatus ( SVNClientManager  clientManager,
File  wcPath,
boolean  isRecursive,
boolean  isRemote,
boolean  isReportAll,
boolean  isIncludeIgnored,
boolean  isCollectParentExternals,
ISVNStatusHandler  statusHandler 
) throws SVNException
inlinestatic
309  {
310  /*
311  * StatusHandler displays status information for each entry in the
312  * console (in the manner of the native Subversion command line client)
313  */
314  clientManager.getStatusClient().doStatus(wcPath, SVNRevision.HEAD, SVNDepth.fromRecurse(isRecursive), isRemote, isReportAll,
315  isIncludeIgnored, isCollectParentExternals, statusHandler, null);
316  }

◆ getStatus() [2/2]

static SVNStatus org.gluu.oxtrust.util.svn.SvnHelper.getStatus ( SVNClientManager  clientManager,
File  wcPath,
boolean  isRemote 
) throws SVNException
inlinestatic
318  {
319  return clientManager.getStatusClient().doStatus(wcPath, isRemote);
320  }

◆ getSVNClientManager()

static SVNClientManager org.gluu.oxtrust.util.svn.SvnHelper.getSVNClientManager ( String  userName,
String  password 
) throws SVNException
inlinestatic
59  {
60  /*
61  * Creates a default run-time configuration options driver. Default
62  * options created in this way use the Subversion run-time configuration
63  * area (for instance, on a Windows platform it can be found in the
64  * '%APPDATA%\Subversion' directory).
65  *
66  * readonly = true - not to save any configuration changes that can be
67  * done during the program run to a config file (config settings will
68  * only be read to initialize; to enable changes the readonly flag
69  * should be set to false).
70  *
71  * SVNWCUtil is a utility class that creates a default options driver.
72  */
73  DefaultSVNOptions options = SVNWCUtil.createDefaultOptions(true);
74 
75  /*
76  * Creates an instance of SVNClientManager providing authentication
77  * information (name, password) and an options driver
78  */
79  return SVNClientManager.newInstance(options, userName, password);
80  }

◆ getSVNRepository()

static SVNRepository org.gluu.oxtrust.util.svn.SvnHelper.getSVNRepository ( SVNClientManager  svnClientManager,
SVNURL  repositoryURL 
) throws SVNException
inlinestatic
470  {
471  return svnClientManager.createRepository(repositoryURL, false);
472  }

◆ importDirectory()

static SVNCommitInfo org.gluu.oxtrust.util.svn.SvnHelper.importDirectory ( SVNClientManager  clientManager,
File  localPath,
SVNURL  dstURL,
String  commitMessage,
boolean  isRecursive 
) throws SVNException
inlinestatic
132  {
133  /*
134  * Returns SVNCommitInfo containing information on the new revision
135  * committed (revision number, etc.)
136  */
137  return clientManager.getCommitClient().doImport(localPath, dstURL, commitMessage, null, true, false,
138  SVNDepth.fromRecurse(isRecursive));
139  }

◆ lock()

static void org.gluu.oxtrust.util.svn.SvnHelper.lock ( SVNClientManager  clientManager,
File  wcPath,
boolean  isStealLock,
String  lockComment 
) throws SVNException
inlinestatic
398  {
399  clientManager.getWCClient().doLock(new File[] { wcPath }, isStealLock, lockComment);
400  }

◆ makeDirectory()

static SVNCommitInfo org.gluu.oxtrust.util.svn.SvnHelper.makeDirectory ( SVNClientManager  clientManager,
SVNURL  url,
String  commitMessage 
) throws SVNException
inlinestatic
96  {
97  /*
98  * Returns SVNCommitInfo containing information on the new revision
99  * committed (revision number, etc.)
100  */
101  return clientManager.getCommitClient().doMkDir(new SVNURL[] { url }, commitMessage);
102  }

◆ setupLibrary()

static void org.gluu.oxtrust.util.svn.SvnHelper.setupLibrary ( String  url)
inlinestatic
42  {
43  // For using over http:// and https://
44  if (url.startsWith("http://") || url.startsWith("https://")) {
45  DAVRepositoryFactory.setup();
46  }
47 
48  // For using over http:// and https://
49  if (url.startsWith("svn")) {
50  SVNRepositoryFactoryImpl.setup();
51  }
52 
53  // For using over file:///
54  if (url.startsWith("file://")) {
55  FSRepositoryFactory.setup();
56  }
57  }

◆ showInfo()

static void org.gluu.oxtrust.util.svn.SvnHelper.showInfo ( SVNClientManager  clientManager,
File  wcPath,
SVNRevision  revision,
boolean  isRecursive,
ISVNInfoHandler  infoHandler 
) throws SVNException
inlinestatic
346  {
347  /*
348  * InfoHandler displays information for each entry in the console (in
349  * the manner of the native Subversion command line client)
350  */
351  clientManager.getWCClient().doInfo(wcPath, SVNRevision.UNDEFINED, revision, SVNDepth.getInfinityOrEmptyDepth(isRecursive), null,
352  infoHandler);
353  }

◆ switchToURL()

static long org.gluu.oxtrust.util.svn.SvnHelper.switchToURL ( SVNClientManager  clientManager,
File  wcPath,
SVNURL  url,
SVNRevision  updateToRevision,
boolean  isRecursive 
) throws SVNException
inlinestatic
262  {
263  SVNUpdateClient updateClient = clientManager.getUpdateClient();
264  /*
265  * sets externals not to be ignored during the switch
266  */
267  updateClient.setIgnoreExternals(false);
268  /*
269  * returns the number of the revision wcPath was updated to
270  */
271  return updateClient.doSwitch(wcPath, url, SVNRevision.UNDEFINED, updateToRevision, SVNDepth.getInfinityOrFilesDepth(isRecursive),
272  false, false);
273  }

◆ update()

static long org.gluu.oxtrust.util.svn.SvnHelper.update ( SVNClientManager  clientManager,
File  wcPath,
SVNRevision  updateToRevision,
boolean  isRecursive 
) throws SVNException
inlinestatic
229  {
230 
231  SVNUpdateClient updateClient = clientManager.getUpdateClient();
232  /*
233  * sets externals not to be ignored during the update
234  */
235  updateClient.setIgnoreExternals(false);
236  /*
237  * returns the number of the revision wcPath was updated to
238  */
239  return updateClient.doUpdate(wcPath, updateToRevision, SVNDepth.fromRecurse(isRecursive), false, false);
240  }

このクラス詳解は次のファイルから抽出されました: