• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ISVNPromptUserPassword类的典型用法和代码示例

java 3次浏览

本文整理汇总了Java中org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword的典型用法代码示例。如果您正苦于以下问题:Java ISVNPromptUserPassword类的具体用法?Java ISVNPromptUserPassword怎么用?Java ISVNPromptUserPassword使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ISVNPromptUserPassword类属于org.tigris.subversion.svnclientadapter包,在下文中一共展示了ISVNPromptUserPassword类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: setupCommandline

点赞 3

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public void setupCommandline () {
    if(!checkCLIExecutable()) return;
    
    factory = new ClientAdapterFactory() {
        @Override
        protected ISVNClientAdapter createAdapter() {
            return new CommandlineClient(); //SVNClientAdapterFactory.createSVNClient(CmdLineClientAdapterFactory.COMMANDLINE_CLIENT);
        }
        @Override
        protected SvnClientInvocationHandler getInvocationHandler(ISVNClientAdapter adapter, SvnClientDescriptor desc, SvnProgressSupport support, int handledExceptions) {
            return new SvnClientInvocationHandler(adapter, desc, support, handledExceptions, ConnectionType.cli);
        }
        @Override
        protected ISVNPromptUserPassword createCallback(SVNUrl repositoryUrl, int handledExceptions) {
            return null;
        }
        @Override
        protected ConnectionType connectionType() {
            return ConnectionType.cli;
        }
    };
    LOG.info("running on commandline");
}
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:24,
代码来源:SvnClientFactory.java

示例2: askTrustSSLServer

点赞 3

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public int askTrustSSLServer(String trustInfo, boolean trustAllowPermanently) {
      info = trustInfo;
      allowPermanently = trustAllowPermanently;
SVNUIPlugin.getStandardDisplay().syncExec(new Runnable() {
	public void run() {
        TrustSSLServerDialog dialog = new TrustSSLServerDialog(Display.getCurrent().getActiveShell(),
                info, allowPermanently);
        switch (dialog.open()) {
        case TrustSSLServerDialog.REJECT:
            trust =  ISVNPromptUserPassword.Reject;
        	break;
        case TrustSSLServerDialog.TEMPORARY:
            trust = ISVNPromptUserPassword.AcceptTemporary;
        	break;
        case TrustSSLServerDialog.PERMANENT:
            trust = ISVNPromptUserPassword.AcceptPermanently;
        	break;
        default:
            trust = TrustSSLServerDialog.REJECT;
        }
	}
});
      return trust;
  }
 

开发者ID:subclipse,
项目名称:subclipse,
代码行数:25,
代码来源:SVNPromptUserPassword.java

示例3: setupAdapter

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
protected void setupAdapter(ISVNClientAdapter adapter, String username, char[] password, ISVNPromptUserPassword callback) {
    adapter.setUsername(username);
    if(callback != null) {
        adapter.addPasswordCallback(callback);
    } else {
        // do not set password for javahl, it seems that in that case the password is stored permanently in ~/.subversion/auth
        adapter.setPassword(password == null ? "" : new String(password)); //NOI18N
    }
    try {
        File configDir = FileUtil.normalizeFile(new File(SvnConfigFiles.getNBConfigPath()));
        adapter.setConfigDirectory(configDir);
    } catch (SVNClientException ex) {
        SvnClientExceptionHandler.notifyException(ex, false, false);
    }
}
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:16,
代码来源:SvnClientFactory.java

示例4: askTrustSSLServer

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
@Override
public int askTrustSSLServer(String certMessage, boolean allowPermanently) {
    
    if((SvnClientExceptionHandler.EX_NO_CERTIFICATE & handledExceptions) != SvnClientExceptionHandler.EX_NO_CERTIFICATE) {
        return -1; // XXX test me
    }
    
    AcceptCertificatePanel acceptCertificatePanel = new AcceptCertificatePanel();
    acceptCertificatePanel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(SvnClientExceptionHandler.class, "CTL_Error_CertFailed"));
    acceptCertificatePanel.certificatePane.setText(certMessage);
    
    DialogDescriptor dialogDescriptor = new DialogDescriptor(acceptCertificatePanel, org.openide.util.NbBundle.getMessage(SvnClientCallback.class, "CTL_Error_CertFailed")); // NOI18N        
    
    JButton permanentlyButton = new JButton(org.openide.util.NbBundle.getMessage(SvnClientExceptionHandler.class, "CTL_Cert_AcceptPermanently")); // NOI18N
    JButton temporarilyButton = new JButton(org.openide.util.NbBundle.getMessage(SvnClientExceptionHandler.class, "CTL_Cert_AcceptTemp")); // NOI18N
    JButton rejectButton = new JButton(org.openide.util.NbBundle.getMessage(SvnClientExceptionHandler.class, "CTL_Cert_Reject")); // NOI18N
    
    dialogDescriptor.setOptions(new Object[] { permanentlyButton, temporarilyButton, rejectButton }); 
    dialogDescriptor.setHelpCtx(new HelpCtx("org.netbeans.modules.subversion.serverCertificateVerification"));

    showDialog(dialogDescriptor);

    if(dialogDescriptor.getValue() == permanentlyButton) {
        return ISVNPromptUserPassword.AcceptPermanently;
    } else if(dialogDescriptor.getValue() == temporarilyButton) {
        return ISVNPromptUserPassword.AcceptTemporary;
    } else {
        return ISVNPromptUserPassword.Reject;
    }
}
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:31,
代码来源:SvnClientCallback.java

示例5: askTrustSSLServer

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
public int askTrustSSLServer( String info, boolean allowpermanently ) {
    if( Boolean.TRUE.equals( reject ) ) {
        return ISVNPromptUserPassword.Reject;
    } else {
        return ISVNPromptUserPassword.AcceptTemporary;
    }
}
 

开发者ID:subclipse,
项目名称:svnant,
代码行数:11,
代码来源:SvnFacade.java

示例6: setupJavaHl

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
private boolean setupJavaHl () {

        String jhlInitFile = Places.getUserDirectory().getAbsolutePath() + "/config/svn/jhlinit";
        File initFile = new File(jhlInitFile);

        if(checkJavahlCrash(initFile) && !SvnClientFactory.FACTORY_TYPE_JAVAHL.equals(SvnModuleConfig.getDefault().getForcedSvnFactory())) {
            return false;
        }
        try {
            initFile.delete();
            initFile.createNewFile();
        } catch (IOException ex) {
            // should not happen
            LOG.log(Level.INFO, null, ex);
        }

        final SvnClientAdapterFactory f;
        try {            
            f = SvnClientAdapterFactory.getInstance(SvnClientAdapterFactory.Client.JAVAHL);
            if(f == null) {
               return false;
            }
        } finally {
            // write the flag even if javahl not available -
            // we just want to now on the next run that javahl didn't crash the jvm,
            // so we will try to init javahl again
            writeJavahlInitFlag(initFile, JAVAHL_INIT_NOCRASH);
        }
        factory = new ClientAdapterFactory() {
            @Override
            protected ISVNClientAdapter createAdapter() {
                return f.createClient();
            }
            @Override
            protected SvnClientInvocationHandler getInvocationHandler(ISVNClientAdapter adapter, SvnClientDescriptor desc, SvnProgressSupport support, int handledExceptions) {
                return new SvnClientInvocationHandler(adapter, desc, support, handledExceptions, ConnectionType.javahl);
            }
            @Override
            protected ISVNPromptUserPassword createCallback(SVNUrl repositoryUrl, int handledExceptions) {
                return new JhlClientCallback(repositoryUrl, handledExceptions);
            }
            @Override
            protected ConnectionType connectionType() {
                return ConnectionType.javahl;
            }
        };
        LOG.info("running on javahl");
        return true;
    }
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:50,
代码来源:SvnClientFactory.java

示例7: setupSvnKit

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
private boolean  setupSvnKit () {
    final SvnClientAdapterFactory f = SvnClientAdapterFactory.getInstance(SvnClientAdapterFactory.Client.SVNKIT);
    if(f == null) {            
        return false;
    }
    factory = new ClientAdapterFactory() {
        @Override
        protected ISVNClientAdapter createAdapter() {
            return f.createClient();
        }
        @Override
        protected SvnClientInvocationHandler getInvocationHandler(ISVNClientAdapter adapter, SvnClientDescriptor desc, SvnProgressSupport support, int handledExceptions) {
            return new SvnClientInvocationHandler(adapter, desc, support, handledExceptions, ConnectionType.svnkit);
        }
        @Override
        protected ISVNPromptUserPassword createCallback(SVNUrl repositoryUrl, int handledExceptions) {
            return new SvnKitClientCallback(repositoryUrl, handledExceptions);
        }
        @Override
        protected ConnectionType connectionType() {
            return ConnectionType.svnkit;
        }
        
        @Override
        /**
         * Slightly different from the default one
         */
        protected void setupAdapter(ISVNClientAdapter adapter, String username, char[] password, ISVNPromptUserPassword callback) {
            if (callback != null) {
                adapter.addPasswordCallback(callback);
            }
            try {
                File configDir = FileUtil.normalizeFile(new File(SvnConfigFiles.getNBConfigPath()));
                adapter.setConfigDirectory(configDir);
            } catch (SVNClientException ex) {
                SvnClientExceptionHandler.notifyException(ex, false, false);
            }
            adapter.setUsername(username);
            adapter.setPassword(password == null ? "" : new String(password)); //NOI18N
        }
    };
    LOG.fine("Setting svnkit prop: svnkit.http.methods=Basic");
    System.setProperty("svnkit.http.methods", "Basic"); //NOI18N
    LOG.info("svnClientAdapter running on svnkit");
    return true;
}
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:47,
代码来源:SvnClientFactory.java

示例8: addPasswordCallback

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
@Override
public void addPasswordCallback(ISVNPromptUserPassword arg0) {
    throw new UnsupportedOperationException("Not supported yet.");
}
 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:5,
代码来源:CommandlineClient.java

示例9: getSvnPromptUserPassword

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public ISVNPromptUserPassword getSvnPromptUserPassword() {
    return svnPromptUserPassword;
}
 

开发者ID:subclipse,
项目名称:subclipse,
代码行数:4,
代码来源:SVNProviderPlugin.java

示例10: setSvnPromptUserPassword

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public void setSvnPromptUserPassword(
        ISVNPromptUserPassword svnPromptUserPassword) {
    this.svnPromptUserPassword = svnPromptUserPassword;
}
 

开发者ID:subclipse,
项目名称:subclipse,
代码行数:5,
代码来源:SVNProviderPlugin.java

示例11: JhlPromptUserPassword

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
/**
 * Constructor
 * @param arg0
 */
public JhlPromptUserPassword(ISVNPromptUserPassword arg0) {
    super();
    this.worker = arg0;
}
 

开发者ID:subclipse,
项目名称:svnclientadapter,
代码行数:9,
代码来源:JhlPromptUserPassword.java

示例12: addPasswordCallback

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public void addPasswordCallback(ISVNPromptUserPassword callback) {
    if (callback != null) {
     JhlPromptUserPassword prompt = new JhlPromptUserPassword(callback);
     this.setPromptUserPassword(prompt);
    }
}
 

开发者ID:subclipse,
项目名称:svnclientadapter,
代码行数:7,
代码来源:AbstractJhlClientAdapter.java

示例13: addPasswordCallback

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public void addPasswordCallback(ISVNPromptUserPassword callback) {
    if (callback != null) {
     SvnKitPromptUserPassword prompt = new SvnKitPromptUserPassword(callback);
     this.setPromptUserPassword(prompt);
    }
}
 

开发者ID:subclipse,
项目名称:svnclientadapter,
代码行数:7,
代码来源:SvnKitClientAdapter.java

示例14: SvnKitPromptUserPassword

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
/**
 * Constructor
 * @param arg0
 */
public SvnKitPromptUserPassword(ISVNPromptUserPassword arg0) {
    super();
    this.worker = arg0;
}
 

开发者ID:subclipse,
项目名称:svnclientadapter,
代码行数:9,
代码来源:SvnKitPromptUserPassword.java

示例15: addPasswordCallback

点赞 2

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
public void addPasswordCallback(ISVNPromptUserPassword callback) {
	if (callback != null) {
		JhlPromptUserPassword prompt = new JhlPromptUserPassword(callback);
		this.setPromptUserPassword(prompt);
	}
}
 

开发者ID:apicloudcom,
项目名称:APICloud-Studio,
代码行数:7,
代码来源:AbstractJhlClientAdapter.java

示例16: createCallback

点赞 1

import org.tigris.subversion.svnclientadapter.ISVNPromptUserPassword; //导入依赖的package包/类
abstract protected ISVNPromptUserPassword createCallback(SVNUrl repositoryUrl, int handledExceptions); 

开发者ID:apache,
项目名称:incubator-netbeans,
代码行数:2,
代码来源:SvnClientFactory.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)