summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
diff options
context:
space:
mode:
authorwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-09 09:54:32 +0000
committerwbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-09 09:54:32 +0000
commitc7cbf8a12db4fcb77fd374392e88c3fa04b1e100 (patch)
tree1534e48980e74a6cb3f61e10e75e2c6adff3aad4 /BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
parentd3698ed2a4f129e5af970f072bc79bb8226d7765 (diff)
downloadmocca-c7cbf8a12db4fcb77fd374392e88c3fa04b1e100.tar.gz
mocca-c7cbf8a12db4fcb77fd374392e88c3fa04b1e100.tar.bz2
mocca-c7cbf8a12db4fcb77fd374392e88c3fa04b1e100.zip
added check to avoid sending baseid to non .gv.at domains
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@25 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java139
1 files changed, 68 insertions, 71 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 5d4d0dab..8289f30b 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -1,19 +1,19 @@
/*
-* Copyright 2008 Federal Chancellery Austria and
-* Graz University of Technology
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
+ * Copyright 2008 Federal Chancellery Austria and
+ * Graz University of Technology
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
package at.gv.egiz.bku.online.applet;
import java.util.Locale;
@@ -29,71 +29,68 @@ import at.gv.egiz.bku.gui.BKUGUIFacade;
import at.gv.egiz.bku.gui.BKUGUIFactory;
/**
- * Note: all swing code is executed by the event dispatch thread (see BKUGUIFacade)
+ * Note: all swing code is executed by the event dispatch thread (see
+ * BKUGUIFacade)
*/
public class BKUApplet extends JApplet {
- private static Log log = LogFactory.getLog(BKUApplet.class);
+ private static Log log = LogFactory.getLog(BKUApplet.class);
+
+ public final static String RESOURCE_BUNDLE_BASE = "at/gv/egiz/bku/online/applet/Messages";
- public final static String RESOURCE_BUNDLE_BASE = "at/gv/egiz/bku/online/applet/Messages";
+ public final static String LOCALE_PARAM_KEY = "Locale";
+ public final static String LOGO_URL_KEY = "LogoURL";
+ public final static String WSDL_URL = "WSDL_URL";
+ public final static String SESSION_ID = "SessionID";
- public final static String LOCALE_PARAM_KEY = "Locale";
- public final static String LOGO_URL_KEY="LogoURL";
- public final static String WSDL_URL="WSDL_URL";
- public final static String SESSION_ID="SessionID";
+ protected ResourceBundle resourceBundle;
+ protected BKUWorker worker;
+ protected Thread workerThread;
- protected ResourceBundle resourceBundle;
- protected BKUWorker worker;
- protected Thread workerThread;
-
- public BKUApplet() {
- }
+ public BKUApplet() {
+ }
- public void init() {
- log.debug("Called init()");
- try {
- HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory.getSocketFactory());
- HttpsURLConnection.setDefaultHostnameVerifier(InternalSSLSocketFactory.getHostNameVerifier());
- } catch (InternalSSLSocketFactoryException e) {
- log.error(e);
- }
- String localeString = getMyAppletParameter(LOCALE_PARAM_KEY);
- if (localeString != null) {
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE,
- new Locale(localeString));
- } else {
- resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE);
- }
- BKUGUIFacade gui = BKUGUIFactory.createGUI();
- gui.init(getContentPane(), localeString);
- worker = new BKUWorker(gui, this, resourceBundle);
- }
+ public void init() {
+ log.debug("Called init()");
+ HttpsURLConnection.setDefaultSSLSocketFactory(InternalSSLSocketFactory
+ .getInstance());
+ String localeString = getMyAppletParameter(LOCALE_PARAM_KEY);
+ if (localeString != null) {
+ resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE,
+ new Locale(localeString));
+ } else {
+ resourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE);
+ }
+ BKUGUIFacade gui = BKUGUIFactory.createGUI();
+ gui.init(getContentPane(), localeString);
+ worker = new BKUWorker(gui, this, resourceBundle);
+ }
- public void start() {
- log.debug("Called start()");
- workerThread = new Thread(worker);
- workerThread.start();
- }
+ public void start() {
+ log.debug("Called start()");
+ workerThread = new Thread(worker);
+ workerThread.start();
+ }
- public void stop() {
- log.debug("Called stop()");
- if ((workerThread != null) && (workerThread.isAlive())) {
- workerThread.interrupt();
- }
- }
+ public void stop() {
+ log.debug("Called stop()");
+ if ((workerThread != null) && (workerThread.isAlive())) {
+ workerThread.interrupt();
+ }
+ }
- public void destroy() {
- log.debug("Called destroy()");
- }
+ public void destroy() {
+ log.debug("Called destroy()");
+ }
- /**
- * Applet configuration parameters
- *
- * @param paramKey
- * @return
- */
- public String getMyAppletParameter(String paramKey) {
- log.info("Getting parameter: "+paramKey+ ": "+ getParameter(paramKey));
- return getParameter(paramKey);
- }
+ /**
+ * Applet configuration parameters
+ *
+ * @param paramKey
+ * @return
+ */
+ public String getMyAppletParameter(String paramKey) {
+ log.info("Getting parameter: " + paramKey + ": " + getParameter(paramKey));
+ return getParameter(paramKey);
+ }
}