public SvnAuthenticationManager getManager(final AuthManagerType type, final SvnVcs vcs) { if (AuthManagerType.active.equals(type)) { return getInteractiveManager(vcs); } else if (AuthManagerType.passive.equals(type)) { return getPassiveAuthenticationManager(vcs.getProject()); } else if (AuthManagerType.usual.equals(type)) { return getAuthenticationManager(vcs); } throw new IllegalArgumentException(); }
public void setIgnoreSpacesInAnnotate(final boolean value) { final boolean changed = IGNORE_SPACES_IN_ANNOTATE != value; IGNORE_SPACES_IN_ANNOTATE = value; if (changed) { myProject .getMessageBus() .syncPublisher(VcsAnnotationRefresher.LOCAL_CHANGES_CHANGED) .configurationChanged(SvnVcs.getKey()); } }
public SvnAuthenticationManager getInteractiveManager(final SvnVcs svnVcs) { if (myInteractiveManager == null) { myInteractiveManager = new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory())); myInteractiveManager.setRuntimeStorage(RUNTIME_AUTH_CACHE); myInteractiveProvider = new SvnInteractiveAuthenticationProvider(svnVcs, myInteractiveManager); myInteractiveManager.setAuthenticationProvider(myInteractiveProvider); } return myInteractiveManager; }
public SvnAuthenticationManager getAuthenticationManager(final SvnVcs svnVcs) { if (myAuthManager == null) { // reloaded when configuration directory changes myAuthManager = new SvnAuthenticationManager(svnVcs.getProject(), new File(getConfigurationDirectory())); Disposer.register( svnVcs.getProject(), new Disposable() { @Override public void dispose() { myAuthManager = null; } }); getInteractiveManager(svnVcs); // to init myAuthManager.setAuthenticationProvider( new SvnAuthenticationProvider(svnVcs, myInteractiveProvider, RUNTIME_AUTH_CACHE)); myAuthManager.setRuntimeStorage(RUNTIME_AUTH_CACHE); } return myAuthManager; }
public static SvnAuthenticationManager createForTmpDir( final Project project, final File dir, @Nullable final SvnInteractiveAuthenticationProvider provider) { final SvnVcs vcs = SvnVcs.getInstance(project); final SvnAuthenticationManager interactive = new SvnAuthenticationManager(project, dir); interactive.setRuntimeStorage(RUNTIME_AUTH_CACHE); final SvnInteractiveAuthenticationProvider interactiveProvider = provider == null ? new SvnInteractiveAuthenticationProvider(vcs, interactive) : provider; interactive.setAuthenticationProvider(interactiveProvider); return interactive; }