001    package org.apache.maven.scm.provider.vss.repository;
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    /**
026     * @author <a href="mailto:triek@thrx.de">Thorsten Riek</a>
027     * @version $Id: VssScmProviderRepository.java 483105 2006-12-06 15:07:54Z evenisse $
028     */
029    public class VssScmProviderRepository
030        extends ScmProviderRepository
031    {
032        private String vssdir;
033    
034        private String project;
035    
036        public VssScmProviderRepository( String user, String password, String vssdir, String project )
037        {
038            super();
039            setUser( user );
040            setPassword( password );
041            this.vssdir = StringUtils.replace( vssdir, "/", "\\" );
042    //        this.project = StringUtils.replace( project, "/", "\\" );
043            this.project = project;
044        }
045    
046        public String getProject()
047        {
048            return project;
049        }
050    
051        public String getVssdir()
052        {
053            return vssdir;
054        }
055    
056        public String getUserPassword()
057        {
058            String userPassword = null;
059    
060            if ( !StringUtils.isEmpty( getUser() ) )
061            {
062                userPassword = getUser();
063    
064                if ( !StringUtils.isEmpty( getPassword() ) )
065                {
066                    userPassword += "," + getPassword();
067                }
068            }
069            return userPassword;
070        }
071    }