1 package org.apache.maven.shared.filtering; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import org.apache.maven.execution.MavenSession; 23 import org.apache.maven.project.MavenProject; 24 import org.apache.maven.shared.utils.io.FileUtils; 25 26 import java.io.File; 27 import java.util.List; 28 29 /** 30 * @author Olivier Lamy 31 * 32 */ 33 public interface MavenFileFilter extends DefaultFilterInfo 34 { 35 36 /** 37 * Will copy a file with some filtering using defaultFilterWrappers. 38 * 39 * @param from file to copy/filter 40 * @param to destination file 41 * @param filtering enable or not filering 42 * @param mavenProject the mavenproject 43 * @param filters {@link List} of String which are path to a Property file 44 * @throws MavenFilteringException 45 * @see #getDefaultFilterWrappers(MavenProject, List, boolean, MavenSession) 46 */ 47 void copyFile( File from, final File to, boolean filtering, MavenProject mavenProject, List<String> filters, 48 boolean escapedBackslashesInFilePath, String encoding, MavenSession mavenSession ) 49 throws MavenFilteringException; 50 51 /** 52 * @param mavenFileFilterRequest 53 * @throws MavenFilteringException 54 * @since 1.0-beta-3 55 */ 56 void copyFile( MavenFileFilterRequest mavenFileFilterRequest ) 57 throws MavenFilteringException; 58 59 /** 60 * @param from 61 * @param to 62 * @param filtering 63 * @param filterWrappers {@link List} of FileUtils.FilterWrapper 64 * @throws MavenFilteringException 65 */ 66 void copyFile( File from, final File to, boolean filtering, List<FileUtils.FilterWrapper> filterWrappers, 67 String encoding ) 68 throws MavenFilteringException; 69 70 71 /** 72 * @param from 73 * @param to 74 * @param filtering 75 * @param filterWrappers 76 * @param encoding 77 * @param overwrite 78 * @throws MavenFilteringException 79 * @since 1.0-beta-2 80 */ 81 void copyFile( File from, final File to, boolean filtering, List<FileUtils.FilterWrapper> filterWrappers, 82 String encoding, boolean overwrite ) 83 throws MavenFilteringException; 84 }