Changeset 4105
- Timestamp:
- Jan 28, 2008, 1:52:31 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Install.java
r4080 r4105 588 588 "wants to use an uploaded file to generate the regular expressions for parsing it.", 589 589 "net.sf.basedb.util.parser.ConfigureByExample", null); 590 createPluginType("Configure by example (wrapped)", "This is an extension to the 'Configure by example' interface " + 591 "that allows plug-ins to wrap the file with a special input stream when reading from it. " + 592 "It makes it possible, for example, to parse compressed files on the fly.", 593 "net.sf.basedb.util.parser.WrappedConfigureByExample", null); 590 594 createPluginType("File unpacker", "This interface should be implemented by all plugins that can unpack compressed files. " + 591 595 "The file upload feature uses these plugins for automatic unpacking of compressed files.", -
trunk/src/core/net/sf/basedb/core/PluginRequest.java
r3679 r4105 271 271 /** 272 272 Get the plugin object. 273 */ 274 P getPlugin() 273 @since 2.6 (was not public before) 274 */ 275 public P getPlugin() 275 276 { 276 277 return plugin; -
trunk/www/common/plugin/parse_file.jsp
r3675 r4105 35 35 import="net.sf.basedb.core.Path" 36 36 import="net.sf.basedb.core.Location" 37 import="net.sf.basedb.core.PluginConfigurationRequest" 38 import="net.sf.basedb.core.plugin.Plugin" 37 39 import="net.sf.basedb.util.parser.FlatFileParser" 40 import="net.sf.basedb.util.parser.WrappedConfigureByExample" 38 41 import="net.sf.basedb.clients.web.Base" 39 42 import="net.sf.basedb.util.Values" … … 60 63 String path = request.getParameter("path"); 61 64 String charsetName = Values.getString(request.getParameter("charset"), Config.getCharset()); 65 PluginConfigurationRequest pcRequest = (PluginConfigurationRequest)sc.getSessionSetting("plugin.configure.request"); 66 Plugin plugin = pcRequest.getPlugin(); 67 62 68 File file = null; 63 69 FlatFileParser parser = null; … … 147 153 148 154 fileInputStream = file.getDownloadStream(0); 155 if (plugin instanceof WrappedConfigureByExample) 156 { 157 WrappedConfigureByExample wex = (WrappedConfigureByExample)plugin; 158 fileInputStream = wex.wrapInputStream(fileInputStream); 159 } 149 160 parser.setInputStream(fileInputStream, charsetName); 150 161 lastLine = parser.parseHeaders();
Note: See TracChangeset
for help on using the changeset viewer.