View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.struts2.jasper;
19  
20  import org.apache.struts2.jasper.compiler.JspConfig;
21  import org.apache.struts2.jasper.compiler.TagPluginManager;
22  import org.apache.struts2.jasper.compiler.TldLocationsCache;
23  
24  import java.io.File;
25  import java.util.Map;
26  
27  /***
28   * A class to hold all init parameters specific to the JSP engine.
29   *
30   * @author Anil K. Vijendran
31   * @author Hans Bergsten
32   * @author Pierre Delisle
33   */
34  public interface Options {
35  
36      /***
37       * Returns true if Jasper issues a compilation error instead of a runtime
38       * Instantiation error if the class attribute specified in useBean action
39       * is invalid.
40       */
41      public boolean getErrorOnUseBeanInvalidClassAttribute();
42  
43      /***
44       * Are we keeping generated code around?
45       */
46      public boolean getKeepGenerated();
47  
48      /***
49       * Returns true if tag handler pooling is enabled, false otherwise.
50       */
51      public boolean isPoolingEnabled();
52  
53      /***
54       * Are we supporting HTML mapped servlets?
55       */
56      public boolean getMappedFile();
57  
58      /***
59       * Should errors be sent to client or thrown into stderr?
60       */
61      public boolean getSendErrorToClient();
62  
63      /***
64       * Should we include debug information in compiled class?
65       */
66      public boolean getClassDebugInfo();
67  
68      /***
69       * Background compile thread check interval in seconds
70       */
71      public int getCheckInterval();
72  
73      /***
74       * Is Jasper being used in development mode?
75       */
76      public boolean getDevelopment();
77  
78      /***
79       * Is the generation of SMAP info for JSR45 debugging suppressed?
80       */
81      public boolean isSmapSuppressed();
82  
83      /***
84       * Indicates whether SMAP info for JSR45 debugging should be dumped to a
85       * file.
86       * Ignored is suppressSmap() is true
87       */
88      public boolean isSmapDumped();
89  
90      /***
91       * Should white spaces between directives or actions be trimmed?
92       */
93      public boolean getTrimSpaces();
94  
95      /***
96       * Class ID for use in the plugin tag when the browser is IE.
97       */
98      public String getIeClassId();
99  
100     /***
101      * What is my scratch dir?
102      */
103     public File getScratchDir();
104 
105     /***
106      * What classpath should I use while compiling the servlets
107      * generated from JSP files?
108      */
109     public String getClassPath();
110 
111     /***
112      * Compiler to use.
113      */
114     public String getCompiler();
115 
116     /***
117      * The compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5.
118      */
119     public String getCompilerTargetVM();
120 
121     /***
122      * Compiler source VM, e.g. 1.3, 1.4, or 1.5.
123      */
124     public String getCompilerSourceVM();
125 
126     /***
127      * The cache for the location of the TLD's
128      * for the various tag libraries 'exposed'
129      * by the web application.
130      * A tag library is 'exposed' either explicitely in
131      * web.xml or implicitely via the uri tag in the TLD
132      * of a taglib deployed in a jar file (WEB-INF/lib).
133      *
134      * @return the instance of the TldLocationsCache
135      *         for the web-application.
136      */
137     public TldLocationsCache getTldLocationsCache();
138 
139     /***
140      * Java platform encoding to generate the JSP
141      * page servlet.
142      */
143     public String getJavaEncoding();
144 
145     /***
146      * boolean flag to tell Ant whether to fork JSP page compilations.
147      */
148     public boolean getFork();
149 
150     /***
151      * Obtain JSP configuration informantion specified in web.xml.
152      */
153     public JspConfig getJspConfig();
154 
155     /***
156      * Is generation of X-Powered-By response header enabled/disabled?
157      */
158     public boolean isXpoweredBy();
159 
160     /***
161      * Obtain a Tag Plugin Manager
162      */
163     public TagPluginManager getTagPluginManager();
164 
165     /***
166      * Are Text strings to be generated as char arrays?
167      */
168     public boolean genStringAsCharArray();
169 
170     /***
171      * Modification test interval.
172      */
173     public int getModificationTestInterval();
174 
175     /***
176      * Is caching enabled (used for precompilation).
177      */
178     public boolean isCaching();
179 
180     /***
181      * The web-application wide cache for the returned TreeNode
182      * by parseXMLDocument in TagLibraryInfoImpl.parseTLD,
183      * if isCaching returns true.
184      *
185      * @return the Map(String uri, TreeNode tld) instance.
186      */
187     public Map getCache();
188 
189 }