From 46a6babcf74ee4eaa01002c30d9975c6ba12b611 Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 26 May 2010 11:20:07 +0000 Subject: Removed unused classes/methods. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@741 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../bku/online/applet/viewer/URLFontLoader.java | 1 - .../at/gv/egiz/smcc/ExclSignatureCardProxy.java | 4 -- .../gv/egiz/smcc/VerificationFailedException.java | 65 ---------------------- .../egiz/bku/smccstal/AbstractRequestHandler.java | 11 ---- .../gv/egiz/bku/smccstal/HashDataInputDisplay.java | 46 --------------- .../bku/smccstal/InfoBoxReadRequestHandler.java | 5 -- .../gv/egiz/bku/smccstal/STALMessageConsumer.java | 21 ------- .../gv/egiz/bku/smccstal/SignRequestHandler.java | 1 - 8 files changed, 154 deletions(-) delete mode 100644 smcc/src/main/java/at/gv/egiz/smcc/VerificationFailedException.java delete mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/HashDataInputDisplay.java delete mode 100644 smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/viewer/URLFontLoader.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/viewer/URLFontLoader.java index d30080d0..88a069ff 100644 --- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/viewer/URLFontLoader.java +++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/viewer/URLFontLoader.java @@ -40,7 +40,6 @@ public class URLFontLoader extends SwingWorker implements FontProv private final Logger log = LoggerFactory.getLogger(URLFontLoader.class); protected URL fontURL; - protected Font font; public URLFontLoader(URL codebase) throws MalformedURLException { this.fontURL = new URL(codebase, SANSMONO_FONT_RESOURCE); diff --git a/smcc/src/main/java/at/gv/egiz/smcc/ExclSignatureCardProxy.java b/smcc/src/main/java/at/gv/egiz/smcc/ExclSignatureCardProxy.java index 2562ae56..9e208e36 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/ExclSignatureCardProxy.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/ExclSignatureCardProxy.java @@ -64,10 +64,6 @@ public class ExclSignatureCardProxy implements InvocationHandler { new ExclSignatureCardProxy(signatureCard)); } - public static PINMgmtSignatureCard newInstance(PINMgmtSignatureCard signatureCard) { - return null; - } - @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { diff --git a/smcc/src/main/java/at/gv/egiz/smcc/VerificationFailedException.java b/smcc/src/main/java/at/gv/egiz/smcc/VerificationFailedException.java deleted file mode 100644 index fa066ff9..00000000 --- a/smcc/src/main/java/at/gv/egiz/smcc/VerificationFailedException.java +++ /dev/null @@ -1,65 +0,0 @@ -/* -* 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.smcc; - -public class VerificationFailedException extends SignatureCardException { - - private static final long serialVersionUID = 1L; - - public static final int UNKNOWN = -1; - - private int retries = UNKNOWN; - - public VerificationFailedException() { - } - - public VerificationFailedException(String message, Throwable cause) { - super(message, cause); - } - - public VerificationFailedException(String message) { - super(message); - } - - public VerificationFailedException(Throwable cause) { - super(cause); - } - - public VerificationFailedException(int retries) { - this.retries = retries; - } - - public VerificationFailedException(int retries, String message, Throwable cause) { - super(message, cause); - this.retries = retries; - } - - public VerificationFailedException(int retries, String message) { - super(message); - this.retries = retries; - } - - public VerificationFailedException(int retries, Throwable cause) { - super(cause); - this.retries = retries; - } - - public int getRetries() { - return retries; - } - -} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java index 940674f9..c32ce366 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/AbstractRequestHandler.java @@ -33,7 +33,6 @@ public abstract class AbstractRequestHandler implements SMCCSTALRequestHandler, protected SignatureCard card; protected BKUGUIFacade gui; - protected static STALMessageConsumer messageConsumer = null; protected String actionCommand; protected boolean actionPerformed = false; @@ -49,16 +48,6 @@ public abstract class AbstractRequestHandler implements SMCCSTALRequestHandler, this.gui = gui; } - public static void setMessageConsumer(STALMessageConsumer messageConsumer) { - AbstractRequestHandler.messageConsumer = messageConsumer; - } - - protected static void newSTALMessage(String caption, String message) { - if (messageConsumer != null) { - messageConsumer.consumeNewSTALMessage(caption, message); - } - } - protected synchronized void waitForAction() throws InterruptedException { try { while (!actionPerformed) { diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/HashDataInputDisplay.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/HashDataInputDisplay.java deleted file mode 100644 index 59700d4a..00000000 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/HashDataInputDisplay.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.smccstal; - -import at.gv.egiz.stal.signedinfo.ReferenceType; -import java.security.DigestException; -import java.util.List; - -/** - * - * @author clemens - */ -public interface HashDataInputDisplay { - - - /** - * TODO: (see AbstractHelpListener) - * - * - * Displays the hashdata inputs for all provided dsig:SignedReferences. - * Implementations may verify the digest value if necessary. - * (LocalSignRequestHandler operates on DataObjectHashDataInput, - * other SignRequestHandlers should cache the HashDataInputs obtained by webservice calls, - * or simply forward to a HashDataInputServlet.) - * @param signedReferences The caller may select a subset of the references in SignedInfo to be displayed. - * @throws java.security.DigestException if digest values are verified and do not correspond - * (or any other digest computation error occurs) - * @throws java.lang.Exception - */ - void displayHashDataInputs(List signedReferences) throws DigestException, Exception; - -} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java index a2042589..46ebd8f5 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java @@ -45,7 +45,6 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler { try { if (infoBox.getInfoboxIdentifier().equals("IdentityLink")) { - newSTALMessage("Message.RequestCaption", "Message.IdentityLink"); log.debug("Handling identitylink infobox."); byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), new VerifyPINGUI(gui), @@ -67,7 +66,6 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler { return stalResp; } else if (SignatureCard.KeyboxName.CERITIFIED_KEYPAIR.equals(infoBox .getInfoboxIdentifier())) { - newSTALMessage("Message.RequestCaption", "Message.CertifiedKeypair"); log.debug("Handling certified keypair infobox."); byte[] resp = card .getCertificate(SignatureCard.KeyboxName.CERITIFIED_KEYPAIR); @@ -79,8 +77,6 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler { return stalResp; } else if (SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR .equals(infoBox.getInfoboxIdentifier())) { - newSTALMessage("Message.RequestCaption", - "Message.SecureSignatureKeypair"); log.debug("Handling secure signature keypair infobox."); byte[] resp = card .getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR); @@ -91,7 +87,6 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler { stalResp.setInfoboxValue(resp); return stalResp; } else { - newSTALMessage("Message.RequestCaption", "Message.InfoboxReadRequest"); log.warn("Unknown infobox identifier: {} trying generic request.", infoBox.getInfoboxIdentifier()); byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java deleted file mode 100644 index 7d7a6ec0..00000000 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/STALMessageConsumer.java +++ /dev/null @@ -1,21 +0,0 @@ -/* -* 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.smccstal; - -public interface STALMessageConsumer { - public void consumeNewSTALMessage(String captionId, String messageId); -} diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java index 52804f79..9e461e0c 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java @@ -70,7 +70,6 @@ public class SignRequestHandler extends AbstractRequestHandler { public STALResponse handleRequest(STALRequest request) throws InterruptedException { if (request instanceof SignRequest) { SignRequest signReq = (SignRequest) request; - newSTALMessage("Message.RequestCaption", "Message.SignRequest"); try { Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); InputStream is = new ByteArrayInputStream(signReq.getSignedInfo()); -- cgit v1.2.3