/** * list all locks in the repository * * @param path the path to the repository * @throws ClientException throw in case of problem * @since 1.2 */ public Lock[] lslocks(String path) throws ClientException { final ArrayList locks = new ArrayList(); getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (event.getAction() == SVNAdminEventAction.LOCK_LISTED) { SVNLock svnLock = event.getLock(); Lock lock = JavaHLObjectFactory.createLock(svnLock); locks.add(lock); } } }); try { getAdminClient().doListLocks(new File(path).getAbsoluteFile()); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } finally { getAdminClient().setEventHandler(null); } return (Lock[]) locks.toArray(new Lock[locks.size()]); }
/** * list all locks in the repository * * @param path the path to the repository * @throws ClientException throw in case of problem * @since 1.2 */ public Lock[] lslocks(String path) throws ClientException { final ArrayList locks = new ArrayList(); getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (event.getAction() == SVNAdminEventAction.LOCK_LISTED) { SVNLock svnLock = event.getLock(); Lock lock = JavaHLObjectFactory.createLock(svnLock); locks.add(lock); } } }); try { getAdminClient().doListLocks(new File(path).getAbsoluteFile()); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } finally { getAdminClient().setEventHandler(null); } return (Lock[]) locks.toArray(new Lock[locks.size()]); }
/** * list all locks in the repository * * @param path the path to the repository * @throws ClientException throw in case of problem * @since 1.2 */ public Lock[] lslocks(String path) throws ClientException { final ArrayList locks = new ArrayList(); getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (event.getAction() == SVNAdminEventAction.LOCK_LISTED) { SVNLock svnLock = event.getLock(); Lock lock = JavaHLObjectFactory.createLock(svnLock); locks.add(lock); } } }); try { getAdminClient().doListLocks(new File(path).getAbsoluteFile()); } catch (SVNException e) { JavaHLObjectFactory.throwException(e, myDelegate); } finally { getAdminClient().setEventHandler(null); } return (Lock[]) locks.toArray(new Lock[locks.size()]); }
public Set<Lock> lslocks(File path, Depth depth) throws ClientException { beforeOperation(); final Set<Lock> locks = new HashSet<Lock>(); getAdminClient().setEventHandler(new SVNAdminEventAdapter() { public void handleAdminEvent(SVNAdminEvent event, double progress) throws SVNException { if (event.getAction() == SVNAdminEventAction.LOCK_LISTED) { SVNLock svnLock = event.getLock(); Lock lock = SVNClientImpl.getLock(svnLock); locks.add(lock); } } }); try { getAdminClient().doListLocks(path.getAbsoluteFile()); } catch (SVNException e) { throwException(e, client); } finally { afterOperation(); } return locks; }
@Override protected SVNAdminEvent run() throws SVNException { SVNAdminClient ac = new SVNAdminClient(getOperation().getAuthenticationManager(), getOperation().getOptions()); ac.setEventHandler(this); ac.doListLocks(getOperation().getRepositoryRoot()); return getOperation().first(); }