/** * Dispatches events to the registered event handler (if any). * @param event the current event * @param progress progress state (from 0 to 1) * @throws SVNException */ public void handleEvent(SVNEvent event, double progress) throws SVNException { dispatchEvent(event, progress); } }
/** * Sets an event handler for this object. * {@link ISVNAdminEventHandler} should be provided to <b>SVNAdminClent</b> * via this method also. But it does not mean that you can have two handler set, only * one handler can be used at a time. * * @param handler an event handler */ public void setEventHandler(ISVNEventHandler handler) { super.setEventHandler(handler); if (handler instanceof ISVNAdminEventHandler) { myEventHandler = (ISVNAdminEventHandler) handler; } }
protected SVNAdminBasicClient(ISVNRepositoryPool repositoryPool, ISVNOptions options) { myRepositoryPool = repositoryPool; setOptions(options); }
protected void initClientDefaults(SVNAdminBasicClient client) { client.setEventHandler(myEventHandler); client.setDebugLog(getDebugLog()); }
protected SVNRepository createRepository(SVNURL url, String uuid, boolean mayReuse) throws SVNException { SVNRepository repository = null; if (myRepositoryPool == null) { repository = SVNRepositoryFactory.create(url, null); } else { repository = myRepositoryPool.createRepository(url, mayReuse); } if (uuid != null) { String reposUUID = repository.getRepositoryUUID(true); if (!uuid.equals(reposUUID)) { SVNErrorMessage err = SVNErrorMessage .create( SVNErrorCode.RA_UUID_MISMATCH, "Repository UUID ''{0}'' doesn''t match expected UUID ''{1}''", new Object[] { reposUUID, uuid }); SVNErrorManager.error(err, SVNLogType.WC); } } repository.setDebugLog(getDebugLog()); repository.setCanceller(getEventDispatcher()); return repository; }
protected SVNAdminBasicClient(SvnOperationFactory of) { myRepositoryPool = of.getRepositoryPool(); setOptions(of.getOptions()); }