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 java.io.Reader; 23 import java.util.List; 24 import java.util.Properties; 25 26 import org.apache.maven.execution.MavenSession; 27 import org.apache.maven.project.MavenProject; 28 29 /** 30 * @author Olivier Lamy 31 * @author Kristian Rosenvold 32 * @since 1.0-beta-3 33 */ 34 public class MavenReaderFilterRequest 35 extends AbstractMavenFilteringRequest 36 { 37 38 private Reader from; 39 40 private boolean filtering; 41 42 /** 43 * Default constructor. 44 */ 45 public MavenReaderFilterRequest() 46 { 47 // nothing 48 } 49 50 /** 51 * @param from To read from 52 * @param filtering filter yes/no 53 * @param mavenProject The Maven Project. 54 * @param filters The list of filters which will be used. 55 * @param escapedBackslashesInFilePath escape backslashes in file paths. 56 * @param mavenSession The Maven Session. 57 * @param additionalProperties supplemental properties. 58 */ 59 public MavenReaderFilterRequest( Reader from, boolean filtering, MavenProject mavenProject, List<String> filters, 60 boolean escapedBackslashesInFilePath, MavenSession mavenSession, 61 Properties additionalProperties ) 62 { 63 super( mavenProject, filters, mavenSession ); 64 this.from = from; 65 this.filtering = filtering; 66 setAdditionalProperties( additionalProperties ); 67 setEscapeWindowsPaths( escapedBackslashesInFilePath ); 68 } 69 70 /** 71 * @return where we read from. 72 */ 73 public Reader getFrom() 74 { 75 return from; 76 } 77 78 /** 79 * @param from set where to read from. 80 */ 81 public void setFrom( Reader from ) 82 { 83 this.from = from; 84 } 85 86 /** 87 * @return is filtering active ({@code true}) false otherwise. 88 */ 89 public boolean isFiltering() 90 { 91 return filtering; 92 } 93 94 /** 95 * @param filtering turn filtering on {@code true}) or off ({@code false}). 96 */ 97 public void setFiltering( boolean filtering ) 98 { 99 this.filtering = filtering; 100 } 101 102 }