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. |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 11 | */ |
| 12 | public interface Plugin { |
Stuart McCulloch | 2286f23 | 2012-06-15 13:27:53 +0000 | [diff] [blame^] | 13 | /** |
| 14 | * Give the plugin the remaining properties. When a plugin is declared, the |
| 15 | * clause can contain extra properties. All the properties and directives |
| 16 | * are given to the plugin to use. |
| 17 | * |
| 18 | * @param map |
| 19 | * attributes and directives for this plugin's clause |
| 20 | */ |
| 21 | void setProperties(Map<String,String> map); |
| 22 | |
| 23 | /** |
| 24 | * Set the current reporter. This is called at init time. This plugin should |
| 25 | * report all errors and warnings to this reporter. |
| 26 | * |
| 27 | * @param processor |
| 28 | */ |
| 29 | void setReporter(Reporter processor); |
Stuart McCulloch | bb01437 | 2012-06-07 21:57:32 +0000 | [diff] [blame] | 30 | } |