diff options
author | Thomas <> | 2021-03-24 12:16:25 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-24 12:16:25 +0100 |
commit | 835a395f3ecb7477b5b67e9da9bf3af58c86473a (patch) | |
tree | 916fa7705879063f6b83517d80197c37dc53caf8 /moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store | |
parent | a972fba0402eca3c5fcfcd1eef1979808fd716a1 (diff) | |
parent | 666d8c9f8cec7573e60a14ab039c0874f6a9ec53 (diff) | |
download | moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.tar.gz moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.tar.bz2 moa-sig-835a395f3ecb7477b5b67e9da9bf3af58c86473a.zip |
Merge branch 'master' of gitlab.iaik.tugraz.at:egiz/moa-sig
# Conflicts:
# moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
# moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java | 93 |
1 files changed, 44 insertions, 49 deletions
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 <code>TrustStoreProfile</code> 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 <code>TrustStoreProfileImpl</code>. - * - * @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 - * <code>TrustStoreProfile</code> is based. - * @throws MOAApplicationException The <code>trustProfileId</code> could not - * be found in the MOA configuration. + * <code>TrustStoreProfile</code> is based. + * @throws MOAApplicationException The <code>trustProfileId</code> 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 <code>TrustStoreProfileImpl</code>. - * - * @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 - * <code>TrustStoreProfile</code> is based. - * @throws MOAApplicationException The <code>trustProfileId</code> could not - * be found in the MOA configuration. + * <code>TrustStoreProfile</code> is based. + * @throws MOAApplicationException The <code>trustProfileId</code> 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_; } |