update copyright
[fedora-idea.git] / plugins / cvs / cvs-plugin / src / com / intellij / cvsSupport2 / connections / CvsRootDataBuilder.java
blobad7d9cc5eddfc9b0baf9bd6b0611229670d152b3
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package com.intellij.cvsSupport2.connections;
19 import com.intellij.cvsSupport2.connections.pserver.PServerLoginProvider;
21 public class CvsRootDataBuilder implements CvsRootSettingsBuilder<CvsRootData>{
23 public static CvsRootData createSettingsOn(String cvsRoot, boolean check) {
24 return new RootFormatter<CvsRootData>(new CvsRootDataBuilder()).createConfiguration(cvsRoot, check);
28 public CvsRootData createSettings(final CvsMethod method, final String cvsRootAsString) {
29 final CvsRootData result = new CvsRootData(cvsRootAsString);
30 result.METHOD = method;
31 return result;
34 public String getPServerPassword(final String cvsRoot) {
35 return PServerLoginProvider.getInstance().getScrambledPasswordForCvsRoot(cvsRoot);