View Javadoc
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.nuiton.eugene.ModelHelper;
26  
27  import java.io.File;
28  import java.util.Map;
29  
30  /**
31   * Shared configuration of a {@link ChainedFileWriter}, should be the same for
32   * all writers to use at a time.
33   *
34   * @author Tony Chemit - chemit@codelutin.com
35   * @since 2.0.0
36   */
37  public interface ChainedFileWriterConfiguration {
38  
39      /** @return the type of model used */
40      String getModelType();
41  
42      /** @return project base directory */
43      File getBasedir();
44  
45      /** @return base directory where to generate */
46      File getOutputDirectory();
47  
48      /**
49       * @return base directory where to extract files obtain from class-path
50       * @since 2.1.3
51       */
52      File getExtractDirectory();
53  
54      /**
55       * @return {@code true} if must regenerate files even if they are up to date
56       */
57      boolean isOverwrite();
58  
59      /**
60       * @return {@code true} if build is off-line and should not be able to access outside resources.
61       */
62      boolean isOffline();
63  
64      /** @return {@code true} if build is verbose. */
65      boolean isVerbose();
66  
67      /** @return {@code true} if build is done on a test phase. */
68      boolean isTestPhase();
69  
70      /** @return encoding to use to read and write files */
71      String getEncoding();
72  
73      /** @return the universe of availables writers */
74      Map<String, ChainedFileWriter> getWriters();
75  
76      /**
77       * @return model helper tool.
78       * @since 2.6.3
79       */
80      ModelHelper getModelHelper();
81  
82      /** @return properties to pass to writers */
83      Map<String, Object> getProperties();
84  
85      /** @return the classloader to use to seek for resources */
86      ClassLoader getClassLoader();
87  
88      File getModelExtensionFile();
89  
90  }