001package org.apache.maven.scm.provider.tfs; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import org.apache.maven.scm.provider.ScmProviderRepository; 023import org.codehaus.plexus.util.StringUtils; 024 025/** 026 * 027 */ 028public class TfsScmProviderRepository 029 extends ScmProviderRepository 030{ 031 private final String tfsUrl; 032 033 private final String serverPath; 034 035 private final String workspace; 036 037 private final boolean useCheckinPolicies; 038 039 public TfsScmProviderRepository( String tfsUrl, String user, String password, String serverPath, String workspace, 040 boolean useCheckinPolicies ) 041 { 042 super(); 043 setUser( user ); 044 setPassword( password ); 045 this.tfsUrl = tfsUrl; 046 this.serverPath = serverPath; 047 this.workspace = workspace; 048 this.useCheckinPolicies = useCheckinPolicies; 049 } 050 051 public String getTfsUrl() 052 { 053 return tfsUrl; 054 } 055 056 public String getWorkspace() 057 { 058 return workspace; 059 } 060 061 public String getServerPath() 062 { 063 return serverPath; 064 } 065 066 public String getUserPassword() 067 { 068 String userPassword = null; 069 070 if ( !StringUtils.isEmpty( getUser() ) ) 071 { 072 userPassword = getUser(); 073 074 if ( !StringUtils.isEmpty( getPassword() ) ) 075 { 076 userPassword += ";" + getPassword(); 077 } 078 } 079 return userPassword; 080 } 081 082 public boolean isUseCheckinPolicies() 083 { 084 return useCheckinPolicies; 085 } 086}