001    package org.apache.maven.scm.provider.local.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    
024    import java.util.HashSet;
025    import java.util.Set;
026    
027    /**
028     * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
029     * @version $Id: LocalScmProviderRepository.java 1057018 2011-01-09 20:12:29Z olamy $
030     */
031    public class LocalScmProviderRepository
032        extends ScmProviderRepository
033    {
034        private String root;
035    
036        private String module;
037    
038        private Set<String> addedFiles = new HashSet<String>();
039    
040        /**
041         * @param root
042         * @param module
043         */
044        public LocalScmProviderRepository( String root, String module )
045        {
046            this.root = root;
047    
048            this.module = module;
049        }
050    
051        /**
052         * @return Returns the root.
053         */
054        public String getRoot()
055        {
056            return root;
057        }
058    
059        /**
060         * @return Returns the module.
061         */
062        public String getModule()
063        {
064            return module;
065        }
066    
067        public void addFile( String path )
068        {
069            addedFiles.add( path );
070        }
071    
072        public boolean isFileAdded( String path )
073        {
074            return addedFiles.contains( path );
075        }
076    }