001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 */ 019package org.apache.maven.scm.provider.local.repository; 020 021import java.util.HashSet; 022import java.util.Set; 023 024import org.apache.maven.scm.provider.ScmProviderRepository; 025 026/** 027 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a> 028 * 029 */ 030public class LocalScmProviderRepository extends ScmProviderRepository { 031 private String root; 032 033 private String module; 034 035 private Set<String> addedFiles = new HashSet<>(); 036 037 /** 038 * @param root 039 * @param module 040 */ 041 public LocalScmProviderRepository(String root, String module) { 042 this.root = root; 043 044 this.module = module; 045 } 046 047 /** 048 * @return Returns the root. 049 */ 050 public String getRoot() { 051 return root; 052 } 053 054 /** 055 * @return Returns the module. 056 */ 057 public String getModule() { 058 return module; 059 } 060 061 public void addFile(String path) { 062 addedFiles.add(path); 063 } 064 065 public boolean isFileAdded(String path) { 066 return addedFiles.contains(path); 067 } 068}