diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java b/pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java index d6867225f..7ab05d755 100644 --- a/pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java +++ b/pki/base/common/src/com/netscape/cms/profile/def/AutoAssignDefault.java @@ -17,6 +17,7 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cms.profile.def; + import java.util.Locale; import netscape.security.x509.X509CertInfo; @@ -30,10 +31,11 @@ import com.netscape.certsrv.property.EPropertyException; import com.netscape.certsrv.property.IDescriptor; import com.netscape.certsrv.request.IRequest; + /** - * This class implements an enrollment default policy that automatically assign - * request to agent. - * + * This class implements an enrollment default policy + * that automatically assign request to agent. + * * @version $Revision$, $Date$ */ public class AutoAssignDefault extends EnrollDefault { @@ -46,14 +48,15 @@ public class AutoAssignDefault extends EnrollDefault { } public void init(IProfile profile, IConfigStore config) - throws EProfileException { + throws EProfileException { super.init(profile, config); } - public IDescriptor getConfigDescriptor(Locale locale, String name) { - if (name.equals(CONFIG_ASSIGN_TO)) { - return new Descriptor(IDescriptor.STRING, null, "admin", - CMS.getUserMessage(locale, "CMS_PROFILE_AUTO_ASSIGN")); + public IDescriptor getConfigDescriptor(Locale locale, String name) { + if (name.equals(CONFIG_ASSIGN_TO)) { + return new Descriptor(IDescriptor.STRING, + null, "admin", CMS.getUserMessage(locale, + "CMS_PROFILE_AUTO_ASSIGN")); } else { return null; } @@ -63,28 +66,30 @@ public class AutoAssignDefault extends EnrollDefault { return null; } - public void setValue(String name, Locale locale, X509CertInfo info, - String value) throws EPropertyException { + public void setValue(String name, Locale locale, + X509CertInfo info, String value) + throws EPropertyException { } - public String getValue(String name, Locale locale, X509CertInfo info) - throws EPropertyException { + public String getValue(String name, Locale locale, + X509CertInfo info) + throws EPropertyException { return null; } public String getText(Locale locale) { return CMS.getUserMessage(locale, "CMS_PROFILE_DEF_AUTO_ASSIGN", - getConfig(CONFIG_ASSIGN_TO)); + getConfig(CONFIG_ASSIGN_TO)); } /** * Populates the request with this policy default. */ public void populate(IRequest request, X509CertInfo info) - throws EProfileException { + throws EProfileException { try { - request.setRequestOwner(mapPattern(request, - getConfig(CONFIG_ASSIGN_TO))); + request.setRequestOwner( + mapPattern(request, getConfig(CONFIG_ASSIGN_TO))); } catch (Exception e) { // failed to insert subject name CMS.debug("AutoAssignDefault: populate " + e.toString()); |