summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/Application.java
diff options
context:
space:
mode:
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-27 11:39:42 +0000
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>2006-12-27 11:39:42 +0000
commit1fc55f6c542933ea7b82e940118d9a0124ea4799 (patch)
treeb551b62d35b443d5b2620d45945030f1c88444b7 /src/com/itmill/toolkit/Application.java
parent578aa38074c92e79e93a12cdc8c4eca170ac5257 (diff)
downloadvaadin-framework-1fc55f6c542933ea7b82e940118d9a0124ea4799.tar.gz
vaadin-framework-1fc55f6c542933ea7b82e940118d9a0124ea4799.zip
Added license getter/setter for application
svn changeset:155/svn branch:toolkit
Diffstat (limited to 'src/com/itmill/toolkit/Application.java')
-rw-r--r--src/com/itmill/toolkit/Application.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/Application.java b/src/com/itmill/toolkit/Application.java
index 5bcf947830..60dc6b1e30 100644
--- a/src/com/itmill/toolkit/Application.java
+++ b/src/com/itmill/toolkit/Application.java
@@ -29,6 +29,7 @@
package com.itmill.toolkit;
import com.itmill.toolkit.service.ApplicationContext;
+import com.itmill.toolkit.service.License;
import com.itmill.toolkit.terminal.*;
import com.itmill.toolkit.ui.AbstractComponent;
import com.itmill.toolkit.ui.Window;
@@ -131,6 +132,9 @@ public abstract class Application
/** Window detach listeners */
private LinkedList windowDetachListeners = null;
+
+ /** License for running this application */
+ private License license = null;
/** Application resource mapping: key <-> resource */
private Hashtable resourceKeyMap = new Hashtable();
@@ -760,5 +764,28 @@ public abstract class Application
public ApplicationContext getContext() {
return context;
}
+
+ /** Get the license this application is running on.
+ *
+ * The license is initialized by the ApplicationServlet before application is started.
+ * The the license-file can not be found in WEB-INF/itmill-toolkit-license.xml, you
+ * can set its source in application init().
+ *
+ * @return License this application is currently using
+ */
+ public License getLicense() {
+ return license;
+ }
+
+ /** Set the license this application is currently using.
+ *
+ * The license is initialized by the ApplicationServlet before application is started.
+ * Changing the license after application init has no effect.
+ *
+ * @param license New license for this application.
+ */
+ public void setLicense(License license) {
+ this.license = license;
+ }
} \ No newline at end of file