Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame^] | 1 | package aQute.bnd.service; |
| 2 | |
| 3 | import java.util.*; |
| 4 | |
| 5 | import aQute.libg.reporter.*; |
| 6 | |
| 7 | /** |
| 8 | * An optional interface for plugins. If a plugin implements this interface then |
| 9 | * it can receive the reminaing attributes and directives given in its clause as |
| 10 | * well as the reporter to use. |
| 11 | * |
| 12 | */ |
| 13 | public interface Plugin { |
| 14 | /** |
| 15 | * Give the plugin the remaining properties. |
| 16 | * |
| 17 | * When a plugin is declared, the clause can contain extra properties. |
| 18 | * All the properties and directives are given to the plugin to use. |
| 19 | * |
| 20 | * @param map attributes and directives for this plugin's clause |
| 21 | */ |
| 22 | void setProperties(Map<String,String> map); |
| 23 | |
| 24 | /** |
| 25 | * Set the current reporter. This is called at init time. This plugin |
| 26 | * should report all errors and warnings to this reporter. |
| 27 | * |
| 28 | * @param processor |
| 29 | */ |
| 30 | void setReporter(Reporter processor); |
| 31 | } |