diff options
author | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
commit | 32150d3ee32f8ac27118af7c792794b538c78a2f (patch) | |
tree | 52dd96f664a6fa51be25b28b6f10adc5f2c9f660 /pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java | |
parent | f05d58a46795553beb8881039cc922974b40db34 (diff) | |
download | pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.gz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.xz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.zip |
Formatting
Formatted project according to eclipse project settings
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java')
-rw-r--r-- | pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java | 67 |
1 files changed, 29 insertions, 38 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java index fae38c696..738127dfa 100644 --- a/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java +++ b/pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java @@ -26,8 +26,7 @@ import netscape.security.x509.X509CertInfo; import com.netscape.certsrv.apps.CMS; import com.netscape.certsrv.base.IConfigStore; -public class CertInfoProfile -{ +public class CertInfoProfile { private Vector mDefaults = new Vector(); private String mName = null; private String mID = null; @@ -35,8 +34,7 @@ public class CertInfoProfile private String mProfileIDMapping = null; private String mProfileSetIDMapping = null; - public CertInfoProfile(String cfg) throws Exception - { + public CertInfoProfile(String cfg) throws Exception { IConfigStore config = CMS.createFileConfigStore(cfg); mID = config.getString("id"); mName = config.getString("name"); @@ -45,67 +43,60 @@ public class CertInfoProfile mProfileSetIDMapping = config.getString("profileSetIDMapping"); StringTokenizer st = new StringTokenizer(config.getString("list"), ","); while (st.hasMoreTokens()) { - String id = (String)st.nextToken(); + String id = (String) st.nextToken(); String c = config.getString(id + ".default.class"); try { - /* load defaults */ - ICertInfoPolicyDefault def = (ICertInfoPolicyDefault) - Class.forName(c).newInstance(); - init(config.getSubStore(id + ".default"), def); - mDefaults.addElement(def); + /* load defaults */ + ICertInfoPolicyDefault def = (ICertInfoPolicyDefault) Class + .forName(c).newInstance(); + init(config.getSubStore(id + ".default"), def); + mDefaults.addElement(def); } catch (Exception e) { - CMS.debug("CertInfoProfile: " + e.toString()); + CMS.debug("CertInfoProfile: " + e.toString()); } } } private void init(IConfigStore config, ICertInfoPolicyDefault def) - throws Exception - { - try { - def.init(null, config); - } catch (Exception e) { - CMS.debug("CertInfoProfile.init: " + e.toString()); - } + throws Exception { + try { + def.init(null, config); + } catch (Exception e) { + CMS.debug("CertInfoProfile.init: " + e.toString()); + } } - public String getID() - { + public String getID() { return mID; } - public String getName() - { + public String getName() { return mName; } - public String getDescription() - { + public String getDescription() { return mDescription; } - public String getProfileIDMapping() - { + public String getProfileIDMapping() { return mProfileIDMapping; } - public String getProfileSetIDMapping() - { + public String getProfileSetIDMapping() { return mProfileSetIDMapping; } - public void populate(X509CertInfo info) - { + public void populate(X509CertInfo info) { Enumeration e1 = mDefaults.elements(); while (e1.hasMoreElements()) { - ICertInfoPolicyDefault def = - (ICertInfoPolicyDefault)e1.nextElement(); - try { - def.populate(null /* request */, info); - } catch (Exception e) { - CMS.debug(e); - CMS.debug("CertInfoProfile.populate: " + e.toString()); - } + ICertInfoPolicyDefault def = (ICertInfoPolicyDefault) e1 + .nextElement(); + try { + def.populate(null /* request */, info); + } catch (Exception e) { + CMS.debug(e); + CMS.debug("CertInfoProfile.populate: " + e.toString()); + } } } } |