001 package 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 022 import org.apache.maven.scm.provider.ScmProviderRepository; 023 import org.codehaus.plexus.util.StringUtils; 024 025 public class TfsScmProviderRepository 026 extends ScmProviderRepository 027 { 028 private final String tfsUrl; 029 030 private final String serverPath; 031 032 private final String workspace; 033 034 public TfsScmProviderRepository( String tfsUrl, String user, String password, String serverPath, String workspace ) 035 { 036 super(); 037 setUser( user ); 038 setPassword( password ); 039 this.tfsUrl = tfsUrl; 040 this.serverPath = serverPath; 041 this.workspace = workspace; 042 } 043 044 public String getTfsUrl() 045 { 046 return tfsUrl; 047 } 048 049 public String getWorkspace() 050 { 051 return workspace; 052 } 053 054 public String getServerPath() 055 { 056 return serverPath; 057 } 058 059 public String getUserPassword() 060 { 061 String userPassword = null; 062 063 if ( !StringUtils.isEmpty( getUser() ) ) 064 { 065 userPassword = getUser(); 066 067 if ( !StringUtils.isEmpty( getPassword() ) ) 068 { 069 userPassword += ";" + getPassword(); 070 } 071 } 072 return userPassword; 073 } 074 }