1 /* 2 * #%L 3 * EUGene :: EUGene 4 * %% 5 * Copyright (C) 2004 - 2010 CodeLutin 6 * %% 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation, either version 3 of the 10 * License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Lesser Public License for more details. 16 * 17 * You should have received a copy of the GNU General Lesser Public 18 * License along with this program. If not, see 19 * <http://www.gnu.org/licenses/lgpl-3.0.html>. 20 * #L% 21 */ 22 23 package org.nuiton.eugene.writer; 24 25 import org.apache.commons.lang3.builder.ToStringBuilder; 26 27 /** 28 * Definition of of the chained writer entry. 29 * 30 * Created: 04 mars. 2010 31 * 32 * @author Tony Chemit - chemit@codelutin.com 33 * @since 2.0.0 34 */ 35 public class ChainedFileWriterEntry { 36 37 /** input path of entry (can be a directory or a classpath entry) */ 38 protected String inputPath; 39 40 /** include pattern of entry */ 41 protected String includePattern; 42 43 /** 44 * Flag to knwon if resources should be searched in classpath. 45 * 46 * If sets to {@code true}, then the {@link #inputPath} is the 47 * absolute path where to seek resources in classpath. 48 * 49 * @since 2.1.3 50 */ 51 protected boolean useClassPath; 52 53 public ChainedFileWriterEntry(String inputPath, 54 String includePattern, 55 boolean useClassPath) { 56 this(inputPath, includePattern); 57 this.useClassPath = useClassPath; 58 } 59 60 public ChainedFileWriterEntry(String inputPath, String includePattern) { 61 this.inputPath = inputPath; 62 this.includePattern = includePattern; 63 } 64 65 public String getIncludePattern() { 66 return includePattern; 67 } 68 69 public String getInputPath() { 70 return inputPath; 71 } 72 73 public boolean isUseClassPath() { 74 return useClassPath; 75 } 76 77 @Override 78 public String toString() { 79 String s = ToStringBuilder.reflectionToString(this); 80 return s; 81 } 82 }