From 578ad0d6bc408edf9e6c875156054374f5fd8337 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Mon, 22 Mar 2021 18:40:26 +0100 Subject: change to EGIZ codestyle --- .../store/truststore/TrustStoreProfileImpl.java | 93 ++++++++++------------ 1 file changed, 44 insertions(+), 49 deletions(-) (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java index c9f4f28..9ef3764 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java @@ -21,89 +21,82 @@ * that you distribute must include a readable copy of the "NOTICE" text file. */ - package at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore; import java.util.ArrayList; -import java.util.Iterator; import java.util.List; -import iaik.pki.store.truststore.TrustStoreProfile; -import iaik.pki.store.truststore.TrustStoreTypes; -import iaik.pki.store.observer.NotificationData; -import iaik.pki.store.observer.Observer; - import at.gv.egovernment.moa.spss.MOAApplicationException; import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider; import at.gv.egovernment.moa.spss.server.config.TrustProfile; +import iaik.pki.store.observer.NotificationData; +import iaik.pki.store.observer.Observer; +import iaik.pki.store.truststore.TrustStoreProfile; +import iaik.pki.store.truststore.TrustStoreTypes; /** * An implementation of the TrustStoreProfile interface, using data * from the MOA configuration. - * - * @see iaik.pki.store.truststore.TrustStoreProfile + * + * @see iaik.pki.store.truststore.TrustStoreProfile * @author Patrick Peck * @version $Id$ */ public class TrustStoreProfileImpl implements TrustStoreProfile { /** The observers of this profile. */ - private List observers = new ArrayList(); - + private final List observers = new ArrayList(); + /** - * The trust profile identifier. + * The trust profile identifier. */ private String id_; - + /** The type of the trust profile. */ private String type; - /** The URI of the trust profile.*/ + /** The URI of the trust profile. */ private String URI; - /** * Create a new TrustStoreProfileImpl. - * - * @param config The MOA configuration data, from which trust store - * configuration data is read. + * + * @param config The MOA configuration data, from which trust store + * configuration data is read. * @param trustProfileId The trust profile id on which this - * TrustStoreProfile is based. - * @throws MOAApplicationException The trustProfileId could not - * be found in the MOA configuration. + * TrustStoreProfile is based. + * @throws MOAApplicationException The trustProfileId could not be + * found in the MOA configuration. */ public TrustStoreProfileImpl(String trustProfileId, String trustProfileUri) - throws MOAApplicationException { - id_ = trustProfileId; - setURI(trustProfileUri); - setType(TrustStoreTypes.DIRECTORY); - + throws MOAApplicationException { + id_ = trustProfileId; + setURI(trustProfileUri); + setType(TrustStoreTypes.DIRECTORY); + } - + /** * Create a new TrustStoreProfileImpl. - * - * @param config The MOA configuration data, from which trust store - * configuration data is read. + * + * @param config The MOA configuration data, from which trust store + * configuration data is read. * @param trustProfileId The trust profile id on which this - * TrustStoreProfile is based. - * @throws MOAApplicationException The trustProfileId could not - * be found in the MOA configuration. + * TrustStoreProfile is based. + * @throws MOAApplicationException The trustProfileId could not be + * found in the MOA configuration. */ @Deprecated public TrustStoreProfileImpl( - ConfigurationProvider config, - String trustProfileId) - throws MOAApplicationException { + ConfigurationProvider config, + String trustProfileId) + throws MOAApplicationException { - TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId); - if (tp != null) - { + final TrustProfile tp = config.getTrustProfile(trustProfileId); + if (tp != null) { id_ = trustProfileId; setURI(tp.getUri()); setType(TrustStoreTypes.DIRECTORY); - } - else - { + } else { throw new MOAApplicationException("2203", new Object[] { trustProfileId }); } } @@ -111,14 +104,15 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getType() */ + @Override public String getType() { return type; } /** * Sets the the trust store type. - * - * @param type The trust store type to set. + * + * @param type The trust store type to set. */ protected void setType(String type) { this.type = type; @@ -127,13 +121,14 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getURI() */ + @Override public String getURI() { return URI; } /** * Sets the trust store URI. - * + * * @param URI The trust store URI to set. */ protected void setURI(String URI) { @@ -162,8 +157,8 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData) */ public void notify(NotificationData notificationData) { - for (Iterator iter = observers.iterator(); iter.hasNext();) { - Observer observer = (Observer) iter.next(); + for (final Object observer2 : observers) { + final Observer observer = (Observer) observer2; observer.notify(notificationData); } } @@ -171,8 +166,8 @@ public class TrustStoreProfileImpl implements TrustStoreProfile { /** * @see iaik.pki.store.truststore.TrustStoreProfile#getId() */ - public String getId() - { + @Override + public String getId() { return id_; } -- cgit v1.2.3