From 057f884903954203339182649daa100ef4ce89e3 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d> Date: Mon, 22 Dec 2003 17:28:21 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'Build_001'. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build_001@85 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/config/DistributionPoint.java | 134 --------------------- 1 file changed, 134 deletions(-) delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java (limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java') diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java b/spss.server/src/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java deleted file mode 100644 index ce9588c87..000000000 --- a/spss.server/src/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java +++ /dev/null @@ -1,134 +0,0 @@ -package at.gv.egovernment.moa.spss.server.config; - -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; - -import at.gv.egovernment.moa.logging.LogMsg; -import at.gv.egovernment.moa.logging.Logger; - -import at.gv.egovernment.moa.spss.util.MessageProvider; - -/** - * A class containing information about a CRL distribution point. - * - * @author Sven Aigner - * @author Patrick Peck - * @version $Id$ - */ -public class DistributionPoint { - - private static Map RC_MAPPING = new HashMap(); - - static { - - // create the mapping between reason code strings and their integer values - RC_MAPPING.put( - "unused", - new Integer(iaik.asn1.structures.DistributionPoint.unused)); - RC_MAPPING.put( - "keyCompromise", - new Integer(iaik.asn1.structures.DistributionPoint.keyCompromise)); - RC_MAPPING.put( - "cACompromise", - new Integer(iaik.asn1.structures.DistributionPoint.cACompromise)); - RC_MAPPING.put( - "affiliationChanged", - new Integer(iaik.asn1.structures.DistributionPoint.affiliationChanged)); - RC_MAPPING.put( - "superseded", - new Integer(iaik.asn1.structures.DistributionPoint.superseded)); - RC_MAPPING.put( - "cessationOfOperation", - new Integer(iaik.asn1.structures.DistributionPoint.cessationOfOperation)); - RC_MAPPING.put( - "certificateHold", - new Integer(iaik.asn1.structures.DistributionPoint.certificateHold)); - RC_MAPPING.put( - "privilegeWithdrawn", - new Integer(iaik.asn1.structures.DistributionPoint.privilegeWithdrawn)); - RC_MAPPING.put( - "aACompromise", - new Integer(iaik.asn1.structures.DistributionPoint.aACompromise)); - } - - /** The distribution point URI. */ - private String uri; - /** The reason codes applicable for the distribution point. */ - private int reasonCodes; - - /** - * Create a DistributionPoint with a URI and a list of reason - * codes. - * - * @param uri The URI of the distribution point. - * @param reasonCodeStr A list of reason codes (a space-separated - * enumeration). - */ - public DistributionPoint(String uri, String reasonCodeStr) { - this.uri = uri; - this.reasonCodes = extractReasonCodes(reasonCodeStr); - } - - /** - * Convert a list of reason codes provided as a String to a - * binary representation. - * - * @param reasonCodeStr A String containing a blank-separated, - * textual representation of reason codes. - * @return int A binary representation of reason codes. - * @see iaik.asn1.structures.DistributionPoint - */ - private int extractReasonCodes(String reasonCodeStr) { - int codes = 0; - StringTokenizer tokenizer = new StringTokenizer(reasonCodeStr); - String token; - Integer reasonCode; - - while (tokenizer.hasMoreTokens()) { - token = tokenizer.nextToken(); - reasonCode = (Integer) RC_MAPPING.get(token); - if (reasonCode != null) { - codes |= reasonCode.intValue(); - } else { - MessageProvider msg = MessageProvider.getInstance(); - Logger.warn( - new LogMsg(msg.getMessage("config.07", new Object[] { token }))); - } - } - - return codes; - } - - /** - * Return the URI of the distribution point. - * - * @return The URI of the distribution point. - */ - public String getUri() { - return uri; - } - - /** - * Return a binary representation of the reason codes of this distribution - * point. - * - * @return The binary representation of the reason codes. - */ - public int getReasonCodes() { - return reasonCodes; - } - - /** - * Return a String representation of this distribution point. - * - * @return The String representation of this distribution point. - * @see java.lang.Object#toString() - */ - public String toString() { - return "(DistributionPoint - " - + ("URI<" + getUri()) - + ("> REASONCODES<" + getReasonCodes() + ">)"); - } - -} -- cgit v1.2.3