Changeset 3439
- Timestamp:
- Jun 4, 2007, 9:22:07 AM (16 years ago)
- Location:
- branches/2.3.1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3.1/src/core/net/sf/basedb/core/PluginResponse.java
r2854 r3439 27 27 import net.sf.basedb.core.plugin.ExportOutputStream; 28 28 import net.sf.basedb.core.plugin.ImmediateDownloadExporter; 29 import net.sf.basedb.core.plugin.Plugin; 29 30 import net.sf.basedb.core.plugin.Response; 30 31 import net.sf.basedb.core.plugin.Request; … … 149 150 throw new PermissionDeniedException("Cannot export since response status is: " + getStatus()); 150 151 } 151 ImmediateDownloadExporter exporter = (ImmediateDownloadExporter)request.getPlugin(); 152 exporter.doExport(out, progress); 152 Plugin plugin = request.getPlugin(); 153 try 154 { 155 ImmediateDownloadExporter exporter = (ImmediateDownloadExporter)plugin; 156 exporter.doExport(out, progress); 157 } 158 finally 159 { 160 plugin.done(); 161 } 153 162 } 154 163 -
branches/2.3.1/www/common/import/index.jsp
r2978 r3439 109 109 for (PluginConfiguration pluginConfig : configQuery.list(dc)) 110 110 { 111 InteractivePlugin ip = plugin.newInstance(InteractivePlugin.class, null, sc, pluginConfig, null);111 InteractivePlugin ip = null; 112 112 String contextMessage = null; 113 113 try 114 114 { 115 ip = plugin.newInstance(InteractivePlugin.class, null, sc, pluginConfig, null); 115 116 contextMessage = ip.isInContext(context, currentItem); 116 117 } … … 118 119 { 119 120 contextMessage = t.getClass().getName() + ": " + t.getMessage(); 121 } 122 finally 123 { 124 if (ip != null) ip.done(); 120 125 } 121 126 if (contextMessage == null) … … 136 141 else if (!plugin.requiresConfiguration()) 137 142 { 138 InteractivePlugin ip = plugin.newInstance(InteractivePlugin.class, null, sc, null, null);143 InteractivePlugin ip = null; 139 144 String contextMessage = null; 140 145 try 141 146 { 147 ip = plugin.newInstance(InteractivePlugin.class, null, sc, null, null); 142 148 contextMessage = ip.isInContext(context, currentItem); 143 149 } … … 145 151 { 146 152 contextMessage = t.getClass().getName() + ": " + t.getMessage(); 153 } 154 finally 155 { 156 if (ip != null) ip.done(); 147 157 } 148 158 if (contextMessage == null) -
branches/2.3.1/www/common/plugin/index.jsp
r2992 r3439 148 148 for (PluginConfiguration pluginConfig : configQuery.list(dc)) 149 149 { 150 InteractivePlugin ip = plugin.newInstance(InteractivePlugin.class, null, sc, pluginConfig, null);150 InteractivePlugin ip = null; 151 151 String contextMessage = null; 152 152 try 153 153 { 154 ip = plugin.newInstance(InteractivePlugin.class, null, sc, pluginConfig, null); 154 155 contextMessage = ip.isInContext(context, currentItem); 155 156 } … … 157 158 { 158 159 contextMessage = t.getClass().getName() + ": " + t.getMessage(); 160 } 161 finally 162 { 163 if (ip != null) ip.done(); 159 164 } 160 165 if (contextMessage == null) … … 174 179 else if (!plugin.requiresConfiguration()) 175 180 { 176 InteractivePlugin ip = plugin.newInstance(InteractivePlugin.class, null, sc, null, null);181 InteractivePlugin ip = null; 177 182 String contextMessage = null; 178 183 try 179 184 { 185 ip = plugin.newInstance(InteractivePlugin.class, null, sc, null, null); 180 186 contextMessage = ip.isInContext(context, currentItem); 181 187 } … … 183 189 { 184 190 contextMessage = t.getClass().getName() + ": " + t.getMessage(); 191 } 192 finally 193 { 194 if (ip != null) ip.done(); 185 195 } 186 196 if (contextMessage == null)
Note: See TracChangeset
for help on using the changeset viewer.