View Javadoc
1   package org.apache.maven.shared.filtering;
2   
3   
4   /*
5    * Licensed to the Apache Software Foundation (ASF) under one
6    * or more contributor license agreements.  See the NOTICE file
7    * distributed with this work for additional information
8    * regarding copyright ownership.  The ASF licenses this file
9    * to you under the Apache License, Version 2.0 (the
10   * "License"); you may not use this file except in compliance
11   * with the License.  You may obtain a copy of the License at
12   *
13   *    http://www.apache.org/licenses/LICENSE-2.0
14   *
15   * Unless required by applicable law or agreed to in writing,
16   * software distributed under the License is distributed on an
17   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18   * KIND, either express or implied.  See the License for the
19   * specific language governing permissions and limitations
20   * under the License.
21   */
22  
23  import java.util.List;
24  
25  import org.apache.maven.execution.MavenSession;
26  import org.apache.maven.project.MavenProject;
27  import org.apache.maven.shared.utils.io.FileUtils;
28  
29  import javax.annotation.Nonnull;
30  
31  public interface DefaultFilterInfo {
32  	/**
33  	 * Will return the default FileUtils.FilterWrappers.
34  	 * <p/>
35  	 * <ul>
36  	 * <li>interpolate with token ${} and values from sysProps, project.properties, filters and project filters.</li>
37  	 * <li>interpolate with token @ @ and values from sysProps, project.properties, filters and project filters.</li>
38  	 * <li>interpolate with token ${} and values from mavenProject interpolation.</li>
39  	 * <li>interpolation with token @ @ and values from mavenProject interpolation</li>
40  	 * </ul>
41  	 * <b>This method is now deprecated and no escape mechanism will be used.</b>
42  	 *
43  	 * @param mavenProject
44  	 * @param filters      {@link java.util.List} of properties file
45  	 * @return {@link java.util.List} of FileUtils.FilterWrapper
46  	 * @deprecated use {@link #getDefaultFilterWrappers(org.apache.maven.project.MavenProject, java.util.List, boolean, org.apache.maven.execution.MavenSession, org.apache.maven.shared.filtering.MavenResourcesExecution)}
47  	 */
48  	@Nonnull List<FileUtils.FilterWrapper> getDefaultFilterWrappers(MavenProject mavenProject, List<String> filters,
49  			boolean escapedBackslashesInFilePath,
50  			MavenSession mavenSession)
51  			throws MavenFilteringException;
52  
53  	/**
54  	 * @param mavenProject
55  	 * @param filters
56  	 * @param escapedBackslashesInFilePath
57  	 * @param mavenSession
58  	 * @param mavenResourcesExecution
59  	 * @return {@link java.util.List} of FileUtils.FilterWrapper
60  	 * @throws org.apache.maven.shared.filtering.MavenFilteringException
61  	 * @since 1.0-beta-2
62  	 */
63  	@Nonnull List<FileUtils.FilterWrapper> getDefaultFilterWrappers(MavenProject mavenProject, List<String> filters,
64  			boolean escapedBackslashesInFilePath,
65  			MavenSession mavenSession,
66  			MavenResourcesExecution mavenResourcesExecution)
67  			throws MavenFilteringException;
68  
69  	/**
70  	 * @param request
71  	 * @return {@link java.util.List} of FileUtils.FilterWrapper
72  	 * @throws org.apache.maven.shared.filtering.MavenFilteringException
73  	 * @since 1.0-beta-3
74  	 */
75  	@Nonnull List<FileUtils.FilterWrapper> getDefaultFilterWrappers(AbstractMavenFilteringRequest request)
76  			throws MavenFilteringException;
77  }