package net.sensnet.node.plugins;

import net.sensnet.node.SensNetNodeConfiguration;

import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;

public abstract class Plugin {
	private SensNetNodeConfiguration configuration;

	public Plugin(SensNetNodeConfiguration configuration) {
		this.configuration = configuration;
	}

	public String getProperty(String property) {
		return configuration.getProperty(getClass().getName().toLowerCase()
				+ "." + property);
	}

	public Logger getLoger() {
		return Log.getLogger("PLUGIN: " + getClass().getSimpleName());
	}
}

@@ -389,22 +389,28 @@
 ty) %7B%0A%09%09
-return
+String res =
  configu
@@ -448,16 +448,21 @@
 etName()
+%0A%09%09%09%09
 .toLower
@@ -471,30 +471,232 @@
 se()
-%0A%09%09%09%09+ %22.%22 + property)
+ + %22.%22 + property);%0A%09%09if (res == null) %7B%0A%09%09%09throw new IllegalArgumentException(%22Misconfigured plugin '%22%0A%09%09%09%09%09+ getClass().getName()%0A%09%09%09%09%09+ %22'! Couldn't find configuration property '%22 + property%0A%09%09%09%09%09+ %22'.%22);%0A%09%09%7D%0A%09%09return res
 ;%0A%09%7D

handle missing configuratoin key