From d7fde6fc92f36a7cc8b8d412724951b12193bb9b Mon Sep 17 00:00:00 2001 From: clemenso Date: Wed, 11 Feb 2009 20:01:17 +0000 Subject: activation applet (NO PINMgmt yet) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@295 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../java/at/gv/egiz/bku/gui/ActivationGUI.java | 249 +++++++++++++++++++++ .../at/gv/egiz/bku/gui/ActivationGUIFacade.java | 33 +++ .../main/java/at/gv/egiz/bku/gui/CardMgmtGUI.java | 52 +++++ .../java/at/gv/egiz/bku/gui/PINManagementGUI.java | 159 +++++++++++++ .../at/gv/egiz/bku/gui/PINManagementGUIFacade.java | 34 +++ .../java/at/gv/egiz/bku/gui/PINStatusProvider.java | 32 +++ 6 files changed, 559 insertions(+) create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUI.java create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUIFacade.java create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/CardMgmtGUI.java create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java create mode 100644 BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusProvider.java (limited to 'BKUAppletExt/src/main/java/at/gv/egiz/bku/gui') diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUI.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUI.java new file mode 100644 index 00000000..8134ac5f --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUI.java @@ -0,0 +1,249 @@ +/* + * 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.gui; + +import java.awt.Container; +import java.awt.Cursor; +import java.awt.event.ActionListener; +import java.net.URL; +import java.text.MessageFormat; +import java.util.Locale; +import java.util.ResourceBundle; +import javax.swing.GroupLayout; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JProgressBar; +import javax.swing.LayoutStyle; +import javax.swing.SwingUtilities; + +/** + * + * @author Clemens Orthacker + */ +public class ActivationGUI extends CardMgmtGUI implements ActivationGUIFacade { + + public static final String TITLE_ACTIVATION = "title.activation"; + public static final String LABEL_ACTIVATION = "label.activation"; + public static final String LABEL_ACTIVATION_STEP = "label.activation.step"; + public static final String LABEL_ACTIVATION_IDLE = "label.activation.idle"; + + public static final String HELP_ACTIVATION = "help.activation"; + + protected JProgressBar progressBar; + + public ActivationGUI(Container contentPane, + Locale locale, + Style guiStyle, + URL backgroundImgURL, + AbstractHelpListener helpListener) { + super(contentPane, locale, guiStyle, backgroundImgURL, helpListener); + + progressBar = new JProgressBar(); + } + + @Override + public void showActivationProgressDialog(final int currentStep, final int maxProgress, final ActionListener cancelListener, final String cancelCommand) { + + log.debug("scheduling activation progress dialog (step " + currentStep + ")"); + + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + + log.debug("show activation progress dialog (step " + currentStep + ")"); + + mainPanel.removeAll(); + buttonPanel.removeAll(); + + mainPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + + + JLabel infoLabel = new JLabel(); + infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + + if (renderHeaderPanel) { + titleLabel.setText(cardmgmtMessages.getString(TITLE_ACTIVATION)); + infoLabel.setText(cardmgmtMessages.getString(LABEL_ACTIVATION)); + } else { + infoLabel.setText(cardmgmtMessages.getString(TITLE_ACTIVATION)); + } + + helpListener.setHelpTopic(HELP_ACTIVATION); + + progressBar.setIndeterminate(false); + progressBar.setStringPainted(true); + progressBar.setString(null); //reset to percentage + progressBar.setMinimum(0); + progressBar.setMaximum(maxProgress); + + JLabel stepLabel = new JLabel(); + stepLabel.setFont(stepLabel.getFont().deriveFont(stepLabel.getFont().getStyle() & ~java.awt.Font.BOLD, stepLabel.getFont().getSize()-2)); + String stepPattern = cardmgmtMessages.getString(LABEL_ACTIVATION_STEP); + stepLabel.setText(MessageFormat.format(stepPattern, new Object[]{ currentStep })); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + GroupLayout.SequentialGroup infoHorizontal = mainPanelLayout.createSequentialGroup().addComponent(infoLabel); + GroupLayout.ParallelGroup infoVertical = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(infoLabel); + + if (!renderHeaderPanel) { + infoHorizontal.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE).addComponent(helpLabel); + infoVertical.addComponent(helpLabel); + } + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(infoHorizontal) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(stepLabel) + .addComponent(progressBar))); + + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createSequentialGroup() + .addGroup(infoVertical) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(mainPanelLayout.createSequentialGroup() + .addComponent(stepLabel) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(progressBar))); + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.addActionListener(cancelListener); + cancelButton.setActionCommand(cancelCommand); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE)); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createSequentialGroup() + .addComponent(cancelButton)); + + contentPanel.validate(); + + } + }); + + } + + @Override + public void incrementProgress() { + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + progressBar.setValue(progressBar.getValue() + 1); + } + }); + + } + + @Override + public void showIdleDialog(final ActionListener cancelListener, final String cancelCommand) { + log.debug("scheduling idle dialog"); + + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + + log.debug("show idle dialog"); + + mainPanel.removeAll(); + buttonPanel.removeAll(); + + mainPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + + + JLabel infoLabel = new JLabel(); + infoLabel.setFont(infoLabel.getFont().deriveFont(infoLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + + if (renderHeaderPanel) { + titleLabel.setText(cardmgmtMessages.getString(TITLE_ACTIVATION)); + infoLabel.setText(cardmgmtMessages.getString(LABEL_ACTIVATION)); + } else { + infoLabel.setText(cardmgmtMessages.getString(TITLE_ACTIVATION)); + } + + helpListener.setHelpTopic(HELP_ACTIVATION); + + progressBar.setIndeterminate(true); + progressBar.setStringPainted(true); + progressBar.setString(""); //not string painted progressbar is smaller + + JLabel stepLabel = new JLabel(); + stepLabel.setFont(stepLabel.getFont().deriveFont(stepLabel.getFont().getStyle() & ~java.awt.Font.BOLD, stepLabel.getFont().getSize()-2)); + stepLabel.setText(cardmgmtMessages.getString(LABEL_ACTIVATION_IDLE)); + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + GroupLayout.SequentialGroup infoHorizontal = mainPanelLayout.createSequentialGroup().addComponent(infoLabel); + GroupLayout.ParallelGroup infoVertical = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(infoLabel); + + if (!renderHeaderPanel) { + infoHorizontal.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE).addComponent(helpLabel); + infoVertical.addComponent(helpLabel); + } + + mainPanelLayout.setHorizontalGroup( + mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addGroup(infoHorizontal) + .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(stepLabel) + .addComponent(progressBar))); + + mainPanelLayout.setVerticalGroup( + mainPanelLayout.createSequentialGroup() + .addGroup(infoVertical) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addGroup(mainPanelLayout.createSequentialGroup() + .addComponent(stepLabel) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(progressBar))); + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.addActionListener(cancelListener); + cancelButton.setActionCommand(cancelCommand); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + buttonPanelLayout.setHorizontalGroup( + buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE)); + buttonPanelLayout.setVerticalGroup( + buttonPanelLayout.createSequentialGroup() + .addComponent(cancelButton)); + + contentPanel.validate(); + + } + }); + + } +} diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUIFacade.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUIFacade.java new file mode 100644 index 00000000..860a1097 --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/ActivationGUIFacade.java @@ -0,0 +1,33 @@ +/* + * 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.gui; + +import java.awt.event.ActionListener; + +/** + * + * @author Clemens Orthacker + */ +public interface ActivationGUIFacade extends BKUGUIFacade { + + public void showActivationProgressDialog(int currentStep, int maxProgress, ActionListener cancelListener, String cancelCommand); + + public void incrementProgress(); + + public void showIdleDialog(ActionListener cancelListener, String cancelCommand); + +} diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/CardMgmtGUI.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/CardMgmtGUI.java new file mode 100644 index 00000000..4059f0e2 --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/CardMgmtGUI.java @@ -0,0 +1,52 @@ +/* + * 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.gui; + +import java.awt.Container; +import java.net.URL; +import java.util.Locale; +import java.util.ResourceBundle; + +/** + * Common superclass for Activation and PinManagement GUIs + * + * @author Clemens Orthacker + */ +public class CardMgmtGUI extends BKUGUIImpl { + + public static final String CARDMGMT_MESSAGES_BUNDLE = "at/gv/egiz/bku/gui/ActivationMessages"; + + protected ResourceBundle cardmgmtMessages; + + public CardMgmtGUI(Container contentPane, + Locale locale, + Style guiStyle, + URL backgroundImgURL, + AbstractHelpListener helpListener) { + super(contentPane, locale, guiStyle, backgroundImgURL, helpListener); + + if (locale != null) { + Locale lang = new Locale(locale.getLanguage().substring(0,2)); + log.debug("loading applet resources for language: " + lang.toString()); + cardmgmtMessages = ResourceBundle.getBundle(CARDMGMT_MESSAGES_BUNDLE, lang); + } else { + cardmgmtMessages = ResourceBundle.getBundle(CARDMGMT_MESSAGES_BUNDLE); + } + + } +} diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java new file mode 100644 index 00000000..8acf051e --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUI.java @@ -0,0 +1,159 @@ +/* + * 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.gui; + +import java.awt.Container; +import java.awt.event.ActionListener; +import java.net.URL; +import java.util.Locale; +import javax.swing.GroupLayout; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.LayoutStyle; +import javax.swing.SwingUtilities; + +/** + * TODO pull out ResourceBundle to common superclass for activationGUI and pinMgmtGUI + * @author Clemens Orthacker + */ +public class PINManagementGUI extends ActivationGUI implements PINManagementGUIFacade { + + public static final String BUTTON_ACTIVATE = "button.activate"; + public static final String BUTTON_UNBLOCK = "button.unblock"; + public static final String BUTTON_CHANGE = "button.change"; + + public PINManagementGUI(Container contentPane, + Locale locale, + Style guiStyle, + URL backgroundImgURL, + AbstractHelpListener helpListener) { + super(contentPane, locale, guiStyle, backgroundImgURL, helpListener); + } + + @Override + public void showPINManagementDialog(final PINStatusProvider pinStatusProvider, + final ActionListener activateListener, final String activateCmd, + final ActionListener changeListener, final String changeCmd, + final ActionListener unblockListener, final String unblockCmd, + final ActionListener cancelListener, final String cancelCmd) { +// try { + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + log.debug("show PIN management dialog"); + + mainPanel.removeAll(); + buttonPanel.removeAll(); + + helpListener.setHelpTopic(HELP_PINMGMT); + + JLabel mgmtLabel = new JLabel(); + mgmtLabel.setFont(mgmtLabel.getFont().deriveFont(mgmtLabel.getFont().getStyle() & ~java.awt.Font.BOLD)); + + if (renderHeaderPanel) { + titleLabel.setText(cardmgmtMessages.getString(TITLE_PINMGMT)); + mgmtLabel.setText(cardmgmtMessages.getString(MESSAGE_PINMGMT)); + } else { + mgmtLabel.setText(cardmgmtMessages.getString(TITLE_PINMGMT)); + } + + + + + GroupLayout mainPanelLayout = new GroupLayout(mainPanel); + mainPanel.setLayout(mainPanelLayout); + + GroupLayout.SequentialGroup messageHorizontal = mainPanelLayout.createSequentialGroup() + .addComponent(mgmtLabel); + GroupLayout.Group messageVertical = mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING) + .addComponent(mgmtLabel); + if (!renderHeaderPanel) { + messageHorizontal + .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED, 0, Short.MAX_VALUE) + .addComponent(helpLabel); + messageVertical + .addComponent(helpLabel); + } + + mainPanelLayout.setHorizontalGroup(messageHorizontal); + mainPanelLayout.setVerticalGroup(messageVertical); + + + JButton activateButton = new JButton(); + activateButton.setFont(activateButton.getFont().deriveFont(activateButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + activateButton.setText(cardmgmtMessages.getString(BUTTON_ACTIVATE)); + activateButton.setEnabled(true);//false); + activateButton.setActionCommand(activateCmd); + activateButton.addActionListener(activateListener); + + JButton changeButton = new JButton(); + changeButton.setFont(activateButton.getFont().deriveFont(activateButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + changeButton.setText(cardmgmtMessages.getString(BUTTON_CHANGE)); + changeButton.setEnabled(false); + changeButton.setActionCommand(changeCmd); + changeButton.addActionListener(changeListener); + + JButton unblockButton = new JButton(); + unblockButton.setFont(activateButton.getFont().deriveFont(activateButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + unblockButton.setText(cardmgmtMessages.getString(BUTTON_UNBLOCK)); + unblockButton.setEnabled(false); + unblockButton.setActionCommand(unblockCmd); + unblockButton.addActionListener(unblockListener); + + JButton cancelButton = new JButton(); + cancelButton.setFont(cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() & ~java.awt.Font.BOLD)); + cancelButton.setText(messages.getString(BUTTON_CANCEL)); + cancelButton.setActionCommand(cancelCmd); + cancelButton.addActionListener(cancelListener); + + GroupLayout buttonPanelLayout = new GroupLayout(buttonPanel); + buttonPanel.setLayout(buttonPanelLayout); + + GroupLayout.SequentialGroup buttonHorizontal = buttonPanelLayout.createSequentialGroup() + .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(activateButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(changeButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(unblockButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE) + .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cancelButton, GroupLayout.PREFERRED_SIZE, buttonSize, GroupLayout.PREFERRED_SIZE); + + GroupLayout.Group buttonVertical = buttonPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) + .addComponent(activateButton) + .addComponent(changeButton) + .addComponent(unblockButton) + .addComponent(cancelButton); + + buttonPanelLayout.setHorizontalGroup(buttonHorizontal); + buttonPanelLayout.setVerticalGroup(buttonVertical); + + contentPanel.validate(); + + } + }); + +// } catch (Exception ex) { +// log.error(ex.getMessage(), ex); +// showErrorDialog(ERR_UNKNOWN_WITH_PARAM, new Object[] {ex.getMessage()}); +// } + } + + +} diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java new file mode 100644 index 00000000..3d653fab --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINManagementGUIFacade.java @@ -0,0 +1,34 @@ +/* + * 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.gui; + +import java.awt.event.ActionListener; + +/** + * + * @author Clemens Orthacker + */ +public interface PINManagementGUIFacade extends BKUGUIFacade { + + public static final String HELP_PINMGMT = "help.pin.mgmt"; + public static final String TITLE_PINMGMT = "title.pin.mgmt"; + public static final String MESSAGE_PINMGMT = "message.pin.mgmt"; + + public void showPINManagementDialog(PINStatusProvider pinStatusProvider, ActionListener activateListener, String activateCmd, ActionListener changeListener, String changeCmd, ActionListener unblockListener, String unblockCmd, ActionListener cancelListener, String cancelCmd); + +} diff --git a/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusProvider.java b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusProvider.java new file mode 100644 index 00000000..73fa0920 --- /dev/null +++ b/BKUAppletExt/src/main/java/at/gv/egiz/bku/gui/PINStatusProvider.java @@ -0,0 +1,32 @@ +/* + * 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.gui; + +import at.gv.egiz.smcc.SignatureCardException; + +/** + * + * @author Clemens Orthacker + */ +public interface PINStatusProvider { + + public enum STATUS { ACTIV, NOT_ACTIV, BLOCKED }; + + public STATUS getPINStatus(int pin) throws SignatureCardException; + +} -- cgit v1.2.3