private String getPServerConnectionPassword(String cvsRoot, CvsRootParser root) { String[] userAndPassword = root.USER_NAME.split(":"); if (userAndPassword.length > 1) { return PServerPasswordScrambler.getInstance().scramble(userAndPassword[1]); } else { return myBuilder.getPServerPassword(cvsRoot); } }
public Settings createConfiguration(String rootAsString, boolean check) { final CvsRootParser root = CvsRootParser.valueOf(rootAsString, check); final Settings result = myBuilder.createSettings(root.METHOD, rootAsString); if (CvsMethod.LOCAL_METHOD.equals(root.METHOD)) { fillLocalSettings(root.REPOSITORY, result); } else if (CvsMethod.PSERVER_METHOD.equals(root.METHOD)) { fillPServerSettings(root, result, rootAsString); } else if (CvsMethod.EXT_METHOD.equals(root.METHOD)) { fillSettings(root, result); } else if (CvsMethod.SSH_METHOD.equals(root.METHOD)) { fillSettings(root, result); } else { throw new CvsRootException( CvsBundle.message("exception.text.unsupported.method", root.METHOD, rootAsString)); } return result; }