summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv')
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/ACL.java48
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java46
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/ACLsResources.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/EACLsException.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/IACL.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/acls/IACLEntry.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/apps/CMS.java479
-rw-r--r--pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java329
-rw-r--r--pki/base/common/src/com/netscape/certsrv/apps/ICommandQueue.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/AuthCredentials.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/AuthManagerProxy.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/AuthMgrPlugin.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/AuthResources.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java40
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EAuthException.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EAuthInternalError.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrNotFound.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrPluginNotFound.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EAuthUserError.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/ECompSyntaxErr.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EFormSubjectDN.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EInvalidCredentials.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/EMissingCredential.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/IAuthCredentials.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/IAuthManager.java24
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/IAuthSubsystem.java35
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java107
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/ISSLClientCertProvider.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authentication/ISharedToken.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authority/IAuthority.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authority/ICertAuthority.java20
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/AuthzManagerProxy.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/AuthzResources.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java46
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzAccessDenied.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzException.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzInternalError.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrNotFound.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrPluginNotFound.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownOperation.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownProtectedRes.java1
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java51
-rw-r--r--pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java18
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/BaseResources.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/EBaseException.java33
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java86
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java70
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java141
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java84
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java35
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java19
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java44
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java38
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java78
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/Nonces.java28
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/Plugin.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/base/SessionContext.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/CAResources.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ECAException.java11
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/EErrorPublishCRL.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ICAService.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtension.java24
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtensions.java11
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java164
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ca/ICertificateAuthority.java140
-rw-r--r--pki/base/common/src/com/netscape/certsrv/cert/ICrossCertPairSubsystem.java29
-rw-r--r--pki/base/common/src/com/netscape/certsrv/client/IDataProcessor.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/client/connection/IAuthenticator.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/client/connection/IConnection.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/client/connection/IConnectionFactory.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/ConfigConstants.java36
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/Constants.java119
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/DestDef.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/NameValuePair.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/NameValuePairs.java36
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/OpDef.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/PrefixDef.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/ScopeDef.java23
-rw-r--r--pki/base/common/src/com/netscape/certsrv/common/TaskId.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IConnector.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IHttpConnFactory.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IHttpPKIMessage.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IPKIMessage.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IRequestEncoder.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/connector/IResender.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/DBResources.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/EDBException.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/EDBNotAvailException.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/EDBRecordNotFoundException.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBAttrMapper.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBDynAttrMapper.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBObj.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBRegistry.java58
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java91
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBSearchResults.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBSubsystem.java100
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IDBVirtualList.java51
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IElementProcessor.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/IFilterConverter.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/Modification.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/ModificationSet.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecord.java70
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java24
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java207
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/certdb/IRevocationInfo.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLIssuingPointRecord.java47
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java64
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecord.java44
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecordList.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java55
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/keydb/KeyState.java45
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/replicadb/IReplicaIDRepository.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepository.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepositoryRecord.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/evaluators/IAccessEvaluator.java29
-rw-r--r--pki/base/common/src/com/netscape/certsrv/extensions/EExtensionsException.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/extensions/ExtensionsResources.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/extensions/ICMSExtension.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/EJobsException.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/IJob.java23
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/IJobCron.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/IJobsScheduler.java84
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/JobPlugin.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/jobs/JobsResources.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/EKRAException.java11
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/IJoinShares.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/IKeyRecoveryAuthority.java78
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/IKeyService.java95
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/IProofOfArchival.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/IShare.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/KRAResources.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java75
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java31
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java47
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/listeners/EListenersException.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/listeners/IRequestListenerPlugin.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/listeners/ListenersResources.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/AuditEvent.java67
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/AuditFormat.java75
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ConsoleError.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ConsoleLog.java56
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ELogException.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ELogNotFound.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ELogPluginNotFound.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/IBundleLogEvent.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogEvent.java32
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogEventFactory.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java68
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogQueue.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogSubsystem.java52
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/ILogger.java77
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/LogPlugin.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/LogResources.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/SignedAuditEvent.java60
-rw-r--r--pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java57
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java11
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java68
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPAuthority.java49
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPService.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPStore.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/password/EPasswordCheckException.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/password/IConfigPasswordCheck.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/password/IPasswordCheck.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/pattern/AttrSetCollection.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/pattern/Pattern.java84
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IExpression.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java23
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java48
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java100
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java41
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java31
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/CertInfoProfile.java67
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java21
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java63
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfile.java172
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java30
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java48
-rw-r--r--pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/property/Descriptor.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/property/EPropertyException.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/property/IConfigTemplate.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/property/IDescriptor.java20
-rw-r--r--pki/base/common/src/com/netscape/certsrv/property/PropertySet.java43
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java66
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java23
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java12
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java33
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java58
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java130
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java18
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java9
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ra/IRAService.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java40
-rw-r--r--pki/base/common/src/com/netscape/certsrv/registry/ERegistryException.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/registry/IPluginInfo.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/registry/IPluginRegistry.java28
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java161
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/AgentApproval.java13
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java34
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IEnrollmentRequest.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/INotify.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IPolicy.java27
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequest.java340
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestList.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestListener.java14
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestNotifier.java36
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestQueue.java220
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestRecord.java19
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestScheduler.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java80
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IRequestVirtualList.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/IService.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/PolicyMessage.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/PolicyResult.java3
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/RequestId.java20
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/RequestStatus.java83
-rw-r--r--pki/base/common/src/com/netscape/certsrv/request/ldap/IRequestMod.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/Credential.java11
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/ICryptoSubsystem.java180
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java50
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java42
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java24
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/IToken.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/ITransportKeyUnit.java22
-rw-r--r--pki/base/common/src/com/netscape/certsrv/security/KeyCertData.java180
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java54
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java54
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java54
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java17
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java31
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java84
-rw-r--r--pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java2
-rw-r--r--pki/base/common/src/com/netscape/certsrv/template/ArgList.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/template/ArgSet.java15
-rw-r--r--pki/base/common/src/com/netscape/certsrv/template/ArgString.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/template/IArgValue.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/tks/ITKSAuthority.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java6
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java16
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java8
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java10
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java4
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java54
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java26
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java21
-rw-r--r--pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java5
-rw-r--r--pki/base/common/src/com/netscape/certsrv/util/HttpInput.java197
-rw-r--r--pki/base/common/src/com/netscape/certsrv/util/IStatsSubsystem.java7
-rw-r--r--pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java309
323 files changed, 5063 insertions, 5190 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACL.java b/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
index 4200b94a..c98135ea 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/ACL.java
@@ -17,22 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
-
import java.util.Enumeration;
import java.util.Vector;
-
/**
* A class represents an access control list (ACL). An ACL
- * is associated with an protected resources. The policy
+ * is associated with an protected resources. The policy
* enforcer can verify the ACLs with the current
- * context to see if the corresponding resource is accessible.
+ * context to see if the corresponding resource is accessible.
* <P>
- * An <code>ACL</code> may contain one or more <code>ACLEntry</code>.
- * However, in case of multiple <code>ACLEntry</code>, a subject must
- * pass ALL of the <code>ACLEntry</code> evaluation for permission
- * to be granted
+ * An <code>ACL</code> may contain one or more <code>ACLEntry</code>. However, in case of multiple <code>ACLEntry</code>, a subject must pass ALL of the <code>ACLEntry</code> evaluation for permission to be granted
* <P>
+ *
* @version $Revision$, $Date$
*/
public class ACL implements IACL, java.io.Serializable {
@@ -58,14 +54,15 @@ public class ACL implements IACL, java.io.Serializable {
* Class constructor.
* Constructs an access control list associated
* with a resource name
+ *
* @param name resource name
* @param rights applicable rights defined for this resource
* @param resourceACLs the entire ACL specification. For example:
- * "certServer.log.configuration:read,modify:
- * allow (read,modify)
- * group=\"Administrators\":
- * Allow administrators to read and modify log
- * configuration"
+ * "certServer.log.configuration:read,modify:
+ * allow (read,modify)
+ * group=\"Administrators\":
+ * Allow administrators to read and modify log
+ * configuration"
*/
public ACL(String name, Vector<String> rights, String resourceACLs) {
setName(name);
@@ -79,17 +76,19 @@ public class ACL implements IACL, java.io.Serializable {
}
/**
- * Sets the name of the resource governed by this
+ * Sets the name of the resource governed by this
* access control.
+ *
* @param name name of the resource
*/
public void setName(String name) {
mName = name;
}
-
+
/**
- * Retrieves the name of the resource governed by
+ * Retrieves the name of the resource governed by
* this access control.
+ *
* @return name of the resource
*/
public String getName() {
@@ -98,6 +97,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Retrieves the exact string of the resourceACLs
+ *
* @return resource's acl
*/
public String getResourceACLs() {
@@ -105,17 +105,19 @@ public class ACL implements IACL, java.io.Serializable {
}
/**
- * Sets the description of the resource governed by this
+ * Sets the description of the resource governed by this
* access control.
+ *
* @param description Description of the protected resource
*/
public void setDescription(String description) {
mDescription = description;
}
-
+
/**
- * Retrieves the description of the resource governed by
+ * Retrieves the description of the resource governed by
* this access control.
+ *
* @return Description of the protected resource
*/
public String getDescription() {
@@ -124,6 +126,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Adds an ACL entry to this list.
+ *
* @param entry the <code>ACLEntry</code> to be added to this resource
*/
public void addEntry(ACLEntry entry) {
@@ -132,6 +135,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns ACL entries.
+ *
* @return enumeration for the <code>ACLEntry</code> vector
*/
public Enumeration<ACLEntry> entries() {
@@ -140,8 +144,9 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns the string reprsentation.
+ *
* @return the string representation of the ACL entries in the
- * following format:
+ * following format:
* <resource name>[<ACLEntry1>,<ACLEntry 2>,...<ACLEntry N>]
*/
public String toString() {
@@ -160,6 +165,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Adds an rights entry to this list.
+ *
* @param right The right to be added for this ACL
*/
public void addRight(String right) {
@@ -168,6 +174,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Tells if the permission is one of the defined "rights"
+ *
* @param permission permission to be checked
* @return true if it's one of the "rights"; false otherwise
*/
@@ -177,6 +184,7 @@ public class ACL implements IACL, java.io.Serializable {
/**
* Returns rights entries.
+ *
* @return enumeration of rights defined for this ACL
*/
public Enumeration<String> rights() {
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
index d689493b..448b851e 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/ACLEntry.java
@@ -17,15 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
-
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.StringTokenizer;
-
/**
* A class represents an ACI entry of an access control list.
* <P>
+ *
* @version $Revision$, $Date$
*/
public class ACLEntry implements IACLEntry, java.io.Serializable {
@@ -47,6 +46,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Checks if this ACL entry is set to negative.
+ *
* @return true if this ACL entry expression is for "deny";
* false if this ACL entry expression is for "allow"
*/
@@ -63,8 +63,10 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Sets the ACL entry string
+ *
* @param s string in the following format:
- * <PRE>
+ *
+ * <PRE>
* allow|deny (right[,right...]) attribute_expression
* </PRE>
*/
@@ -72,10 +74,12 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
mACLEntryString = s;
}
- /**
+ /**
* Gets the ACL Entry String
+ *
* @return ACL Entry string in the following format:
- * <PRE>
+ *
+ * <PRE>
* allow|deny (right[,right...]) attribute_expression
* </PRE>
*/
@@ -86,9 +90,10 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Adds permission to this entry. Permission must be one of the
* "rights" defined for each protected resource in its ACL
+ *
* @param acl the acl instance that this aclEntry is associated with
* @param permission one of the "rights" defined for each
- * protected resource in its ACL
+ * protected resource in its ACL
*/
public void addPermission(IACL acl, String permission) {
if (acl.checkRight(permission) == true) {
@@ -101,6 +106,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Returns a list of permissions associated with
* this entry.
+ *
* @return a list of permissions for this ACL entry
*/
public Enumeration<String> permissions() {
@@ -109,8 +115,9 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Sets the expression associated with this entry.
+ *
* @param expressions the evaluator expressions. For example,
- * group="Administrators"
+ * group="Administrators"
*/
public void setAttributeExpressions(String expressions) {
mExpressions = expressions;
@@ -118,8 +125,9 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Retrieves the expression associated with this entry.
- * @return the evaluator expressions. For example,
- * group="Administrators"
+ *
+ * @return the evaluator expressions. For example,
+ * group="Administrators"
*/
public String getAttributeExpressions() {
return mExpressions;
@@ -128,10 +136,11 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Checks to see if this <code>ACLEntry</code> contains a
* particular permission
+ *
* @param permission one of the "rights" defined for each
- * protected resource in its ACL
+ * protected resource in its ACL
* @return true if permission contained in the permission list
- * for this <code>ACLEntry</code>; false otherwise.
+ * for this <code>ACLEntry</code>; false otherwise.
*/
public boolean containPermission(String permission) {
return (mPerms.get(permission) != null);
@@ -139,11 +148,12 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Checks if this entry has the given permission.
+ *
* @param permission one of the "rights" defined for each
- * protected resource in its ACL
+ * protected resource in its ACL
* @return true if the permission is allowed; false if the
- * permission is denied. If a permission is not
- * recognized by this ACL, it is considered denied
+ * permission is denied. If a permission is not
+ * recognized by this ACL, it is considered denied
*/
public boolean checkPermission(String permission) {
// default - if we dont know about the requested permission,
@@ -159,10 +169,13 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Parse string in the following format:
+ *
* <PRE>
* allow|deny (right[,right...]) attribute_expression
* </PRE>
+ *
* into an instance of the <code>ACLEntry</code> class
+ *
* @param acl the acl instance associated with this aclentry
* @param aclEntryString aclEntryString in the specified format
* @return an instance of the <code>ACLEntry</code> class
@@ -175,7 +188,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
String te = aclEntryString.trim();
// locate first space
- int i = te.indexOf(' ');
+ int i = te.indexOf(' ');
// prefix should be "allowed" or "deny"
String prefix = te.substring(0, i);
String suffix = te.substring(i + 1).trim();
@@ -189,7 +202,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
return null;
}
// locate the second space
- i = suffix.indexOf(' ');
+ i = suffix.indexOf(' ');
// this prefix should be rights list, delimited by ","
prefix = suffix.substring(1, i - 1);
// the suffix is the rest, which is the "expressions"
@@ -206,6 +219,7 @@ public class ACLEntry implements IACLEntry, java.io.Serializable {
/**
* Returns the string representation of this ACLEntry
+ *
* @return string representation of this ACLEntry
*/
public String toString() {
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/ACLsResources.java b/pki/base/common/src/com/netscape/certsrv/acls/ACLsResources.java
index 878fe163..bf3ea4a2 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/ACLsResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/ACLsResources.java
@@ -23,7 +23,7 @@ import java.util.ListResourceBundle;
* A class represents a resource bundle for the entire ACL component.
* system.
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -31,13 +31,14 @@ public class ACLsResources extends ListResourceBundle {
/**
* Returns the content of this resource.
+ *
* @return the content of this resource.
*/
public Object[][] getContents() {
return contents;
}
- /**
+ /**
* A set of constants for localized error messages.
*/
static final Object[][] contents = {};
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/EACLsException.java b/pki/base/common/src/com/netscape/certsrv/acls/EACLsException.java
index e79bd724..8d204091 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/EACLsException.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/EACLsException.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
-
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* A class represents an acls exception. Note that this is
* an Runtime exception so that methods used AccessManager
@@ -31,7 +29,7 @@ import com.netscape.certsrv.base.MessageFormatter;
* allows AccessManager to be easily integrated into any
* existing code.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EACLsException extends EBaseException {
@@ -44,10 +42,11 @@ public class EACLsException extends EBaseException {
* resource class name
*/
private static final String ACL_RESOURCES = ACLsResources.class.getName();
-
+
/**
* Constructs an acls exception.
* <P>
+ *
* @param msgFormat exception details
*/
public EACLsException(String msgFormat) {
@@ -57,11 +56,12 @@ public class EACLsException extends EBaseException {
/**
* Constructs a base exception with a parameter. For example,
+ *
* <PRE>
- * new EACLsException("failed to load {0}", fileName);
+ * new EACLsException(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -75,6 +75,7 @@ public class EACLsException extends EBaseException {
* Constructs a base exception. It can be used to carry
* a system exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -83,7 +84,7 @@ public class EACLsException extends EBaseException {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param param system exception
*/
@@ -97,7 +98,7 @@ public class EACLsException extends EBaseException {
* Constructs a base exception with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param params list of message format parameters
*/
@@ -109,7 +110,7 @@ public class EACLsException extends EBaseException {
/**
* Returns a list of parameters.
* <P>
- *
+ *
* @return list of message format parameters
*/
public Object[] getParameters() {
@@ -118,6 +119,7 @@ public class EACLsException extends EBaseException {
/**
* String representation for the corresponding exception.
+ *
* @return String representation for the corresponding exception.
*/
public String toString() {
@@ -126,6 +128,7 @@ public class EACLsException extends EBaseException {
/**
* Returns string representation for the corresponding exception.
+ *
* @param locale client specified locale for string representation.
* @return String representation for the corresponding exception.
*/
@@ -136,6 +139,7 @@ public class EACLsException extends EBaseException {
/**
* Return the class name of the resource bundle.
+ *
* @return class name of the resource bundle.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/IACL.java b/pki/base/common/src/com/netscape/certsrv/acls/IACL.java
index d336fc26..aad73372 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/IACL.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/IACL.java
@@ -17,47 +17,50 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
-
import java.util.Enumeration;
-
/**
* A class represents an access control list (ACL). An ACL
- * is associated with a protected resource. The policy
+ * is associated with a protected resource. The policy
* enforcer can verify the ACLs with the current
- * context to see if the corresponding resource is accessible.
+ * context to see if the corresponding resource is accessible.
* <P>
*
* @version $Revision$, $Date$
*/
-public interface IACL {
+public interface IACL {
/**
* Returns the name of the current ACL.
+ *
* @return the name of the current ACL.
*/
public String getName();
/**
* Returns the description of the current ACL.
+ *
* @return the description of the current ACL.
*/
- public String getDescription();
+ public String getDescription();
/**
* Returns a list of access rights of the current ACL.
+ *
* @return a list of access rights
*/
- public Enumeration<String> rights();
+ public Enumeration<String> rights();
/**
* Returns a list of entries of the current ACL.
+ *
* @return a list of entries
*/
public Enumeration<ACLEntry> entries();
/**
* Verifies if permission is granted.
+ *
* @param permission one of the applicable rights
* @return true if the given permission is one of the applicable rights; false otherwise.
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/acls/IACLEntry.java b/pki/base/common/src/com/netscape/certsrv/acls/IACLEntry.java
index f91ef38b..ff806f15 100644
--- a/pki/base/common/src/com/netscape/certsrv/acls/IACLEntry.java
+++ b/pki/base/common/src/com/netscape/certsrv/acls/IACLEntry.java
@@ -17,19 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.acls;
-
-
-
/**
* A class represents an entry of access control list.
* <P>
*
* @version $Revision$, $Date$
*/
-public interface IACLEntry {
+public interface IACLEntry {
/**
* Returns the ACL entry string of the entry.
+ *
* @return the ACL entry string of the entry.
*/
public String getACLEntryString();
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
index f093bb74..01820376 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/CMS.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.apps;
-
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.math.BigInteger;
@@ -98,18 +97,17 @@ import com.netscape.certsrv.usrgrp.IUGSubsystem;
import com.netscape.cmsutil.net.ISocketFactory;
import com.netscape.cmsutil.password.IPasswordStore;
-
/**
* This represents the CMS server. Plugins can access other
- * public objects such as subsystems via this inteface.
+ * public objects such as subsystems via this inteface.
* This object also include a set of utility functions.
- *
+ *
* This object does not include the actual implementation.
* It acts as a public interface for plugins, and the
- * actual implementation is in the CMS engine
- * (com.netscape.cmscore.apps.CMSEngine) that implements
+ * actual implementation is in the CMS engine
+ * (com.netscape.cmscore.apps.CMSEngine) that implements
* ICMSEngine interface.
- *
+ *
* @version $Revision$, $Date$
*/
public final class CMS {
@@ -129,7 +127,7 @@ public final class CMS {
public static final String SUBSYSTEM_KRA = IKeyRecoveryAuthority.ID;
public static final String SUBSYSTEM_OCSP = IOCSPAuthority.ID;
public static final String SUBSYSTEM_TKS = ITKSAuthority.ID;
- public static final String SUBSYSTEM_UG = IUGSubsystem.ID;
+ public static final String SUBSYSTEM_UG = IUGSubsystem.ID;
public static final String SUBSYSTEM_AUTH = IAuthSubsystem.ID;
public static final String SUBSYSTEM_AUTHZ = IAuthzSubsystem.ID;
public static final String SUBSYSTEM_REGISTRY = IPluginRegistry.ID;
@@ -141,7 +139,7 @@ public final class CMS {
/**
* Private constructor.
- *
+ *
* @param engine CMS engine implementation
*/
private CMS(ICMSEngine engine) {
@@ -149,8 +147,9 @@ public final class CMS {
}
/**
- * This method is used for unit tests. It allows the underlying _engine
+ * This method is used for unit tests. It allows the underlying _engine
* to be stubbed out.
+ *
* @param engine The stub engine to set, for testing.
*/
public static void setCMSEngine(ICMSEngine engine) {
@@ -159,7 +158,7 @@ public final class CMS {
/**
* Gets this ID .
- *
+ *
* @return CMS engine identifier
*/
public static String getId() {
@@ -167,9 +166,9 @@ public final class CMS {
}
/**
- * Sets the identifier of this subsystem. Should never be called.
- * Returns error.
- *
+ * Sets the identifier of this subsystem. Should never be called.
+ * Returns error.
+ *
* @param id CMS engine identifier
*/
public static void setId(String id) throws EBaseException {
@@ -178,14 +177,14 @@ public final class CMS {
/**
* Initialize all static, dynamic and final static subsystems.
- *
+ *
* @param owner null
* @param config main config store.
- * @exception EBaseException if any error occur in subsystems during
- * initialization.
+ * @exception EBaseException if any error occur in subsystems during
+ * initialization.
*/
- public static void init(ISubsystem owner, IConfigStore config)
- throws EBaseException {
+ public static void init(ISubsystem owner, IConfigStore config)
+ throws EBaseException {
_engine.init(owner, config);
}
@@ -195,7 +194,7 @@ public final class CMS {
/**
* Starts up all subsystems. subsystems must be initialized.
- *
+ *
* @exception EBaseException if any subsystem fails to startup.
*/
public static void startup() throws EBaseException {
@@ -220,7 +219,7 @@ public final class CMS {
* Checks to ensure that all new incoming requests have been blocked.
* This method is used for reentrancy protection.
* <P>
- *
+ *
* @return true or false
*/
public static boolean areRequestsDisabled() {
@@ -228,7 +227,7 @@ public final class CMS {
}
/**
- * Shuts down subsystems in backwards order
+ * Shuts down subsystems in backwards order
* exceptions are ignored. process exists at end to force exit.
*/
public static void shutdown() {
@@ -240,22 +239,22 @@ public final class CMS {
* exceptions are ignored. process exists at end to force exit.
*/
- public static void forceShutdown() {
+ public static void forceShutdown() {
- _engine.forceShutdown();
- }
+ _engine.forceShutdown();
+ }
- /**
- * mode = 0 (pre-operational)
- * mode = 1 (running)
- */
- public static void setCSState(int mode) {
- _engine.setCSState(mode);
- }
+ /**
+ * mode = 0 (pre-operational)
+ * mode = 1 (running)
+ */
+ public static void setCSState(int mode) {
+ _engine.setCSState(mode);
+ }
- public static int getCSState() {
- return _engine.getCSState();
- }
+ public static int getCSState() {
+ return _engine.getCSState();
+ }
public static boolean isPreOpMode() {
return _engine.isPreOpMode();
@@ -268,7 +267,7 @@ public final class CMS {
/**
* Is the server in running state. After server startup, the
* server will be initialization state first. After the
- * initialization state, the server will be in the running
+ * initialization state, the server will be in the running
* state.
*
* @return true if the server is in the running state
@@ -281,7 +280,7 @@ public final class CMS {
* Returns the logger of the current server. The logger can
* be used to log critical informational or critical error
* messages.
- *
+ *
* @return logger
*/
public static ILogger getLogger() {
@@ -292,7 +291,7 @@ public final class CMS {
* Returns the signed audit logger of the current server. This logger can
* be used to log critical informational or critical error
* messages.
- *
+ *
* @return signed audit logger
*/
public static ILogger getSignedAuditLogger() {
@@ -301,7 +300,7 @@ public final class CMS {
/**
* Creates a repository record in the internal database.
- *
+ *
* @return repository record
*/
public static IRepositoryRecord createRepositoryRecord() {
@@ -310,8 +309,10 @@ public final class CMS {
/**
* Parse ACL resource attributes
+ *
* @param resACLs same format as the resourceACLs attribute:
- * <PRE>
+ *
+ * <PRE>
* <resource name>:<permission1,permission2,...permissionn>:
* <allow|deny> (<subset of the permission set>) <evaluator expression>
* </PRE>
@@ -324,7 +325,7 @@ public final class CMS {
/**
* Creates an issuing poing record.
- *
+ *
* @return issuing record
*/
public static ICRLIssuingPointRecord createCRLIssuingPointRecord(String id, BigInteger crlNumber, Long crlSize, Date thisUpdate, Date nextUpdate) {
@@ -333,7 +334,7 @@ public final class CMS {
/**
* Retrieves the default CRL issuing point record name.
- *
+ *
* @return CRL issuing point record name
*/
public static String getCRLIssuingPointRecordName() {
@@ -342,7 +343,7 @@ public final class CMS {
/**
* Retrieves the process id of this server.
- *
+ *
* @return process id of the server
*/
public static int getpid() {
@@ -351,7 +352,7 @@ public final class CMS {
/**
* Retrieves the instance roort path of this server.
- *
+ *
* @return instance directory path name
*/
public static String getInstanceDir() {
@@ -361,7 +362,7 @@ public final class CMS {
/**
* Returns a server wide system time. Plugins should call
* this method to retrieve system time.
- *
+ *
* @return current time
*/
public static Date getCurrentDate() {
@@ -372,7 +373,7 @@ public final class CMS {
/**
* Puts data of an byte array into the debug file.
- *
+ *
* @param data byte array to be recorded in the debug file
*/
public static void debug(byte data[]) {
@@ -382,7 +383,7 @@ public final class CMS {
/**
* Puts a message into the debug file.
- *
+ *
* @param msg debugging message
*/
public static void debug(String msg) {
@@ -392,7 +393,7 @@ public final class CMS {
/**
* Puts a message into the debug file.
- *
+ *
* @param level 0-10 (0 is less detail, 10 is more detail)
* @param msg debugging message
*/
@@ -403,7 +404,7 @@ public final class CMS {
/**
* Puts an exception into the debug file.
- *
+ *
* @param e exception
*/
public static void debug(Throwable e) {
@@ -413,7 +414,7 @@ public final class CMS {
/**
* Checks if the debug mode is on or not.
- *
+ *
* @return true if debug mode is on
*/
public static boolean debugOn() {
@@ -430,42 +431,43 @@ public final class CMS {
_engine.debugStackTrace();
}
- /*
- * If debugging for the particular realm is enabled, output name/value
- * pair info to the debug file. This is useful to dump out what hidden
- * config variables the server is looking at, or what HTTP variables it
- * is expecting to find, or what database attributes it is looking for.
- * @param type indicates what the source of key/val is. For example,
+ /*
+ * If debugging for the particular realm is enabled, output name/value
+ * pair info to the debug file. This is useful to dump out what hidden
+ * config variables the server is looking at, or what HTTP variables it
+ * is expecting to find, or what database attributes it is looking for.
+ * @param type indicates what the source of key/val is. For example,
* this could be 'CS.cfg', or something else. In the debug
- * subsystem, there is a mechanism to filter this so only the types
+ * subsystem, there is a mechanism to filter this so only the types
* you care about are listed
- * @param key the 'key' of the hashtable which is being accessed.
- * This could be the name of the config parameter, or the http param
- * name.
- * @param val the value of the parameter
+ * @param key the 'key' of the hashtable which is being accessed.
+ * This could be the name of the config parameter, or the http param
+ * name.
+ * @param val the value of the parameter
* @param default the default value if the param is not found
- */
+ */
public static void traceHashKey(String type, String key) {
if (_engine != null) {
- _engine.traceHashKey(type, key);
- }
- }
+ _engine.traceHashKey(type, key);
+ }
+ }
+
public static void traceHashKey(String type, String key, String val) {
if (_engine != null) {
- _engine.traceHashKey(type, key, val);
- }
- }
+ _engine.traceHashKey(type, key, val);
+ }
+ }
+
public static void traceHashKey(String type, String key, String val, String def) {
if (_engine != null) {
- _engine.traceHashKey(type, key, val, def);
- }
- }
-
+ _engine.traceHashKey(type, key, val, def);
+ }
+ }
/**
* Returns the names of all the registered subsystems.
- *
+ *
* @return a list of string-based subsystem names
*/
public static Enumeration<String> getSubsystemNames() {
@@ -478,7 +480,7 @@ public final class CMS {
/**
* Returns all the registered subsystems.
- *
+ *
* @return a list of ISubsystem-based subsystems
*/
public static Enumeration<ISubsystem> getSubsystems() {
@@ -487,7 +489,7 @@ public final class CMS {
/**
* Retrieves the registered subsytem with the given name.
- *
+ *
* @param name subsystem name
* @return subsystem of the given name
*/
@@ -497,7 +499,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param msgID message id defined in UserMessages.properties
* @return localized user message
*/
@@ -509,7 +511,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @return localized user message
@@ -522,7 +524,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
* @return localized user message
@@ -535,7 +537,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -549,7 +551,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -563,7 +565,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -578,7 +580,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -593,15 +595,14 @@ public final class CMS {
public static LDAPConnection getBoundConnection(String host, int port,
int version, LDAPSSLSocketFactoryExt fac, String bindDN,
- String bindPW) throws LDAPException
- {
- return _engine.getBoundConnection(host, port, version, fac,
+ String bindPW) throws LDAPException {
+ return _engine.getBoundConnection(host, port, version, fac,
bindDN, bindPW);
}
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -617,7 +618,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param msgID message id defined in UserMessages.properties
* @param p an array of parameters
* @return localized user message
@@ -630,7 +631,7 @@ public final class CMS {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p an array of parameters
@@ -644,7 +645,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @return localized log message
*/
@@ -654,7 +655,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p an array of parameters
* @return localized log message
@@ -665,7 +666,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @return localized log message
@@ -676,7 +677,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -688,7 +689,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -701,7 +702,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -715,7 +716,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -730,7 +731,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -746,7 +747,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -763,7 +764,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -781,7 +782,7 @@ public final class CMS {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -800,7 +801,7 @@ public final class CMS {
/**
* Returns the main config store. It is a handle to CMS.cfg.
- *
+ *
* @return configuration store
*/
public static IConfigStore getConfigStore() {
@@ -809,7 +810,7 @@ public final class CMS {
/**
* Retrieves time server started up.
- *
+ *
* @return last startup time
*/
public static long getStartupTime() {
@@ -818,41 +819,41 @@ public final class CMS {
/**
* Retrieves the HTTP Connection for use with connector.
- *
+ *
* @param authority remote authority
* @param factory socket factory
* @return http connection to the remote authority
*/
- public static IHttpConnection getHttpConnection(IRemoteAuthority authority,
- ISocketFactory factory) {
+ public static IHttpConnection getHttpConnection(IRemoteAuthority authority,
+ ISocketFactory factory) {
return _engine.getHttpConnection(authority, factory);
}
/**
* Retrieves the HTTP Connection for use with connector.
- *
+ *
* @param authority remote authority
* @param factory socket factory
* @param timeout return error if connection cannot be established within
- * the timeout period
+ * the timeout period
* @return http connection to the remote authority
*/
- public static IHttpConnection getHttpConnection(IRemoteAuthority authority,
- ISocketFactory factory, int timeout) {
+ public static IHttpConnection getHttpConnection(IRemoteAuthority authority,
+ ISocketFactory factory, int timeout) {
return _engine.getHttpConnection(authority, factory, timeout);
}
/**
* Retrieves the request sender for use with connector.
- *
+ *
* @param authority local authority
* @param nickname nickname of the client certificate
* @param remote remote authority
* @param interval timeout interval
* @return resender
*/
- public static IResender getResender(IAuthority authority, String nickname,
- IRemoteAuthority remote, int interval) {
+ public static IResender getResender(IAuthority authority, String nickname,
+ IRemoteAuthority remote, int interval) {
return _engine.getResender(authority, nickname, remote, interval);
}
@@ -867,7 +868,7 @@ public final class CMS {
/**
* Sets the nickname of the server's server certificate.
- *
+ *
* @param tokenName name of token where the certificate is located
* @param nickName name of server certificate
*/
@@ -877,7 +878,7 @@ public final class CMS {
/**
* Sets the nickname of the server's server certificate.
- *
+ *
* @param newName new nickname of server certificate
*/
public static void setServerCertNickname(String newName) {
@@ -886,7 +887,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's secure end entity service.
- *
+ *
* @return host name of end-entity service
*/
public static String getEEHost() {
@@ -895,7 +896,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's non-secure end entity service.
- *
+ *
* @return host name of end-entity non-secure service
*/
public static String getEENonSSLHost() {
@@ -904,7 +905,7 @@ public final class CMS {
/**
* Retrieves the IP address of the server's non-secure end entity service.
- *
+ *
* @return ip address of end-entity non-secure service
*/
public static String getEENonSSLIP() {
@@ -913,7 +914,7 @@ public final class CMS {
/**
* Retrieves the port number of the server's non-secure end entity service.
- *
+ *
* @return port of end-entity non-secure service
*/
public static String getEENonSSLPort() {
@@ -922,7 +923,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's secure end entity service.
- *
+ *
* @return port of end-entity secure service
*/
public static String getEESSLHost() {
@@ -931,7 +932,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's secure end entity service.
- *
+ *
* @return port of end-entity secure service
*/
public static String getEEClientAuthSSLPort() {
@@ -940,7 +941,7 @@ public final class CMS {
/**
* Retrieves the IP address of the server's secure end entity service.
- *
+ *
* @return ip address of end-entity secure service
*/
public static String getEESSLIP() {
@@ -949,7 +950,7 @@ public final class CMS {
/**
* Retrieves the port number of the server's secure end entity service.
- *
+ *
* @return port of end-entity secure service
*/
public static String getEESSLPort() {
@@ -958,7 +959,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's agent service.
- *
+ *
* @return host name of agent service
*/
public static String getAgentHost() {
@@ -967,7 +968,7 @@ public final class CMS {
/**
* Retrieves the IP address of the server's agent service.
- *
+ *
* @return ip address of agent service
*/
public static String getAgentIP() {
@@ -976,7 +977,7 @@ public final class CMS {
/**
* Retrieves the port number of the server's agent service.
- *
+ *
* @return port of agent service
*/
public static String getAgentPort() {
@@ -985,7 +986,7 @@ public final class CMS {
/**
* Retrieves the host name of the server's administration service.
- *
+ *
* @return host name of administration service
*/
public static String getAdminHost() {
@@ -994,7 +995,7 @@ public final class CMS {
/**
* Retrieves the IP address of the server's administration service.
- *
+ *
* @return ip address of administration service
*/
public static String getAdminIP() {
@@ -1003,7 +1004,7 @@ public final class CMS {
/**
* Retrieves the port number of the server's administration service.
- *
+ *
* @return port of administration service
*/
public static String getAdminPort() {
@@ -1012,7 +1013,7 @@ public final class CMS {
/**
* Creates a general name constraints.
- *
+ *
* @param generalNameChoice type of general name
* @param value general name string
* @return general name object
@@ -1024,14 +1025,14 @@ public final class CMS {
/**
* Creates a general name.
- *
+ *
* @param generalNameChoice type of general name
* @param value general name string
* @return general name object
* @exception EBaseException failed to create general name
*/
public static GeneralName form_GeneralName(String generalNameChoice,
- String value) throws EBaseException {
+ String value) throws EBaseException {
return _engine.form_GeneralName(generalNameChoice, value);
}
@@ -1041,25 +1042,25 @@ public final class CMS {
* @param name configuration name
* @param params configuration parameters
*/
- public static void getSubjAltNameConfigDefaultParams(String name,
- Vector<String> params) {
+ public static void getSubjAltNameConfigDefaultParams(String name,
+ Vector<String> params) {
_engine.getSubjAltNameConfigDefaultParams(name, params);
}
/**
* Get extended plugin info for subject alt name configuration.
- *
+ *
* @param name configuration name
* @param params configuration parameters
*/
- public static void getSubjAltNameConfigExtendedPluginInfo(String name,
- Vector<String> params) {
+ public static void getSubjAltNameConfigExtendedPluginInfo(String name,
+ Vector<String> params) {
_engine.getSubjAltNameConfigExtendedPluginInfo(name, params);
}
/**
* Creates subject alt name configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
@@ -1072,162 +1073,162 @@ public final class CMS {
/**
* Retrieves default general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param params configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
public static void getGeneralNameConfigDefaultParams(String name,
- boolean isValueConfigured, Vector<String> params) {
+ boolean isValueConfigured, Vector<String> params) {
_engine.getGeneralNameConfigDefaultParams(name,
- isValueConfigured, params);
+ isValueConfigured, params);
}
/**
* Retrieves default general names configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param params configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
public static void getGeneralNamesConfigDefaultParams(String name,
- boolean isValueConfigured, Vector<String> params) {
+ boolean isValueConfigured, Vector<String> params) {
_engine.getGeneralNamesConfigDefaultParams(name,
- isValueConfigured, params);
+ isValueConfigured, params);
}
/**
* Retrieves extended plugin info for general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param info configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
public static void getGeneralNameConfigExtendedPluginInfo(String name,
- boolean isValueConfigured, Vector<String> info) {
+ boolean isValueConfigured, Vector<String> info) {
_engine.getGeneralNameConfigExtendedPluginInfo(name,
- isValueConfigured, info);
+ isValueConfigured, info);
}
/**
* Retrieves extended plugin info for general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param info configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
public static void getGeneralNamesConfigExtendedPluginInfo(String name,
- boolean isValueConfigured, Vector<String> info) {
+ boolean isValueConfigured, Vector<String> info) {
_engine.getGeneralNamesConfigExtendedPluginInfo(name,
- isValueConfigured, info);
+ isValueConfigured, info);
}
/**
* Created general names configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public static IGeneralNamesConfig createGeneralNamesConfig(String name,
- IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException {
+ public static IGeneralNamesConfig createGeneralNamesConfig(String name,
+ IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException {
return _engine.createGeneralNamesConfig(name, config, isValueConfigured,
isPolicyEnabled);
}
/**
* Created general name constraints configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public static IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException {
+ public static IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException {
return _engine.createGeneralNameAsConstraintsConfig(
name, config, isValueConfigured, isPolicyEnabled);
}
/**
* Created general name constraints configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public static IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException {
+ public static IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException {
return _engine.createGeneralNamesAsConstraintsConfig(
name, config, isValueConfigured, isPolicyEnabled);
}
/**
* Returns the finger print of the given certificate.
- *
- * @param cert certificate
+ *
+ * @param cert certificate
* @return finger print of certificate
*/
public static String getFingerPrint(Certificate cert)
- throws CertificateEncodingException, NoSuchAlgorithmException {
+ throws CertificateEncodingException, NoSuchAlgorithmException {
return _engine.getFingerPrint(cert);
}
/**
* Returns the finger print of the given certificate.
- *
- * @param certDer DER byte array of the certificate
+ *
+ * @param certDer DER byte array of the certificate
* @return finger print of certificate
*/
public static String getFingerPrints(byte[] certDer)
- throws NoSuchAlgorithmException {
+ throws NoSuchAlgorithmException {
return _engine.getFingerPrints(certDer);
}
/**
* Returns the finger print of the given certificate.
- *
- * @param cert certificate
+ *
+ * @param cert certificate
* @return finger print of certificate
*/
public static String getFingerPrints(Certificate cert)
- throws NoSuchAlgorithmException, CertificateEncodingException {
+ throws NoSuchAlgorithmException, CertificateEncodingException {
return _engine.getFingerPrints(cert);
}
- /**
+ /**
* Creates a HTTP PKI Message that can be sent to a remote
* authority.
- *
+ *
* @return a new PKI Message for remote authority
*/
public static IPKIMessage getHttpPKIMessage() {
return _engine.getHttpPKIMessage();
}
- /**
+ /**
* Creates a request encoder. A request cannot be sent to
* the remote authority in its regular format.
- *
+ *
* @return a request encoder
*/
public static IRequestEncoder getHttpRequestEncoder() {
return _engine.getHttpRequestEncoder();
}
- /**
+ /**
* Converts a BER-encoded byte array into a MIME-64 encoded string.
- *
+ *
* @param data data in byte array format
* @return base-64 encoding for the data
*/
@@ -1235,9 +1236,9 @@ public final class CMS {
return _engine.BtoA(data);
}
- /**
+ /**
* Converts a MIME-64 encoded string into a BER-encoded byte array.
- *
+ *
* @param data base-64 encoding for the data
* @return data data in byte array format
*/
@@ -1248,40 +1249,40 @@ public final class CMS {
/**
* Retrieves the ldap connection information from the configuration
* store.
- *
+ *
* @param config configuration parameters of ldap connection
* @return a LDAP connection info
*/
public static ILdapConnInfo getLdapConnInfo(IConfigStore config)
- throws EBaseException, ELdapException {
+ throws EBaseException, ELdapException {
return _engine.getLdapConnInfo(config);
}
/**
- * Creates a LDAP SSL socket with the given nickname. The
+ * Creates a LDAP SSL socket with the given nickname. The
* certificate associated with the nickname will be used
* for client authentication.
- *
+ *
* @param certNickname nickname of client certificate
* @return LDAP SSL socket factory
*/
- public static LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(
- String certNickname) {
+ public static LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(
+ String certNickname) {
return _engine.getLdapJssSSLSocketFactory(certNickname);
}
/**
* Creates a LDAP SSL socket.
- *
+ *
* @return LDAP SSL socket factory
*/
- public static LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory() {
+ public static LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory() {
return _engine.getLdapJssSSLSocketFactory();
}
/**
* Creates a LDAP Auth Info object.
- *
+ *
* @return LDAP authentication info
*/
public static ILdapAuthInfo getLdapAuthInfo() {
@@ -1290,27 +1291,27 @@ public final class CMS {
/**
* Retrieves the LDAP connection factory.
- *
+ *
* @return bound LDAP connection pool
*/
public static ILdapConnFactory getLdapBoundConnFactory()
- throws ELdapException {
+ throws ELdapException {
return _engine.getLdapBoundConnFactory();
}
/**
* Retrieves the LDAP connection factory.
- *
+ *
* @return anonymous LDAP connection pool
*/
public static ILdapConnFactory getLdapAnonConnFactory()
- throws ELdapException {
+ throws ELdapException {
return _engine.getLdapAnonConnFactory();
}
/**
* Retrieves the default X.509 certificate template.
- *
+ *
* @return default certificate template
*/
public static X509CertInfo getDefaultX509CertInfo() {
@@ -1320,7 +1321,7 @@ public final class CMS {
/**
* Retrieves the certifcate in MIME-64 encoded format
* with header and footer.
- *
+ *
* @param cert certificate
* @return base-64 format certificate
*/
@@ -1328,25 +1329,25 @@ public final class CMS {
return _engine.getEncodedCert(cert);
}
- /**
- * Verifies all system certs
- * with tags defined in <subsystemtype>.cert.list
- */
+ /**
+ * Verifies all system certs
+ * with tags defined in <subsystemtype>.cert.list
+ */
public static boolean verifySystemCerts() {
return _engine.verifySystemCerts();
}
- /**
- * Verify a system cert by tag name
- * with tags defined in <subsystemtype>.cert.list
- */
+ /**
+ * Verify a system cert by tag name
+ * with tags defined in <subsystemtype>.cert.list
+ */
public static boolean verifySystemCertByTag(String tag) {
return _engine.verifySystemCertByTag(tag);
}
- /**
- * Verify a system cert by certificate nickname
- */
+ /**
+ * Verify a system cert by certificate nickname
+ */
public static boolean verifySystemCertByNickname(String nickname, String certificateUsage) {
return _engine.verifySystemCertByNickname(nickname, certificateUsage);
}
@@ -1360,7 +1361,7 @@ public final class CMS {
/**
* Checks if the given certificate is a signing certificate.
- *
+ *
* @param cert certificate
* @return true if the given certificate is a signing certificate
*/
@@ -1370,7 +1371,7 @@ public final class CMS {
/**
* Checks if the given certificate is an encryption certificate.
- *
+ *
* @param cert certificate
* @return true if the given certificate is an encryption certificate
*/
@@ -1380,7 +1381,7 @@ public final class CMS {
/**
* Retrieves the email form processor.
- *
+ *
* @return email form processor
*/
public static IEmailFormProcessor getEmailFormProcessor() {
@@ -1389,7 +1390,7 @@ public final class CMS {
/**
* Retrieves the email form template.
- *
+ *
* @return email template
*/
public static IEmailTemplate getEmailTemplate(String path) {
@@ -1398,7 +1399,7 @@ public final class CMS {
/**
* Retrieves the email notification handler.
- *
+ *
* @return email notification
*/
public static IMailNotification getMailNotification() {
@@ -1407,7 +1408,7 @@ public final class CMS {
/**
* Retrieves the email key resolver.
- *
+ *
* @return email key resolver
*/
public static IEmailResolverKeys getEmailResolverKeys() {
@@ -1416,19 +1417,19 @@ public final class CMS {
/**
* Checks if the given OID is valid.
- *
+ *
* @param attrName attribute name
* @param value attribute value
* @return object identifier of the given attrName
*/
- public static ObjectIdentifier checkOID(String attrName, String value)
- throws EBaseException {
+ public static ObjectIdentifier checkOID(String attrName, String value)
+ throws EBaseException {
return _engine.checkOID(attrName, value);
}
/**
* Retrieves the email resolver that checks for subjectAlternateName.
- *
+ *
* @return email key resolver
*/
public static IEmailResolver getReqCertSANameEmailResolver() {
@@ -1437,7 +1438,7 @@ public final class CMS {
/**
* Retrieves the extension pretty print handler.
- *
+ *
* @param e extension
* @param indent indentation
* @return extension pretty print handler
@@ -1445,10 +1446,10 @@ public final class CMS {
public static IExtPrettyPrint getExtPrettyPrint(Extension e, int indent) {
return _engine.getExtPrettyPrint(e, indent);
}
-
+
/**
* Retrieves the certificate pretty print handler.
- *
+ *
* @param delimiter delimiter
* @return certificate pretty print handler
*/
@@ -1458,7 +1459,7 @@ public final class CMS {
/**
* Retrieves the CRL pretty print handler.
- *
+ *
* @param crl CRL
* @return CRL pretty print handler
*/
@@ -1468,7 +1469,7 @@ public final class CMS {
/**
* Retrieves the CRL cache pretty print handler.
- *
+ *
* @param ip CRL issuing point
* @return CRL pretty print handler
*/
@@ -1478,7 +1479,7 @@ public final class CMS {
/**
* Retrieves the certificate pretty print handler.
- *
+ *
* @param cert certificate
* @return certificate pretty print handler
*/
@@ -1496,7 +1497,7 @@ public final class CMS {
/**
* Retrieves the password check.
- *
+ *
* @return default password checker
*/
public static IPasswordCheck getPasswordChecker() {
@@ -1505,7 +1506,7 @@ public final class CMS {
/**
* Puts a password entry into the single-sign on cache.
- *
+ *
* @param tag password tag
* @param pw password
*/
@@ -1524,7 +1525,7 @@ public final class CMS {
/**
* Retrieves command queue
- *
+ *
* @return command queue
*/
public static ICommandQueue getCommandQueue() {
@@ -1533,25 +1534,25 @@ public final class CMS {
/**
* Loads the configuration file and starts CMS's core implementation.
- *
+ *
* @param path path to configuration file (CMS.cfg)
* @exception EBaseException failed to start CMS
*/
public static void start(String path) throws EBaseException {
//FileConfigStore mainConfig = null;
-/*
- try {
- mainConfig = new FileConfigStore(path);
- } catch (EBaseException e) {
- e.printStackTrace();
- System.out.println(
- "Error: The Server is not fully configured.\n" +
- "Finish configuring server using Configure Setup Wizard in " +
- "the Certificate Server Console.");
- System.out.println(e.toString());
- System.exit(0);
- }
-*/
+ /*
+ try {
+ mainConfig = new FileConfigStore(path);
+ } catch (EBaseException e) {
+ e.printStackTrace();
+ System.out.println(
+ "Error: The Server is not fully configured.\n" +
+ "Finish configuring server using Configure Setup Wizard in " +
+ "the Certificate Server Console.");
+ System.out.println(e.toString());
+ System.exit(0);
+ }
+ */
String classname = "com.netscape.cmscore.apps.CMSEngine";
@@ -1559,7 +1560,7 @@ public final class CMS {
try {
ICMSEngine engine = (ICMSEngine)
- Class.forName(classname).newInstance();
+ Class.forName(classname).newInstance();
cms = new CMS(engine);
IConfigStore mainConfig = createFileConfigStore(path);
@@ -1568,7 +1569,7 @@ public final class CMS {
} catch (EBaseException e) { // catch everything here purposely
CMS.debug("CMS:Caught EBaseException");
- CMS.debug(e);
+ CMS.debug(e);
// Raidzilla Bug #57592: Always print error message to stdout.
System.out.println(e.toString());
@@ -1576,8 +1577,8 @@ public final class CMS {
shutdown();
throw e;
} catch (Exception e) { // catch everything here purposely
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- PrintStream ps = new PrintStream(bos);
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bos);
e.printStackTrace(ps);
System.out.println(Constants.SERVER_SHUTDOWN_MESSAGE);
@@ -1609,7 +1610,7 @@ public final class CMS {
public static void setListOfVerifiedCerts(int size, long interval, long unknownStateInterval) {
_engine.setListOfVerifiedCerts(size, interval, unknownStateInterval);
}
-
+
public static IPasswordStore getPasswordStore() {
return _engine.getPasswordStore();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java b/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
index 7f5e4605..4a6e6c69 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/ICMSEngine.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.apps;
-
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
@@ -85,18 +84,16 @@ import com.netscape.cmsutil.password.IPasswordStore;
* framework contains a set of services that provide
* the foundation of a security application.
* <p>
- * The engine implementation is loaded by CMS at startup.
- * It is responsible for starting up all the related
- * subsystems.
+ * The engine implementation is loaded by CMS at startup. It is responsible for starting up all the related subsystems.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICMSEngine extends ISubsystem {
/**
* Gets this ID .
- *
+ *
* @return CMS engine identifier
*/
public String getId();
@@ -104,26 +101,31 @@ public interface ICMSEngine extends ISubsystem {
/**
* Sets the identifier of this subsystem. Should never be called.
* Returns error.
- *
+ *
* @param id CMS engine identifier
*/
public void setId(String id) throws EBaseException;
/**
* Retrieves the process id of this server.
- *
+ *
* @return process id of the server
*/
public int getpid();
public void reinit(String id) throws EBaseException;
+
public int getCSState();
+
public void setCSState(int mode);
+
public boolean isPreOpMode();
+
public boolean isRunningMode();
+
/**
* Retrieves the instance roort path of this server.
- *
+ *
* @return instance directory path name
*/
public String getInstanceDir();
@@ -131,14 +133,14 @@ public interface ICMSEngine extends ISubsystem {
/**
* Returns a server wide system time. Plugins should call
* this method to retrieve system time.
- *
+ *
* @return current time
*/
public Date getCurrentDate();
/**
* Retrieves time server started up.
- *
+ *
* @return last startup time
*/
public long getStartupTime();
@@ -148,28 +150,28 @@ public interface ICMSEngine extends ISubsystem {
* server will be initialization state first. After the
* initialization state, the server will be in the running
* state.
- *
+ *
* @return true if the server is in the running state
*/
public boolean isInRunningState();
/**
* Returns the names of all the registered subsystems.
- *
+ *
* @return a list of string-based subsystem names
*/
public Enumeration<String> getSubsystemNames();
/**
* Returns all the registered subsystems.
- *
+ *
* @return a list of ISubsystem-based subsystems
*/
public Enumeration<ISubsystem> getSubsystems();
/**
* Retrieves the registered subsytem with the given name.
- *
+ *
* @param name subsystem name
* @return subsystem of the given name
*/
@@ -179,7 +181,7 @@ public interface ICMSEngine extends ISubsystem {
* Returns the logger of the current server. The logger can
* be used to log critical informational or critical error
* messages.
- *
+ *
* @return logger
*/
public ILogger getLogger();
@@ -188,28 +190,28 @@ public interface ICMSEngine extends ISubsystem {
* Returns the signed audit logger of the current server. This logger can
* be used to log critical informational or critical error
* messages.
- *
+ *
* @return signed audit logger
*/
public ILogger getSignedAuditLogger();
/**
* Puts data of an byte array into the debug file.
- *
+ *
* @param data byte array to be recorded in the debug file
*/
public void debug(byte data[]);
/**
* Puts a message into the debug file.
- *
+ *
* @param msg debugging message
*/
public void debug(String msg);
/**
* Puts a message into the debug file.
- *
+ *
* @param level 0-10
* @param msg debugging message
*/
@@ -217,14 +219,14 @@ public interface ICMSEngine extends ISubsystem {
/**
* Puts an exception into the debug file.
- *
+ *
* @param e exception
*/
public void debug(Throwable e);
/**
* Checks if the debug mode is on or not.
- *
+ *
* @return true if debug mode is on
*/
public boolean debugOn();
@@ -234,20 +236,20 @@ public interface ICMSEngine extends ISubsystem {
*/
public void debugStackTrace();
-
- /**
- * Dump name/value pair debug information to debug file
- */
+ /**
+ * Dump name/value pair debug information to debug file
+ */
public void traceHashKey(String type, String key);
+
public void traceHashKey(String type, String key, String val);
- public void traceHashKey(String type, String key, String val, String def);
+ public void traceHashKey(String type, String key, String val, String def);
public byte[] getPKCS7(Locale locale, IRequest req);
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @return localized user message
@@ -256,7 +258,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p an array of parameters
@@ -266,7 +268,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -276,7 +278,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -287,7 +289,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the localized user message from UserMessages.properties.
- *
+ *
* @param locale end-user locale
* @param msgID message id defined in UserMessages.properties
* @param p1 1st parameter
@@ -299,7 +301,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @return localized log message
*/
@@ -307,7 +309,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p an array of parameters
* @return localized log message
@@ -316,7 +318,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @return localized log message
@@ -325,7 +327,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -335,7 +337,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -346,7 +348,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -358,7 +360,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -371,7 +373,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -385,7 +387,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -400,7 +402,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -416,7 +418,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the centralized log message from LogMessages.properties.
- *
+ *
* @param msgID message id defined in LogMessages.properties
* @param p1 1st parameter
* @param p2 2nd parameter
@@ -433,8 +435,10 @@ public interface ICMSEngine extends ISubsystem {
/**
* Parse ACL resource attributes
+ *
* @param resACLs same format as the resourceACLs attribute:
- * <PRE>
+ *
+ * <PRE>
* <resource name>:<permission1,permission2,...permissionn>:
* <allow|deny> (<subset of the permission set>) <evaluator expression>
* </PRE>
@@ -445,48 +449,48 @@ public interface ICMSEngine extends ISubsystem {
/**
* Creates an issuing poing record.
- *
+ *
* @return issuing record
*/
public ICRLIssuingPointRecord createCRLIssuingPointRecord(String id, BigInteger crlNumber, Long crlSize, Date thisUpdate, Date nextUpdate);
/**
* Retrieves the default CRL issuing point record name.
- *
+ *
* @return CRL issuing point record name
*/
public String getCRLIssuingPointRecordName();
/**
* Returns the finger print of the given certificate.
- *
+ *
* @param cert certificate
* @return finger print of certificate
*/
public String getFingerPrint(Certificate cert)
- throws CertificateEncodingException, NoSuchAlgorithmException;
+ throws CertificateEncodingException, NoSuchAlgorithmException;
/**
* Returns the finger print of the given certificate.
- *
+ *
* @param cert certificate
* @return finger print of certificate
*/
public String getFingerPrints(Certificate cert)
- throws NoSuchAlgorithmException, CertificateEncodingException;
+ throws NoSuchAlgorithmException, CertificateEncodingException;
- /*
+ /*
* Returns the finger print of the given certificate.
*
* @param certDer DER byte array of certificate
* @return finger print of certificate
*/
public String getFingerPrints(byte[] certDer)
- throws NoSuchAlgorithmException;
+ throws NoSuchAlgorithmException;
/**
* Creates a repository record in the internal database.
- *
+ *
* @return repository record
*/
public IRepositoryRecord createRepositoryRecord();
@@ -494,7 +498,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Creates a HTTP PKI Message that can be sent to a remote
* authority.
- *
+ *
* @return a new PKI Message for remote authority
*/
public IPKIMessage getHttpPKIMessage();
@@ -502,14 +506,14 @@ public interface ICMSEngine extends ISubsystem {
/**
* Creates a request encoder. A request cannot be sent to
* the remote authority in its regular format.
- *
+ *
* @return a request encoder
*/
public IRequestEncoder getHttpRequestEncoder();
/**
* Converts a BER-encoded byte array into a MIME-64 encoded string.
- *
+ *
* @param data data in byte array format
* @return base-64 encoding for the data
*/
@@ -517,7 +521,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Converts a MIME-64 encoded string into a BER-encoded byte array.
- *
+ *
* @param data base-64 encoding for the data
* @return data data in byte array format
*/
@@ -526,7 +530,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the certifcate in MIME-64 encoded format
* with header and footer.
- *
+ *
* @param cert certificate
* @return base-64 format certificate
*/
@@ -534,7 +538,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the certificate pretty print handler.
- *
+ *
* @param delimiter delimiter
* @return certificate pretty print handler
*/
@@ -542,7 +546,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the extension pretty print handler.
- *
+ *
* @param e extension
* @param indent indentation
* @return extension pretty print handler
@@ -551,7 +555,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the certificate pretty print handler.
- *
+ *
* @param cert certificate
* @return certificate pretty print handler
*/
@@ -559,7 +563,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the CRL pretty print handler.
- *
+ *
* @param crl CRL
* @return CRL pretty print handler
*/
@@ -567,7 +571,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the CRL cache pretty print handler.
- *
+ *
* @param ip CRL issuing point
* @return CRL pretty print handler
*/
@@ -576,41 +580,41 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the ldap connection information from the configuration
* store.
- *
+ *
* @param config configuration parameters of ldap connection
* @return a LDAP connection info
*/
- public ILdapConnInfo getLdapConnInfo(IConfigStore config)
- throws EBaseException, ELdapException;
+ public ILdapConnInfo getLdapConnInfo(IConfigStore config)
+ throws EBaseException, ELdapException;
/**
* Creates a LDAP SSL socket with the given nickname. The
* certificate associated with the nickname will be used
* for client authentication.
- *
+ *
* @param certNickname nickname of client certificate
* @return LDAP SSL socket factory
*/
- public LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(
- String certNickname);
+ public LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory(
+ String certNickname);
/**
* Creates a LDAP SSL socket.
- *
+ *
* @return LDAP SSL socket factory
*/
- public LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory();
+ public LDAPSSLSocketFactoryExt getLdapJssSSLSocketFactory();
/**
* Creates a LDAP Auth Info object.
- *
+ *
* @return LDAP authentication info
*/
public ILdapAuthInfo getLdapAuthInfo();
/**
* Retrieves the LDAP connection factory.
- *
+ *
* @return bound LDAP connection pool
*/
public ILdapConnFactory getLdapBoundConnFactory() throws ELdapException;
@@ -618,23 +622,24 @@ public interface ICMSEngine extends ISubsystem {
public LDAPConnection getBoundConnection(String host, int port,
int version, LDAPSSLSocketFactoryExt fac, String bindDN,
String bindPW) throws LDAPException;
+
/**
* Retrieves the LDAP connection factory.
- *
+ *
* @return anonymous LDAP connection pool
*/
public ILdapConnFactory getLdapAnonConnFactory() throws ELdapException;
/**
* Retrieves the password check.
- *
+ *
* @return default password checker
*/
public IPasswordCheck getPasswordChecker();
/**
* Puts a password entry into the single-sign on cache.
- *
+ *
* @param tag password tag
* @param pw password
*/
@@ -642,21 +647,21 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the password callback.
- *
+ *
* @return default password callback
*/
public PasswordCallback getPasswordCallback();
/**
* Retrieves the nickname of the server's server certificate.
- *
+ *
* @return nickname of the server certificate
*/
public String getServerCertNickname();
/**
* Sets the nickname of the server's server certificate.
- *
+ *
* @param tokenName name of token where the certificate is located
* @param nickName name of server certificate
*/
@@ -664,137 +669,141 @@ public interface ICMSEngine extends ISubsystem {
/**
* Sets the nickname of the server's server certificate.
- *
+ *
* @param newName new nickname of server certificate
*/
public void setServerCertNickname(String newName);
/**
* Retrieves the host name of the server's secure end entity service.
- *
+ *
* @return host name of end-entity service
*/
public String getEEHost();
/**
* Retrieves the host name of the server's non-secure end entity service.
- *
+ *
* @return host name of end-entity non-secure service
*/
public String getEENonSSLHost();
/**
* Retrieves the IP address of the server's non-secure end entity service.
- *
+ *
* @return ip address of end-entity non-secure service
*/
public String getEENonSSLIP();
/**
* Retrieves the port number of the server's non-secure end entity service.
- *
+ *
* @return port of end-entity non-secure service
*/
public String getEENonSSLPort();
/**
* Retrieves the host name of the server's secure end entity service.
- *
+ *
* @return port of end-entity secure service
*/
public String getEESSLHost();
/**
* Retrieves the IP address of the server's secure end entity service.
- *
+ *
* @return ip address of end-entity secure service
*/
public String getEESSLIP();
/**
* Retrieves the port number of the server's secure end entity service.
- *
+ *
* @return port of end-entity secure service
*/
public String getEESSLPort();
/**
* Retrieves the port number of the server's client auth secure end entity service.
- *
+ *
* @return port of end-entity client auth secure service
*/
public String getEEClientAuthSSLPort();
/**
* Retrieves the host name of the server's agent service.
- *
+ *
* @return host name of agent service
*/
public String getAgentHost();
/**
* Retrieves the IP address of the server's agent service.
- *
+ *
* @return ip address of agent service
*/
public String getAgentIP();
/**
* Retrieves the port number of the server's agent service.
- *
+ *
* @return port of agent service
*/
public String getAgentPort();
/**
* Retrieves the host name of the server's administration service.
- *
+ *
* @return host name of administration service
*/
public String getAdminHost();
/**
* Retrieves the IP address of the server's administration service.
- *
+ *
* @return ip address of administration service
*/
public String getAdminIP();
/**
* Retrieves the port number of the server's administration service.
- *
+ *
* @return port of administration service
*/
public String getAdminPort();
/**
* Verifies all system certificates
+ *
* @return true if all passed, false otherwise
*/
- public boolean verifySystemCerts();
+ public boolean verifySystemCerts();
/**
* Verifies a system certificate by its tag name
* as defined in <subsystemtype>.cert.list
+ *
* @return true if passed, false otherwise
*/
public boolean verifySystemCertByTag(String tag);
/**
* Verifies a system certificate by its nickname
+ *
* @return true if passed, false otherwise
*/
public boolean verifySystemCertByNickname(String nickname, String certificateUsage);
/**
* get the CertificateUsage as defined in JSS CryptoManager
+ *
* @return CertificateUsage as defined in JSS CryptoManager
*/
public CertificateUsage getCertificateUsage(String certusage);
/**
* Checks if the given certificate is a signing certificate.
- *
+ *
* @param cert certificate
* @return true if the given certificate is a signing certificate
*/
@@ -802,7 +811,7 @@ public interface ICMSEngine extends ISubsystem {
/**
* Checks if the given certificate is an encryption certificate.
- *
+ *
* @param cert certificate
* @return true if the given certificate is an encryption certificate
*/
@@ -810,209 +819,209 @@ public interface ICMSEngine extends ISubsystem {
/**
* Retrieves the default X.509 certificate template.
- *
+ *
* @return default certificate template
*/
public X509CertInfo getDefaultX509CertInfo();
/**
* Retrieves the email form processor.
- *
+ *
* @return email form processor
*/
public IEmailFormProcessor getEmailFormProcessor();
/**
* Retrieves the email form template.
- *
+ *
* @return email template
*/
public IEmailTemplate getEmailTemplate(String path);
/**
* Retrieves the email notification handler.
- *
+ *
* @return email notification
*/
public IMailNotification getMailNotification();
/**
* Retrieves the email key resolver.
- *
+ *
* @return email key resolver
*/
public IEmailResolverKeys getEmailResolverKeys();
/**
* Retrieves the email resolver that checks for subjectAlternateName.
- *
+ *
* @return email key resolver
*/
public IEmailResolver getReqCertSANameEmailResolver();
/**
* Checks if the given OID is valid.
- *
+ *
* @param attrName attribute name
* @param value attribute value
* @return object identifier of the given attrName
*/
public ObjectIdentifier checkOID(String attrName, String value)
- throws EBaseException;
+ throws EBaseException;
/**
* Creates a general name constraints.
- *
+ *
* @param generalNameChoice type of general name
* @param value general name string
* @return general name object
* @exception EBaseException failed to create general name constraint
*/
- public GeneralName form_GeneralNameAsConstraints(String generalNameChoice, String value) throws EBaseException;
+ public GeneralName form_GeneralNameAsConstraints(String generalNameChoice, String value) throws EBaseException;
/**
* Creates a general name.
- *
+ *
* @param generalNameChoice type of general name
* @param value general name string
* @return general name object
* @exception EBaseException failed to create general name
*/
- public GeneralName form_GeneralName(String generalNameChoice,
- String value) throws EBaseException;
+ public GeneralName form_GeneralName(String generalNameChoice,
+ String value) throws EBaseException;
/**
* Retrieves default general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param params configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
- public void getGeneralNameConfigDefaultParams(String name,
- boolean isValueConfigured, Vector<String> params);
+ public void getGeneralNameConfigDefaultParams(String name,
+ boolean isValueConfigured, Vector<String> params);
/**
* Retrieves default general names configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param params configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
- public void getGeneralNamesConfigDefaultParams(String name,
- boolean isValueConfigured, Vector<String> params);
+ public void getGeneralNamesConfigDefaultParams(String name,
+ boolean isValueConfigured, Vector<String> params);
/**
* Retrieves extended plugin info for general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param info configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
- public void getGeneralNameConfigExtendedPluginInfo(String name,
- boolean isValueConfigured, Vector<String> info);
+ public void getGeneralNameConfigExtendedPluginInfo(String name,
+ boolean isValueConfigured, Vector<String> info);
/**
* Retrieves extended plugin info for general name configuration.
- *
+ *
* @param name configuration name
* @param isValueConfigured true if value is configured
* @param info configuration parameters
* @exception EBaseException failed to create subject alt name configuration
*/
- public void getGeneralNamesConfigExtendedPluginInfo(String name,
- boolean isValueConfigured, Vector<String> info);
+ public void getGeneralNamesConfigExtendedPluginInfo(String name,
+ boolean isValueConfigured, Vector<String> info);
/**
* Created general names configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public IGeneralNamesConfig createGeneralNamesConfig(String name,
- IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException;
+ public IGeneralNamesConfig createGeneralNamesConfig(String name,
+ IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException;
/**
* Created general name constraints configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException;
+ public IGeneralNameAsConstraintsConfig createGeneralNameAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException;
/**
* Created general name constraints configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @param isPolicyEnabled true if policy is enabled
* @exception EBaseException failed to create subject alt name configuration
*/
- public IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
- boolean isPolicyEnabled) throws EBaseException;
+ public IGeneralNamesAsConstraintsConfig createGeneralNamesAsConstraintsConfig(String name, IConfigStore config, boolean isValueConfigured,
+ boolean isPolicyEnabled) throws EBaseException;
/**
* Get default parameters for subject alt name configuration.
- *
+ *
* @param name configuration name
* @param params configuration parameters
*/
- public void getSubjAltNameConfigDefaultParams(String name, Vector<String> params);
+ public void getSubjAltNameConfigDefaultParams(String name, Vector<String> params);
/**
* Get extended plugin info for subject alt name configuration.
- *
+ *
* @param name configuration name
* @param params configuration parameters
*/
- public void getSubjAltNameConfigExtendedPluginInfo(String name, Vector<String> params);
+ public void getSubjAltNameConfigExtendedPluginInfo(String name, Vector<String> params);
/**
* Creates subject alt name configuration.
- *
+ *
* @param name configuration name
* @param config configuration store
* @param isValueConfigured true if value is configured
* @exception EBaseException failed to create subject alt name configuration
*/
- public ISubjAltNameConfig createSubjAltNameConfig(String name, IConfigStore config, boolean isValueConfigured) throws EBaseException;
+ public ISubjAltNameConfig createSubjAltNameConfig(String name, IConfigStore config, boolean isValueConfigured) throws EBaseException;
/**
* Retrieves the HTTP Connection for use with connector.
- *
+ *
* @param authority remote authority
* @param factory socket factory
* @return http connection to the remote authority
*/
public IHttpConnection getHttpConnection(IRemoteAuthority authority,
- ISocketFactory factory);
+ ISocketFactory factory);
/**
* Retrieves the HTTP Connection for use with connector.
- *
+ *
* @param authority remote authority
* @param factory socket factory
* @param timeout return error if connection cannot be established within
- * the timeout period
+ * the timeout period
* @return http connection to the remote authority
*/
public IHttpConnection getHttpConnection(IRemoteAuthority authority,
- ISocketFactory factory, int timeout);
+ ISocketFactory factory, int timeout);
/**
* Retrieves the request sender for use with connector.
- *
+ *
* @param authority local authority
* @param nickname nickname of the client certificate
* @param remote remote authority
@@ -1020,11 +1029,11 @@ public interface ICMSEngine extends ISubsystem {
* @return resender
*/
public IResender getResender(IAuthority authority, String nickname,
- IRemoteAuthority remote, int interval);
+ IRemoteAuthority remote, int interval);
/**
* Retrieves command queue
- *
+ *
* @return command queue
*/
public ICommandQueue getCommandQueue();
@@ -1043,19 +1052,20 @@ public interface ICMSEngine extends ISubsystem {
* Checks to ensure that all new incoming requests have been blocked.
* This method is used for reentrancy protection.
* <P>
- *
+ *
* @return true or false
*/
public boolean areRequestsDisabled();
/**
* Create configuration file.
- *
+ *
* @param path configuration path
* @return configuration store
* @exception EBaseException failed to create file
*/
public IConfigStore createFileConfigStore(String path) throws EBaseException;
+
/**
* Creates argument block.
*/
@@ -1072,31 +1082,31 @@ public interface ICMSEngine extends ISubsystem {
public IArgBlock createArgBlock(Hashtable<String, String> httpReq);
/**
- * Checks against the local certificate repository to see
+ * Checks against the local certificate repository to see
* if the certificates are revoked.
- *
+ *
* @param certificates certificates
- * @return true if certificate is revoked in the local
- * certificate repository
+ * @return true if certificate is revoked in the local
+ * certificate repository
*/
public boolean isRevoked(X509Certificate[] certificates);
/**
* Sets list of verified certificates
- *
+ *
* @param size size of verified certificates list
* @param interval interval in which certificate is not recheck
- * against local certificate repository
+ * against local certificate repository
* @param unknownStateInterval interval in which certificate
- * may not recheck against local certificate repository
+ * may not recheck against local certificate repository
*/
public void setListOfVerifiedCerts(int size, long interval, long unknownStateInterval);
/**
- * Performs graceful shutdown of CMS.
- * Subsystems are shutdown in reverse order.
- * Exceptions are ignored.
- */
+ * Performs graceful shutdown of CMS.
+ * Subsystems are shutdown in reverse order.
+ * Exceptions are ignored.
+ */
public void forceShutdown();
public IPasswordStore getPasswordStore();
@@ -1107,4 +1117,3 @@ public interface ICMSEngine extends ISubsystem {
public String getConfigSDSessionId();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/apps/ICommandQueue.java b/pki/base/common/src/com/netscape/certsrv/apps/ICommandQueue.java
index f41b2989..a165ab46 100644
--- a/pki/base/common/src/com/netscape/certsrv/apps/ICommandQueue.java
+++ b/pki/base/common/src/com/netscape/certsrv/apps/ICommandQueue.java
@@ -21,9 +21,6 @@ import javax.servlet.Servlet;
import com.netscape.cms.servlet.common.CMSRequest;
-
-
-
/**
* This interface represents a command queue for registeration
* and unregisteration proccess for clean shutdown
@@ -34,17 +31,18 @@ public interface ICommandQueue {
/**
* Registers a thread into the command queue.
- *
+ *
* @param currentRequest request object
* @param currentServlet servlet that serves the request object
*/
public boolean registerProcess(CMSRequest currentRequest, Servlet currentServlet);
+
/**
* UnRegisters a thread from the command queue.
- *
+ *
* @param currentRequest request object
* @param currentServlet servlet that serves the request object
*/
public void unRegisterProccess(Object currentRequest, Object currentServlet);
-
+
} // CommandQueue
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthCredentials.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthCredentials.java
index de124a38..1475683e 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthCredentials.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthCredentials.java
@@ -23,10 +23,10 @@ import java.util.Hashtable;
import com.netscape.certsrv.base.IArgBlock;
/**
- * Authentication Credentials as input to the authMgr. It contains all the
+ * Authentication Credentials as input to the authMgr. It contains all the
* information required for authentication in the authMgr.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class AuthCredentials implements IAuthCredentials {
@@ -34,7 +34,7 @@ public class AuthCredentials implements IAuthCredentials {
private static final long serialVersionUID = 5862936214648594328L;
private Hashtable<String, Object> authCreds = null;
private IArgBlock argblk = null;
-
+
/**
* Constructor
*/
@@ -44,6 +44,7 @@ public class AuthCredentials implements IAuthCredentials {
/**
* Sets an authentication credential with credential name and the credential object
+ *
* @param name credential name
* @param cred credential object
*/
@@ -54,7 +55,8 @@ public class AuthCredentials implements IAuthCredentials {
/**
* Returns the credential to which the specified name is mapped in this
- * credential set
+ * credential set
+ *
* @param name credential name
* @return the authentication credential for the given name
*/
@@ -64,8 +66,9 @@ public class AuthCredentials implements IAuthCredentials {
/**
* Removes the name and its corresponding credential from this
- * credential set. This method does nothing if the named
- * credential is not in the credential set.
+ * credential set. This method does nothing if the named
+ * credential is not in the credential set.
+ *
* @param name credential name
*/
public void delete(String name) {
@@ -76,26 +79,27 @@ public class AuthCredentials implements IAuthCredentials {
* Returns an enumeration of the credentials in this credential
* set. Use the Enumeration methods on the returned object to
* fetch the elements sequentially.
+ *
* @return an enumeration of the values in this credential set
*/
public Enumeration<Object> getElements() {
return (authCreds.elements());
}
-
+
/**
* Set the given argblock
-i * @param blk the given argblock.
+ * i * @param blk the given argblock.
*/
public void setArgBlock(IArgBlock blk) {
argblk = blk;
- }
+ }
/**
* Returns the argblock.
+ *
* @return the argblock.
*/
public IArgBlock getArgBlock() {
return argblk;
- }
+ }
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthManagerProxy.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthManagerProxy.java
index f98276ec..76161e80 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthManagerProxy.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthManagerProxy.java
@@ -17,10 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authentication;
-
/**
* A class represents an authentication manager. It contains an
* authentication manager instance and its state (enable or not).
+ *
* @version $Revision$, $Date$
*/
public class AuthManagerProxy {
@@ -29,9 +29,10 @@ public class AuthManagerProxy {
/**
* Constructor
+ *
* @param enable true if the authMgr is enabled; false otherwise
* @param mgr authentication manager instance
- */
+ */
public AuthManagerProxy(boolean enable, IAuthManager mgr) {
mEnable = enable;
mMgr = mgr;
@@ -39,7 +40,8 @@ public class AuthManagerProxy {
/**
* Returns the state of the authentication manager instance
- * @return true if the state of the authentication manager instance is
+ *
+ * @return true if the state of the authentication manager instance is
* enabled; false otherwise.
*/
public boolean isEnable() {
@@ -48,6 +50,7 @@ public class AuthManagerProxy {
/**
* Returns an authentication manager instance.
+ *
* @return an authentication manager instance
*/
public IAuthManager getAuthManager() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthMgrPlugin.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthMgrPlugin.java
index bdb2fe00..4226fd83 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthMgrPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthMgrPlugin.java
@@ -17,13 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authentication;
-
-
-
/**
* This class represents a registered authentication manager plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class AuthMgrPlugin {
@@ -33,6 +30,7 @@ public class AuthMgrPlugin {
/**
* Constructs a AuthManager plugin.
+ *
* @param id auth manager implementation name
* @param classPath class path
*/
@@ -45,9 +43,10 @@ public class AuthMgrPlugin {
mId = id;
mClassPath = classPath;
}
-
+
/**
* Returns an auth manager implementation name
+ *
* @return an auth manager implementation name
*/
public String getId() {
@@ -56,22 +55,25 @@ public class AuthMgrPlugin {
/**
* Returns a classpath of a AuthManager plugin
+ *
* @return a classpath of a AuthManager plugin
*/
public String getClassPath() {
return mClassPath;
}
- /**
+ /**
* Returns a visibility of the plugin
+ *
* @return a visibility of the plugin
*/
public boolean isVisible() {
return mVisible;
}
- /**
+ /**
* Sets visibility of the plugin
+ *
* @param visibility visibility of the plugin
*/
public void setVisible(boolean visibility) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthResources.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthResources.java
index 138a07eb..35e81011 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthResources.java
@@ -22,7 +22,7 @@ import java.util.ListResourceBundle;
/**
* A class represents a resource bundle for the authentication component.
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -30,6 +30,7 @@ public class AuthResources extends ListResourceBundle {
/**
* Returns the content of this resource.
+ *
* @return the contents of this resource
*/
public Object[][] getContents() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
index eae282c0..0a2b1f0a 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/AuthToken.java
@@ -41,10 +41,11 @@ import com.netscape.certsrv.usrgrp.Certificates;
* Authentication token returned by Authentication Managers.
* Upon return, it contains authentication/identification information
* as well as information retrieved from the database where the
- * authentication was done against. Each authentication manager has
- * its own list of such information. See individual authenticaiton
+ * authentication was done against. Each authentication manager has
+ * its own list of such information. See individual authenticaiton
* manager for more details.
* <p>
+ *
* @version $Revision$, $Date$
*/
public class AuthToken implements IAuthToken {
@@ -74,7 +75,7 @@ public class AuthToken implements IAuthToken {
public static final String TOKEN_CERT_TO_REVOKE = "tokenCertToRevoke";
/**
- * Plugin name of the authentication manager that created the
+ * Plugin name of the authentication manager that created the
* AuthToken as a string.
*/
public static final String TOKEN_AUTHMGR_IMPL_NAME = "authMgrImplName";
@@ -86,31 +87,33 @@ public class AuthToken implements IAuthToken {
public static final String TOKEN_AUTHMGR_INST_NAME = "authMgrInstName";
/**
- * Time of authentication as a java.util.Date
+ * Time of authentication as a java.util.Date
*/
public static final String TOKEN_AUTHTIME = "authTime";
/**
* Constructs an instance of a authentication token.
* The token by default contains the following attributes: <br>
+ *
* <pre>
- * "authMgrInstName" - The authentication manager instance name.
- * "authMgrImplName" - The authentication manager plugin name.
- * "authTime" - The - The time of authentication.
+ * "authMgrInstName" - The authentication manager instance name.
+ * "authMgrImplName" - The authentication manager plugin name.
+ * "authTime" - The - The time of authentication.
* </pre>
+ *
* @param authMgr The authentication manager that created this Token.
*/
public AuthToken(IAuthManager authMgr) {
mAttrs = new Hashtable<String, Object>();
if (authMgr != null) {
- set(TOKEN_AUTHMGR_INST_NAME, authMgr.getName());
- set(TOKEN_AUTHMGR_IMPL_NAME, authMgr.getImplName());
+ set(TOKEN_AUTHMGR_INST_NAME, authMgr.getName());
+ set(TOKEN_AUTHMGR_IMPL_NAME, authMgr.getImplName());
}
set(TOKEN_AUTHTIME, new Date());
}
public String getInString(String attrName) {
- return (String)mAttrs.get(attrName);
+ return (String) mAttrs.get(attrName);
}
public boolean set(String attrName, String value) {
@@ -123,6 +126,7 @@ public class AuthToken implements IAuthToken {
/**
* Removes an attribute in the AuthToken
+ *
* @param attrName The name of the attribute to remove.
*/
public void delete(String attrName) {
@@ -131,6 +135,7 @@ public class AuthToken implements IAuthToken {
/**
* Enumerate all attribute names in the AuthToken.
+ *
* @return Enumeration of all attribute names in this AuthToken.
*/
public Enumeration<String> getElements() {
@@ -351,7 +356,7 @@ public class AuthToken implements IAuthToken {
for (int i = 0; i < certArray.length; i++) {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
try {
- X509CertImpl certImpl = (X509CertImpl)certArray[i];
+ X509CertImpl certImpl = (X509CertImpl) certArray[i];
certImpl.encode(byteStream);
derValues[i] = new DerValue(byteStream.toByteArray());
} catch (CertificateEncodingException e) {
@@ -406,6 +411,7 @@ public class AuthToken implements IAuthToken {
/**
* Enumerate all attribute values in the AuthToken.
+ *
* @return Enumeration of all attribute names in this AuthToken.
*/
public Enumeration<Object> getVals() {
@@ -413,10 +419,11 @@ public class AuthToken implements IAuthToken {
}
/**
- * Gets the name of the authentication manager instance that created
- * this token.
- * @return The name of the authentication manager instance that created
+ * Gets the name of the authentication manager instance that created
* this token.
+ *
+ * @return The name of the authentication manager instance that created
+ * this token.
*/
public String getAuthManagerInstName() {
return ((String) mAttrs.get(TOKEN_AUTHMGR_INST_NAME));
@@ -425,8 +432,9 @@ public class AuthToken implements IAuthToken {
/**
* Gets the plugin name of the authentication manager that created this
* token.
+ *
* @return The plugin name of the authentication manager that created this
- * token.
+ * token.
*/
public String getAuthManagerImplName() {
return ((String) mAttrs.get(TOKEN_AUTHMGR_IMPL_NAME));
@@ -434,10 +442,10 @@ public class AuthToken implements IAuthToken {
/**
* Gets the time of authentication.
+ *
* @return The time of authentication
*/
public Date getAuthTime() {
return ((Date) mAttrs.get(TOKEN_AUTHTIME));
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthException.java b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthException.java
index b998ae8b..c79c3e9a 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthException.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthException.java
@@ -22,6 +22,7 @@ import com.netscape.certsrv.base.EBaseException;
/**
* This class represents authentication exceptions.
* <P>
+ *
* @version $Revision$, $Date$
*/
public class EAuthException extends EBaseException {
@@ -38,6 +39,7 @@ public class EAuthException extends EBaseException {
/**
* Constructs an authentication exception
* <P>
+ *
* @param msgFormat exception details
*/
public EAuthException(String msgFormat) {
@@ -45,8 +47,9 @@ public class EAuthException extends EBaseException {
}
/**
- * Constructs an authentication exception with a parameter.
+ * Constructs an authentication exception with a parameter.
* <p>
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -57,6 +60,7 @@ public class EAuthException extends EBaseException {
/**
* Constructs a auth exception with a exception parameter.
* <P>
+ *
* @param msgFormat exception details in message string format
* @param exception system exception
*/
@@ -67,6 +71,7 @@ public class EAuthException extends EBaseException {
/**
* Constructs a auth exception with a list of parameters.
* <P>
+ *
* @param msgFormat the message format.
* @param params list of message format parameters
*/
@@ -76,6 +81,7 @@ public class EAuthException extends EBaseException {
/**
* Returns the resource bundle name
+ *
* @return resource bundle name.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthInternalError.java b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthInternalError.java
index fb4ad04b..52688f92 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthInternalError.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthInternalError.java
@@ -30,6 +30,7 @@ public class EAuthInternalError extends EAuthException {
/**
* Constructs an authentication internal error exception
* with a detailed message.
+ *
* @param errorString Detailed error message.
*/
public EAuthInternalError(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrNotFound.java b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrNotFound.java
index 675fbe59..925aaabf 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrNotFound.java
@@ -29,6 +29,7 @@ public class EAuthMgrNotFound extends EAuthException {
/**
* Constructs a exception for a missing authentication manager
+ *
* @param errorString error string for missing authentication manager
*/
public EAuthMgrNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrPluginNotFound.java
index 2210de2c..2ca90e3c 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrPluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthMgrPluginNotFound.java
@@ -29,7 +29,8 @@ public class EAuthMgrPluginNotFound extends EAuthException {
/**
* Constructs a exception for a missing authentication manager plugin
- * @param errorString error for a missing authentication manager plugin
+ *
+ * @param errorString error for a missing authentication manager plugin
*/
public EAuthMgrPluginNotFound(String errorString) {
super(errorString);
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthUserError.java b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthUserError.java
index b3bafd3c..f816c35e 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EAuthUserError.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EAuthUserError.java
@@ -29,6 +29,7 @@ public class EAuthUserError extends EAuthException {
/**
* Constructs a exception for a Invalid attribute value
+ *
* @param errorString Detailed error message.
*/
public EAuthUserError(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/ECompSyntaxErr.java b/pki/base/common/src/com/netscape/certsrv/authentication/ECompSyntaxErr.java
index edbf13e6..84725bb9 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/ECompSyntaxErr.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/ECompSyntaxErr.java
@@ -29,6 +29,7 @@ public class ECompSyntaxErr extends EAuthException {
/**
* Constructs an component syntax error
+ *
* @param errorString Detailed error message.
*/
public ECompSyntaxErr(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EFormSubjectDN.java b/pki/base/common/src/com/netscape/certsrv/authentication/EFormSubjectDN.java
index b56a1e0a..95282448 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EFormSubjectDN.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EFormSubjectDN.java
@@ -29,6 +29,7 @@ public class EFormSubjectDN extends EAuthException {
/**
* Constructs an Error on formulating the subject dn.
+ *
* @param errorString Detailed error message.
*/
public EFormSubjectDN(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EInvalidCredentials.java b/pki/base/common/src/com/netscape/certsrv/authentication/EInvalidCredentials.java
index 894a07ca..3e4daaf0 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EInvalidCredentials.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EInvalidCredentials.java
@@ -29,6 +29,7 @@ public class EInvalidCredentials extends EAuthException {
/**
* Constructs an Invalid Credentials exception.
+ *
* @param errorString Detailed error message.
*/
public EInvalidCredentials(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/EMissingCredential.java b/pki/base/common/src/com/netscape/certsrv/authentication/EMissingCredential.java
index 695dd15c..5de73aa0 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/EMissingCredential.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/EMissingCredential.java
@@ -29,6 +29,7 @@ public class EMissingCredential extends EAuthException {
/**
* Constructs a exception for a missing required authentication credential
+ *
* @param errorString Detailed error message.
*/
public EMissingCredential(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthCredentials.java b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthCredentials.java
index eb36f996..cd843443 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthCredentials.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthCredentials.java
@@ -24,19 +24,21 @@ import com.netscape.certsrv.base.IAttrSet;
* An interface represents authentication credentials:
* e.g. uid/pwd, uid/pin, certificate, etc.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthCredentials extends IAttrSet {
- /**
+ /**
* Set argblock.
+ *
* @param blk argblock
*/
public void setArgBlock(IArgBlock blk);
/**
* Returns argblock.
+ *
* @return Argblock.
*/
public IArgBlock getArgBlock();
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthManager.java b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthManager.java
index b2f7d69a..1ff46af7 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthManager.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthManager.java
@@ -23,7 +23,7 @@ import com.netscape.certsrv.base.IConfigStore;
/**
* Authentication Manager interface.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthManager {
@@ -41,6 +41,7 @@ public interface IAuthManager {
/**
* Get the name of this authentication manager instance.
* <p>
+ *
* @return the name of this authentication manager.
*/
public String getName();
@@ -48,31 +49,34 @@ public interface IAuthManager {
/**
* Get name of authentication manager plugin.
* <p>
+ *
* @return the name of the authentication manager plugin.
- */
+ */
public String getImplName();
/**
* Authenticate the given credentials.
+ *
* @param authCred The authentication credentials
* @return authentication token
- * @exception EMissingCredential If a required credential for this
- * authentication manager is missing.
+ * @exception EMissingCredential If a required credential for this
+ * authentication manager is missing.
* @exception EInvalidCredentials If credentials cannot be authenticated.
* @exception EBaseException If an internal error occurred.
*/
public IAuthToken authenticate(IAuthCredentials authCred)
- throws EMissingCredential, EInvalidCredentials, EBaseException;
+ throws EMissingCredential, EInvalidCredentials, EBaseException;
/**
* Initialize this authentication manager.
+ *
* @param name The name of this authentication manager instance.
* @param implName The name of the authentication manager plugin.
* @param config The configuration store for this authentication manager.
* @exception EBaseException If an initialization error occurred.
*/
public void init(String name, String implName, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Prepare this authentication manager for a shutdown.
@@ -82,24 +86,26 @@ public interface IAuthManager {
/**
* Gets a list of the required credentials for this authentication manager.
+ *
* @return The required credential attributes.
*/
public String[] getRequiredCreds();
/**
* Get configuration parameters for this implementation.
- * The configuration parameters returned is passed to the
- * configuration console so configuration for instances of this
+ * The configuration parameters returned is passed to the
+ * configuration console so configuration for instances of this
* implementation can be made through the console.
*
* @return a list of configuration parameters.
* @exception EBaseException If an internal error occurred
*/
public String[] getConfigParams()
- throws EBaseException;
+ throws EBaseException;
/**
* Get the configuration store for this authentication manager.
+ *
* @return The configuration store of this authentication manager.
*/
public IConfigStore getConfigStore();
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthSubsystem.java b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthSubsystem.java
index 2de8ed26..329b6802 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthSubsystem.java
@@ -26,7 +26,7 @@ import com.netscape.certsrv.base.ISubsystem;
/**
* An interface that represents an authentication component
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthSubsystem extends ISubsystem {
@@ -39,17 +39,17 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Constant for class.
*/
- public static final String PROP_CLASS = "class";
+ public static final String PROP_CLASS = "class";
/**
* Constant for impl
*/
- public static final String PROP_IMPL = "impl";
+ public static final String PROP_IMPL = "impl";
/**
* Constant for pluginName.
*/
- public static final String PROP_PLUGIN = "pluginName";
+ public static final String PROP_PLUGIN = "pluginName";
/**
* Constant for instance.
@@ -120,6 +120,7 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Authenticate the given credentials using the given manager name.
+ *
* @param authCred The authentication credentials
* @param authMgrName The authentication manager name
* @return a authentication token.
@@ -128,11 +129,12 @@ public interface IAuthSubsystem extends ISubsystem {
* @exception EBaseException If an error occurs during authentication.
*/
public IAuthToken authenticate(IAuthCredentials authCred, String authMgrName)
- throws EMissingCredential, EInvalidCredentials, EBaseException;
+ throws EMissingCredential, EInvalidCredentials, EBaseException;
/**
* Gets the required credential attributes for the given authentication
* manager.
+ *
* @param authMgrName The authentication manager name
* @return a Vector of required credential attribute names.
* @exception EBaseException If the required credential is missing
@@ -141,6 +143,7 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Adds (registers) the given authentication manager.
+ *
* @param name The authentication manager name
* @param authMgr The authentication manager instance.
*/
@@ -148,12 +151,14 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Deletes (deregisters) the given authentication manager.
+ *
* @param name The authentication manager name to delete.
*/
public void delete(String name);
/**
* Gets the Authentication manager instance of the specified name.
+ *
* @param name The authentication manager's name.
* @exception EBaseException when internal error occurs.
*/
@@ -162,18 +167,21 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Gets an enumeration of authentication managers registered to the
* authentication subsystem.
+ *
* @return a list of authentication managers
*/
public Enumeration<IAuthManager> getAuthManagers();
/**
* Gets an enumeration of authentication manager plugins.
+ *
* @return a list of authentication plugins
*/
public Enumeration<AuthMgrPlugin> getAuthManagerPlugins();
/**
* Gets a single authentication manager plugin implementation
+ *
* @param name given authentication plugin name
* @return the given authentication plugin
*/
@@ -181,17 +189,19 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Get configuration parameters for a authentication mgr plugin.
+ *
* @param implName The plugin name.
* @return configuration parameters for the given authentication manager plugin
- * @exception EAuthMgrPluginNotFound If the authentication manager
- * plugin is not found.
+ * @exception EAuthMgrPluginNotFound If the authentication manager
+ * plugin is not found.
* @exception EBaseException If an internal error occurred.
*/
- public String[] getConfigParams(String implName)
- throws EAuthMgrPluginNotFound, EBaseException;
+ public String[] getConfigParams(String implName)
+ throws EAuthMgrPluginNotFound, EBaseException;
/**
* Log error message.
+ *
* @param level log level
* @param msg error message
*/
@@ -199,28 +209,31 @@ public interface IAuthSubsystem extends ISubsystem {
/**
* Get a hashtable containing all authentication plugins.
+ *
* @return all authentication plugins.
*/
public Hashtable<String, AuthMgrPlugin> getPlugins();
/**
* Get a hashtable containing all authentication instances.
+ *
* @return all authentication instances.
*/
public Hashtable<?, ?> getInstances();
/**
* Get an authentication manager interface for the given name.
+ *
* @param name given authentication manager name.
* @return an authentication manager for the given manager name.
*/
public IAuthManager get(String name);
/**
- * Get an authentication manager plugin impl for the given name.
+ * Get an authentication manager plugin impl for the given name.
+ *
* @param name given authentication manager name.
* @return an authentication manager plugin
*/
public AuthMgrPlugin getAuthManagerPluginImpl(String name);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
index 94279363..f46ee3ca 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
@@ -32,14 +32,14 @@ import com.netscape.certsrv.usrgrp.Certificates;
*/
public interface IAuthToken {
- /**
- * Constant for userid.
- */
- public static final String USER_ID = "userid";
+ /**
+ * Constant for userid.
+ */
+ public static final String USER_ID = "userid";
/**
* Sets an attribute value within this AttrSet.
- *
+ *
* @param name the name of the attribute
* @param value the attribute object.
* @return false on an error
@@ -48,7 +48,7 @@ public interface IAuthToken {
/**
* Gets an attribute value.
- *
+ *
* @param name the name of the attribute to return.
* @exception EBaseException on attribute handling errors.
* @return the attribute value
@@ -58,7 +58,7 @@ public interface IAuthToken {
/**
* Returns an enumeration of the names of the attributes existing within
* this AttrSet.
- *
+ *
* @return an enumeration of the attribute names.
*/
public Enumeration<String> getElements();
@@ -70,139 +70,156 @@ public interface IAuthToken {
*/
/**
- * Retrieves the byte array value for name. The value should have been
+ * Retrieves the byte array value for name. The value should have been
* previously stored as a byte array (it will be CMS.AtoB decoded).
- * @param name The attribute name.
- * @return The byte array or null on error.
+ *
+ * @param name The attribute name.
+ * @return The byte array or null on error.
*/
public byte[] getInByteArray(String name);
/**
* Stores the byte array with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on an error
*/
public boolean set(String name, byte[] value);
/**
* Retrieves the Integer value for name.
- * @param name The attribute name.
- * @return The Integer or null on error.
+ *
+ * @param name The attribute name.
+ * @return The Integer or null on error.
*/
public Integer getInInteger(String name);
/**
* Stores the Integer with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on an error
*/
public boolean set(String name, Integer value);
/**
* Retrieves the BigInteger array value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public BigInteger[] getInBigIntegerArray(String name);
/**
* Stores the BigInteger array with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on an error
*/
public boolean set(String name, BigInteger[] value);
/**
* Retrieves the Date value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public Date getInDate(String name);
/**
* Stores the Date with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on an error
*/
public boolean set(String name, Date value);
/**
* Retrieves the String array value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public String[] getInStringArray(String name);
/**
* Stores the String array with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return False on error.
*/
public boolean set(String name, String[] value);
/**
* Retrieves the X509CertImpl value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public X509CertImpl getInCert(String name);
/**
* Stores the X509CertImpl with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on error
*/
public boolean set(String name, X509CertImpl value);
/**
* Retrieves the CertificateExtensions value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public CertificateExtensions getInCertExts(String name);
/**
* Stores the CertificateExtensions with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on error
*/
public boolean set(String name, CertificateExtensions value);
/**
* Retrieves the Certificates value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public Certificates getInCertificates(String name);
/**
* Stores the Certificates with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on error
*/
public boolean set(String name, Certificates value);
/**
* Retrieves the byte[][] value for name.
- * @param name The attribute name.
- * @return The value or null on error.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
*/
public byte[][] getInByteArrayArray(String name);
/**
* Stores the byte[][] with the associated key.
- * @param name The attribute name.
- * @param value The value to store
+ *
+ * @param name The attribute name.
+ * @param value The value to store
* @return false on error
*/
public boolean set(String name, byte[][] value);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/ISSLClientCertProvider.java b/pki/base/common/src/com/netscape/certsrv/authentication/ISSLClientCertProvider.java
index d4bdf7bb..6932decc 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/ISSLClientCertProvider.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/ISSLClientCertProvider.java
@@ -17,18 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authentication;
-
import java.security.cert.X509Certificate;
-
/**
* This interface represents an object that captures the
* SSL client certificate in a SSL session. Normally, this
* object is a servlet.
* <p>
- *
- * This interface is used to avoid the internal imeplemtnation
- * to have servlet (protocol handler) dependency.
+ *
+ * This interface is used to avoid the internal imeplemtnation to have servlet (protocol handler) dependency.
* <p>
*
* @version $Revision$, $Date$
@@ -37,7 +34,7 @@ public interface ISSLClientCertProvider {
/**
* Retrieves the SSL client certificate chain.
- *
+ *
* @return certificate chain
*/
public X509Certificate[] getClientCertificateChain();
diff --git a/pki/base/common/src/com/netscape/certsrv/authentication/ISharedToken.java b/pki/base/common/src/com/netscape/certsrv/authentication/ISharedToken.java
index eae65d17..830c8866 100644
--- a/pki/base/common/src/com/netscape/certsrv/authentication/ISharedToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authentication/ISharedToken.java
@@ -26,6 +26,7 @@ import org.mozilla.jss.pkix.cmc.PKIData;
*/
public interface ISharedToken {
- public String getSharedToken(PKIData cmcData);
- public String getSharedToken(BigInteger serialnum);
+ public String getSharedToken(PKIData cmcData);
+
+ public String getSharedToken(BigInteger serialnum);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/authority/IAuthority.java b/pki/base/common/src/com/netscape/certsrv/authority/IAuthority.java
index 5916ecd0..2875e4dd 100644
--- a/pki/base/common/src/com/netscape/certsrv/authority/IAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/authority/IAuthority.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authority;
-
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.request.IRequestListener;
import com.netscape.certsrv.request.IRequestQueue;
-
/**
* Authority interface.
- *
+ *
* @version $Revision$ $Date$
*/
public interface IAuthority extends ISubsystem {
@@ -33,6 +31,7 @@ public interface IAuthority extends ISubsystem {
/**
* Retrieves the request queue for the Authority.
* <P>
+ *
* @return the request queue.
*/
public IRequestQueue getRequestQueue();
diff --git a/pki/base/common/src/com/netscape/certsrv/authority/ICertAuthority.java b/pki/base/common/src/com/netscape/certsrv/authority/ICertAuthority.java
index 94d6df40..c2f2c91e 100644
--- a/pki/base/common/src/com/netscape/certsrv/authority/ICertAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/authority/ICertAuthority.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authority;
-
import netscape.security.x509.CertificateChain;
import netscape.security.x509.X500Name;
import netscape.security.x509.X509CertImpl;
@@ -27,12 +26,11 @@ import com.netscape.certsrv.logging.ILogger;
import com.netscape.certsrv.publish.IPublisherProcessor;
import com.netscape.certsrv.request.IRequestListener;
-
/**
* Authority that handles certificates needed by the cert registration
- * servlets.
+ * servlets.
* <P>
- *
+ *
* @version $Revision$ $Date$
*/
public interface ICertAuthority extends IAuthority {
@@ -40,7 +38,7 @@ public interface ICertAuthority extends IAuthority {
/**
* Retrieves the certificate repository for this authority.
* <P>
- *
+ *
* @return the certificate repository.
*/
public ICertificateRepository getCertificateRepository();
@@ -48,6 +46,7 @@ public interface ICertAuthority extends IAuthority {
/**
* Returns CA's certificate chain.
* <P>
+ *
* @return the Certificate Chain for the CA.
*/
public CertificateChain getCACertChain();
@@ -55,18 +54,19 @@ public interface ICertAuthority extends IAuthority {
/**
* Returns CA's certificate implementaion.
* <P>
+ *
* @return CA's certificate.
*/
public X509CertImpl getCACert();
/**
* Returns signing algorithms supported by the CA.
- * Dependent on CA's key type and algorithms supported by security lib.
+ * Dependent on CA's key type and algorithms supported by security lib.
*/
public String[] getCASigningAlgorithms();
/**
- * Returns authority's X500 Name. - XXX what's this for ??
+ * Returns authority's X500 Name. - XXX what's this for ??
*/
public X500Name getX500Name();
@@ -86,15 +86,15 @@ public interface ICertAuthority extends IAuthority {
public void registerPendingListener(IRequestListener l);
/**
- * get authority's publishing module if any.
+ * get authority's publishing module if any.
*/
public IPublisherProcessor getPublisherProcessor();
-
+
/**
* Returns the logging interface for this authority.
* Using this interface both System and Audit events can be
* logged.
- *
+ *
*/
public ILogger getLogger();
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzManagerProxy.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzManagerProxy.java
index 0960311e..58a5264b 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzManagerProxy.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzManagerProxy.java
@@ -17,10 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
/**
* A class represents an authorization manager. It contains an
* authorization manager instance and its state (enable or not).
+ *
* @version $Revision$, $Date$
*/
public class AuthzManagerProxy {
@@ -29,9 +29,10 @@ public class AuthzManagerProxy {
/**
* Constructor
+ *
* @param enable true if the authzMgr is enabled; false otherwise
* @param mgr authorization manager instance
- */
+ */
public AuthzManagerProxy(boolean enable, IAuthzManager mgr) {
mEnable = enable;
mMgr = mgr;
@@ -39,6 +40,7 @@ public class AuthzManagerProxy {
/**
* Returns the state of the authorization manager instance
+ *
* @return true if the state of the authorization manager instance is
* enabled; false otherwise.
*/
@@ -48,6 +50,7 @@ public class AuthzManagerProxy {
/**
* Returns an authorization manager instance.
+ *
* @return an authorization manager instance
*/
public IAuthzManager getAuthzManager() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java
index aebe9170..e47e5817 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzMgrPlugin.java
@@ -17,13 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
-
-
/**
* This class represents a registered authorization manager plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class AuthzMgrPlugin {
@@ -33,6 +30,7 @@ public class AuthzMgrPlugin {
/**
* Constructs a AuthzManager plugin.
+ *
* @param id authz manager implementation name
* @param classPath class path
*/
@@ -40,9 +38,10 @@ public class AuthzMgrPlugin {
mId = id;
mClassPath = classPath;
}
-
+
/**
* Returns an authorization manager implementation name
+ *
* @return an authorization manager implementation name
*/
public String getId() {
@@ -51,6 +50,7 @@ public class AuthzMgrPlugin {
/**
* Returns a classpath of a AuthzManager plugin
+ *
* @return a classpath of a AuthzManager plugin
*/
public String getClassPath() {
@@ -59,6 +59,7 @@ public class AuthzMgrPlugin {
/**
* Returns a visibility of the plugin
+ *
* @return a visibility of the plugin
*/
public boolean isVisible() {
@@ -67,6 +68,7 @@ public class AuthzMgrPlugin {
/**
* Sets visibility of the plugin
+ *
* @param visibility visibility of the plugin
*/
public void setVisible(boolean visibility) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzResources.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzResources.java
index 7cb5240a..13d33c21 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzResources.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for the authorization subsystem
* <P>
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -31,6 +30,7 @@ public class AuthzResources extends ListResourceBundle {
/**
* Returns the content of this resource.
+ *
* @return the content of this resource
*/
public Object[][] getContents() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java
index 0b5db00a..b6e2d144 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/AuthzToken.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
import java.util.Date;
import java.util.Enumeration;
import java.util.Hashtable;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* Authorization token returned by Authorization Managers.
* Upon return, it contains the name of the authorization manager that create
@@ -32,6 +30,7 @@ import com.netscape.certsrv.base.IAttrSet;
* authorization happened, name of the resource, type of operation performed
* on the resource.
* <p>
+ *
* @version $Revision$, $Date$
*/
public class AuthzToken implements IAttrSet {
@@ -39,7 +38,7 @@ public class AuthzToken implements IAttrSet {
private Hashtable<String, Object> mAttrs = null;
/**
- * Plugin name of the authorization manager that created the
+ * Plugin name of the authorization manager that created the
* AuthzToken as a string.
*/
public static final String TOKEN_AUTHZMGR_IMPL_NAME = "authzMgrImplName";
@@ -51,7 +50,7 @@ public class AuthzToken implements IAttrSet {
public static final String TOKEN_AUTHZMGR_INST_NAME = "authzMgrInstName";
/**
- * Time of authorization as a java.util.Date
+ * Time of authorization as a java.util.Date
*/
public static final String TOKEN_AUTHZTIME = "authzTime";
@@ -61,7 +60,7 @@ public class AuthzToken implements IAttrSet {
public static final String TOKEN_AUTHZ_RESOURCE = "authzRes";
/**
- * name of the operation
+ * name of the operation
*/
public static final String TOKEN_AUTHZ_OPERATION = "authzOp";
@@ -69,33 +68,36 @@ public class AuthzToken implements IAttrSet {
* Status of the authorization evaluation
*/
public static final String TOKEN_AUTHZ_STATUS = "status";
-
+
/**
- * Constant for the success status of the authorization evaluation.
+ * Constant for the success status of the authorization evaluation.
*/
public static final String AUTHZ_STATUS_SUCCESS = "statusSuccess";
/**
* Constructs an instance of a authorization token.
* The token by default contains the following attributes: <br>
+ *
* <pre>
- * "authzMgrInstName" - The authorization manager instance name.
- * "authzMgrImplName" - The authorization manager plugin name.
- * "authzTime" - The - The time of authorization.
+ * "authzMgrInstName" - The authorization manager instance name.
+ * "authzMgrImplName" - The authorization manager plugin name.
+ * "authzTime" - The - The time of authorization.
* </pre>
+ *
* @param authzMgr The authorization manager that created this Token.
*/
public AuthzToken(IAuthzManager authzMgr) {
mAttrs = new Hashtable<String, Object>();
- mAttrs.put(TOKEN_AUTHZMGR_INST_NAME, authzMgr.getName());
- mAttrs.put(TOKEN_AUTHZMGR_IMPL_NAME, authzMgr.getImplName());
+ mAttrs.put(TOKEN_AUTHZMGR_INST_NAME, authzMgr.getName());
+ mAttrs.put(TOKEN_AUTHZMGR_IMPL_NAME, authzMgr.getImplName());
mAttrs.put(TOKEN_AUTHZTIME, new Date());
}
/**
* Get the value of an attribute in the AuthzToken
+ *
* @param attrName The attribute name
- * @return The value of attrName if any.
+ * @return The value of attrName if any.
*/
public Object get(String attrName) {
return mAttrs.get(attrName);
@@ -103,7 +105,8 @@ public class AuthzToken implements IAttrSet {
/**
* Used by an Authorization manager to set an attribute and value
- * in the AuthzToken.
+ * in the AuthzToken.
+ *
* @param attrName The name of the attribute
* @param value The value of the attribute to set.
*/
@@ -113,6 +116,7 @@ public class AuthzToken implements IAttrSet {
/**
* Removes an attribute in the AuthzToken
+ *
* @param attrName The name of the attribute to remove.
*/
public void delete(String attrName) {
@@ -121,6 +125,7 @@ public class AuthzToken implements IAttrSet {
/**
* Enumerate all attribute names in the AuthzToken.
+ *
* @return Enumeration of all attribute names in this AuthzToken.
*/
public Enumeration<String> getElements() {
@@ -129,6 +134,7 @@ public class AuthzToken implements IAttrSet {
/**
* Enumerate all attribute values in the AuthzToken.
+ *
* @return Enumeration of all attribute names in this AuthzToken.
*/
public Enumeration<Object> getVals() {
@@ -136,10 +142,11 @@ public class AuthzToken implements IAttrSet {
}
/**
- * Gets the name of the authorization manager instance that created
- * this token.
- * @return The name of the authorization manager instance that created
+ * Gets the name of the authorization manager instance that created
* this token.
+ *
+ * @return The name of the authorization manager instance that created
+ * this token.
*/
public String getAuthzManagerInstName() {
return ((String) mAttrs.get(TOKEN_AUTHZMGR_INST_NAME));
@@ -148,8 +155,9 @@ public class AuthzToken implements IAttrSet {
/**
* Gets the plugin name of the authorization manager that created this
* token.
+ *
* @return The plugin name of the authorization manager that created this
- * token.
+ * token.
*/
public String getAuthzManagerImplName() {
return ((String) mAttrs.get(TOKEN_AUTHZMGR_IMPL_NAME));
@@ -157,10 +165,10 @@ public class AuthzToken implements IAttrSet {
/**
* Gets the time of authorization.
+ *
* @return The time of authorization
*/
public Date getAuthzTime() {
return ((Date) mAttrs.get(TOKEN_AUTHZTIME));
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzAccessDenied.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzAccessDenied.java
index 18429c98..9fc7777c 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzAccessDenied.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzAccessDenied.java
@@ -29,9 +29,10 @@ public class EAuthzAccessDenied extends EAuthzException {
/**
* Constructs a exception for access denied by Authz manager
+ *
* @param errorString Detailed error message.
*/
public EAuthzAccessDenied(String errorString) {
- super(errorString);
+ super(errorString);
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzException.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzException.java
index 869a021c..65d95a57 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzException.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzException.java
@@ -17,12 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
import com.netscape.certsrv.base.EBaseException;
/**
* This class represents authorization exceptions.
* <P>
+ *
* @version $Revision$, $Date$
*/
public class EAuthzException extends EBaseException {
@@ -39,6 +39,7 @@ public class EAuthzException extends EBaseException {
/**
* Constructs a authz exception
* <P>
+ *
* @param msgFormat exception details
*/
public EAuthzException(String msgFormat) {
@@ -46,8 +47,9 @@ public class EAuthzException extends EBaseException {
}
/**
- * Constructs a authz exception with a parameter.
+ * Constructs a authz exception with a parameter.
* <p>
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -58,6 +60,7 @@ public class EAuthzException extends EBaseException {
/**
* Constructs a authz exception with a exception parameter.
* <P>
+ *
* @param msgFormat exception details in message string format
* @param param system exception
*/
@@ -68,6 +71,7 @@ public class EAuthzException extends EBaseException {
/**
* Constructs a authz exception with a list of parameters.
* <P>
+ *
* @param msgFormat the message format.
* @param params list of message format parameters
*/
@@ -77,6 +81,7 @@ public class EAuthzException extends EBaseException {
/**
* Returns the resource bundle name
+ *
* @return resource bundle name
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzInternalError.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzInternalError.java
index ff7da13d..2afe2c74 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzInternalError.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzInternalError.java
@@ -29,6 +29,7 @@ public class EAuthzInternalError extends EAuthzException {
/**
* Constructs an authorization internal error exception
+ *
* @param errorString error with a detailed message.
*/
public EAuthzInternalError(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrNotFound.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrNotFound.java
index 944b9854..a920d37a 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrNotFound.java
@@ -29,6 +29,7 @@ public class EAuthzMgrNotFound extends EAuthzException {
/**
* Constructs a exception for a missing required authorization manager
+ *
* @param errorString Detailed error message.
*/
public EAuthzMgrNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrPluginNotFound.java
index b44e4711..43ae6edc 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrPluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzMgrPluginNotFound.java
@@ -29,6 +29,7 @@ public class EAuthzMgrPluginNotFound extends EAuthzException {
/**
* Constructs a exception for a missing authorization plugin
+ *
* @param errorString Detailed error message.
*/
public EAuthzMgrPluginNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownOperation.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownOperation.java
index 025306cb..ce061ddd 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownOperation.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownOperation.java
@@ -29,6 +29,7 @@ public class EAuthzUnknownOperation extends EAuthzException {
/**
* Constructs a exception for an operation unknown to the authorization manager
+ *
* @param errorString Detailed error message.
*/
public EAuthzUnknownOperation(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownProtectedRes.java b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownProtectedRes.java
index 4d7695a8..5cb2d727 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownProtectedRes.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/EAuthzUnknownProtectedRes.java
@@ -29,6 +29,7 @@ public class EAuthzUnknownProtectedRes extends EAuthzException {
/**
* Constructs a exception for a protected resource unknown to the authorization manager
+ *
* @param errorString Detailed error message.
*/
public EAuthzUnknownProtectedRes(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java
index 25a66505..70e4b7c0 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzManager.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.authorization;
-
import java.util.Enumeration;
import java.util.Hashtable;
@@ -29,12 +28,11 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.evaluators.IAccessEvaluator;
-
/**
* Authorization Manager interface needs to be implemented by all
- * authorization managers.
+ * authorization managers.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthzManager {
@@ -42,6 +40,7 @@ public interface IAuthzManager {
/**
* Get the name of this authorization manager instance.
* <p>
+ *
* @return String the name of this authorization manager.
*/
public String getName();
@@ -50,29 +49,29 @@ public interface IAuthzManager {
* Get implementation name of authorization manager plugin.
* <p>
* An example of an implementation name will be:
+ *
* <PRE>
* com.netscape.cms.BasicAclAuthz
* </PRE>
* <p>
+ *
* @return The name of the authorization manager plugin.
- */
+ */
public String getImplName();
/**
* <code>accessInit</code> is for servlets who want to initialize their
- * own authorization information before full operation. It is supposed
+ * own authorization information before full operation. It is supposed
* to be called from the authzMgrAccessInit() method of the AuthzSubsystem.
* <p>
- * The accessInfo format is determined by each individual
- * authzmgr. For example, for BasicAclAuthz,
- * The accessInfo is the resACLs, whose format should conform
- * to the following:
+ * The accessInfo format is determined by each individual authzmgr. For example, for BasicAclAuthz, The accessInfo is the resACLs, whose format should conform to the following:
+ *
* <pre>
* <resource ID>:right-1[,right-n]:[allow,deny](right(s))<evaluatorType>=<value>:<comment for this resource acl
* </pre>
* <P>
- * Example:
- * resTurnKnob:left,right:allow(left) group="lefties":door knobs for lefties
+ * Example: resTurnKnob:left,right:allow(left) group="lefties":door knobs for lefties
+ *
* @param accessInfo the access info string in the format specified in the authorization manager
* @exception EBaseException error parsing the accessInfo
*/
@@ -81,6 +80,7 @@ public interface IAuthzManager {
/**
* Check if the user is authorized to perform the given operation on the
* given resource.
+ *
* @param authToken the authToken associated with a user.
* @param resource - the protected resource name
* @param operation - the protected resource operation name
@@ -89,20 +89,21 @@ public interface IAuthzManager {
* @exception EAuthzAccessDenied if access denied
*/
public AuthzToken authorize(IAuthToken authToken, String resource, String operation)
- throws EAuthzInternalError, EAuthzAccessDenied;
+ throws EAuthzInternalError, EAuthzAccessDenied;
public AuthzToken authorize(IAuthToken authToken, String expression)
- throws EAuthzInternalError, EAuthzAccessDenied;
+ throws EAuthzInternalError, EAuthzAccessDenied;
/**
* Initialize this authorization manager.
+ *
* @param name The name of this authorization manager instance.
* @param implName The name of the authorization manager plugin.
* @param config The configuration store for this authorization manager.
* @exception EBaseException If an initialization error occurred.
*/
public void init(String name, String implName, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Prepare this authorization manager for a graceful shutdown.
@@ -112,30 +113,33 @@ public interface IAuthzManager {
/**
* Get configuration parameters for this implementation.
- * The configuration parameters returned is passed to the
- * console so configuration for instances of this
+ * The configuration parameters returned is passed to the
+ * console so configuration for instances of this
* implementation can be made through the console.
*
* @return a list of names for configuration parameters.
* @exception EBaseException If an internal error occurred
*/
public String[] getConfigParams()
- throws EBaseException;
+ throws EBaseException;
/**
* Get the configuration store for this authorization manager.
+ *
* @return The configuration store of this authorization manager.
*/
public IConfigStore getConfigStore();
/**
* Get ACL entries
+ *
* @return enumeration of ACL entries.
*/
public Enumeration<ACL> getACLs();
/**
* Get individual ACL entry for the given name of entry.
+ *
* @param target The name of the ACL entry
* @return The ACL entry.
*/
@@ -143,23 +147,26 @@ public interface IAuthzManager {
/**
* Update ACLs in the database
+ *
* @param id The name of the ACL entry (ie, resource id)
* @param rights The allowable rights for this resource
* @param strACLs The value of the ACL entry
* @param desc The description for this resource
* @exception EACLsException when update fails.
*/
- public void updateACLs(String id, String rights, String strACLs,
- String desc) throws EACLsException;
+ public void updateACLs(String id, String rights, String strACLs,
+ String desc) throws EACLsException;
/**
* Get all registered evaluators.
+ *
* @return All registered evaluators.
*/
public Enumeration<IAccessEvaluator> aclEvaluatorElements();
/**
* Register new evaluator
+ *
* @param type Type of evaluator
* @param evaluator Value of evaluator
*/
@@ -167,8 +174,8 @@ public interface IAuthzManager {
/**
* Return a table of evaluators
+ *
* @return A table of evaluators
*/
- public Hashtable<String, IAccessEvaluator> getAccessEvaluators();
+ public Hashtable<String, IAccessEvaluator> getAccessEvaluators();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java
index 281a11a2..d8ccc8a8 100644
--- a/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/authorization/IAuthzSubsystem.java
@@ -27,11 +27,11 @@ import com.netscape.certsrv.base.ISubsystem;
/**
* An interface that represents an authorization component
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthzSubsystem extends ISubsystem {
-
+
/**
* Constant for auths.
*/
@@ -40,17 +40,17 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Constant for class.
*/
- public static final String PROP_CLASS = "class";
+ public static final String PROP_CLASS = "class";
/**
* Constant for impl
*/
- public static final String PROP_IMPL = "impl";
+ public static final String PROP_IMPL = "impl";
/**
* Constant for pluginName.
*/
- public static final String PROP_PLUGIN = "pluginName";
+ public static final String PROP_PLUGIN = "pluginName";
/**
* Constant for instance.
@@ -60,6 +60,7 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* authorize the user associated with the given authToken for a given
* operation with the given authorization manager name
+ *
* @param authzMgrName The authorization manager name
* @param authToken the authenticaton token associated with a user
* @param resource the resource protected by the authorization system
@@ -68,14 +69,15 @@ public interface IAuthzSubsystem extends ISubsystem {
* @exception EBaseException If an error occurs during authorization.
*/
public AuthzToken authorize(String authzMgrName, IAuthToken authToken,
- String resource, String operation)
- throws EBaseException;
+ String resource, String operation)
+ throws EBaseException;
public AuthzToken authorize(String authzMgrName, IAuthToken authToken,
- String exp) throws EBaseException;
+ String exp) throws EBaseException;
/**
* Adds (registers) the given authorization manager.
+ *
* @param name The authorization manager name
* @param authzMgr The authorization manager instance.
*/
@@ -83,12 +85,14 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Deletes (deregisters) the given authorization manager.
+ *
* @param name The authorization manager name to delete.
*/
public void delete(String name);
/**
* Gets the Authorization manager instance of the specified name.
+ *
* @param name The authorization manager's name.
* @return an authorization manager interface
*/
@@ -97,6 +101,7 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Gets an enumeration of authorization managers registered to the
* authorization component.
+ *
* @return a list of authorization managers
*/
public Enumeration<IAuthzManager> getAuthzManagers();
@@ -112,12 +117,14 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Gets an enumeration of authorization manager plugins.
+ *
* @return list of authorization manager plugins
*/
- public Enumeration<AuthzMgrPlugin> getAuthzManagerPlugins();
+ public Enumeration<AuthzMgrPlugin> getAuthzManagerPlugins();
/**
* Gets a single authorization manager plugin implementation
+ *
* @param name given authorization plugin name
* @return authorization manager plugin
*/
@@ -125,6 +132,7 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Log error message.
+ *
* @param level log level
* @param msg error message
*/
@@ -132,21 +140,23 @@ public interface IAuthzSubsystem extends ISubsystem {
/**
* Get a hashtable containing all authentication plugins.
+ *
* @return all authentication plugins.
*/
public Hashtable<String, AuthzMgrPlugin> getPlugins();
/**
* Get a hashtable containing all authentication instances.
+ *
* @return all authentication instances.
*/
public Hashtable<String, AuthzManagerProxy> getInstances();
/**
* Get an authorization manager interface for the given name.
+ *
* @param name given authorization manager name.
* @return an authorization manager interface
*/
public IAuthzManager get(String name);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java b/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java
index ea334230..2b4c6d15 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ASubsystem.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
/**
* This class represents a basic subsystem. Each basic
- * subsystem is named with an identifier and has a
+ * subsystem is named with an identifier and has a
* configuration store.
- *
+ *
* @version $Revision$, $Date$
*/
public abstract class ASubsystem implements ISubsystem {
@@ -33,7 +32,7 @@ public abstract class ASubsystem implements ISubsystem {
/**
* Initializes this subsystem.
- *
+ *
* @param parent parent subsystem
* @param cfg configuration store
*/
@@ -44,7 +43,7 @@ public abstract class ASubsystem implements ISubsystem {
/**
* Retrieves the configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore() {
@@ -53,7 +52,7 @@ public abstract class ASubsystem implements ISubsystem {
/**
* Sets the identifier of this subsystem.
- *
+ *
* @param id subsystem identifier
*/
public void setId(String id) {
@@ -62,7 +61,7 @@ public abstract class ASubsystem implements ISubsystem {
/**
* Retrieves the subsystem identifier.
- *
+ *
* @return subsystem identifier
*/
public String getId() {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java b/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java
index 786148a0..5b6db131 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/AttributeNameHelper.java
@@ -17,25 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
/**
- * AttributeNameHelper. This Helper class used to decompose
+ * AttributeNameHelper. This Helper class used to decompose
* dot-separated attribute name into prefix and suffix.
- *
+ *
* @version $Revision$, $Date$
*/
public class AttributeNameHelper {
// Public members
private static final char SEPARATOR = '.';
-
+
// Private data members
private String prefix = null;
private String suffix = null;
-
+
/**
* Default constructor for the class. Name is of the form
* "proofOfPosession.type".
- *
+ *
* @param name the attribute name.
*/
public AttributeNameHelper(String name) {
@@ -51,20 +50,19 @@ public class AttributeNameHelper {
/**
* Return the prefix of the name.
- *
+ *
* @return attribute prefix
*/
public String getPrefix() {
return (prefix);
}
-
+
/**
* Return the suffix of the name.
- *
+ *
* @return attribute suffix
*/
public String getSuffix() {
return (suffix);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java b/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java
index f54f1377..41159481 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/BaseResources.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for the entire
* system.
* <P>
- *
+ *
* @version $Revision$, $Date$
* @see java.util.ListResourceBundle
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java b/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java
index e58aaca2..26def60f 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/EBaseException.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Locale;
-
/**
- * An exception with localizable error messages. It is the
- * base class for all exceptions in certificate server.
+ * An exception with localizable error messages. It is the
+ * base class for all exceptions in certificate server.
* <P>
- *
+ *
* @version $Revision$, $Date$
* @see java.text.MessageFormat
* @see com.netscape.certsrv.base.BaseResources
@@ -50,11 +48,12 @@ public class EBaseException extends Exception {
/**
* Constructs an instance of this exception with the given resource key.
- * If resource key is not found in the resource bundle, the resource key
+ * If resource key is not found in the resource bundle, the resource key
* specified is used as the error message.
+ *
* <pre>
- * new EBaseException(BaseResources.PERMISSION_DENIED);
- * new EBaseException("An plain error message");
+ * new EBaseException(BaseResources.PERMISSION_DENIED);
+ * new EBaseException(&quot;An plain error message&quot;);
* <P>
* @param msgFormat The error message resource key.
*/
@@ -65,11 +64,13 @@ public class EBaseException extends Exception {
/**
* Constructs an instance of this exception with the given resource key
- * and a parameter as a string.
+ * and a parameter as a string.
+ *
* <PRE>
- * new EBaseException(BaseResource.NO_CONFIG_FILE, fileName);
+ * new EBaseException(BaseResource.NO_CONFIG_FILE, fileName);
* </PRE>
* <P>
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -80,8 +81,9 @@ public class EBaseException extends Exception {
}
/**
- * Constructs an instance of the exception given the resource key and
- * a exception parameter.
+ * Constructs an instance of the exception given the resource key and
+ * a exception parameter.
+ *
* <PRE>
* try {
* ...
@@ -90,6 +92,7 @@ public class EBaseException extends Exception {
* }
* </PRE>
* <P>
+ *
* @param msgFormat The resource key
* @param param The parameter as an exception
*/
@@ -103,6 +106,7 @@ public class EBaseException extends Exception {
* Constructs an instance of this exception given the resource key and
* an array of parameters.
* <P>
+ *
* @param msgFormat The resource key
* @param params Array of params
*/
@@ -114,7 +118,7 @@ public class EBaseException extends Exception {
/**
* Returns the list of parameters.
* <P>
- *
+ *
* @return List of parameters.
*/
public Object[] getParameters() {
@@ -124,6 +128,7 @@ public class EBaseException extends Exception {
/**
* Returns the exception string in the default locale.
* <P>
+ *
* @return The exception string in the default locale.
*/
public String toString() {
@@ -133,6 +138,7 @@ public class EBaseException extends Exception {
/**
* Returns the exception string in the given locale.
* <P>
+ *
* @param locale The locale
* @return The exception string in the given locale.
*/
@@ -143,6 +149,7 @@ public class EBaseException extends Exception {
/**
* Returns the given resource bundle name.
+ *
* @return the name of the resource bundle for this class.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java
index 938c9fff..46630658 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotDefined.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
/**
- * This class represents an exception thrown when a
+ * This class represents an exception thrown when a
* property is not defined (empty string) the configuration store.
* It extends EBaseException and uses the same resource bundle.
* <p>
- *
+ *
* @version $Revision$, $Date$
* @see com.netscape.certsrv.base.EBaseException
*/
@@ -38,6 +37,7 @@ public class EPropertyNotDefined extends EBaseException {
* Constructs an instance of this exception given the name of the
* property that's not found.
* <p>
+ *
* @param errorString Detailed error message.
*/
public EPropertyNotDefined(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java
index 833a393a..5a8a9550 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/EPropertyNotFound.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
/**
- * This class represents an exception thrown when a
+ * This class represents an exception thrown when a
* property is not found in the configuration store.
* It extends EBaseException and uses the same resource bundle.
* <p>
- *
+ *
* @version $Revision$, $Date$
* @see com.netscape.certsrv.base.EBaseException
*/
@@ -38,6 +37,7 @@ public class EPropertyNotFound extends EBaseException {
* Constructs an instance of this exception given the name of the
* property that's not found.
* <p>
+ *
* @param errorString Detailed error message.
*/
public EPropertyNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java b/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java
index a0399d34..86f5999d 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ExtendedPluginInfo.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Locale;
-
/**
* Plugin which can return extended information to console
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class ExtendedPluginInfo implements IExtendedPluginInfo {
@@ -33,7 +31,7 @@ public class ExtendedPluginInfo implements IExtendedPluginInfo {
/**
* Constructs an extended plugin info object.
- *
+ *
* @param epi plugin info list
*/
public ExtendedPluginInfo(String epi[]) {
@@ -41,48 +39,48 @@ public class ExtendedPluginInfo implements IExtendedPluginInfo {
}
/**
- * This method returns an array of strings. Each element of the
- * array represents a configurable parameter, or some other
- * meta-info (such as help-token)
+ * This method returns an array of strings. Each element of the
+ * array represents a configurable parameter, or some other
+ * meta-info (such as help-token)
+ *
+ * there is an entry indexed on that parameter name
+ * <param-name>;<type_info>[,required];<description>;...
+ *
+ * Where:
+ *
+ * type_info is either 'string', 'number', 'boolean', 'password' or
+ * 'choice(ch1,ch2,ch3,...)'
+ *
+ * If the marker 'required' is included after the type_info,
+ * the parameter will has some visually distinctive marking in
+ * the UI.
+ *
+ * 'description' is a short sentence describing the parameter
+ * 'choice' is rendered as a drop-down list. The first parameter in the
+ * list will be activated by default
+ * 'boolean' is rendered as a checkbox. The resulting parameter will be
+ * either 'true' or 'false'
+ * 'string' allows any characters
+ * 'number' allows only numbers
+ * 'password' is rendered as a password field (the characters are replaced
+ * with *'s when being types. This parameter is not passed through to
+ * the plugin. It is instead inserted directly into the password cache
+ * keyed on the instance name. The value of the parameter
+ * 'bindPWPrompt' (see example below) is set to the key.
+ *
+ * In addition to the configurable parameters, the following magic parameters
+ * may be defined:
+ *
+ * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin
+ * HELP_TEXT;helptext - a general help string describing the plugin
*
- * there is an entry indexed on that parameter name
- * <param-name>;<type_info>[,required];<description>;...
- *
- * Where:
- *
- * type_info is either 'string', 'number', 'boolean', 'password' or
- * 'choice(ch1,ch2,ch3,...)'
- *
- * If the marker 'required' is included after the type_info,
- * the parameter will has some visually distinctive marking in
- * the UI.
+ * For example:
+ * "username;string;The username you wish to login as"
+ * "bindPWPrompt;password;Enter password to bind as above user with"
+ * "algorithm;choice(RSA,DSA);Which algorithm do you want to use"
+ * "enable;boolean;Do you want to run this plugin"
+ * "port;number;Which port number do you want to use"
*
- * 'description' is a short sentence describing the parameter
- * 'choice' is rendered as a drop-down list. The first parameter in the
- * list will be activated by default
- * 'boolean' is rendered as a checkbox. The resulting parameter will be
- * either 'true' or 'false'
- * 'string' allows any characters
- * 'number' allows only numbers
- * 'password' is rendered as a password field (the characters are replaced
- * with *'s when being types. This parameter is not passed through to
- * the plugin. It is instead inserted directly into the password cache
- * keyed on the instance name. The value of the parameter
- * 'bindPWPrompt' (see example below) is set to the key.
- *
- * In addition to the configurable parameters, the following magic parameters
- * may be defined:
- *
- * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin
- * HELP_TEXT;helptext - a general help string describing the plugin
- *
- * For example:
- * "username;string;The username you wish to login as"
- * "bindPWPrompt;password;Enter password to bind as above user with"
- * "algorithm;choice(RSA,DSA);Which algorithm do you want to use"
- * "enable;boolean;Do you want to run this plugin"
- * "port;number;Which port number do you want to use"
- *
*/
public String[] getExtendedPluginInfo(Locale locale) {
return _epi;
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java b/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java
index 65ca140e..adddccba 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IArgBlock.java
@@ -23,32 +23,32 @@ import java.util.Enumeration;
import netscape.security.pkcs.PKCS10;
-
/**
* This interface defines the abstraction for the generic collection
* of attributes indexed by string names.
* Set of cooperating implementations of this interface may exploit
* dot-separated attribute names to provide seamless access to the
- * attributes of attribute value which also implements AttrSet
+ * attributes of attribute value which also implements AttrSet
* interface as if it was direct attribute of the container
* E.g., ((AttrSet)container.get("x")).get("y") is equivalent to
* container.get("x.y");
* <p>
- *
+ *
* @version $Revision$, $Date$
**/
public interface IArgBlock extends Serializable {
/**
* Checks if this argument block contains the given key.
- *
+ *
* @param n key
* @return true if key is present
*/
public boolean isValuePresent(String n);
+
/**
* Adds string-based value into this argument block.
- *
+ *
* @param n key
* @param v value
* @return value
@@ -57,7 +57,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as string.
- *
+ *
* @param n key
* @return argument value as string
* @exception EBaseException failed to retrieve value
@@ -66,7 +66,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as string.
- *
+ *
* @param n key
* @param def default value to be returned if key is not present
* @return argument value as string
@@ -75,16 +75,16 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as integer.
- *
+ *
* @param n key
* @return argument value as int
* @exception EBaseException failed to retrieve value
*/
- public int getValueAsInt(String n) throws EBaseException;
+ public int getValueAsInt(String n) throws EBaseException;
/**
* Retrieves argument value as integer.
- *
+ *
* @param n key
* @param def default value to be returned if key is not present
* @return argument value as int
@@ -93,7 +93,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as big integer.
- *
+ *
* @param n key
* @return argument value as big integer
* @exception EBaseException failed to retrieve value
@@ -102,7 +102,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as big integer.
- *
+ *
* @param n key
* @param def default value to be returned if key is not present
* @return argument value as big integer
@@ -111,7 +111,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as object
- *
+ *
* @param n key
* @return argument value as object
* @exception EBaseException failed to retrieve value
@@ -120,7 +120,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument value as object
- *
+ *
* @param n key
* @param def default value to be returned if key is not present
* @return argument value as object
@@ -129,7 +129,7 @@ public interface IArgBlock extends Serializable {
/**
* Gets boolean value. They should be "true" or "false".
- *
+ *
* @param name name of the input type
* @return boolean type: <code>true</code> or <code>false</code>
* @exception EBaseException failed to retrieve value
@@ -138,16 +138,16 @@ public interface IArgBlock extends Serializable {
/**
* Gets boolean value. They should be "true" or "false".
- *
+ *
* @param name name of the input type
- * @param def Default value to return.
+ * @param def Default value to return.
* @return boolean type: <code>true</code> or <code>false</code>
*/
public boolean getValueAsBoolean(String name, boolean def);
/**
* Gets KeyGenInfo
- *
+ *
* @param name name of the input type
* @param def default value to return
* @exception EBaseException On error.
@@ -158,7 +158,7 @@ public interface IArgBlock extends Serializable {
/**
* Gets PKCS10 request. This pkcs10 attribute does not
* contain header information.
- *
+ *
* @param name name of the input type
* @return pkcs10 request
* @exception EBaseException failed to retrieve value
@@ -168,7 +168,7 @@ public interface IArgBlock extends Serializable {
/**
* Gets PKCS10 request. This pkcs10 attribute does not
* contain header information.
- *
+ *
* @param name name of the input type
* @param def default PKCS10
* @return pkcs10 request
@@ -178,8 +178,8 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves PKCS10
- *
- * @param name name of the input type
+ *
+ * @param name name of the input type
* @param checkheader true if header must be present
* @return PKCS10 object
* @exception EBaseException failed to retrieve value
@@ -188,8 +188,8 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves PKCS10
- *
- * @param name name of the input type
+ *
+ * @param name name of the input type
* @param checkheader true if header must be present
* @param def default PKCS10
* @return PKCS10 object
@@ -199,8 +199,8 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves PKCS10
- *
- * @param name name of the input type
+ *
+ * @param name name of the input type
* @param def default PKCS10
* @return PKCS10 object
* @exception EBaseException on error
@@ -209,14 +209,14 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves a list of argument keys.
- *
+ *
* @return a list of string-based keys
*/
public Enumeration<String> elements();
/**
* Adds long-type arguments to this block.
- *
+ *
* @param n key
* @param v value
* @return value
@@ -225,7 +225,7 @@ public interface IArgBlock extends Serializable {
/**
* Adds integer-type arguments to this block.
- *
+ *
* @param n key
* @param v value
* @return value
@@ -234,7 +234,7 @@ public interface IArgBlock extends Serializable {
/**
* Adds boolean-type arguments to this block.
- *
+ *
* @param n key
* @param v value
* @return value
@@ -243,7 +243,7 @@ public interface IArgBlock extends Serializable {
/**
* Adds integer-type arguments to this block.
- *
+ *
* @param n key
* @param v value
* @param radix radix
@@ -253,7 +253,7 @@ public interface IArgBlock extends Serializable {
/**
* Sets argument into this block.
- *
+ *
* @param name key
* @param obj value
*/
@@ -261,7 +261,7 @@ public interface IArgBlock extends Serializable {
/**
* Retrieves argument.
- *
+ *
* @param name key
* @return object value
*/
@@ -269,14 +269,14 @@ public interface IArgBlock extends Serializable {
/**
* Deletes argument by the given key.
- *
+ *
* @param name key
*/
public void delete(String name);
/**
* Retrieves a list of argument keys.
- *
+ *
* @return a list of string-based keys
*/
public Enumeration<String> getElements();
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java b/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java
index 28e36da6..f7567292 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IAttrSet.java
@@ -17,38 +17,36 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.io.Serializable;
import java.util.Enumeration;
-
/**
* This interface defines the abstraction for the generic collection
* of attributes indexed by string names.
* Set of cooperating implementations of this interface may exploit
* dot-separated attribute names to provide seamless access to the
- * attributes of attribute value which also implements AttrSet
+ * attributes of attribute value which also implements AttrSet
* interface as if it was direct attribute of the container
* E.g., ((AttrSet)container.get("x")).get("y") is equivalent to
* container.get("x.y");
* <p>
- *
+ *
* @version $Revision$, $Date$
**/
public interface IAttrSet extends Serializable {
/**
* Sets an attribute value within this AttrSet.
- *
+ *
* @param name the name of the attribute
* @param obj the attribute object.
* @exception EBaseException on attribute handling errors.
*/
- public void set(String name, Object obj)throws EBaseException;
+ public void set(String name, Object obj) throws EBaseException;
/**
* Gets an attribute value.
- *
+ *
* @param name the name of the attribute to return.
* @exception EBaseException on attribute handling errors.
*/
@@ -56,7 +54,7 @@ public interface IAttrSet extends Serializable {
/**
* Deletes an attribute value from this AttrSet.
- *
+ *
* @param name the name of the attribute to delete.
* @exception EBaseException on attribute handling errors.
*/
@@ -65,7 +63,7 @@ public interface IAttrSet extends Serializable {
/**
* Returns an enumeration of the names of the attributes existing within
* this AttrSet.
- *
+ *
* @return an enumeration of the attribute names.
*/
public Enumeration<?> getElements();
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java b/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java
index 91f9f51a..4806a94c 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IAuthInfo.java
@@ -17,9 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* An interface represents an authentication context. This
* is an entity that encapsulates the authentication
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java
index c770121f..d111063a 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ICRLPrettyPrint.java
@@ -17,21 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Locale;
-
/**
* This interface represents a CRL pretty print handler.
* It converts a CRL object into a printable CRL string.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICRLPrettyPrint {
/**
* Retrieves the printable CRL string.
- *
+ *
* @param clientLocale end user clocale
* @param crlSize CRL size
* @param pageStart starting page number
@@ -42,7 +40,7 @@ public interface ICRLPrettyPrint {
/**
* Retrieves the printable CRL string.
- *
+ *
* @param clientLocale end user clocale
* @return printable CRL string
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java
index fc4e8c29..e991d5a1 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ICertPrettyPrint.java
@@ -17,22 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Locale;
-
/**
* This interface represents a certificate pretty print
* handler. This handler converts certificate object into
* a printable certificate string.
*
- * @version $Revision$, $Date$
+ * @version $Revision$, $Date$
*/
public interface ICertPrettyPrint {
/**
* Returns printable certificate string.
- *
+ *
* @param clientLocale end user locale
* @return printable certificate string
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java
index aef83b1c..d12265e8 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStore.java
@@ -17,16 +17,16 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.math.BigInteger;
import java.util.Enumeration;
-
/**
- * An interface represents a configuration store.
- * A configuration store is an abstraction of a hierarchical store
- * to keep arbitrary data indexed by string names.<p>
- * In the following example:
+ * An interface represents a configuration store.
+ * A configuration store is an abstraction of a hierarchical store
+ * to keep arbitrary data indexed by string names.
+ * <p>
+ * In the following example:
+ *
* <pre>
* param1=value1
* configStore1.param11=value11
@@ -35,26 +35,27 @@ import java.util.Enumeration;
* configStore1.subStore1.param112=value112
* configStore2.param21=value21
* </pre>
- * The top config store has parameters <i>param1</i> and sub-stores
- * <i>configStore1</i> and <i>configStore2</i>. <br>
+ *
+ * The top config store has parameters <i>param1</i> and sub-stores <i>configStore1</i> and <i>configStore2</i>. <br>
* The following illustrates how a config store is used.
+ *
* <pre>
- * // the top config store is passed to the following method.
- * public void init(IConfigStore config) throws EBaseException {
- * IConfigStore store = config;
- * String valx = config.getString("param1");
- * // valx is "value1" <p>
- *
- * IConfigStore substore1 = config.getSubstore("configStore1");
- * String valy = substore1.getString("param11");
- * // valy is "value11" <p>
- *
- * IConfigStore substore2 = config.getSubstore("configStore2");
- * String valz = substore2.getString("param21");
- * // valz is "value21" <p>
- * }
+ * // the top config store is passed to the following method.
+ * public void init(IConfigStore config) throws EBaseException {
+ * IConfigStore store = config;
+ * String valx = config.getString(&quot;param1&quot;);
+ * // valx is &quot;value1&quot; &lt;p&gt;
+ *
+ * IConfigStore substore1 = config.getSubstore(&quot;configStore1&quot;);
+ * String valy = substore1.getString(&quot;param11&quot;);
+ * // valy is &quot;value11&quot; &lt;p&gt;
+ *
+ * IConfigStore substore2 = config.getSubstore(&quot;configStore2&quot;);
+ * String valz = substore2.getString(&quot;param21&quot;);
+ * // valz is &quot;value21&quot; &lt;p&gt;
+ * }
* </pre>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConfigStore extends ISourceConfigStore {
@@ -62,6 +63,7 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Gets the name of this Configuration Store.
* <P>
+ *
* @return The name of this Configuration store
*/
public String getName();
@@ -69,60 +71,66 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Retrieves the value of the given property as a string.
* <p>
+ *
* @param name The name of the property to get
* @return The value of the property as a String
* @exception EPropertyNotFound If the property is not present
* @exception EBaseException If an internal error occurred
*/
- public String getString(String name)
- throws EPropertyNotFound, EBaseException;
+ public String getString(String name)
+ throws EPropertyNotFound, EBaseException;
/**
- * Retrieves the value of a given property as a string or the
+ * Retrieves the value of a given property as a string or the
* given default value if the property is not present.
* <P>
+ *
* @param name The property to retrive
* @param defval The default value to return if the property is not present
* @return The roperty value as a string
* @exception EBaseException If an internal error occurred
*/
- public String getString(String name, String defval)
- throws EBaseException;
+ public String getString(String name, String defval)
+ throws EBaseException;
/**
- * Stores a property and its value as a string.
+ * Stores a property and its value as a string.
* <p>
+ *
* @param name The name of the property
* @param value The value as a string
- */
+ */
public void putString(String name, String value);
/**
* Retrieves the value of a property as a byte array.
* <P>
+ *
* @param name The property name
* @return The property value as a byte array
* @exception EPropertyNotFound If the property is not present
* @exception EBaseException If an internal error occurred
*/
- public byte[] getByteArray(String name)
- throws EPropertyNotFound, EBaseException;
+ public byte[] getByteArray(String name)
+ throws EPropertyNotFound, EBaseException;
/**
- * Retrieves the value of a property as a byte array, using the
+ * Retrieves the value of a property as a byte array, using the
* given default value if property is not present.
* <P>
+ *
* @param name The name of the property
* @param defval The default value if the property is not present.
* @return The property value as a byte array.
* @exception EBaseException If an internal error occurred
*/
- public byte[] getByteArray(String name, byte defval[])
- throws EBaseException;
+ public byte[] getByteArray(String name, byte defval[])
+ throws EBaseException;
/**
* Stores the given property and value as a byte array.
* <p>
+ *
* @param name The property name
* @param value The value as a byte array to store
*/
@@ -131,29 +139,32 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Retrieves the given property as a boolean.
* <P>
+ *
* @param name The name of the property as a string.
* @return The value of the property as a boolean.
* @exception EPropertyNotFound If the property is not present
* @exception EBaseException If an internal error occurred
*/
- public boolean getBoolean(String name)
- throws EPropertyNotFound, EBaseException;
+ public boolean getBoolean(String name)
+ throws EPropertyNotFound, EBaseException;
/**
* Retrieves the given property as a boolean.
* <P>
+ *
* @param name The name of the property
- * @param defval The default value to turn as a boolean if
- * property is not present
+ * @param defval The default value to turn as a boolean if
+ * property is not present
* @return The value of the property as a boolean.
* @exception EBaseException If an internal error occurred
*/
- public boolean getBoolean(String name, boolean defval)
- throws EBaseException;
+ public boolean getBoolean(String name, boolean defval)
+ throws EBaseException;
/**
* Stores the given property and its value as a boolean.
* <P>
+ *
* @param name The property name
* @param value The value as a boolean
*/
@@ -162,28 +173,31 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Retrieves the given property as an integer.
* <P>
+ *
* @param name The property name
* @return The property value as an integer
* @exception EPropertyNotFound If property is not found
* @exception EBaseException If an internal error occurred
*/
- public int getInteger(String name)
- throws EPropertyNotFound, EBaseException;
+ public int getInteger(String name)
+ throws EPropertyNotFound, EBaseException;
/**
* Retrieves the given property as an integer.
* <P>
+ *
* @param name The property name
* @return int The default value to return as an integer
- * @exception EBaseException If the value cannot be converted to a
- * integer
+ * @exception EBaseException If the value cannot be converted to a
+ * integer
*/
- public int getInteger(String name, int defval)
- throws EBaseException;
+ public int getInteger(String name, int defval)
+ throws EBaseException;
/**
* Sets a property and its value as an integer.
* <P>
+ *
* @param name parameter name
* @param value integer value
*/
@@ -192,28 +206,31 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Retrieves the given property as a big integer.
* <P>
+ *
* @param name The property name
* @return The property value as a big integer
* @exception EPropertyNotFound If property is not found
* @exception EBaseException If an internal error occurred
*/
- public BigInteger getBigInteger(String name)
- throws EPropertyNotFound, EBaseException;
+ public BigInteger getBigInteger(String name)
+ throws EPropertyNotFound, EBaseException;
/**
* Retrieves the given property as a big integer.
* <P>
+ *
* @param name The property name
* @return int The default value to return as a big integer
- * @exception EBaseException If the value cannot be converted to a
- * integer
+ * @exception EBaseException If the value cannot be converted to a
+ * integer
*/
- public BigInteger getBigInteger(String name, BigInteger defval)
- throws EBaseException;
+ public BigInteger getBigInteger(String name, BigInteger defval)
+ throws EBaseException;
/**
* Sets a property and its value as an integer.
* <P>
+ *
* @param name parameter name
* @param value big integer value
*/
@@ -222,23 +239,26 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Creates a nested sub-store with the specified name.
* <P>
+ *
* @param name The name of the sub-store
* @return The sub-store created
*/
public IConfigStore makeSubStore(String name);
/**
- * Retrieves the given sub-store.
+ * Retrieves the given sub-store.
* <P>
+ *
* @param name The name of the sub-store
* @return The sub-store
*/
public IConfigStore getSubStore(String name);
/**
- * Removes sub-store with the given name.
+ * Removes sub-store with the given name.
* (Removes all properties and sub-stores under this sub-store.)
* <P>
+ *
* @param name The name of the sub-store to remove
*/
public void removeSubStore(String name);
@@ -247,22 +267,24 @@ public interface IConfigStore extends ISourceConfigStore {
/**
* Retrives and enumeration of all properties in this config-store.
+ *
* @return An enumeration of all properties in this config-store
*/
public Enumeration<String> getPropertyNames();
/**
- * Returns an enumeration of the names of the substores of
+ * Returns an enumeration of the names of the substores of
* this config-store.
* <P>
- * @return An enumeration of the names of the sub-stores of this
- * config-store
+ *
+ * @return An enumeration of the names of the sub-stores of this
+ * config-store
*/
public Enumeration<String> getSubStoreNames();
/**
* Commits all the data into file immediately.
- *
+ *
* @param createBackup true if a backup file should be created
* @exception EBaseException failed to commit
*/
@@ -273,4 +295,3 @@ public interface IConfigStore extends ISourceConfigStore {
*/
public int size();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
index f2b6a03d..376b4e91 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IConfigStoreEventListener.java
@@ -17,34 +17,32 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Hashtable;
-
/**
* ConfigStore Parameters Event Notification.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConfigStoreEventListener {
/**
* Called to validate the config store parameters that changed
- *
+ *
* @param action action
* @param params configuration parameters changed
* @exception EBaseException failed to validate
*/
- public void validateConfigParams(String action,
- Hashtable params) throws EBaseException;
+ public void validateConfigParams(String action,
+ Hashtable params) throws EBaseException;
/**
* Validates the config store parameters that changed
- *
+ *
* @param action action
* @param params configuration parameters changed
* @exception EBaseException failed to validate
*/
- public void doConfigParams(String action,
- Hashtable params) throws EBaseException;
+ public void doConfigParams(String action,
+ Hashtable params) throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java b/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java
index 73e95b77..8d95a40c 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IExtPrettyPrint.java
@@ -17,22 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* This class will display the certificate content in predefined
* format.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IExtPrettyPrint {
/**
* Retrieves the printable extension string.
- *
+ *
* @return printable extension string
*/
public String toString();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java b/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java
index e8060b24..aff3daf4 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IExtendedPluginInfo.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Locale;
-
/**
* Plugin which can return extended information to console
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IExtendedPluginInfo {
@@ -33,48 +31,48 @@ public interface IExtendedPluginInfo {
public static final String HELP_TEXT = "HELP_TEXT";
/**
- * This method returns an array of strings. Each element of the
- * array represents a configurable parameter, or some other
- * meta-info (such as help-token)
+ * This method returns an array of strings. Each element of the
+ * array represents a configurable parameter, or some other
+ * meta-info (such as help-token)
+ *
+ * there is an entry indexed on that parameter name
+ * <param-name>;<type_info>[,required];<description>;...
+ *
+ * Where:
+ *
+ * type_info is either 'string', 'number', 'boolean', 'password' or
+ * 'choice(ch1,ch2,ch3,...)'
+ *
+ * If the marker 'required' is included after the type_info,
+ * the parameter will has some visually distinctive marking in
+ * the UI.
+ *
+ * 'description' is a short sentence describing the parameter
+ * 'choice' is rendered as a drop-down list. The first parameter in the
+ * list will be activated by default
+ * 'boolean' is rendered as a checkbox. The resulting parameter will be
+ * either 'true' or 'false'
+ * 'string' allows any characters
+ * 'number' allows only numbers
+ * 'password' is rendered as a password field (the characters are replaced
+ * with *'s when being types. This parameter is not passed through to
+ * the plugin. It is instead inserted directly into the password cache
+ * keyed on the instance name. The value of the parameter
+ * 'bindPWPrompt' (see example below) is set to the key.
+ *
+ * In addition to the configurable parameters, the following magic parameters
+ * may be defined:
+ *
+ * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin
+ * HELP_TEXT;helptext - a general help string describing the plugin
*
- * there is an entry indexed on that parameter name
- * <param-name>;<type_info>[,required];<description>;...
- *
- * Where:
- *
- * type_info is either 'string', 'number', 'boolean', 'password' or
- * 'choice(ch1,ch2,ch3,...)'
- *
- * If the marker 'required' is included after the type_info,
- * the parameter will has some visually distinctive marking in
- * the UI.
+ * For example:
+ * "username;string;The username you wish to login as"
+ * "bindPWPrompt;password;Enter password to bind as above user with"
+ * "algorithm;choice(RSA,DSA);Which algorithm do you want to use"
+ * "enable;boolean;Do you want to run this plugin"
+ * "port;number;Which port number do you want to use"
*
- * 'description' is a short sentence describing the parameter
- * 'choice' is rendered as a drop-down list. The first parameter in the
- * list will be activated by default
- * 'boolean' is rendered as a checkbox. The resulting parameter will be
- * either 'true' or 'false'
- * 'string' allows any characters
- * 'number' allows only numbers
- * 'password' is rendered as a password field (the characters are replaced
- * with *'s when being types. This parameter is not passed through to
- * the plugin. It is instead inserted directly into the password cache
- * keyed on the instance name. The value of the parameter
- * 'bindPWPrompt' (see example below) is set to the key.
- *
- * In addition to the configurable parameters, the following magic parameters
- * may be defined:
- *
- * HELP_TOKEN;helptoken - a pointer to the online manual section for this plugin
- * HELP_TEXT;helptext - a general help string describing the plugin
- *
- * For example:
- * "username;string;The username you wish to login as"
- * "bindPWPrompt;password;Enter password to bind as above user with"
- * "algorithm;choice(RSA,DSA);Which algorithm do you want to use"
- * "enable;boolean;Do you want to run this plugin"
- * "port;number;Which port number do you want to use"
- *
*/
public String[] getExtendedPluginInfo(Locale locale);
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
index 4a55af60..566fef38 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IPluginImpl.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Vector;
/**
* This interface represents a plugin instance.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPluginImpl {
@@ -32,6 +31,7 @@ public interface IPluginImpl {
/**
* Gets the description for this plugin instance.
* <P>
+ *
* @return The Description for this plugin instance.
*/
public String getDescription();
@@ -39,7 +39,7 @@ public interface IPluginImpl {
/**
* Returns the name of the plugin class.
* <P>
- *
+ *
* @return The name of the plugin class.
*/
public String getImplName();
@@ -47,24 +47,24 @@ public interface IPluginImpl {
/**
* Returns the name of the plugin instance.
* <P>
- *
- * @return The name of the plugin instance. If none is set
- * the name of the implementation will be returned.xxxx
+ *
+ * @return The name of the plugin instance. If none is set
+ * the name of the implementation will be returned.xxxx
*/
public String getInstanceName();
/**
* Initializes this plugin instance.
- *
+ *
* @param sys parent subsystem
* @param instanceName instance name of this plugin
* @param className class name of this plugin
* @param config configuration store
* @exception EBaseException failed to initialize
*/
- public void init(ISubsystem sys, String instanceName, String className,
- IConfigStore config)
- throws EBaseException;
+ public void init(ISubsystem sys, String instanceName, String className,
+ IConfigStore config)
+ throws EBaseException;
/**
* Shutdowns this plugin.
@@ -73,33 +73,32 @@ public interface IPluginImpl {
/**
* Retrieves the configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Return configured parameters for a plugin instance.
- *
- * @return nvPairs A Vector of name/value pairs. Each name/value
- * pair is constructed as a String in name=value format.
+ *
+ * @return nvPairs A Vector of name/value pairs. Each name/value
+ * pair is constructed as a String in name=value format.
*/
public Vector getInstanceParams();
/**
* Retrieves a list of configuration parameter names.
- *
+ *
* @return a list of parameter names
*/
public String[] getConfigParams();
/**
* Return default parameters for a plugin implementation.
- *
+ *
* @return nvPairs A Vector of name/value pairs. Each name/value
- * pair is constructed as a String in name=value.
+ * pair is constructed as a String in name=value.
*/
public Vector getDefaultParams();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java b/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java
index 1fba48f1..67c1b01d 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/IPrettyPrintFormat.java
@@ -17,32 +17,29 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* This class will display the certificate content in predefined
* format.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPrettyPrintFormat {
/**
* Retrieves a pretty print string of the given byte array.
- *
+ *
* @param in byte array
* @param indentSize indentation size
* @param lineLen length of line
* @param separator separator string
* @return pretty print string
*/
- public String toHexString(byte[] in, int indentSize,
- int lineLen, String separator);
+ public String toHexString(byte[] in, int indentSize,
+ int lineLen, String separator);
/**
* Retrieves a pretty print string of the given byte array.
- *
+ *
* @param in byte array
* @param indentSize indentation size
* @param lineLen length of line
@@ -52,7 +49,7 @@ public interface IPrettyPrintFormat {
/**
* Retrieves a pretty print string of the given byte array.
- *
+ *
* @param in byte array
* @param indentSize indentation size
* @return pretty print string
@@ -61,7 +58,7 @@ public interface IPrettyPrintFormat {
/**
* Retrieves a pretty print string of the given byte array.
- *
+ *
* @param in byte array
* @return pretty print string
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java b/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
index ced3886c..24c55d08 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ISecurityDomainSessionTable.java
@@ -19,21 +19,30 @@ package com.netscape.certsrv.base;
import java.util.Enumeration;
-
/**
* This interface defines the abstraction for the cookie table.
**/
public interface ISecurityDomainSessionTable {
- public static final int SUCCESS =0;
- public static final int FAILURE =1;
+ public static final int SUCCESS = 0;
+ public static final int FAILURE = 1;
+
public int addEntry(String cookieId, String ip, String uid, String group);
+
public int removeEntry(String sessionId);
+
public boolean isSessionIdExist(String sessionId);
+
public String getIP(String sessionId);
+
public String getUID(String sessionId);
+
public String getGroup(String sessionId);
+
public long getBeginTime(String sessionId);
+
public int getSize();
+
public long getTimeToLive();
+
public Enumeration<String> getSessionIds();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java b/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java
index 03adb700..eb848c54 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ISourceConfigStore.java
@@ -17,20 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Enumeration;
-
/**
* An interface that represents the source that creates the configuration
* store tree. Note that the tree can be built based on the information
* from a text file or ldap entries.
+ *
* @see com.netscape.certsrv.base.IConfigStore
- *
+ *
* @version $Revision$, $Date$
*/
public interface ISourceConfigStore extends Serializable {
@@ -38,7 +37,7 @@ public interface ISourceConfigStore extends Serializable {
/**
* Gets a property.
* <P>
- *
+ *
* @param name The property name
* @return property value
*/
@@ -47,7 +46,7 @@ public interface ISourceConfigStore extends Serializable {
/**
* Retrieves a property.
* <P>
- *
+ *
* @param name The property name
* @param value The property value
*/
@@ -56,7 +55,7 @@ public interface ISourceConfigStore extends Serializable {
/**
* Returns an enumeration of the config store's keys.
* <P>
- *
+ *
* @return a list of keys
* @see java.util.Hashtable#elements
* @see java.util.Enumeration
@@ -64,16 +63,16 @@ public interface ISourceConfigStore extends Serializable {
public Enumeration<String> keys();
/**
- * Reads a config store from an input stream.
- *
+ * Reads a config store from an input stream.
+ *
* @param in input stream where the properties are located
* @exception IOException If an IO error occurs while loading from input.
*/
public void load(InputStream in) throws IOException;
/**
- * Stores this config store to the specified output stream.
- *
+ * Stores this config store to the specified output stream.
+ *
* @param out output stream where the properties should be serialized
* @param header optional header to be serialized
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java b/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java
index 77f1708a..7b2a37d7 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ISubsystem.java
@@ -17,12 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* An interface represents a CMS subsystem. CMS is made up of a list
- * subsystems. Each subsystem is responsible for a set of
+ * subsystems. Each subsystem is responsible for a set of
* speciailized functions.
* <P>
*
@@ -32,14 +29,14 @@ public interface ISubsystem {
/**
* Retrieves the name of this subsystem.
- *
+ *
* @return subsystem identifier
*/
public String getId();
/**
* Sets specific to this subsystem.
- *
+ *
* @param id subsystem identifier
* @exception EBaseException failed to set id
*/
@@ -49,17 +46,17 @@ public interface ISubsystem {
* Initializes this subsystem with the given configuration
* store.
* <P>
- *
+ *
* @param owner owner of this subsystem
* @param config configuration store
* @exception EBaseException failed to initialize
*/
public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Notifies this subsystem if owner is in running mode.
- *
+ *
* @exception EBaseException failed to start up
*/
public void startup() throws EBaseException;
@@ -74,7 +71,7 @@ public interface ISubsystem {
/**
* Returns the root configuration storage of this system.
* <P>
- *
+ *
* @return configuration store of this subsystem
*/
public IConfigStore getConfigStore();
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java b/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java
index 23b82179..f6bb6378 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ISubsystemSource.java
@@ -17,9 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* An interface represents a subsystem source. A subsystem
* source is a container that manages multiple subsystems.
@@ -31,7 +28,7 @@ public interface ISubsystemSource {
/**
* Retrieves subsystem from the source.
- *
+ *
* @param sid subsystem identifier
* @return subsystem
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java b/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java
index f1e3e25e..1e7dd0fb 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/ITimeSource.java
@@ -17,10 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Date;
-
/**
* This interface represents a time source where
* current time can be retrieved. CMS is installed
@@ -35,7 +33,7 @@ public interface ITimeSource {
/**
* Retrieves current time and date.
- *
+ *
* @return current time and date
*/
public Date getCurrentDate();
diff --git a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
index 17efca77..23cb1957 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/KeyGenInfo.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.io.IOException;
import netscape.security.util.DerInputStream;
@@ -25,27 +24,27 @@ import netscape.security.util.DerValue;
import netscape.security.x509.AlgorithmId;
import netscape.security.x509.X509Key;
-
/**
- *
+ *
* The <code>KeyGenInfo</code> represents the information generated by
* the KeyGen tag of the HTML forms. It provides the parsing and accessing
- * mechanisms.<p>
- *
+ * mechanisms.
+ * <p>
+ *
* <pre>
* SignedPublicKeyAndChallenge ::= SEQUENCE {
* publicKeyAndChallenge PublicKeyAndChallenge,
* signatureAlgorithm AlgorithmIdentifier,
* signature BIT STRING
* }
- *
+ *
* PublicKeyAndChallenge ::= SEQUENCE {
* spki SubjectPublicKeyInfo,
* challenge IA5STRING
* }
- *</pre>
- *
- *
+ * </pre>
+ *
+ *
* @version $Revision$, $Date$
*/
@@ -79,11 +78,11 @@ public class KeyGenInfo {
/**
* Construct KeyGenInfo using the SignedPublicKeyAndChallenge
* string representation.
- *
+ *
* @param spkac SignedPublicKeyAndChallenge string representation
*/
public KeyGenInfo(String spkac)
- throws IOException {
+ throws IOException {
decode(spkac);
}
@@ -93,7 +92,7 @@ public class KeyGenInfo {
/**
* Initialize using the SPKAC string
- *
+ *
* @param spkac SPKAC string from the end user
*/
public void decode(String spkac) throws IOException {
@@ -104,7 +103,7 @@ public class KeyGenInfo {
/**
* Der encoded into buffer
- *
+ *
* @return Der encoded buffer
*/
public byte[] encode() {
@@ -113,7 +112,7 @@ public class KeyGenInfo {
/**
* Get SPKI in DerValue form
- *
+ *
* @return SPKI in DerValue form
*/
public DerValue getDerSPKI() {
@@ -122,7 +121,7 @@ public class KeyGenInfo {
/**
* Get SPKI as X509Key
- *
+ *
* @return SPKI in X509Key form
*/
public X509Key getSPKI() {
@@ -131,7 +130,7 @@ public class KeyGenInfo {
/**
* Get Challenge phrase in DerValue form
- *
+ *
* @return Challenge in DerValue form. null if none.
*/
public DerValue getDerChallenge() {
@@ -140,7 +139,7 @@ public class KeyGenInfo {
/**
* Get Challenge phrase in string format
- *
+ *
* @return challenge phrase. null if none.
*/
public String getChallenge() {
@@ -149,6 +148,7 @@ public class KeyGenInfo {
/**
* Get Signature
+ *
* @return signature
*/
public byte[] getSignature() {
@@ -157,6 +157,7 @@ public class KeyGenInfo {
/**
* Get Algorithm ID
+ *
* @return the algorithm id
*/
public AlgorithmId getAlgorithmId() {
@@ -165,7 +166,7 @@ public class KeyGenInfo {
/**
* Validate Signature and Challenge Phrase
- *
+ *
* @param challenge phrase; null if none
* @return true if validated; otherwise, false
*/
@@ -180,7 +181,7 @@ public class KeyGenInfo {
/**
* String representation of KenGenInfo
- *
+ *
* @return string representation of KeGenInfo
*/
public String toString() {
@@ -194,13 +195,13 @@ public class KeyGenInfo {
*==========================================================*/
private byte[] base64Decode(String spkac)
- throws IOException {
+ throws IOException {
return com.netscape.osutil.OSUtil.AtoB(spkac);
}
private void derDecode(byte spkac[])
- throws IOException {
+ throws IOException {
DerInputStream derIn = new DerInputStream(spkac);
/* get SPKAC Algorithm & Signature */
@@ -224,4 +225,3 @@ public class KeyGenInfo {
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java b/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java
index 8e186fc4..903b534e 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/MessageFormatter.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.lang.reflect.Method;
import java.text.MessageFormat;
import java.util.Date;
@@ -25,13 +24,12 @@ import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
-
/**
- * Factors out common function of formatting internatinalized
- * messages taking arguments and using java.util.ResourceBundle
+ * Factors out common function of formatting internatinalized
+ * messages taking arguments and using java.util.ResourceBundle
* and java.text.MessageFormat mechanism.
* <P>
- *
+ *
* @version $Revision$, $Date$
* @see java.text.MessageFormat
* @see java.util.ResourceBundle
@@ -42,22 +40,22 @@ public class MessageFormatter {
/**
* Retrieves the localized string.
- *
+ *
* @param locale end user locale
* @param resourceBundleBaseName resource bundle class name
* @param formatString format string
* @return localized string
*/
public static String getLocalizedString(
- Locale locale, String resourceBundleBaseName,
- String formatString) {
- return getLocalizedString(locale, resourceBundleBaseName,
+ Locale locale, String resourceBundleBaseName,
+ String formatString) {
+ return getLocalizedString(locale, resourceBundleBaseName,
formatString, null);
}
/**
* Retrieves the localized string.
- *
+ *
* @param locale end user locale
* @param resourceBundleBaseName resource bundle class name
* @param formatString format string
@@ -65,18 +63,18 @@ public class MessageFormatter {
* @return localized string
*/
public static String getLocalizedString(
- Locale locale, String resourceBundleBaseName,
- String formatString, Object params) {
+ Locale locale, String resourceBundleBaseName,
+ String formatString, Object params) {
Object o[] = new Object[1];
o[0] = params;
- return getLocalizedString(locale, resourceBundleBaseName,
+ return getLocalizedString(locale, resourceBundleBaseName,
formatString, o);
}
/**
* Retrieves the localized string.
- *
+ *
* @param locale end user locale
* @param resourceBundleBaseName resource bundle class name
* @param formatString format string
@@ -84,8 +82,8 @@ public class MessageFormatter {
* @return localized string
*/
public static String getLocalizedString(
- Locale locale, String resourceBundleBaseName,
- String formatString, Object[] params) {
+ Locale locale, String resourceBundleBaseName,
+ String formatString, Object[] params) {
String localizedFormat = null;
@@ -100,7 +98,7 @@ public class MessageFormatter {
resourceBundleBaseName, locale).getString(formatString);
} catch (MissingResourceException e) {
return formatString;
-
+
}
Object[] localizedParams = params;
Object[] localeArg = null;
@@ -108,8 +106,8 @@ public class MessageFormatter {
if (params != null) {
for (int i = 0; i < params.length; ++i) {
if (!(params[i] instanceof String) ||
- !(params[i] instanceof Date) ||
- !(params[i] instanceof Number)) {
+ !(params[i] instanceof Date) ||
+ !(params[i] instanceof Number)) {
if (localizedParams == params) {
// only done once
@@ -121,7 +119,7 @@ public class MessageFormatter {
localizedParams = new Object[params.length];
System.arraycopy(params, 0, localizedParams, 0,
- params.length);
+ params.length);
}
try {
Method toStringMethod = params[i].getClass().getMethod(
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
index 93dd2502..9450558c 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/MetaAttributeDef.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Enumeration;
import java.util.Hashtable;
import netscape.security.util.ObjectIdentifier;
-
/**
* A class representing a meta attribute defintion.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class MetaAttributeDef {
@@ -40,66 +38,66 @@ public class MetaAttributeDef {
private MetaAttributeDef() {
}
-
+
/**
* Constructs a MetaAttribute defintion
* <P>
- *
+ *
* @param name attribute name
* @param valueClass attribute value class
* @param oid attribute object identifier
*/
private MetaAttributeDef(String name, Class<?> valueClass,
- ObjectIdentifier oid) {
+ ObjectIdentifier oid) {
mName = name;
mValueClass = valueClass;
mOid = oid;
}
-
+
/**
* Gets an attribute OID.
* <P>
- *
+ *
* @return returns attribute OID or null if not defined.
*/
- public ObjectIdentifier getOID() {
- return mOid;
+ public ObjectIdentifier getOID() {
+ return mOid;
}
/**
* Gets an Java class for the attribute values
* <P>
- *
+ *
* @return returns Java class for the attribute values
*/
public Class<?> getValueClass() {
- return mValueClass;
+ return mValueClass;
}
/**
* Gets attribute name
* <P>
- *
- * @return returns attribute name
+ *
+ * @return returns attribute name
*/
- public String getName() {
- return mName;
+ public String getName() {
+ return mName;
}
-
+
/**
* Registers new MetaAttribute defintion
- * Attribute is defined by name, Java class for attribute values and
+ * Attribute is defined by name, Java class for attribute values and
* optional object identifier
* <P>
- *
+ *
* @param name attribute name
* @param valueClass attribute value class
* @param oid attribute object identifier
* @exception IllegalArgumentException if name or valueClass are null, or
- * conflicting attribute definition already exists
+ * conflicting attribute definition already exists
*/
public static MetaAttributeDef register(String name, Class<?> valueClass,
- ObjectIdentifier oid) {
+ ObjectIdentifier oid) {
if (name == null) {
throw new IllegalArgumentException(
"Attribute name must not be null");
@@ -113,13 +111,13 @@ public class MetaAttributeDef {
MetaAttributeDef oldDef;
if ((oldDef = (MetaAttributeDef) mNameToAttrDef.get(name)) != null &&
- !oldDef.equals(newDef)) {
+ !oldDef.equals(newDef)) {
throw new IllegalArgumentException(
"Attribute \'" + name + "\' is already defined");
}
if (oid != null &&
- (oldDef = (MetaAttributeDef) mOidToAttrDef.get(oid)) != null &&
- !oldDef.equals(newDef)) {
+ (oldDef = (MetaAttributeDef) mOidToAttrDef.get(oid)) != null &&
+ !oldDef.equals(newDef)) {
throw new IllegalArgumentException(
"OID \'" + oid + "\' is already in use");
}
@@ -128,37 +126,37 @@ public class MetaAttributeDef {
mOidToAttrDef.put(oid, newDef);
}
return newDef;
- }
-
+ }
+
/**
* Compares this attribute definition with another, for equality.
* <P>
- *
- * @return true iff names, valueClasses and object identifiers
- * are identical.
+ *
+ * @return true iff names, valueClasses and object identifiers
+ * are identical.
*/
public boolean equals(Object other) {
if (other == this)
return true;
-
+
if (other instanceof MetaAttributeDef) {
MetaAttributeDef otherDef = (MetaAttributeDef) other;
- if ((mOid != null && otherDef.mOid != null &&
- !mOid.equals(otherDef.mOid)) ||
- (mOid == null && otherDef.mOid != null) ||
- !mName.equals(otherDef.mName) ||
- !mValueClass.equals(otherDef.mValueClass)) {
+ if ((mOid != null && otherDef.mOid != null &&
+ !mOid.equals(otherDef.mOid)) ||
+ (mOid == null && otherDef.mOid != null) ||
+ !mName.equals(otherDef.mName) ||
+ !mValueClass.equals(otherDef.mValueClass)) {
return false;
}
}
return false;
}
-
+
/**
* Retrieves attribute definition by name
* <P>
- *
+ *
* @param name attribute name
* @return attribute definition or null if not found
*/
@@ -169,7 +167,7 @@ public class MetaAttributeDef {
/**
* Retrieves attribute definition by object identifier
* <P>
- *
+ *
* @param oid attribute object identifier
* @return attribute definition or null if not found
*/
@@ -180,7 +178,7 @@ public class MetaAttributeDef {
/**
* Returns enumeration of the registered attribute names
* <P>
- *
+ *
* @return returns enumeration of the registered attribute names
*/
public static Enumeration<String> getAttributeNames() {
@@ -190,7 +188,7 @@ public class MetaAttributeDef {
/**
* Returns enumeration of the registered attribute object identifiers
* <P>
- *
+ *
* @return returns enumeration of the attribute object identifiers
*/
public static Enumeration<ObjectIdentifier> getAttributeNameOids() {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
index 65e40174..8aed6b84 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/MetaInfo.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Enumeration;
import java.util.Hashtable;
-
/**
* A class represents meta information. A meta information
* object is just a generic hashtable that is embedded into
* a request object.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class MetaInfo implements IAttrSet {
@@ -41,7 +39,7 @@ public class MetaInfo implements IAttrSet {
private Hashtable<String, Object> content = new Hashtable<String, Object>();
- /**
+ /**
* Constructs a meta information.
* <P>
*/
@@ -51,7 +49,7 @@ public class MetaInfo implements IAttrSet {
/**
* Returns a short string describing this certificate attribute.
* <P>
- *
+ *
* @return information about this certificate attribute.
*/
public String toString() {
@@ -69,11 +67,11 @@ public class MetaInfo implements IAttrSet {
sb.append("]\n");
return sb.toString();
}
-
+
/**
* Gets an attribute value.
* <P>
- *
+ *
* @param name the name of the attribute to return.
* @exception EBaseException on attribute handling errors.
*/
@@ -83,8 +81,8 @@ public class MetaInfo implements IAttrSet {
/**
* Sets an attribute value.
- *
- * @param name the name of the attribute
+ *
+ * @param name the name of the attribute
* @param obj the attribute object.
*
* @exception EBaseException on attribute handling errors.
@@ -92,18 +90,18 @@ public class MetaInfo implements IAttrSet {
public void set(String name, Object obj) throws EBaseException {
content.put(name, obj);
}
-
+
/**
* Deletes an attribute value from this CertAttrSet.
* <P>
- *
+ *
* @param name the name of the attribute to delete.
* @exception EBaseException on attribute handling errors.
*/
public void delete(String name) throws EBaseException {
content.remove(name);
}
-
+
/**
* Returns an enumeration of the names of the attributes existing within
* this attribute.
diff --git a/pki/base/common/src/com/netscape/certsrv/base/Nonces.java b/pki/base/common/src/com/netscape/certsrv/base/Nonces.java
index fde20933..cc0231ac 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/Nonces.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/Nonces.java
@@ -21,14 +21,13 @@ import java.security.cert.X509Certificate;
import java.util.Hashtable;
import java.util.Vector;
-
/**
* This class manages nonces sometimes used to control request state flow.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
-public class Nonces {
+public class Nonces {
private Hashtable<Long, X509Certificate> mNonces = new Hashtable<Long, X509Certificate>();
private Vector<Long> mNonceList = new Vector<Long>();
@@ -49,17 +48,17 @@ public class Nonces {
long i;
long k = 0;
long n = nonce;
- long m = (long)((mNonceLimit / 2) + 1);
+ long m = (long) ((mNonceLimit / 2) + 1);
for (i = 0; i < m; i++) {
k = n + i;
// avoid collisions
- if (!mNonceList.contains((Object)k)) {
+ if (!mNonceList.contains((Object) k)) {
break;
}
k = n - i;
// avoid collisions
- if (!mNonceList.contains((Object)k)) {
+ if (!mNonceList.contains((Object) k)) {
break;
}
}
@@ -67,9 +66,9 @@ public class Nonces {
mNonceList.add(k);
mNonces.put(k, cert);
if (mNonceList.size() > mNonceLimit) {
- n = ((Long)(mNonceList.firstElement())).longValue();
+ n = ((Long) (mNonceList.firstElement())).longValue();
mNonceList.remove(0);
- mNonces.remove((Object)n);
+ mNonces.remove((Object) n);
}
} else {
// failed to resolved collision
@@ -79,15 +78,15 @@ public class Nonces {
}
public X509Certificate getCertificate(long nonce) {
- X509Certificate cert = (X509Certificate)mNonces.get(nonce);
+ X509Certificate cert = (X509Certificate) mNonces.get(nonce);
return cert;
}
public X509Certificate getCertificate(int index) {
X509Certificate cert = null;
if (index >= 0 && index < mNonceList.size()) {
- long nonce = ((Long)(mNonceList.elementAt(index))).longValue();
- cert = (X509Certificate)mNonces.get(nonce);
+ long nonce = ((Long) (mNonceList.elementAt(index))).longValue();
+ cert = (X509Certificate) mNonces.get(nonce);
}
return cert;
}
@@ -95,17 +94,16 @@ public class Nonces {
public long getNonce(int index) {
long nonce = 0;
if (index >= 0 && index < mNonceList.size()) {
- nonce = ((Long)(mNonceList.elementAt(index))).longValue();
+ nonce = ((Long) (mNonceList.elementAt(index))).longValue();
}
return nonce;
}
public void removeNonce(long nonce) {
- mNonceList.remove((Object)nonce);
- mNonces.remove((Object)nonce);
+ mNonceList.remove((Object) nonce);
+ mNonces.remove((Object) nonce);
}
-
public int size() {
return mNonceList.size();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java b/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java
index 287ce795..c3309c5f 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/PasswordResources.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for the password checker.
* <p>
- *
+ *
* @version $Revision$, $Date$
* @see java.util.ListResourceBundle
*/
@@ -42,4 +40,3 @@ public class PasswordResources extends ListResourceBundle {
*/
static final Object[][] contents = {};
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/base/Plugin.java b/pki/base/common/src/com/netscape/certsrv/base/Plugin.java
index e7001ce5..79fae88a 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/Plugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/Plugin.java
@@ -17,9 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
-
-
/**
* This represents a generici CMS plugin.
* <p>
@@ -41,10 +38,10 @@ public class Plugin {
mId = id;
mClassPath = classPath;
}
-
+
/**
* Returns the plugin identifier.
- *
+ *
* @return plugin id
*/
public String getId() {
@@ -53,7 +50,7 @@ public class Plugin {
/**
* Returns the plugin classpath.
- *
+ *
* @return plugin classpath
*/
public String getClassPath() {
diff --git a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
index 151c2420..b4ecd124 100644
--- a/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
+++ b/pki/base/common/src/com/netscape/certsrv/base/SessionContext.java
@@ -17,22 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.base;
-
import java.util.Hashtable;
-
/**
* This class specifies the context object that includes
* authentication environment and connection information.
* This object is later used in access control evaluation.
- * This is a global object that can be accessible
- * throughout the server. It is useful for passing
+ * This is a global object that can be accessible
+ * throughout the server. It is useful for passing
* global and per-thread infomration in methods.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
-public class SessionContext extends Hashtable<Object,Object> {
+public class SessionContext extends Hashtable<Object, Object> {
/**
*
@@ -107,12 +105,12 @@ public class SessionContext extends Hashtable<Object,Object> {
}
/**
- * Sets the current context. This allows the
- * caller to associate a specific session context
+ * Sets the current context. This allows the
+ * caller to associate a specific session context
* with the current thread.
* This methods makes custom session context
* possible.
- *
+ *
* @param sc session context
*/
public static void setContext(SessionContext sc) {
@@ -120,10 +118,10 @@ public class SessionContext extends Hashtable<Object,Object> {
}
/**
- * Retrieves the session context associated with
+ * Retrieves the session context associated with
* the current thread. If no context is associated,
* a context is created.
- *
+ *
* @return sesssion context
*/
public static SessionContext getContext() {
@@ -137,15 +135,15 @@ public class SessionContext extends Hashtable<Object,Object> {
}
/**
- * Retrieves the session context associated with
+ * Retrieves the session context associated with
* the current thread. If no context is associated,
* null is returned.
- *
+ *
* @return sesssion context
*/
public static SessionContext getExistingContext() {
SessionContext sc = (SessionContext)
- mContexts.get(Thread.currentThread());
+ mContexts.get(Thread.currentThread());
if (sc == null) {
return null;
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/CAResources.java b/pki/base/common/src/com/netscape/certsrv/ca/CAResources.java
index 4510c46b..dfb72d57 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/CAResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/CAResources.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for CA subsystem.
* <P>
- *
+ *
* @version $Revision$ $Date$
*/
public class CAResources extends ListResourceBundle {
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ECAException.java b/pki/base/common/src/com/netscape/certsrv/ca/ECAException.java
index 59d8847c..a530b08a 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ECAException.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ECAException.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a CA exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class ECAException extends EBaseException {
@@ -36,11 +34,12 @@ public class ECAException extends EBaseException {
/**
* CA resource class name.
*/
- private static final String CA_RESOURCES = CAResources.class.getName();
+ private static final String CA_RESOURCES = CAResources.class.getName();
/**
* Constructs a CA exception.
* <P>
+ *
* @param msgFormat constant from CAResources.
*/
public ECAException(String msgFormat) {
@@ -50,6 +49,7 @@ public class ECAException extends EBaseException {
/**
* Constructs a CA exception.
* <P>
+ *
* @param msgFormat constant from CAResources.
* @param param additional parameters to the message.
*/
@@ -60,6 +60,7 @@ public class ECAException extends EBaseException {
/**
* Constructs a CA exception.
* <P>
+ *
* @param msgFormat constant from CAResources.
* @param e embedded exception.
*/
@@ -70,6 +71,7 @@ public class ECAException extends EBaseException {
/**
* Constructs a CA exception.
* <P>
+ *
* @param msgFormat constant from CAResources.
* @param params additional parameters to the message.
*/
@@ -80,6 +82,7 @@ public class ECAException extends EBaseException {
/**
* Returns the bundle file name.
* <P>
+ *
* @return name of bundle class associated with this exception.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/EErrorPublishCRL.java b/pki/base/common/src/com/netscape/certsrv/ca/EErrorPublishCRL.java
index 0e271c21..b4c10a0c 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/EErrorPublishCRL.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/EErrorPublishCRL.java
@@ -17,11 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
/**
* A class represents a CA exception associated with publishing error.
* <P>
- *
+ *
* @version $Revision$ $Date$
*/
public class EErrorPublishCRL extends ECAException {
@@ -34,9 +33,10 @@ public class EErrorPublishCRL extends ECAException {
/**
* Constructs a CA exception caused by publishing error.
* <P>
+ *
* @param errorString Detailed error message.
*/
public EErrorPublishCRL(String errorString) {
- super(errorString);
+ super(errorString);
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICAService.java b/pki/base/common/src/com/netscape/certsrv/ca/ICAService.java
index cac6fc75..1edebcc8 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICAService.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICAService.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import netscape.security.x509.RevokedCertImpl;
import netscape.security.x509.X509CertImpl;
import netscape.security.x509.X509CertInfo;
@@ -27,11 +26,10 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.connector.IConnector;
import com.netscape.certsrv.request.IRequest;
-
/**
* An interface representing a CA request services.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICAService {
@@ -39,54 +37,54 @@ public interface ICAService {
/**
* Marks certificate record as revoked by adding revocation information.
* Updates CRL cache.
- *
+ *
* @param crlentry revocation information obtained from revocation request
* @exception EBaseException failed to mark certificate record as revoked
*/
public void revokeCert(RevokedCertImpl crlentry)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate record as revoked by adding revocation information.
* Updates CRL cache.
- *
+ *
* @param crlentry revocation information obtained from revocation request
* @param requestId revocation request id
* @exception EBaseException failed to mark certificate record as revoked
*/
public void revokeCert(RevokedCertImpl crlentry, String requestId)
- throws EBaseException;
+ throws EBaseException;
/**
* Issues certificate base on enrollment information,
* creates certificate record, and stores all necessary data.
- *
+ *
* @param certi information obtain from revocation request
* @exception EBaseException failed to issue certificate or create certificate record
*/
public X509CertImpl issueX509Cert(X509CertInfo certi)
- throws EBaseException;
+ throws EBaseException;
public X509CertImpl issueX509Cert(X509CertInfo certi, String profileId, String rid)
- throws EBaseException;
+ throws EBaseException;
/**
* Services profile request.
- *
+ *
* @param request profile enrollment request information
* @exception EBaseException failed to service profile enrollment request
*/
public void serviceProfileRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
* Returns KRA-CA connector.
- *
+ *
* @return KRA-CA connector
*/
public IConnector getKRAConnector();
public void setKRAConnector(IConnector c);
- public IConnector getConnector(IConfigStore cs) throws EBaseException;
+ public IConnector getConnector(IConfigStore cs) throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtension.java b/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtension.java
index edaea59c..b3e94d02 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtension.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtension.java
@@ -17,24 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import netscape.security.x509.Extension;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.common.NameValuePairs;
-
/**
* An interface representing a CRL extension plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICMSCRLExtension {
/**
* Returns CRL extension OID string.
- *
+ *
* @return OID of CRL extension
*/
public String getCRLExtOID();
@@ -42,33 +40,33 @@ public interface ICMSCRLExtension {
/**
* Sets extension criticality and returns extension
* with new criticality.
- *
+ *
* @param ext CRL extension that will change criticality
* @param critical new criticality to be assigned to CRL extension
* @return extension with new criticality
*/
Extension setCRLExtensionCriticality(Extension ext,
- boolean critical);
+ boolean critical);
/**
* Builds new CRL extension based on configuration data,
* issuing point information, and criticality.
- *
+ *
* @param config configuration store
* @param crlIssuingPoint CRL issuing point
* @param critical criticality to be assigned to CRL extension
* @return extension new CRL extension
*/
Extension getCRLExtension(IConfigStore config,
- Object crlIssuingPoint,
- boolean critical);
+ Object crlIssuingPoint,
+ boolean critical);
/**
* Reads configuration data and converts them to name value pairs.
- *
+ *
* @param config configuration store
- * @param nvp name value pairs obtained from configuration data
+ * @param nvp name value pairs obtained from configuration data
*/
public void getConfigParams(IConfigStore config,
- NameValuePairs nvp);
-}
+ NameValuePairs nvp);
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtensions.java b/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtensions.java
index f6df2226..6fa520fb 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtensions.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICMSCRLExtensions.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.common.NameValuePairs;
-
/**
* An interface representing a list of CRL extensions.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICMSCRLExtensions {
@@ -33,7 +31,7 @@ public interface ICMSCRLExtensions {
/**
* Updates configuration store for extension identified by id
* with data delivered in name value pairs.
- *
+ *
* @param id extension id
* @param nvp name value pairs with new configuration data
* @param config configuration store
@@ -42,7 +40,7 @@ public interface ICMSCRLExtensions {
/**
* Reads configuration data and returns them as name value pairs.
- *
+ *
* @param id extension id
* @return name value pairs with configuration data
*/
@@ -50,10 +48,9 @@ public interface ICMSCRLExtensions {
/**
* Returns class name with its path.
- *
+ *
* @param name extension id
* @return class name with its path
*/
public String getClassPath(String name);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java b/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
index dab45fdb..f317db9b 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICRLIssuingPoint.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import java.math.BigInteger;
import java.util.Date;
import java.util.Set;
@@ -34,19 +33,18 @@ import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.common.NameValuePairs;
import com.netscape.certsrv.dbs.IElementProcessor;
-
/**
- * This class encapsulates CRL issuing mechanism. CertificateAuthority
- * contains a map of CRLIssuingPoint indexed by string ids. Each issuing
- * point contains information about CRL issuing and publishing parameters
- * as well as state information which includes last issued CRL, next CRL
- * serial number, time of the next update etc.
- * If autoUpdateInterval is set to non-zero value then worker thread
- * is created that will perform CRL update at scheduled intervals. Update
- * can also be triggered by invoking updateCRL method directly. Another
+ * This class encapsulates CRL issuing mechanism. CertificateAuthority
+ * contains a map of CRLIssuingPoint indexed by string ids. Each issuing
+ * point contains information about CRL issuing and publishing parameters
+ * as well as state information which includes last issued CRL, next CRL
+ * serial number, time of the next update etc.
+ * If autoUpdateInterval is set to non-zero value then worker thread
+ * is created that will perform CRL update at scheduled intervals. Update
+ * can also be triggered by invoking updateCRL method directly. Another
* parameter minUpdateInterval can be used to prevent CRL
* from being updated too often
- *
+ *
* @version $Revision$, $Date$
*/
@@ -75,105 +73,105 @@ public interface ICRLIssuingPoint {
/**
* Returns true if CRL issuing point is enabled.
- *
+ *
* @return true if CRL issuing point is enabled
*/
public boolean isCRLIssuingPointEnabled();
/**
* Returns true if CRL generation is enabled.
- *
+ *
* @return true if CRL generation is enabled
*/
public boolean isCRLGenerationEnabled();
/**
* Enables or disables CRL issuing point according to parameter.
- *
+ *
* @param enable if true enables CRL issuing point
*/
public void enableCRLIssuingPoint(boolean enable);
/**
* Returns CRL update status.
- *
+ *
* @return CRL update status
*/
public String getCrlUpdateStatusStr();
/**
* Returns CRL update error.
- *
+ *
* @return CRL update error
*/
public String getCrlUpdateErrorStr();
/**
* Returns CRL publishing status.
- *
+ *
* @return CRL publishing status
*/
public String getCrlPublishStatusStr();
/**
* Returns CRL publishing error.
- *
+ *
* @return CRL publishing error
*/
public String getCrlPublishErrorStr();
/**
* Returns CRL issuing point initialization status.
- *
+ *
* @return status of CRL issuing point initialization
*/
public int isCRLIssuingPointInitialized();
/**
* Checks if manual update is set.
- *
+ *
* @return true if manual update is set
*/
public boolean isManualUpdateSet();
/**
* Checks if expired certificates are included in CRL.
- *
+ *
* @return true if expired certificates are included in CRL
*/
public boolean areExpiredCertsIncluded();
/**
* Checks if CRL includes CA certificates only.
- *
+ *
* @return true if CRL includes CA certificates only
*/
public boolean isCACertsOnly();
/**
* Checks if CRL includes profile certificates only.
- *
+ *
* @return true if CRL includes profile certificates only
*/
public boolean isProfileCertsOnly();
/**
* Checks if CRL issuing point includes this profile.
- *
+ *
* @return true if CRL issuing point includes this profile
*/
public boolean checkCurrentProfile(String id);
/**
* Initializes CRL issuing point.
- *
- * @param ca certificate authority that holds CRL issuing point
+ *
+ * @param ca certificate authority that holds CRL issuing point
* @param id CRL issuing point id
* @param config configuration sub-store for CRL issuing point
* @exception EBaseException thrown if initialization failed
*/
- public void init(ISubsystem ca, String id, IConfigStore config)
- throws EBaseException;
+ public void init(ISubsystem ca, String id, IConfigStore config)
+ throws EBaseException;
/**
* This method is called during shutdown.
@@ -183,21 +181,21 @@ public interface ICRLIssuingPoint {
/**
* Returns internal id of this CRL issuing point.
- *
+ *
* @return internal id of this CRL issuing point
*/
public String getId();
/**
* Returns internal description of this CRL issuing point.
- *
+ *
* @return internal description of this CRL issuing point
*/
public String getDescription();
/**
* Sets internal description of this CRL issuing point.
- *
+ *
* @param description description for this CRL issuing point.
*/
public void setDescription(String description);
@@ -205,21 +203,21 @@ public interface ICRLIssuingPoint {
/**
* Returns DN of the directory entry where CRLs from this issuing point
* are published.
- *
+ *
* @return DN of the directory entry where CRLs are published.
*/
public String getPublishDN();
/**
* Returns signing algorithm.
- *
+ *
* @return signing algorithm
*/
public String getSigningAlgorithm();
/**
* Returns signing algorithm used in last signing operation..
- *
+ *
* @return last signing algorithm
*/
public String getLastSigningAlgorithm();
@@ -227,14 +225,14 @@ public interface ICRLIssuingPoint {
/**
* Returns current CRL generation schema for this CRL issuing point.
* <P>
- *
+ *
* @return current CRL generation schema for this CRL issuing point
*/
public int getCRLSchema();
/**
* Returns current CRL number of this CRL issuing point.
- *
+ *
* @return current CRL number of this CRL issuing point
*/
public BigInteger getCRLNumber();
@@ -242,56 +240,56 @@ public interface ICRLIssuingPoint {
/**
* Returns current delta CRL number of this CRL issuing point.
* <P>
- *
+ *
* @return current delta CRL number of this CRL issuing point
*/
public BigInteger getDeltaCRLNumber();
/**
* Returns next CRL number of this CRL issuing point.
- *
+ *
* @return next CRL number of this CRL issuing point
*/
public BigInteger getNextCRLNumber();
/**
* Returns number of entries in the current CRL.
- *
+ *
* @return number of entries in the current CRL
*/
public long getCRLSize();
/**
* Returns number of entries in delta CRL
- *
+ *
* @return number of entries in delta CRL
*/
public long getDeltaCRLSize();
/**
* Returns time of the last update.
- *
+ *
* @return last CRL update time
*/
public Date getLastUpdate();
/**
* Returns time of the next update.
- *
+ *
* @return next CRL update time
*/
public Date getNextUpdate();
/**
* Returns time of the next delta CRL update.
- *
+ *
* @return next delta CRL update time
*/
public Date getNextDeltaUpdate();
/**
* Returns all the revoked certificates from the CRL cache.
- *
+ *
* @param start first requested CRL entry
* @param end next after last requested CRL entry
* @return set of all the revoked certificates or null if there are none.
@@ -300,7 +298,7 @@ public interface ICRLIssuingPoint {
/**
* Returns certificate authority.
- *
+ *
* @return certificate authority
*/
public ISubsystem getCertificateAuthority();
@@ -308,14 +306,14 @@ public interface ICRLIssuingPoint {
/**
* Schedules immediate CRL manual-update
* and sets signature algorithm to be used for signing.
- *
+ *
* @param signatureAlgorithm signature algorithm to be used for signing
*/
- public void setManualUpdate(String signatureAlgorithm);
+ public void setManualUpdate(String signatureAlgorithm);
/**
* Returns auto update interval in milliseconds.
- *
+ *
* @return auto update interval in milliseconds
*/
public long getAutoUpdateInterval();
@@ -323,14 +321,14 @@ public interface ICRLIssuingPoint {
/**
* Returns true if CRL is updated for every change
* of revocation status of any certificate.
- *
+ *
* @return true if CRL update is always triggered by revocation operation
*/
public boolean getAlwaysUpdate();
/**
* Returns next update grace period in minutes.
- *
+ *
* @return next update grace period in minutes
*/
public long getNextUpdateGracePeriod();
@@ -338,7 +336,7 @@ public interface ICRLIssuingPoint {
/**
* Returns filter used to build CRL based on information stored
* in local directory.
- *
+ *
* @return filter used to search local directory
*/
public String getFilter();
@@ -348,30 +346,31 @@ public interface ICRLIssuingPoint {
* Calls certificate record processor to get necessary data
* from certificate records.
* This also regenerates CRL cache.
- *
+ *
* @param cp certificate record processor
* @exception EBaseException if an error occurred in the database.
*/
public void processRevokedCerts(IElementProcessor cp)
- throws EBaseException;
+ throws EBaseException;
/**
* Returns date of revoked certificate or null
* if certificated is not listed as revoked.
- *
+ *
* @param serialNumber serial number of certificate to be checked
* @param checkDeltaCache true if delta CRL cache suppose to be
- * included in checking process
+ * included in checking process
* @param includeExpiredCerts true if delta CRL cache with expired
- * certificates suppose to be included in checking process
+ * certificates suppose to be included in checking process
* @return date of revoked certificate or null
*/
public Date getRevocationDateFromCache(BigInteger serialNumber,
boolean checkDeltaCache,
boolean includeExpiredCerts);
+
/**
* Returns split times from CRL generation.
- *
+ *
* @return split times from CRL generation in milliseconds
*/
public Vector<Long> getSplitTimes();
@@ -379,13 +378,13 @@ public interface ICRLIssuingPoint {
/**
* Generates CRL now based on cache or local directory if cache
* is not available. It also publishes CRL if it is required.
- *
+ *
* @param signingAlgorithm signing algorithm to be used for CRL signing
* @exception EBaseException if an error occurred during
- * CRL generation or publishing
+ * CRL generation or publishing
*/
- public void updateCRLNow(String signingAlgorithm)
- throws EBaseException;
+ public void updateCRLNow(String signingAlgorithm)
+ throws EBaseException;
/**
* Clears CRL cache
@@ -399,21 +398,21 @@ public interface ICRLIssuingPoint {
/**
* Returns number of recently revoked certificates.
- *
+ *
* @return number of recently revoked certificates
*/
public int getNumberOfRecentlyRevokedCerts();
/**
* Returns number of recently unrevoked certificates.
- *
+ *
* @return number of recently unrevoked certificates
*/
public int getNumberOfRecentlyUnrevokedCerts();
/**
* Returns number of recently expired and revoked certificates.
- *
+ *
* @return number of recently expired and revoked certificates
*/
public int getNumberOfRecentlyExpiredCerts();
@@ -421,7 +420,7 @@ public interface ICRLIssuingPoint {
/**
* Converts list of extensions supplied by revocation request
* to list of extensions required to be placed in CRL.
- *
+ *
* @param exts list of extensions supplied by revocation request
* @return list of extensions required to be placed in CRL
*/
@@ -429,7 +428,7 @@ public interface ICRLIssuingPoint {
/**
* Adds revoked certificate to delta-CRL cache.
- *
+ *
* @param serialNumber serial number of revoked certificate
* @param revokedCert revocation information supplied by revocation request
*/
@@ -437,7 +436,7 @@ public interface ICRLIssuingPoint {
/**
* Adds revoked certificate to delta-CRL cache.
- *
+ *
* @param serialNumber serial number of revoked certificate
* @param revokedCert revocation information supplied by revocation request
* @param requestId revocation request id
@@ -447,14 +446,14 @@ public interface ICRLIssuingPoint {
/**
* Adds unrevoked certificate to delta-CRL cache.
- *
+ *
* @param serialNumber serial number of unrevoked certificate
*/
public void addUnrevokedCert(BigInteger serialNumber);
/**
* Adds unrevoked certificate to delta-CRL cache.
- *
+ *
* @param serialNumber serial number of unrevoked certificate
* @param requestId unrevocation request id
*/
@@ -462,7 +461,7 @@ public interface ICRLIssuingPoint {
/**
* Adds expired and revoked certificate to delta-CRL cache.
- *
+ *
* @param serialNumber serial number of expired and revoked certificate
*/
public void addExpiredCert(BigInteger serialNumber);
@@ -475,7 +474,7 @@ public interface ICRLIssuingPoint {
/**
* Updates issuing point configuration according to supplied data
* in name value pairs.
- *
+ *
* @param params name value pairs defining new issuing point configuration
* @return true if configuration is updated successfully
*/
@@ -483,35 +482,35 @@ public interface ICRLIssuingPoint {
/**
* Returns true if delta-CRL is enabled.
- *
+ *
* @return true if delta-CRL is enabled
*/
public boolean isDeltaCRLEnabled();
/**
* Returns true if CRL cache is enabled.
- *
+ *
* @return true if CRL cache is enabled
*/
public boolean isCRLCacheEnabled();
/**
* Returns true if CRL cache is empty.
- *
+ *
* @return true if CRL cache is empty
*/
public boolean isCRLCacheEmpty();
/**
* Returns true if CRL cache testing is enabled.
- *
+ *
* @return true if CRL cache testing is enabled
*/
public boolean isCRLCacheTestingEnabled();
/**
* Returns true if supplied delta-CRL is matching current delta-CRL.
- *
+ *
* @param deltaCRL delta-CRL to verify against current delta-CRL
* @return true if supplied delta-CRL is matching current delta-CRL
*/
@@ -519,7 +518,7 @@ public interface ICRLIssuingPoint {
/**
* Returns status of CRL generation.
- *
+ *
* @return one of the following according to CRL generation status:
* CRL_UPDATE_DONE, CRL_UPDATE_STARTED, and CRL_PUBLISHING_STARTED
*/
@@ -528,18 +527,17 @@ public interface ICRLIssuingPoint {
/**
* Generates CRL now based on cache or local directory if cache
* is not available. It also publishes CRL if it is required.
- * CRL is signed by default signing algorithm.
- *
+ * CRL is signed by default signing algorithm.
+ *
* @exception EBaseException if an error occurred during
- * CRL generation or publishing
+ * CRL generation or publishing
*/
- public void updateCRLNow() throws EBaseException;
+ public void updateCRLNow() throws EBaseException;
/**
* Returns list of CRL extensions.
- *
+ *
* @return list of CRL extensions
*/
public ICMSCRLExtensions getCRLExtensions();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ca/ICertificateAuthority.java b/pki/base/common/src/com/netscape/certsrv/ca/ICertificateAuthority.java
index d86a37dd..a49653c1 100644
--- a/pki/base/common/src/com/netscape/certsrv/ca/ICertificateAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/ca/ICertificateAuthority.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ca;
-
import java.util.Enumeration;
import netscape.security.x509.CertificateChain;
@@ -29,7 +28,6 @@ import netscape.security.x509.X509CertInfo;
import org.mozilla.jss.crypto.SignatureAlgorithm;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
@@ -45,12 +43,11 @@ import com.netscape.certsrv.request.IRequestQueue;
import com.netscape.certsrv.request.IService;
import com.netscape.certsrv.security.ISigningUnit;
-
/**
* An interface represents a Certificate Authority that is
* responsible for certificate specific operations.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICertificateAuthority extends ISubsystem {
@@ -78,7 +75,7 @@ public interface ICertificateAuthority extends ISubsystem {
public final static String PROP_DEF_VALIDITY = "DefaultIssueValidity";
public final static String PROP_FAST_SIGNING = "fastSigning";
public static final String PROP_ENABLE_ADMIN_ENROLL =
- "enableAdminEnroll";
+ "enableAdminEnroll";
public final static String PROP_CRL_SUBSTORE = "crl";
// make this public so agent gateway can access for now.
@@ -86,9 +83,9 @@ public interface ICertificateAuthority extends ISubsystem {
public final static String PROP_MASTER_CRL = "MasterCRL";
public final static String PROP_CRLEXT_SUBSTORE = "extension";
public final static String PROP_ISSUING_CLASS =
- "com.netscape.cmscore.ca.CRLIssuingPoint";
+ "com.netscape.cmscore.ca.CRLIssuingPoint";
public final static String PROP_EXPIREDCERTS_CLASS =
- "com.netscape.cmscore.ca.CRLWithExpiredCerts";
+ "com.netscape.cmscore.ca.CRLWithExpiredCerts";
public final static String PROP_NOTIFY_SUBSTORE = "notification";
public final static String PROP_CERT_ISSUED_SUBSTORE = "certIssued";
@@ -109,67 +106,68 @@ public interface ICertificateAuthority extends ISubsystem {
public final static String PROP_ID = "id";
public final static String PROP_CERTDB_TRANS_MAXRECORDS = "transitMaxRecords";
- public final static String PROP_CERTDB_TRANS_PAGESIZE = "transitRecordPageSize";
+ public final static String PROP_CERTDB_TRANS_PAGESIZE = "transitRecordPageSize";
/**
* Retrieves the certificate repository where all the locally
* issued certificates are kept.
- *
+ *
* @return CA's certificate repository
*/
public ICertificateRepository getCertificateRepository();
/**
* Retrieves the request queue of this certificate authority.
- *
+ *
* @return CA's request queue
*/
public IRequestQueue getRequestQueue();
/**
* Retrieves the policy processor of this certificate authority.
- *
+ *
* @return CA's policy processor
*/
public IPolicyProcessor getPolicyProcessor();
public boolean noncesEnabled();
- public Nonces getNonces();
+
+ public Nonces getNonces();
/**
* Retrieves the publishing processor of this certificate authority.
- *
+ *
* @return CA's publishing processor
*/
public IPublisherProcessor getPublisherProcessor();
/**
* Retrieves the next available serial number.
- *
+ *
* @return next available serial number
*/
public String getStartSerial();
/**
* Sets the next available serial number.
- *
+ *
* @param serial next available serial number
* @exception EBaseException failed to set next available serial number
*/
public void setStartSerial(String serial) throws EBaseException;
/**
- * Retrieves the last serial number that can be used for
+ * Retrieves the last serial number that can be used for
* certificate issuance in this certificate authority.
- *
+ *
* @return the last serial number
*/
public String getMaxSerial();
/**
- * Sets the last serial number that can be used for
+ * Sets the last serial number that can be used for
* certificate issuance in this certificate authority.
- *
+ *
* @param serial the last serial number
* @exception EBaseException failed to set the last serial number
*/
@@ -177,21 +175,21 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the default signature algorithm of this certificate authority.
- *
+ *
* @return the default signature algorithm of this CA
*/
public SignatureAlgorithm getDefaultSignatureAlgorithm();
/**
* Retrieves the default signing algorithm of this certificate authority.
- *
+ *
* @return the default signing algorithm of this CA
*/
public String getDefaultAlgorithm();
/**
* Sets the default signing algorithm of this certificate authority.
- *
+ *
* @param algorithm new default signing algorithm
* @exception EBaseException failed to set the default signing algorithm
*/
@@ -199,7 +197,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the supported signing algorithms of this certificate authority.
- *
+ *
* @return the supported signing algorithms of this CA
*/
public String[] getCASigningAlgorithms();
@@ -207,30 +205,30 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Allows certificates to have validities that are longer
* than this certificate authority's.
- *
+ *
* @param enableCAPast if equals "true", it allows certificates
- * to have validity longer than CA's certificate validity
+ * to have validity longer than CA's certificate validity
* @exception EBaseException failed to set above option
*/
- public void setValidity(String enableCAPast) throws EBaseException;
+ public void setValidity(String enableCAPast) throws EBaseException;
/**
* Retrieves the default validity period.
- *
+ *
* @return the default validity length in days
*/
public long getDefaultValidity();
/**
* Retrieves all the CRL issuing points.
- *
+ *
* @return enumeration of all the CRL issuing points
*/
public Enumeration<ICRLIssuingPoint> getCRLIssuingPoints();
/**
* Retrieves CRL issuing point with the given identifier.
- *
+ *
* @param id CRL issuing point id
* @return CRL issuing point with given id
*/
@@ -238,7 +236,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Adds CRL issuing point with the given identifier and description.
- *
+ *
* @param crlSubStore sub-store with all CRL issuing points
* @param id CRL issuing point id
* @param description CRL issuing point description
@@ -249,7 +247,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Deletes CRL issuing point with the given identifier.
- *
+ *
* @param crlSubStore sub-store with all CRL issuing points
* @param id CRL issuing point id
*/
@@ -257,77 +255,77 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the CRL repository.
- *
+ *
* @return CA's CRL repository
*/
public ICRLRepository getCRLRepository();
/**
* Retrieves the Replica ID repository.
- *
+ *
* @return CA's Replica ID repository
*/
public IReplicaIDRepository getReplicaRepository();
/**
* Retrieves the request in queue listener.
- *
+ *
* @return the request in queue listener
*/
public IRequestListener getRequestInQListener();
/**
* Retrieves all request listeners.
- *
+ *
* @return name enumeration of all request listeners
*/
- public Enumeration<String> getRequestListenerNames();
+ public Enumeration<String> getRequestListenerNames();
/**
* Retrieves the request listener for issued certificates.
- *
+ *
* @return the request listener for issued certificates
*/
public IRequestListener getCertIssuedListener();
/**
* Retrieves the request listener for revoked certificates.
- *
+ *
* @return the request listener for revoked certificates
*/
public IRequestListener getCertRevokedListener();
/**
* Retrieves the CA certificate chain.
- *
+ *
* @return the CA certificate chain
*/
- public CertificateChain getCACertChain();
+ public CertificateChain getCACertChain();
/**
* Retrieves the CA certificate.
- *
+ *
* @return the CA certificate
*/
public org.mozilla.jss.crypto.X509Certificate getCaX509Cert();
/**
* Retrieves the CA certificate.
- *
+ *
* @return the CA certificate
*/
public X509CertImpl getCACert();
/**
* Updates the CRL immediately for MasterCRL issuing point if it exists.
- *
+ *
* @exception EBaseException failed to create or publish CRL
*/
public void updateCRLNow() throws EBaseException;
/**
* Publishes the CRL immediately for MasterCRL issuing point if it exists.
- *
+ *
* @exception EBaseException failed to publish CRL
*/
public void publishCRLNow() throws EBaseException;
@@ -335,7 +333,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the signing unit that manages the CA signing key for
* signing certificates.
- *
+ *
* @return the CA signing unit for certificates
*/
public ISigningUnit getSigningUnit();
@@ -343,7 +341,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the signing unit that manages the CA signing key for
* signing CRL.
- *
+ *
* @return the CA signing unit for CRLs
*/
public ISigningUnit getCRLSigningUnit();
@@ -351,28 +349,28 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the signing unit that manages the CA signing key for
* signing OCSP response.
- *
+ *
* @return the CA signing unit for OCSP responses
*/
public ISigningUnit getOCSPSigningUnit();
/**
* Sets the maximium path length in the basic constraint extension.
- *
+ *
* @param num the maximium path length
*/
public void setBasicConstraintMaxLen(int num);
/**
* Is this a clone CA?
- *
+ *
* @return true if this is a clone CA
*/
public boolean isClone();
/**
* Retrieves the request listener by name.
- *
+ *
* @param name request listener name
* @return the request listener
*/
@@ -382,17 +380,17 @@ public interface ICertificateAuthority extends ISubsystem {
* get request notifier
*/
public IRequestNotifier getRequestNotifier();
-
+
/**
* Registers a request listener.
- *
+ *
* @param listener request listener to be registered
*/
public void registerRequestListener(IRequestListener listener);
/**
* Registers a request listener.
- *
+ *
* @param name under request listener is going to be registered
* @param listener request listener to be registered
*/
@@ -400,32 +398,32 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the issuer name of this certificate authority.
- *
+ *
* @return the issuer name of this certificate authority
*/
public X500Name getX500Name();
/**
* Retrieves the issuer name of this certificate authority issuing point.
- *
+ *
* @return the issuer name of this certificate authority issuing point
*/
- public X500Name getCRLX500Name();
+ public X500Name getCRLX500Name();
/**
* Signs the given CRL with the specific algorithm.
- *
+ *
* @param crl CRL to be signed
* @param algname algorithm used for signing
* @return signed CRL
* @exception EBaseException failed to sign CRL
*/
public X509CRLImpl sign(X509CRLImpl crl, String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Logs a message to this certificate authority.
- *
+ *
* @param level logging level
* @param msg logged message
*/
@@ -433,25 +431,25 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Returns the nickname for the CA signing certificate.
- *
+ *
* @return the nickname for the CA signing certificate
*/
public String getNickname();
/**
* Signs a X.509 certificate template.
- *
+ *
* @param certInfo X.509 certificate template
* @param algname algorithm used for signing
* @return signed certificate
* @exception EBaseException failed to sign certificate
*/
public X509CertImpl sign(X509CertInfo certInfo, String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the default certificate version.
- *
+ *
* @return the default version certificate
*/
public CertificateVersion getDefaultCertVersion();
@@ -459,7 +457,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Is this CA allowed to issue certificate that has longer
* validty than the CA's.
- *
+ *
* @return true if allows certificates to have validity longer than CA's
*/
public boolean isEnablePastCATime();
@@ -467,30 +465,30 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Retrieves the CA service object that is responsible for
* processing requests.
- *
+ *
* @return CA service object
*/
public IService getCAService();
/**
* Returns the in-memory count of the processed OCSP requests.
- *
+ *
* @return number of processed OCSP requests in memory
*/
public long getNumOCSPRequest();
/**
- * Returns the in-memory time (in mini-second) of
+ * Returns the in-memory time (in mini-second) of
* the processed time for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPRequestTotalTime();
/**
- * Returns the in-memory time (in mini-second) of
+ * Returns the in-memory time (in mini-second) of
* the signing time for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPTotalSignTime();
@@ -498,7 +496,7 @@ public interface ICertificateAuthority extends ISubsystem {
/**
* Returns the total data signed
* for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPTotalData();
diff --git a/pki/base/common/src/com/netscape/certsrv/cert/ICrossCertPairSubsystem.java b/pki/base/common/src/com/netscape/certsrv/cert/ICrossCertPairSubsystem.java
index 653c684f..c79479dc 100644
--- a/pki/base/common/src/com/netscape/certsrv/cert/ICrossCertPairSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/cert/ICrossCertPairSubsystem.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.cert;
-
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* Interface for handling cross certs
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICrossCertPairSubsystem extends ISubsystem {
@@ -35,27 +33,30 @@ public interface ICrossCertPairSubsystem extends ISubsystem {
/**
* "import" the CA cert cross-signed by another CA (potentially a
* bridge CA) into internal ldap db.
- * If publishing is turned on, and
+ * If publishing is turned on, and
* if matches up a pair, then publish to publishing directory
- * otherwise, leave in internal ldap db and wait for it's matching
+ * otherwise, leave in internal ldap db and wait for it's matching
* pair
+ *
* @param certBytes binary byte array of the cert
- * @exception EBaseException when certBytes conversion to X509
- * certificate fails
+ * @exception EBaseException when certBytes conversion to X509
+ * certificate fails
*/
public void importCert(byte[] certBytes) throws EBaseException;
/**
* publish all cert pairs, if publisher is on
- * @exception EBaseException when publishing fails
+ *
+ * @exception EBaseException when publishing fails
*/
public void publishCertPairs() throws EBaseException;
- /**
- * convert byte array to X509Certificate
- * @return X509Certificate the X509Certificate class
- * representation of the certificate byte array
- * @exception CertificateException when conversion fails
- */
+ /**
+ * convert byte array to X509Certificate
+ *
+ * @return X509Certificate the X509Certificate class
+ * representation of the certificate byte array
+ * @exception CertificateException when conversion fails
+ */
public X509Certificate byteArray2X509Cert(byte[] certBytes) throws CertificateException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/client/IDataProcessor.java b/pki/base/common/src/com/netscape/certsrv/client/IDataProcessor.java
index 3bce367d..b6784b6d 100644
--- a/pki/base/common/src/com/netscape/certsrv/client/IDataProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/client/IDataProcessor.java
@@ -17,11 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.client;
-
/**
* this class represents the callback interface between
* the client package and the data storage object (data model)
- *
+ *
* @version $Revision$, $Date$
*/
public interface IDataProcessor {
@@ -29,6 +28,7 @@ public interface IDataProcessor {
/**
* This method will be callby the client package each time
* data object arrived from the server side.
+ *
* @param data data object expected by the interface implementor
*/
public void processData(Object data);
diff --git a/pki/base/common/src/com/netscape/certsrv/client/connection/IAuthenticator.java b/pki/base/common/src/com/netscape/certsrv/client/connection/IAuthenticator.java
index ff83cadd..0a96ee69 100644
--- a/pki/base/common/src/com/netscape/certsrv/client/connection/IAuthenticator.java
+++ b/pki/base/common/src/com/netscape/certsrv/client/connection/IAuthenticator.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.client.connection;
-
/**
* An interface represents authentiator.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IAuthenticator {
diff --git a/pki/base/common/src/com/netscape/certsrv/client/connection/IConnection.java b/pki/base/common/src/com/netscape/certsrv/client/connection/IConnection.java
index 18bd3518..4a8166b0 100644
--- a/pki/base/common/src/com/netscape/certsrv/client/connection/IConnection.java
+++ b/pki/base/common/src/com/netscape/certsrv/client/connection/IConnection.java
@@ -22,13 +22,13 @@ import java.net.SocketException;
/**
* Interface for all connection objects.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConnection {
/**
- * Send request to the server using this connection
+ * Send request to the server using this connection
*/
public int sendRequest(String req) throws IOException;
@@ -41,11 +41,10 @@ public interface IConnection {
* Close the connection
*/
public void disconnect();
-
+
/**
* SetTimeout
*/
public void setSoTimeout(int timeout) throws SocketException;
-
-
+
}
diff --git a/pki/base/common/src/com/netscape/certsrv/client/connection/IConnectionFactory.java b/pki/base/common/src/com/netscape/certsrv/client/connection/IConnectionFactory.java
index 1542d5fa..4506abbf 100644
--- a/pki/base/common/src/com/netscape/certsrv/client/connection/IConnectionFactory.java
+++ b/pki/base/common/src/com/netscape/certsrv/client/connection/IConnectionFactory.java
@@ -23,21 +23,21 @@ import java.net.UnknownHostException;
/**
* Interface for all connection factory. Primarily act as
* the abstraction layer for different kind of connection factory.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConnectionFactory {
/**
* Creates connection using the host and port
- * @param host The host to connect to
- * @param port The port to connect to
- * @return The created connection
- * @throws IOException On an IO Error
- * @throws UnknownHostException If the host can't be resolved
+ *
+ * @param host The host to connect to
+ * @param port The port to connect to
+ * @return The created connection
+ * @throws IOException On an IO Error
+ * @throws UnknownHostException If the host can't be resolved
*/
public IConnection create(String host, int port)
- throws IOException, UnknownHostException;
+ throws IOException, UnknownHostException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/common/ConfigConstants.java b/pki/base/common/src/com/netscape/certsrv/common/ConfigConstants.java
index 9f892cd2..2ea7b746 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/ConfigConstants.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/ConfigConstants.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
- * This interface contains constants that are used
- * in the protocol between the configuration daemon
+ * This interface contains constants that are used
+ * in the protocol between the configuration daemon
* and UI configuration wizard.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ConfigConstants {
@@ -30,8 +29,8 @@ public interface ConfigConstants {
public static final String TRUE = "true";
public static final String FALSE = "false";
public static final String OPTYPE = "opType";
- public static final String TASKID = "taskID";
-
+ public static final String TASKID = "taskID";
+
// Stages
public static final String STAGES = "stages";
public static final String STAGE_INTERNAL_DB = "stageInternalDB";
@@ -135,7 +134,7 @@ public interface ConfigConstants {
public static final String PR_EE_SECURE_PORT = "eeGateway.https.port";
public static final String PR_AGENT_PORT = "agentGateway.https.port";
public static final String PR_RADM_PORT = "radm.https.port";
- public static final String PR_RADM_PORT_SETUP="radm.port";
+ public static final String PR_RADM_PORT_SETUP = "radm.port";
public static final String PR_EE_PORT_ENABLE = "eeGateway.http.enable";
public static final String PR_EE_PORTS_ENABLE = "eePortsEnable";
@@ -173,27 +172,27 @@ public interface ConfigConstants {
public static final String PR_ADD_LDIF_PATH = "addLdifPath";
public static final String PR_MOD_LDIF_PATH = "modLdifPath";
public static final String PR_SIGNING_KEY_MIGRATION_TOKEN =
- "signingKeyMigrationToken";
+ "signingKeyMigrationToken";
public static final String PR_SSL_KEY_MIGRATION_TOKEN =
- "sslKeyMigrationToken";
+ "sslKeyMigrationToken";
public static final String PR_SIGNING_KEY_MIGRATION_TOKEN_PASSWD =
- "signingKeyMigrationTokenPasswd";
+ "signingKeyMigrationTokenPasswd";
public static final String PR_SIGNING_KEY_MIGRATION_TOKEN_SOPPASSWD =
- "signingKeyMigrationTokenSOPPasswd";
+ "signingKeyMigrationTokenSOPPasswd";
public static final String PR_SSL_KEY_MIGRATION_TOKEN_PASSWD =
- "sslKeyMigrationTokenPasswd";
+ "sslKeyMigrationTokenPasswd";
public static final String PR_SSL_KEY_MIGRATION_TOKEN_SOPPASSWD =
- "sslKeyMigrationTokenSOPPasswd";
+ "sslKeyMigrationTokenSOPPasswd";
public static final String PR_NUM_MIGRATION_WARNINGS =
- "numMigrationWarnings";
+ "numMigrationWarnings";
public static final String PR_MIGRATION_WARNING = "migrationWarning";
public static final String PR_CA_KEY_TYPE = "caKeyType";
public static final String PR_LDAP_PASSWORD = "ldapPassword";
public static final String PR_MIGRATION_PASSWORD = "migrationPassword";
// Key and Cert
- public static final String PR_HARDWARE_SPLIT = "hardwareSplit";
- public static final String PR_TOKEN_LIST = "tokenList";
+ public static final String PR_HARDWARE_SPLIT = "hardwareSplit";
+ public static final String PR_TOKEN_LIST = "tokenList";
public static final String PR_TOKEN_NAME = "tokenName";
public static final String PR_SUBJECT_NAME = "subjectName";
public static final String PR_CA_SUBJECT_NAME = "caSubjectName";
@@ -293,8 +292,8 @@ public interface ConfigConstants {
// CA serial number
public static final String PR_CA_SERIAL_NUMBER = "caSerialNumber";
public static final String PR_CA_ENDSERIAL_NUMBER = "caEndSerialNumber";
-
- // KRA number
+
+ // KRA number
public static final String PR_REQUEST_NUMBER = "requestNumber";
public static final String PR_ENDREQUEST_NUMBER = "endRequestNumber";
public static final String PR_SERIAL_REQUEST_NUMBER = "serialRequestNumber";
@@ -331,4 +330,3 @@ public interface ConfigConstants {
public static final String PR_AGREEMENT_NAME_2 = "agreementName2";
public static final String PR_REPLICATION_MANAGER_PASSWD_2 = "replicationManagerPwd2";
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/common/Constants.java b/pki/base/common/src/com/netscape/certsrv/common/Constants.java
index c8503491..be9d33b4 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/Constants.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/Constants.java
@@ -17,11 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
- * This interface contains constants that are shared
+ * This interface contains constants that are shared
* by certificate server and its client SDK.
- *
+ *
* @version $Revision$, $Date$
*/
public interface Constants {
@@ -48,24 +47,24 @@ public interface Constants {
//STATIC UI TYPE
public final static String TYPE_PASSWORD = "password";
-
+
/**********************************************************
* PROPERTY NAME LISTED BELOW
**********************************************************/
-
+
/*========================================================
* General
- *========================================================*/
+ *========================================================*/
public final static String PR_PORT = "port";
public final static String PR_SSLPORT = "sslPort";
-
+
/*========================================================
* Tasks
*========================================================*/
public final static String PR_SERVER_START = "start";
public final static String PR_SERVER_STOP = "stop";
public final static String PR_SERVER_RESTART = "restart";
-
+
/*========================================================
* Networks
*========================================================*/
@@ -79,15 +78,15 @@ public interface Constants {
public final static String PR_GATEWAY_S_BACKLOG = "gateway.https.backlog";
public final static String PR_GATEWAY_BACKLOG = "gateway.http.backlog";
public final static String PR_GATEWAY_PORT_ENABLED =
- "gateway.http.enable";
+ "gateway.http.enable";
public final static String PR_MASTER_AGENT_PORT = "master.ca.agent.port";
public final static String PR_MASTER_AGENT_HOST = "master.ca.agent.host";
-
+
/*========================================================
* SMTP
*========================================================*/
public final static String PR_SERVER_NAME = "server";
-
+
/*========================================================
* SNMP
*========================================================*/
@@ -109,7 +108,7 @@ public interface Constants {
/*========================================================
* Users and Groups
*========================================================*/
-
+
//group properties
public final static String PR_GROUP_DESC = "desc";
public final static String PR_GROUP_USER = "user";
@@ -149,7 +148,7 @@ public interface Constants {
*========================================================*/
public final static String PR_NOTIFICATION_FORM_NAME = "emailTemplate";
public final static String PR_NOTIFICATION_SUBJECT =
- "emailSubject";
+ "emailSubject";
public final static String PR_NOTIFICATION_SENDER = "senderEmail";
public final static String PR_NOTIFICATION_RECEIVER = "recipientEmail";
@@ -194,7 +193,7 @@ public interface Constants {
/*========================================================
* LDAP Publishing
*========================================================*/
-
+
// publishing properties
public final static String PR_BASIC_AUTH = "BasicAuth";
public final static String PR_SSL_AUTH = "SslClientAuth";
@@ -253,7 +252,7 @@ public interface Constants {
public final static String PR_BASE_DN = "baseDN";
public final static String PR_DNCOMPS = "dnComps";
public final static String PR_FILTERCOMPS = "filterComps";
-
+
// ldap connection test
public final static String PR_CONN_INITED = "connInited";
public final static String PR_CONN_INIT_FAIL = "connInitFail";
@@ -323,10 +322,10 @@ public interface Constants {
public final static String PR_RENEWAL_ENABLED = "renewal.enabled";
public final static String PR_RENEWAL_VALIDITY = "renewal.validity";
public final static String PR_RENEWAL_EMAIL = "renewal.email";
- public final static String PR_RENEWAL_EXPIREDNOTIFIEDENABLED =
- "renewal.expired.notification.enabled";
- public final static String PR_RENEWAL_NUMNOTIFICATION =
- "renewal.numNotification";
+ public final static String PR_RENEWAL_EXPIREDNOTIFIEDENABLED =
+ "renewal.expired.notification.enabled";
+ public final static String PR_RENEWAL_NUMNOTIFICATION =
+ "renewal.numNotification";
public final static String PR_RENEWAL_INTERVAL = "renewal.interval";
public final static String PR_SERVLET_CLASS = "class";
public final static String PR_SERVLET_URI = "uri";
@@ -354,7 +353,7 @@ public interface Constants {
public final static String PR_ACL_CLASS = "class";
public final static String PR_ACL_DESC = "desc";
public final static String PR_ACL_RIGHTS = "rights";
-
+
/*========================================================
* Key Recovery
*========================================================*/
@@ -386,7 +385,7 @@ public interface Constants {
public final static String PR_RA_INSTANCE = "ra";
public final static String PR_KRA_INSTANCE = "kra";
public final static String PR_TKS_INSTANCE = "tks";
-
+
/*
* Certificate info
*/
@@ -467,7 +466,7 @@ public interface Constants {
/*========================================================
* Security
*========================================================*/
-
+
//functionality
public final static String PR_CERT_SERVER = "SERVER";
public final static String PR_CERT_ADMIN = "ADMIN";
@@ -477,7 +476,7 @@ public interface Constants {
public final static String PR_CERT_RA = "RA";
public final static String PR_CERT_POA = "POA";
public final static String PR_CERT_TRANS = "TRANS";
-
+
// key and certificate management
public final static String PR_OPERATION_TYPE = "operationtype";
public final static String PR_INSTALL_TYPE = "install";
@@ -485,9 +484,9 @@ public interface Constants {
//public final static String PR_CA_SIGNING_CERT = "cacert";
//public final static String PR_SERVER_CERT = "servercert";
public final static String PR_CLIENT_CERT = "clientcert";
- public final static String PR_FULL_INTERNAL_TOKEN_NAME="Internal Key Storage Token";
- public final static String PR_INTERNAL_TOKEN_NAME =
- "internal";
+ public final static String PR_FULL_INTERNAL_TOKEN_NAME = "Internal Key Storage Token";
+ public final static String PR_INTERNAL_TOKEN_NAME =
+ "internal";
public final static String PR_TOKEN_NAME = "tokenName";
public final static String PR_TOKEN_PASSWD = "tokenPwd";
public final static String PR_KEY_LENGTH = "keyLength";
@@ -503,15 +502,15 @@ public interface Constants {
public final static String PR_CSR = "csr";
//encryption
-
+
/* Cipher Version: domestic or export */
public final static String PR_CIPHER_VERSION = "cipherversion";
public final static String PR_CIPHER_VERSION_DOMESTIC = "cipherdomestic";
public final static String PR_CIPHER_VERSION_EXPORT = "cipherexport";
-
+
/* Cipher Fortezza: true, false */
public final static String PR_CIPHER_FORTEZZA = "cipherfortezza";
-
+
/* Token and Certificates */
public final static String PR_TOKEN_LIST = "tokenlist";
public final static String PR_TOKEN_PREFIX = "token_";
@@ -525,42 +524,24 @@ public interface Constants {
public final static String PR_ECTYPE = "ectype";
/* values for SSL cipher preferences */
- public final static String
- PR_SSL2_RC4_128_WITH_MD5 = "rc4";
- public final static String
- PR_SSL2_RC4_128_EXPORT40_WITH_MD5 = "rc4export";
- public final static String
- PR_SSL2_RC2_128_CBC_WITH_MD5 = "rc2";
- public final static String
- PR_SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 = "rc2export";
- public final static String
- PR_SSL2_DES_64_CBC_WITH_MD5 = "des";
- public final static String
- PR_SSL2_DES_192_EDE3_CBC_WITH_MD5 = "desede3";
- public final static String
- PR_SSL3_RSA_WITH_NULL_MD5 = "rsa_null_md5";
- public final static String
- PR_SSL3_RSA_EXPORT_WITH_RC4_40_MD5 = "rsa_rc4_40_md5";
- public final static String
- PR_SSL3_RSA_WITH_RC4_128_MD5 = "rsa_rc4_128_md5";
- public final static String
- PR_SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = "rsa_rc2_40_md5";
- public final static String
- PR_SSL3_RSA_WITH_DES_CBC_SHA = "rsa_des_sha";
- public final static String
- PR_SSL3_RSA_WITH_3DES_EDE_CBC_SHA = "rsa_3des_sha";
- public final static String
- PR_SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = "fortezza";
- public final static String
- PR_SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA = "fortezza_rc4_128_sha";
- public final static String
- PR_SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA = "rsa_fips_3des_sha";
- public final static String
- PR_SSL_RSA_FIPS_WITH_DES_CBC_SHA = "rsa_fips_des_sha";
- public final static String
- PR_TLS_RSA_EXPORT1024_WITH_RC4_56_SHA = "tls_rsa_rc4_56_sha";
- public final static String
- PR_TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA = "tls_rsa_des_sha";
+ public final static String PR_SSL2_RC4_128_WITH_MD5 = "rc4";
+ public final static String PR_SSL2_RC4_128_EXPORT40_WITH_MD5 = "rc4export";
+ public final static String PR_SSL2_RC2_128_CBC_WITH_MD5 = "rc2";
+ public final static String PR_SSL2_RC2_128_CBC_EXPORT40_WITH_MD5 = "rc2export";
+ public final static String PR_SSL2_DES_64_CBC_WITH_MD5 = "des";
+ public final static String PR_SSL2_DES_192_EDE3_CBC_WITH_MD5 = "desede3";
+ public final static String PR_SSL3_RSA_WITH_NULL_MD5 = "rsa_null_md5";
+ public final static String PR_SSL3_RSA_EXPORT_WITH_RC4_40_MD5 = "rsa_rc4_40_md5";
+ public final static String PR_SSL3_RSA_WITH_RC4_128_MD5 = "rsa_rc4_128_md5";
+ public final static String PR_SSL3_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = "rsa_rc2_40_md5";
+ public final static String PR_SSL3_RSA_WITH_DES_CBC_SHA = "rsa_des_sha";
+ public final static String PR_SSL3_RSA_WITH_3DES_EDE_CBC_SHA = "rsa_3des_sha";
+ public final static String PR_SSL3_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = "fortezza";
+ public final static String PR_SSL3_FORTEZZA_DMS_WITH_RC4_128_SHA = "fortezza_rc4_128_sha";
+ public final static String PR_SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA = "rsa_fips_3des_sha";
+ public final static String PR_SSL_RSA_FIPS_WITH_DES_CBC_SHA = "rsa_fips_des_sha";
+ public final static String PR_TLS_RSA_EXPORT1024_WITH_RC4_56_SHA = "tls_rsa_rc4_56_sha";
+ public final static String PR_TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA = "tls_rsa_des_sha";
/*========================================================
* Watchdog and Server State Messages
@@ -599,9 +580,9 @@ public interface Constants {
public final static String PT_DN = "dn";
public final static String PV_SYSTEM_ADMINISTRATORS =
- "SystemAdministrators";
+ "SystemAdministrators";
public final static String PV_CERTIFICATE_ADMINISTRATORS =
- "CertificateAdministrators";
+ "CertificateAdministrators";
public final static String OP_AUTHENTICATE = "authenticate";
public final static String OP_RESTART = "restart";
@@ -636,9 +617,9 @@ public interface Constants {
// certificate authority operations
public final static String PT_PUBLISH_DN = "ldappublish.ldap.admin-dn";
public final static String PT_PUBLISH_PWD =
- "ldappublish.ldap.admin-password";
+ "ldappublish.ldap.admin-password";
public final static String PT_PUBLISH_FREQ =
- "crl.crl0.autoUpdateInterval";
+ "crl.crl0.autoUpdateInterval";
public final static String PT_SERIALNO = "serialno";
public final static String PT_NAMES = "names";
public final static String PT_CERTIFICATES = "certificates";
diff --git a/pki/base/common/src/com/netscape/certsrv/common/DestDef.java b/pki/base/common/src/com/netscape/certsrv/common/DestDef.java
index 1d3eaff1..273e6af0 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/DestDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/DestDef.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
* This interface defines all the operation destination
* used in the administration protocol between the
* console and the server.
- *
+ *
* @version $Revision$, $Date$
*/
public interface DestDef {
diff --git a/pki/base/common/src/com/netscape/certsrv/common/NameValuePair.java b/pki/base/common/src/com/netscape/certsrv/common/NameValuePair.java
index 44d55e32..ed1d0614 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/NameValuePair.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/NameValuePair.java
@@ -17,13 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
-
-
/**
* A class represents a name value pair. A name value
* pair consists of a name and a value.
- *
+ *
* @version $Revision$, $Date$
*/
public class NameValuePair {
@@ -33,7 +30,7 @@ public class NameValuePair {
/**
* Constructs value pair object.
- *
+ *
* @param name name
* @param value value
*/
@@ -44,7 +41,7 @@ public class NameValuePair {
/**
* Retrieves the name.
- *
+ *
* @return name
*/
public String getName() {
@@ -53,19 +50,19 @@ public class NameValuePair {
/**
* Retrieves the value.
- *
+ *
* @return value
*/
public String getValue() {
return mValue;
}
-
+
/**
* Sets the value
- *
+ *
* @param value value
*/
public void setValue(String value) {
mValue = value;
}
-}
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/common/NameValuePairs.java b/pki/base/common/src/com/netscape/certsrv/common/NameValuePairs.java
index 651de782..61d3cad6 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/NameValuePairs.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/NameValuePairs.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.StringTokenizer;
import java.util.Vector;
-
/**
- * A class represents an ordered list of name
+ * A class represents an ordered list of name
* value pairs.
- *
+ *
* @version $Revision$, $Date$
*/
public class NameValuePairs {
@@ -40,7 +38,7 @@ public class NameValuePairs {
/**
* Constructs name value pairs.
- */
+ */
public NameValuePairs() {
}
@@ -48,7 +46,7 @@ public class NameValuePairs {
* Adds a name value pair into this set.
* if the name already exist, the value will
* be replaced.
- *
+ *
* @param name name
* @param value value
*/
@@ -66,7 +64,7 @@ public class NameValuePairs {
/**
* Retrieves name value pair from this set.
- *
+ *
* @param name name
* @return name value pair
*/
@@ -76,7 +74,7 @@ public class NameValuePairs {
/**
* Returns number of pairs in this set.
- *
+ *
* @return size
*/
public int size() {
@@ -85,7 +83,7 @@ public class NameValuePairs {
/**
* Retrieves name value pairs in specific position.
- *
+ *
* @param pos position of the value
* @return name value pair
*/
@@ -104,7 +102,7 @@ public class NameValuePairs {
/**
* Retrieves value of the name value pairs that matches
* the given name.
- *
+ *
* @param name name
* @return value
*/
@@ -119,14 +117,14 @@ public class NameValuePairs {
/**
* Retrieves a list of names.
- *
+ *
* @return a list of names
*/
public Enumeration<String> getNames() {
Vector<String> v = new Vector<String>();
- int size = mPairs.size();
+ int size = mPairs.size();
- for (int i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++) {
NameValuePair p = (NameValuePair) mPairs.elementAt(i);
v.addElement(p.getName());
@@ -134,11 +132,11 @@ public class NameValuePairs {
//System.out.println("getNames: "+v.size());
return v.elements();
}
-
+
/**
* Show the content of this name value container as
* string representation.
- *
+ *
* @return string representation
*/
public String toString() {
@@ -155,7 +153,7 @@ public class NameValuePairs {
/**
* Parses a string into name value pairs.
- *
+ *
* @param s string
* @param nvp name value pairs
* @return true if successful
@@ -174,16 +172,16 @@ public class NameValuePairs {
String v = t.substring(i + 1);
nvp.add(n, v);
- }
+ }
return true;
}
/**
* Returns a list of name value pair object.
- *
+ *
* @return name value objects
*/
public Enumeration<NameValuePair> elements() {
return mPairs.elements();
}
-}
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/common/OpDef.java b/pki/base/common/src/com/netscape/certsrv/common/OpDef.java
index 9cfcab4a..22a974e1 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/OpDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/OpDef.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
* This interface defines all the administration operations
* used in the administration protocol between the console
* and the server.
- *
+ *
* @version $Revision$, $Date$
*/
public interface OpDef {
diff --git a/pki/base/common/src/com/netscape/certsrv/common/PrefixDef.java b/pki/base/common/src/com/netscape/certsrv/common/PrefixDef.java
index 11a58c5d..833847d0 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/PrefixDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/PrefixDef.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
* This interface defines all the prefix tags
* used in the administration protocol between
* the console and the server.
- *
+ *
* @version $Revision$, $Date$
*/
public interface PrefixDef {
@@ -34,8 +33,8 @@ public interface PrefixDef {
public final static String PX_SYS = "SYS_";
public final static String PX_DEF = "DEF_";
public final static String PX_PP = "CERT_PP";
-
+
//log content
public final static String PX_LOG = "log";
-
+
}
diff --git a/pki/base/common/src/com/netscape/certsrv/common/ScopeDef.java b/pki/base/common/src/com/netscape/certsrv/common/ScopeDef.java
index 0be3fdf0..f29067f5 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/ScopeDef.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/ScopeDef.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
* This interface defines all the operation scope
* used in the administration protocol between the
* console and the server.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ScopeDef {
@@ -31,7 +30,7 @@ public interface ScopeDef {
public final static String SC_GROUPS = "groups";
public final static String SC_USERS = "users";
public final static String SC_USER_CERTS = "certs";
-
+
public final static String SC_SNMP = "snmp";
public final static String SC_SMTP = "smtp";
public final static String SC_SUBSYSTEM = "subsystem";
@@ -39,12 +38,12 @@ public interface ScopeDef {
public final static String SC_GATEWAY = "gateway";
public final static String SC_ADMIN = "admin";
public final static String SC_NETWORK = "network";
-
+
// profile
public final static String SC_PROFILE_IMPLS = "profile";
public final static String SC_PROFILE_RULES = "rules";
public final static String SC_PROFILE_DEFAULT_POLICY = "defaultPolicy";
- public final static String SC_PROFILE_CONSTRAINT_POLICY = "constraintPolicy";
+ public final static String SC_PROFILE_CONSTRAINT_POLICY = "constraintPolicy";
public final static String SC_PROFILE_POLICIES = "policies";
public final static String SC_PROFILE_POLICY_CONFIG = "config";
public final static String SC_PROFILE_INPUT = "profileInput";
@@ -83,7 +82,7 @@ public interface ScopeDef {
public final static String SC_LOG_CONTENT = "log_content";
public final static String SC_AUDITLOG_CONTENT = "transactionsLog_content";
public final static String SC_ERRORLOG_CONTENT = "errorLog_content";
- public final static String SC_SYSTEMLOG_CONTENT = "systemLog_content";
+ public final static String SC_SYSTEMLOG_CONTENT = "systemLog_content";
//LDAP publishing
public final static String SC_LDAP = "ldap";
@@ -109,9 +108,9 @@ public interface ScopeDef {
public final static String SC_RECOVERY = "recovery";
public final static String SC_AGENT_PWD = "agentPwd";
public final static String SC_MNSCHEME = "mnScheme";
-
+
//stat
- public final static String SC_STAT = "stat";
+ public final static String SC_STAT = "stat";
// RA
public final static String SC_GENERAL = "general";
@@ -119,10 +118,10 @@ public interface ScopeDef {
public final static String SC_PKIGW = "pkigw";
public final static String SC_SERVLET = "servlet";
public final static String SC_CONNECTOR = "connector";
-
+
//tasks
public final static String SC_TASKS = "tasks";
-
+
//authentication
public final static String SC_AUTH = "auths";
public final static String SC_AUTHTYPE = "authType";
@@ -139,7 +138,7 @@ public interface ScopeDef {
public final static String SC_NOTIFICATION_REQ_COMP = "notificationREQC";
public final static String SC_NOTIFICATION_REV_COMP = "notificationREVC";
public final static String SC_NOTIFICATION_RIQ = "notificationRIQ";
-
+
// acl
public final static String SC_ACL_IMPLS = "impl";
public final static String SC_ACL = "acls";
@@ -181,7 +180,7 @@ public interface ScopeDef {
public final static String SC_PLATFORM = "platform";
public final static String SC_GET_NICKNAMES = "getNicknames";
-
+
// Profile
public final static String SC_SUPPORTED_CONSTRAINTPOLICIES = "supportedConstraintPolicies";
diff --git a/pki/base/common/src/com/netscape/certsrv/common/TaskId.java b/pki/base/common/src/com/netscape/certsrv/common/TaskId.java
index 458822ff..01a97b2a 100644
--- a/pki/base/common/src/com/netscape/certsrv/common/TaskId.java
+++ b/pki/base/common/src/com/netscape/certsrv/common/TaskId.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.common;
-
/**
* This interface defines all the tasks used in
* the configuration protocol between the
* configuration wizard and the configuration
* daemon.
- *
+ *
* @version $Revision$, $Date$
*/
public interface TaskId {
@@ -66,7 +65,7 @@ public interface TaskId {
// get information about all cryptotokens
public final static String TASK_TOKEN_INFO = "tokenInfo";
-
+
// server get master or clone setting
public final static String TASK_MASTER_OR_CLONE = "SetMasterOrClone";
// single signon
@@ -100,10 +99,10 @@ public interface TaskId {
// set CA starting serial number
public final static String TASK_SET_CA_SERIAL = "setCASerial";
- // set CA starting serial number
+ // set CA starting serial number
public final static String TASK_SET_KRA_NUMBER = "setKRANumber";
- // check key length
+ // check key length
public final static String TASK_CHECK_KEYLENGTH = "checkKeyLength";
// check certificate extension
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IConnector.java b/pki/base/common/src/com/netscape/certsrv/connector/IConnector.java
index 6dcca9d2..202fb079 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IConnector.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IConnector.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.request.IRequest;
-
/**
* This interface represents a connector that forwards
* CMS requests to a remote authority.
- *
+ *
* To register a connector, one can add the following
* to the CMS.cfg:
- *
+ *
* <pre>
- *
+ *
* Example for KRA type connector.
* ca.connector.KRA.enable=true
* ca.connector.KRA.host=thehost.netscape.com #Remote host.
@@ -39,21 +37,22 @@ import com.netscape.certsrv.request.IRequest;
* ca.connector.KRA.uri="/kra/connector" #Uri of the KRA server.
* ca.connector.KRA.id="kra"
* ca.connector.KRA.minHttpConns=1 #Min connection pool connections.
- * ca.connector.KRA.maxHttpConns=10 #Max connection pool connections.
+ * ca.connector.KRA.maxHttpConns=10 #Max connection pool connections.
* </pre>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConnector {
/**
* Sends the request to a remote authority.
+ *
* @param req Request to be forwarded to remote authority.
* @return true for success, otherwise false.
- * @exception EBaseException Failure to send request to remote authority.
+ * @exception EBaseException Failure to send request to remote authority.
*/
public boolean send(IRequest req)
- throws EBaseException;
+ throws EBaseException;
/**
* Starts this connector.
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnFactory.java b/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnFactory.java
index c53c6f09..27a94a57 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnFactory.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnFactory.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import com.netscape.certsrv.base.EBaseException;
/**
@@ -26,26 +25,27 @@ import com.netscape.certsrv.base.EBaseException;
* Multiple threads use this interface to utilize and release
* the Ldap connection resources. This factory will maintain a
* list of Http type connections to the remote host.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IHttpConnFactory {
-
/**
* Request access to a Ldap connection from the pool.
+ *
* @exception EBaseException if any error occurs, such as a
* @return Ldap connection object.
- * connection is not available
+ * connection is not available
*/
public IHttpConnection getConn()
- throws EBaseException;
+ throws EBaseException;
/**
* Return connection to the factory. mandatory after a getConn().
+ *
* @param conn Ldap connection object to be returned to the free list of the pool.
* @exception EBaseException On any failure to return the connection.
*/
public void returnConn(IHttpConnection conn)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java b/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java
index 6ee57059..d1652dc9 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IHttpConnection.java
@@ -17,26 +17,25 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* This represents a HTTP connection to a remote authority.
* Http connection is used by the connector to send
* PKI messages to a remote authority. The remote authority
* will reply with a PKI message as well. An example would
* be the communication between a CA and a KRA.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IHttpConnection {
/**
* Sends the PKI message to the remote authority.
+ *
* @param tomsg Message to forward to authority.
* @exception EBaseException Failed to send message.
*/
- public IPKIMessage send(IPKIMessage tomsg)
- throws EBaseException;
+ public IPKIMessage send(IPKIMessage tomsg)
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IHttpPKIMessage.java b/pki/base/common/src/com/netscape/certsrv/connector/IHttpPKIMessage.java
index 5cb53e25..efa49126 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IHttpPKIMessage.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IHttpPKIMessage.java
@@ -17,39 +17,41 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import com.netscape.certsrv.request.IRequest;
-
/**
- * This represents a Http PKI message. It contains
- * simple name/value pair values. Also maintains information
+ * This represents a Http PKI message. It contains
+ * simple name/value pair values. Also maintains information
* about the status and type of the message.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IHttpPKIMessage extends IPKIMessage {
/**
* Retrieves the request type.
+ *
* @return String with the type of request.
*/
public String getReqType();
/**
* Retrieves the request identifier.
+ *
* @return String of name of request.
*/
public String getReqId();
/**
* Copies contents of request to make a simple name/value message.
+ *
* @param r Instance of IRequest to be copied from.
*/
public void fromRequest(IRequest r);
/**
* Copies contents to request.
+ *
* @param r Instance of IRequest to be copied to.
*/
public void toRequest(IRequest r);
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IPKIMessage.java b/pki/base/common/src/com/netscape/certsrv/connector/IPKIMessage.java
index 57ce9700..787dd838 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IPKIMessage.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IPKIMessage.java
@@ -17,37 +17,37 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import java.io.Serializable;
import com.netscape.certsrv.request.IRequest;
-
/**
* Messages that are serialized and go over the wire.
* It must be serializable, and
- * later will be inherited by CRMF message.
- *
+ * later will be inherited by CRMF message.
+ *
* @version $Revision$, $Date$
*/
public interface IPKIMessage extends Serializable {
/**
- *
- * Returns status of request.
- * @return String of request status.
- */
+ *
+ * Returns status of request.
+ *
+ * @return String of request status.
+ */
public String getReqStatus();
/**
* Retrieves the request type.
+ *
* @return String of type of request.
*/
public String getReqType();
-
/**
* Retrieves the request identifer.
+ *
* @return String of name of request.
*/
public String getReqId();
@@ -55,6 +55,7 @@ public interface IPKIMessage extends Serializable {
/**
* Makes a PKIMessage from a request
* PKIMessage will be sent to wire.
+ *
* @param r Request to copy from.
*/
public void fromRequest(IRequest r);
@@ -62,8 +63,9 @@ public interface IPKIMessage extends Serializable {
/**
* Copies contents of PKIMessage to the request
* PKIMessage is from the wire.
+ *
* @param r Request to copy to.
*/
public void toRequest(IRequest r);
-
+
}
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java b/pki/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java
index a97936aa..50a3aea5 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IRemoteAuthority.java
@@ -17,38 +17,39 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
-
-
/**
* This represents a remote authority that can be
* a certificate manager, or key recovery manager or
* some other manager.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRemoteAuthority {
/**
* Retrieves the host name of the remote Authority.
+ *
* @return String with the name of host of remote Authority.
*/
public String getHost();
/**
* Retrieves the port number of the remote Authority.
+ *
* @return Int with port number of remote Authority.
*/
public int getPort();
/**
* Retrieves the URI of the remote Authority.
+ *
* @return String with URI of remote Authority.
*/
public String getURI();
/**
* Retrieves the timeout value for the connection to the remote Authority.
+ *
* @return In with remote Authority timeout value.
*/
public int getTimeout();
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IRequestEncoder.java b/pki/base/common/src/com/netscape/certsrv/connector/IRequestEncoder.java
index 7838aa5e..478af417 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IRequestEncoder.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IRequestEncoder.java
@@ -17,34 +17,33 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import java.io.IOException;
-
/**
* This represents a rquest encoder that serializes and
* deserializes a request to a Remote Authority so that it can be sent through
* the connector.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRequestEncoder {
/**
* Encodes a request object.
+ *
* @param r Object to serve as the source of the message.
* @return String containing encoded message.
* @exception IOException Failure of the encoding operation due to IO error.
*/
String encode(Object r)
- throws IOException;
+ throws IOException;
/**
- * Dncodes a String into an object.
+ * Dncodes a String into an object.
+ *
* @return Object which is the result of the decoded message.
* @exception IOException Failure of the decoding operation due to IO error.
*/
Object decode(String s)
- throws IOException;
+ throws IOException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/connector/IResender.java b/pki/base/common/src/com/netscape/certsrv/connector/IResender.java
index 3574c3a5..85d3e364 100644
--- a/pki/base/common/src/com/netscape/certsrv/connector/IResender.java
+++ b/pki/base/common/src/com/netscape/certsrv/connector/IResender.java
@@ -17,25 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.connector;
-
import com.netscape.certsrv.request.IRequest;
-
/**
- * Resend requests at intervals to the server to ensure completion of requests.
- * Default interval is 5 minutes. The need to resend a message could arise
+ * Resend requests at intervals to the server to ensure completion of requests.
+ * Default interval is 5 minutes. The need to resend a message could arise
* due to an error or the fact that the message could not be serviced
* immediately.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IResender extends Runnable {
/**
* Adds the request to the resend queue.
+ *
* @param r Request to be placed on the resend queue.
*/
public void addRequest(IRequest r);
-
-}
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/DBResources.java b/pki/base/common/src/com/netscape/certsrv/dbs/DBResources.java
index 4bfb14fb..a2201b8e 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/DBResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/DBResources.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for DBS subsystem.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class DBResources extends ListResourceBundle {
@@ -38,4 +36,3 @@ public class DBResources extends ListResourceBundle {
static final Object[][] contents = {};
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/EDBException.java b/pki/base/common/src/com/netscape/certsrv/dbs/EDBException.java
index 14f653d6..77508dca 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/EDBException.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/EDBException.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a database exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EDBException extends EBaseException {
@@ -36,12 +34,12 @@ public class EDBException extends EBaseException {
/**
* Resource class name.
*/
- private static final String DB_RESOURCES = DBResources.class.getName();
+ private static final String DB_RESOURCES = DBResources.class.getName();
/**
* Constructs a database exception.
* <P>
- *
+ *
* @param msgFormat message format
*/
public EDBException(String msgFormat) {
@@ -51,7 +49,7 @@ public class EDBException extends EBaseException {
/**
* Constructs a database exception.
* <P>
- *
+ *
* @param msgFormat message format
* @param param parameter
*/
@@ -62,7 +60,7 @@ public class EDBException extends EBaseException {
/**
* Constructs a database exception.
* <P>
- *
+ *
* @param msgFormat message format
* @param e exception as parameter
*/
@@ -73,7 +71,7 @@ public class EDBException extends EBaseException {
/**
* Constructs a database exception.
* <P>
- *
+ *
* @param msgFormat message format
* @param params list of parameters
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/EDBNotAvailException.java b/pki/base/common/src/com/netscape/certsrv/dbs/EDBNotAvailException.java
index 170a8ee8..6afb2dcc 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/EDBNotAvailException.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/EDBNotAvailException.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
/**
* Indicates internal db is down.
- *
+ *
* @version $Revision$, $Date$
*/
public class EDBNotAvailException extends EDBException {
@@ -32,7 +31,7 @@ public class EDBNotAvailException extends EDBException {
/**
* Constructs a ldap server down exception with host & port info.
- *
+ *
* @param errorString Detailed error message.
*/
public EDBNotAvailException(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/EDBRecordNotFoundException.java b/pki/base/common/src/com/netscape/certsrv/dbs/EDBRecordNotFoundException.java
index 1640fc78..dd3880c1 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/EDBRecordNotFoundException.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/EDBRecordNotFoundException.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
/**
* Indicates internal db is down.
- *
+ *
* @version $Revision$, $Date$
*/
public class EDBRecordNotFoundException extends EDBException {
@@ -32,7 +31,7 @@ public class EDBRecordNotFoundException extends EDBException {
/**
* Constructs a ldap server down exception with host & port info.
- *
+ *
* @param errorString Detailed error message.
*/
public EDBRecordNotFoundException(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBAttrMapper.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBAttrMapper.java
index 173537d6..27e15bd7 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBAttrMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBAttrMapper.java
@@ -17,21 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.util.Enumeration;
import netscape.ldap.LDAPAttributeSet;
import com.netscape.certsrv.base.EBaseException;
-
/**
* An interface represents an attribute mapper. A mapper
* has knowledge on how to convert a db attribute into
* zero or more LDAP attribute, and vice versa.
* <P>
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBAttrMapper {
@@ -39,44 +37,44 @@ public interface IDBAttrMapper {
* Retrieves a list of LDAP attributes that are used
* in the mapper. By having this, the framework can
* provide search on selective attributes.
- *
+ *
* @return a list of supported attribute names
*/
public Enumeration<String> getSupportedLDAPAttributeNames();
/**
* Maps object attribute into LDAP attributes.
- *
+ *
* @param parent parent object where the object comes from
* @param name name of db attribute
* @param obj object itself
* @param attrs LDAP attribute set where the result should be stored
* @exception EBaseException failed to map object
*/
- public void mapObjectToLDAPAttributeSet(IDBObj parent,
- String name, Object obj, LDAPAttributeSet attrs)
- throws EBaseException;
+ public void mapObjectToLDAPAttributeSet(IDBObj parent,
+ String name, Object obj, LDAPAttributeSet attrs)
+ throws EBaseException;
/**
- * Maps LDAP attributes into object, and puts the object
+ * Maps LDAP attributes into object, and puts the object
* into 'parent'.
- *
+ *
* @param attrs LDAP attribute set
* @param name name of db attribute to be processed
* @param parent parent object where the object should be added
* @exception EBaseException failed to map object
*/
- public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
- String name, IDBObj parent) throws EBaseException;
+ public void mapLDAPAttributeSetToObject(LDAPAttributeSet attrs,
+ String name, IDBObj parent) throws EBaseException;
/**
* Maps search filters into LDAP search filter.
- *
+ *
* @param name name of db attribute
* @param op filte operation (i.e. "=", ">=")
* @param value attribute value
* @exception EBaseException failed to map filter
*/
- public String mapSearchFilter(String name, String op,
- String value) throws EBaseException;
+ public String mapSearchFilter(String name, String op,
+ String value) throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBDynAttrMapper.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBDynAttrMapper.java
index c1c8c3b3..5684dd4d 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBDynAttrMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBDynAttrMapper.java
@@ -6,7 +6,7 @@ package com.netscape.certsrv.dbs;
* assigned db attribute into zero or more dynamically assigned LDAP
* attributes, and vice versa.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IDBDynAttrMapper extends IDBAttrMapper {
@@ -14,7 +14,7 @@ public interface IDBDynAttrMapper extends IDBAttrMapper {
/**
* Returns true if the LDAP attribute can be mapped by this
* dynamic mapper.
- *
+ *
* @param attrName LDAP attribute name to check
* @return a list of supported attribute names
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBObj.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBObj.java
index ab1ce0a4..5c634bee 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBObj.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBObj.java
@@ -17,26 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* An interface represents a database object
* that is serializable.
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBObj extends IAttrSet {
/**
- * Returns a list of serializable attribute
+ * Returns a list of serializable attribute
* names. This method should return the
* attribute name even if there is no attribute
* value for the attribute.
- *
+ *
* @return a list of serializable attribute names
*/
public Enumeration<String> getSerializableAttrNames();
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBRegistry.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBRegistry.java
index 4270c9ce..241f3af9 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBRegistry.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBRegistry.java
@@ -17,42 +17,40 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import netscape.ldap.LDAPAttributeSet;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* A class represents a registry where all the
- * schema (object classes and attribute) information
+ * schema (object classes and attribute) information
* is stored.
- *
+ *
* Attribute mappers can be registered with this
* registry.
- *
+ *
* Given the schema information stored, this registry
* has knowledge to convert a Java object into a
* LDAPAttributeSet or vice versa.
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBRegistry extends ISubsystem {
/**
* Registers object class.
- *
+ *
* @param className java class to create for the object classes
* @param ldapNames a list of LDAP object classes
* @exception EDBException failed to register
*/
public void registerObjectClass(String className, String ldapNames[])
- throws EDBException;
+ throws EDBException;
/**
* See if an object class is registered.
- *
+ *
* @param className java class to create
* @return true if object class is registered already
*/
@@ -60,17 +58,17 @@ public interface IDBRegistry extends ISubsystem {
/**
* Registers attribute mapper.
- *
+ *
* @param ufName LDAP attribute name
* @param mapper mapper to invoke for the attribute
* @exception EDBException failed to register
*/
- public void registerAttribute(String ufName, IDBAttrMapper mapper)
- throws EDBException;
+ public void registerAttribute(String ufName, IDBAttrMapper mapper)
+ throws EDBException;
/**
* See if an attribute is registered.
- *
+ *
* @param ufName attribute name
* @return true if attribute is registered already
*/
@@ -78,6 +76,7 @@ public interface IDBRegistry extends ISubsystem {
/**
* Registers a dynamic attribute mapper.
+ *
* @param mapper The dynamic mapper to register
*/
public void registerDynamicMapper(IDBDynAttrMapper mapper);
@@ -86,6 +85,7 @@ public interface IDBRegistry extends ISubsystem {
* Creates LDAP-based search filters with help of
* registered mappers.
* Parses filter from filter string specified in RFC1558.
+ *
* <pre>
* <filter> ::= '(' <filtercomp> ')'
* <filtercomp> ::= <and> | <or> | <not> | <item>
@@ -107,7 +107,7 @@ public interface IDBRegistry extends ISubsystem {
* <starval> ::= NULL | <value> '*' <starval>
* <final> ::= NULL | <value>
* </pre>
- *
+ *
* @param filter CMS-based filter
* @return LDAP-based filter string
* @exception EBaseException failed to convert filter
@@ -117,55 +117,55 @@ public interface IDBRegistry extends ISubsystem {
/**
* Creates LDAP-based search filters with help of
* registered mappers.
- *
+ *
* @param filter CMS-based filter
* @param c filter converter
* @return LDAP-based filter string
* @exception EBaseException failed to convert filter
*/
- public String getFilter(String filter, IFilterConverter c)
- throws EBaseException;
+ public String getFilter(String filter, IFilterConverter c)
+ throws EBaseException;
/**
* Maps object into LDAP attribute set.
- *
+ *
* @param parent object's parent
* @param name name of the object
* @param obj object to be mapped
* @param attrs LDAP attribute set
* @exception EBaseException failed to map object
*/
- public void mapObject(IDBObj parent, String name, Object obj,
- LDAPAttributeSet attrs) throws EBaseException;
+ public void mapObject(IDBObj parent, String name, Object obj,
+ LDAPAttributeSet attrs) throws EBaseException;
/**
* Retrieves a list of LDAP attributes that are associated
* with the given attributes.
- *
+ *
* @param attrs attributes
* @return LDAP-based attributes
* @exception EBaseException failed to map attributes
*/
- public String[] getLDAPAttributes(String attrs[])
- throws EBaseException;
+ public String[] getLDAPAttributes(String attrs[])
+ throws EBaseException;
/**
* Creates attribute set from object.
- *
+ *
* @param obj database object
* @return LDAP attribute set
* @exception EBaseException failed to create set
*/
- public LDAPAttributeSet createLDAPAttributeSet(IDBObj obj)
- throws EBaseException;
+ public LDAPAttributeSet createLDAPAttributeSet(IDBObj obj)
+ throws EBaseException;
/**
* Creates object from attribute set.
- *
+ *
* @param attrs LDAP attribute set
* @return database object
* @exception EBaseException failed to create object
*/
public IDBObj createObject(LDAPAttributeSet attrs)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
index 7f4e4f8c..ec019423 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSSession.java
@@ -17,45 +17,44 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import netscape.ldap.LDAPSearchResults;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* An interface represents the database session. Operations
* can be performed with a session.
- *
- * Transaction and Caching support can be integrated
+ *
+ * Transaction and Caching support can be integrated
* into session.
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBSSession {
/**
* Returns database subsystem.
- *
+ *
* @return subsystem
*/
public ISubsystem getDBSubsystem();
/**
* Closes this session.
- *
+ *
* @exception EDBException failed to close session
*/
public void close() throws EDBException;
/**
* Adds object to backend database. For example,
+ *
* <PRE>
- * session.add("cn=123459,o=certificate repository,o=airius.com",
- * certRec);
+ * session.add(&quot;cn=123459,o=certificate repository,o=airius.com&quot;,
+ * certRec);
* </PRE>
- *
+ *
* @param name name of the object
* @param obj object to be added
* @exception EDBException failed to add object
@@ -64,7 +63,7 @@ public interface IDBSSession {
/**
* Reads an object from the database.
- *
+ *
* @param name name of the object that is to be read
* @return database object
* @exception EBaseException failed to read object
@@ -74,18 +73,18 @@ public interface IDBSSession {
/**
* Reads an object from the database, and only populates
* the selected attributes.
- *
+ *
* @param name name of the object that is to be read
* @param attrs selected attributes
* @return database object
* @exception EBaseException failed to read object
*/
- public IDBObj read(String name, String attrs[])
- throws EBaseException;
+ public IDBObj read(String name, String attrs[])
+ throws EBaseException;
/**
* Deletes object from database.
- *
+ *
* @param name name of the object that is to be deleted
* @exception EBaseException failed to delete object
*/
@@ -93,43 +92,43 @@ public interface IDBSSession {
/**
* Modify an object in the database.
- *
+ *
* @param name name of the object that is to be modified
* @param mods modifications
* @exception EBaseException failed to modify
*/
- public void modify(String name, ModificationSet mods)
- throws EBaseException;
+ public void modify(String name, ModificationSet mods)
+ throws EBaseException;
/**
- * Searchs for a list of objects that match the
+ * Searchs for a list of objects that match the
* filter.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @return search results
* @exception EBaseException failed to search
*/
- public IDBSearchResults search(String base, String filter)
- throws EBaseException;
+ public IDBSearchResults search(String base, String filter)
+ throws EBaseException;
/**
- * Searchs for a list of objects that match the
+ * Searchs for a list of objects that match the
* filter.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param maxSize max number of entries
* @return search results
* @exception EBaseException failed to search
*/
- public IDBSearchResults search(String base, String filter, int maxSize)
- throws EBaseException;
+ public IDBSearchResults search(String base, String filter, int maxSize)
+ throws EBaseException;
/**
- * Searchs for a list of objects that match the
+ * Searchs for a list of objects that match the
* filter.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param maxSize max number of entries
@@ -137,25 +136,25 @@ public interface IDBSSession {
* @return search results
* @exception EBaseException failed to search
*/
- public IDBSearchResults search(String base, String filter, int maxSize,
- int timeLimit) throws EBaseException;
+ public IDBSearchResults search(String base, String filter, int maxSize,
+ int timeLimit) throws EBaseException;
/**
- * Retrieves a list of object that satifies the given
+ * Retrieves a list of object that satifies the given
* filter.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param attrs selected attributes
* @return search results
* @exception EBaseException failed to search
*/
- public IDBSearchResults search(String base, String filter,
- String attrs[]) throws EBaseException;
+ public IDBSearchResults search(String base, String filter,
+ String attrs[]) throws EBaseException;
/**
* Retrieves a list of objects.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param attrs selected attributes
@@ -163,12 +162,12 @@ public interface IDBSSession {
* @exception EBaseException failed to search
*/
public <T> IDBVirtualList<T> createVirtualList(String base, String filter,
- String attrs[]) throws EBaseException;
+ String attrs[]) throws EBaseException;
/**
* Sets persistent search to retrieve modified
* certificate records.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param attrs selected attributes
@@ -176,11 +175,11 @@ public interface IDBSSession {
* @exception EBaseException failed to search
*/
public LDAPSearchResults persistentSearch(String base, String filter,
- String attrs[]) throws EBaseException;
+ String attrs[]) throws EBaseException;
/**
* Retrieves a list of objects.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param attrs selected attributes
@@ -190,12 +189,12 @@ public interface IDBSSession {
* @exception EBaseException failed to search
*/
public <T> IDBVirtualList<T> createVirtualList(String base, String filter,
- String attrs[], String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String sortKey, int pageSize)
+ throws EBaseException;
/**
* Retrieves a list of objects.
- *
+ *
* @param base starting point of the search
* @param filter search filter
* @param attrs selected attributes
@@ -206,7 +205,7 @@ public interface IDBSSession {
* @exception EBaseException failed to search
*/
public <T> IDBVirtualList<T> createVirtualList(String base, String filter,
- String attrs[], String startFrom,
- String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String startFrom,
+ String sortKey, int pageSize)
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSearchResults.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSearchResults.java
index 9f15b808..04736cf3 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSearchResults.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSearchResults.java
@@ -17,29 +17,27 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.util.Enumeration;
-
/**
* A class represents the search results. A search
* results object contain a enumeration of
* Java objects that are just read from the database.
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBSearchResults extends Enumeration<Object> {
/**
* Checks if any element is available.
- *
+ *
* @return true if there is more elements
*/
public boolean hasMoreElements();
/**
* Retrieves next element.
- *
+ *
* @return next element
*/
public Object nextElement();
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSubsystem.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSubsystem.java
index 350a29c4..fec6e6af 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBSubsystem.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.math.BigInteger;
import netscape.ldap.LDAPConnection;
@@ -25,22 +24,19 @@ import netscape.ldap.LDAPConnection;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* An interface represents certificate server
* backend database.
* <P>
- * This interface separate the database subsystem
- * functionalities from internal implementation.
+ * This interface separate the database subsystem functionalities from internal implementation.
* <P>
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IDBSubsystem extends ISubsystem {
public static final String SUB_ID = "dbs";
-
// values for repos
public static final int CERTS = 0;
public static final int REQUESTS = 1;
@@ -49,21 +45,21 @@ public interface IDBSubsystem extends ISubsystem {
/**
* Retrieves the base DN.
- *
+ *
* @return base DN of the subsystem
*/
public String getBaseDN();
/**
* Retrieves the registry.
- *
+ *
* @return registry
*/
public IDBRegistry getRegistry();
/**
* Creates a database session.
- *
+ *
* @return database session
* @exception EDBException failed to create session
*/
@@ -71,145 +67,145 @@ public interface IDBSubsystem extends ISubsystem {
/**
* Avoids losing serial number.
- *
+ *
* @return true if serial number recovery option is enabled
*/
public boolean enableSerialNumberRecovery();
/**
* Records next serial number in config file
- *
+ *
* @param serial next serial number
- * @exception EBaseException failed to set
+ * @exception EBaseException failed to set
*/
public void setNextSerialConfig(BigInteger serial) throws EBaseException;
/**
* Gets the next serial number in config file
- *
+ *
* @return next serial number
*/
public BigInteger getNextSerialConfig();
/**
* Records maximum serial number limit in config file
- *
+ *
* @param serial max serial number
- * @param repo repo identifier
- * @exception EBaseException failed to set
+ * @param repo repo identifier
+ * @exception EBaseException failed to set
*/
public void setMaxSerialConfig(int repo, String serial) throws EBaseException;
/**
* Records minimum serial number limit in config file
- *
+ *
* @param serial min serial number
- * @param repo repo identifier
- * @exception EBaseException failed to set
+ * @param repo repo identifier
+ * @exception EBaseException failed to set
*/
public void setMinSerialConfig(int repo, String serial) throws EBaseException;
/**
* Records maximum serial number limit for the next range in config file
- *
+ *
* @param serial max serial number
- * @param repo repo identifier
- * @exception EBaseException failed to set
+ * @param repo repo identifier
+ * @exception EBaseException failed to set
*/
public void setNextMaxSerialConfig(int repo, String serial) throws EBaseException;
/**
* Records minimum serial number limit for the next range in config file
- *
+ *
* @param serial min serial number
- * @param repo repo identifier
- * @exception EBaseException failed to set
+ * @param repo repo identifier
+ * @exception EBaseException failed to set
*/
public void setNextMinSerialConfig(int repo, String serial) throws EBaseException;
/**
* Gets minimum serial number limit in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return min serial number
*/
public String getMinSerialConfig(int repo);
/**
* Gets the maximum serial number limit in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return max serial number
*/
public String getMaxSerialConfig(int repo);
/**
* Gets the maximum serial number limit for next range in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return max serial number
*/
public String getNextMaxSerialConfig(int repo);
/**
* Gets minimum serial number limit for next range in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return min serial number
*/
public String getNextMinSerialConfig(int repo);
-
+
/**
* Gets low water mark limit in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return low water mark
*/
public String getLowWaterMarkConfig(int repo);
-
+
/**
* Gets range increment limit for next range in config file
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return range increment
*/
public String getIncrementConfig(int repo);
-
+
/**
* Gets number corresponding to start of next range from database
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return start of next range
*/
public String getNextRange(int repo);
/**
* Determines if a range conflict has been observed in database
- *
- * @param repo repo identifier
+ *
+ * @param repo repo identifier
* @return true if range conflict, false otherwise
*/
public boolean hasRangeConflict(int repo);
/**
* Determines if serial number management has been enabled
- *
+ *
* @return true if enabled, false otherwise
*/
public boolean getEnableSerialMgmt();
- /**
+ /**
* Sets whether serial number management is enabled for certs
- * and requests.
- *
- * @param value true/false
- * @exception EBaseException failed to set
+ * and requests.
+ *
+ * @param value true/false
+ * @exception EBaseException failed to set
*/
public void setEnableSerialMgmt(boolean value) throws EBaseException;
/**
* Returns LDAP connection to connection pool.
- *
+ *
* @param conn connection to be returned
*/
public void returnConn(LDAPConnection conn);
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IDBVirtualList.java b/pki/base/common/src/com/netscape/certsrv/dbs/IDBVirtualList.java
index 7d175c45..919a82ef 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IDBVirtualList.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IDBVirtualList.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A interface represents a virtual list of search results.
* Note that this class must be used with DS4.0.
- *
+ *
* @version $Revision$, $Date$
*/
-public interface IDBVirtualList<E> {
+public interface IDBVirtualList<E> {
/**
* Sets the paging size of this virtual list.
@@ -42,7 +40,7 @@ public interface IDBVirtualList<E> {
/**
* Sets the sort key
- *
+ *
* @param sortKey the attribute to sort by
* @exception EBaseException failed to set
*/
@@ -50,7 +48,7 @@ public interface IDBVirtualList<E> {
/**
* Sets the sort key
- *
+ *
* @param sortKeys the attributes to sort by
* @exception EBaseException failed to set
*/
@@ -58,60 +56,61 @@ public interface IDBVirtualList<E> {
/**
* Retrieves the size of this virtual list.
- * Recommend to call getSize() before getElementAt() or getElements()
+ * Recommend to call getSize() before getElementAt() or getElements()
* since you'd better check if the index is out of bound first.
- *
+ *
* @return current size in list
*/
public int getSize();
/**
* Returns current index.
- *
+ *
* @return current index
*/
public int getSizeBeforeJumpTo();
+
public int getSizeAfterJumpTo();
public int getCurrentIndex();
- /**
+ /**
* Get a page starting at "first" (although we may also fetch
* some preceding entries)
- * Recommend to call getSize() before getElementAt() or getElements()
+ * Recommend to call getSize() before getElementAt() or getElements()
* since you'd better check if the index is out of bound first.
- *
+ *
* @param first the index of the first entry of the page you want to fetch
*/
public boolean getPage(int first);
- /**
+ /**
* Called by application to scroll the list with initial letters.
* Consider text to be an initial substring of the attribute of the
* primary sorting key(the first one specified in the sort key array)
* of an entry.
* If no entries match, the one just before(or after, if none before)
* will be returned as mSelectedIndex
- *
+ *
* @param text the prefix of the first entry of the page you want to fetch
*/
public boolean getPage(String text);
- /**
+ /**
* Fetchs data of a single list item
- * Recommend to call getSize() before getElementAt() or getElements()
+ * Recommend to call getSize() before getElementAt() or getElements()
* since you'd better check if the index is out of bound first.
- * If the index is out of range of the virtual list, an exception
+ * If the index is out of range of the virtual list, an exception
* will be thrown and return null
- *
+ *
* @param index the index of the element to fetch
*/
public E getElementAt(int index);
/**
* Retrieves and jumps to element in the given position.
- *
+ *
* @param i position
* @return object
*/
@@ -119,26 +118,26 @@ public interface IDBVirtualList<E> {
/**
* Processes elements as soon as it arrives. It is
- * more memory-efficient.
- *
+ * more memory-efficient.
+ *
* @param startidx starting index
* @param endidx ending index
* @param ep object to call
* @exception EBaseException failed to process elements
*/
public void processElements(int startidx, int endidx, IElementProcessor ep)
- throws EBaseException;
+ throws EBaseException;
- /**
+ /**
* Gets the virutal selected index
- *
+ *
* @return selected index
*/
public int getSelectedIndex();
- /**
+ /**
* Gets the top of the buffer
- *
+ *
* @return first index
*/
public int getFirstIndex();
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IElementProcessor.java b/pki/base/common/src/com/netscape/certsrv/dbs/IElementProcessor.java
index 75702199..648a13ae 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IElementProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IElementProcessor.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* Processor handles object read from the session.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IElementProcessor {
/**
* Handles object
- *
+ *
* @param o object to be processed
* @exception EBaseException failed to process object
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/IFilterConverter.java b/pki/base/common/src/com/netscape/certsrv/dbs/IFilterConverter.java
index 1a078365..2c0ccb89 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/IFilterConverter.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/IFilterConverter.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
-
-
/**
* An interface represents a filter converter
* that understands how to convert a attribute
* type from one defintion to another.
- * For example,
+ * For example,
+ *
* <PRE>
* (1) database layer need to convert
* registered attribute type to ldap attribute
@@ -34,13 +32,13 @@ package com.netscape.certsrv.dbs;
* attribute type.
* </PRE>
*
- * @version $Revision$, $Date$
+ * @version $Revision$, $Date$
*/
public interface IFilterConverter {
/**
* Converts attribute into LDAP attribute.
- *
+ *
* @param attr attribute name
* @param op attribute operation
* @param value attribute value
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/Modification.java b/pki/base/common/src/com/netscape/certsrv/dbs/Modification.java
index 9be75f0b..6c61bdb1 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/Modification.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/Modification.java
@@ -17,14 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
-
-
/**
* A class represents a modification. This is used by the
* database (dbs) framework for modification operations.
* It specifices the modification type and values.
- *
+ *
* @version $Revision$, $Date$
*/
public class Modification {
@@ -50,7 +47,7 @@ public class Modification {
/**
* Constructs a role modification.
- *
+ *
* @param name attribute name
* @param op attribute operation (i.e. MOD_ADD, MOD_DELETE, or MOD_REPLACE)
* @param value attribute value
@@ -63,7 +60,7 @@ public class Modification {
/**
* Retrieves attribute name.
- *
+ *
* @return attribute name
*/
public String getName() {
@@ -72,7 +69,7 @@ public class Modification {
/**
* Retrieves modification operation type.
- *
+ *
* @return modification type
*/
public int getOp() {
@@ -81,7 +78,7 @@ public class Modification {
/**
* Retrieves attribute value.
- *
+ *
* @return attribute value
*/
public Object getValue() {
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/ModificationSet.java b/pki/base/common/src/com/netscape/certsrv/dbs/ModificationSet.java
index b737f861..70e9b377 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/ModificationSet.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/ModificationSet.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs;
-
import java.util.Enumeration;
import java.util.Vector;
-
/**
* A class represents a modification set. A modification
* set contains zero or more modifications.
- *
+ *
* @version $Revision$, $Date$
*/
public class ModificationSet {
@@ -43,7 +41,7 @@ public class ModificationSet {
/**
* Adds modification to this set.
- *
+ *
* @param name attribute name
* @param op modification operation
* @param value attribute value
@@ -54,7 +52,7 @@ public class ModificationSet {
/**
* Retrieves a list of modifications.
- *
+ *
* @return a list of Modifications
*/
public Enumeration<Modification> getModifications() {
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecord.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecord.java
index 681e586b..d05c9ed5 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecord.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecord.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.certdb;
-
import java.math.BigInteger;
import java.util.Date;
@@ -26,10 +25,9 @@ import netscape.security.x509.X509CertImpl;
import com.netscape.certsrv.base.MetaInfo;
import com.netscape.certsrv.dbs.IDBObj;
-
/**
* An interface contains constants for certificate record.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICertRecord extends IDBObj {
@@ -71,108 +69,108 @@ public interface ICertRecord extends IDBObj {
public final static String X509CERT_DURATION = "duration";
public final static String X509CERT_EXTENSION = "extension";
public final static String X509CERT_SUBJECT = "subject";
- public final static String X509CERT_PUBLIC_KEY_DATA ="publicKeyData";
+ public final static String X509CERT_PUBLIC_KEY_DATA = "publicKeyData";
public final static String X509CERT_VERSION = "version";
public final static String X509CERT_ALGORITHM = "algorithm";
public final static String X509CERT_SIGNING_ALGORITHM = "signingAlgorithm";
public final static String X509CERT_SERIAL_NUMBER = "serialNumber";
/* attribute type used the following with search filter */
- public final static String ATTR_X509CERT_NOT_BEFORE =
- ATTR_X509CERT + "." + X509CERT_NOT_BEFORE;
- public final static String ATTR_X509CERT_NOT_AFTER =
- ATTR_X509CERT + "." + X509CERT_NOT_AFTER;
- public final static String ATTR_X509CERT_DURATION =
- ATTR_X509CERT + "." + X509CERT_DURATION;
- public final static String ATTR_X509CERT_EXTENSION =
- ATTR_X509CERT + "." + X509CERT_EXTENSION;
- public final static String ATTR_X509CERT_SUBJECT =
- ATTR_X509CERT + "." + X509CERT_SUBJECT;
- public final static String ATTR_X509CERT_VERSION =
- ATTR_X509CERT + "." + X509CERT_VERSION;
- public final static String ATTR_X509CERT_ALGORITHM =
- ATTR_X509CERT + "." + X509CERT_ALGORITHM;
- public final static String ATTR_X509CERT_SIGNING_ALGORITHM =
- ATTR_X509CERT + "." + X509CERT_SIGNING_ALGORITHM;
- public final static String ATTR_X509CERT_SERIAL_NUMBER =
- ATTR_X509CERT + "." + X509CERT_SERIAL_NUMBER;
- public final static String ATTR_X509CERT_PUBLIC_KEY_DATA =
- ATTR_X509CERT + "." + X509CERT_PUBLIC_KEY_DATA;
+ public final static String ATTR_X509CERT_NOT_BEFORE =
+ ATTR_X509CERT + "." + X509CERT_NOT_BEFORE;
+ public final static String ATTR_X509CERT_NOT_AFTER =
+ ATTR_X509CERT + "." + X509CERT_NOT_AFTER;
+ public final static String ATTR_X509CERT_DURATION =
+ ATTR_X509CERT + "." + X509CERT_DURATION;
+ public final static String ATTR_X509CERT_EXTENSION =
+ ATTR_X509CERT + "." + X509CERT_EXTENSION;
+ public final static String ATTR_X509CERT_SUBJECT =
+ ATTR_X509CERT + "." + X509CERT_SUBJECT;
+ public final static String ATTR_X509CERT_VERSION =
+ ATTR_X509CERT + "." + X509CERT_VERSION;
+ public final static String ATTR_X509CERT_ALGORITHM =
+ ATTR_X509CERT + "." + X509CERT_ALGORITHM;
+ public final static String ATTR_X509CERT_SIGNING_ALGORITHM =
+ ATTR_X509CERT + "." + X509CERT_SIGNING_ALGORITHM;
+ public final static String ATTR_X509CERT_SERIAL_NUMBER =
+ ATTR_X509CERT + "." + X509CERT_SERIAL_NUMBER;
+ public final static String ATTR_X509CERT_PUBLIC_KEY_DATA =
+ ATTR_X509CERT + "." + X509CERT_PUBLIC_KEY_DATA;
/**
* Retrieves serial number from stored certificate.
- *
+ *
* @return certificate serial number
*/
public BigInteger getCertificateSerialNumber();
/**
* Retrieves serial number from certificate record.
- *
+ *
* @return certificate serial number
*/
public BigInteger getSerialNumber();
/**
* Retrieves certificate from certificate record.
- *
+ *
* @return certificate
*/
public X509CertImpl getCertificate();
/**
* Retrieves name of who issued this certificate.
- *
+ *
* @return name of who issued this certificate
*/
public String getIssuedBy();
/**
* Retrieves name of who revoked this certificate.
- *
+ *
* @return name of who revoked this certificate
*/
public String getRevokedBy();
/**
* Retrieves date when this certificate was revoked.
- *
+ *
* @return date when this certificate was revoked
*/
public Date getRevokedOn();
/**
* Retrieves meta info.
- *
+ *
* @return meta info
*/
public MetaInfo getMetaInfo();
/**
* Retrieves certificate status.
- *
+ *
* @return certificate status
*/
public String getStatus();
/**
* Retrieves time of creation of this certificate record.
- *
+ *
* @return time of creation of this certificate record
*/
public Date getCreateTime();
/**
* Retrieves time of modification of this certificate record.
- *
+ *
* @return time of modification of this certificate record
*/
public Date getModifyTime();
/**
* Retrieves revocation info.
- *
+ *
* @return revocation info
*/
public IRevocationInfo getRevocationInfo();
-}
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
index 616bd5db..5db7e473 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertRecordList.java
@@ -17,74 +17,72 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.certdb;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.IElementProcessor;
-
/**
* A class represents a list of certificate records.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICertRecordList {
/**
* Gets the current index.
- *
+ *
* @return current index
*/
public int getCurrentIndex();
/**
* Retrieves the size of request list.
- *
+ *
* @return size
*/
public int getSize();
/**
* Gets size before jump to index.
- *
+ *
* @return size
*/
public int getSizeBeforeJumpTo();
/**
* Gets size after jump to index.
- *
+ *
* @return size
*/
public int getSizeAfterJumpTo();
/**
* Process certificate record as soon as it is returned.
- *
+ *
* @param startidx starting index
* @param endidx ending index
* @param ep element processor
* @exception EBaseException failed to process cert records
*/
public void processCertRecords(int startidx, int endidx,
- IElementProcessor ep) throws EBaseException;
+ IElementProcessor ep) throws EBaseException;
/**
* Retrieves requests.
* It's no good to call this if you didnt check
* if the startidx, endidx are valid.
- *
+ *
* @param startidx starting index
* @param endidx ending index
* @exception EBaseException failed to retrieve
*/
public Enumeration getCertRecords(int startidx, int endidx)
- throws EBaseException;
+ throws EBaseException;
/**
- * Gets one single record at a time similar to
+ * Gets one single record at a time similar to
* processCertRecords but no extra class needed.
*
* @param index position of the record to be retrieved
@@ -92,5 +90,5 @@ public interface ICertRecordList {
* @exception EBaseException failed to retrieve
*/
public ICertRecord getCertRecord(int index)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
index b913a18c..e354970b 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/ICertificateRepository.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.certdb;
-
import java.math.BigInteger;
import java.security.cert.Certificate;
import java.util.Date;
@@ -32,12 +31,11 @@ import com.netscape.certsrv.base.MetaInfo;
import com.netscape.certsrv.dbs.ModificationSet;
import com.netscape.certsrv.dbs.repository.IRepository;
-
/**
- * An interface represents a CMS certificate repository.
+ * An interface represents a CMS certificate repository.
* It stores all the issued certificate.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICertificateRepository extends IRepository {
@@ -47,142 +45,143 @@ public interface ICertificateRepository extends IRepository {
* record contains four parts: certificate, meta-attributes,
* issue information and reovcation information.
* <P>
- *
+ *
* @param record X.509 certificate
* @exception EBaseException failed to add new certificate to
- * the repository
+ * the repository
*/
public void addCertificateRecord(ICertRecord record)
- throws EBaseException;
+ throws EBaseException;
/**
* Reads the certificate identified by the given serial no.
- *
+ *
* @param serialNo serial number of certificate
* @return certificate
* @exception EBaseException failed to retrieve certificate
*/
public X509CertImpl getX509Certificate(BigInteger serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Reads certificate from repository.
- *
+ *
* @param serialNo serial number of certificate
* @return certificate record
* @exception EBaseException failed to retrieve certificate
*/
public ICertRecord readCertificateRecord(BigInteger serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Sets certificate status update internal
- *
+ *
* @param requestRepo request repository
* @param interval update interval
* @param listenToCloneModifications enable listening to clone modifications
*/
- public void setCertStatusUpdateInterval(IRepository requestRepo,
- int interval,
- boolean listenToCloneModifications);
+ public void setCertStatusUpdateInterval(IRepository requestRepo,
+ int interval,
+ boolean listenToCloneModifications);
/**
* Updates certificate status now. This is a blocking method.
- *
+ *
* @exception EBaseException failed to update
*/
public void updateCertStatus() throws EBaseException;
/**
* Modifies certificate record.
- *
+ *
* @param serialNo serial number of record
* @param mods modifications
* @exception EBaseException failed to modify
*/
public void modifyCertificateRecord(BigInteger serialNo,
- ModificationSet mods) throws EBaseException;
+ ModificationSet mods) throws EBaseException;
/**
* Checks if the certificate exists in this repository.
- *
+ *
* @param serialNo serial number of certificate
* @return true if it exists
* @exception EBaseException failed to check
*/
public boolean containsCertificate(BigInteger serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Deletes certificate from this repository.
- *
+ *
* @param serialNo serial number of certificate
* @exception EBaseException failed to delete
*/
public void deleteCertificateRecord(BigInteger serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate as revoked.
- *
+ *
* @param id serial number
* @param info revocation information
* @exception EBaseException failed to mark
*/
public void markAsRevoked(BigInteger id, IRevocationInfo info)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates certificate status.
- *
+ *
* @param id serial number
* @param status certificate status
* @exception EBaseException failed to update status
*/
public void updateStatus(BigInteger id, String status)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate as renewable.
- *
+ *
* @param record certificate record to modify
* @exception EBaseException failed to update
*/
public void markCertificateAsRenewable(ICertRecord record)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate as not renewable.
- *
+ *
* @param record certificate record to modify
* @exception EBaseException failed to update
*/
public void markCertificateAsNotRenewable(ICertRecord record)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate as renewed.
- *
+ *
* @param serialNo certificate record to modify
* @exception EBaseException failed to update
*/
public void markCertificateAsRenewed(String serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Marks certificate as renewed and notified.
- *
+ *
* @param serialNo certificate record to modify
* @exception EBaseException failed to update
*/
public void markCertificateAsRenewalNotified(String serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
* Here is a list of filter
* attribute can be used:
+ *
* <pre>
* certRecordId
* certMetaInfo
@@ -193,37 +192,39 @@ public interface ICertificateRepository extends IRepository {
* x509Cert.notAfter
* x509Cert.subject
* </pre>
+ *
* The filter should follow RFC1558 LDAP filter syntax.
* For example,
+ *
* <pre>
* (&(certRecordId=5)(x509Cert.notBefore=934398398))
* </pre>
- *
+ *
* @param filter search filter
* @param maxSize max size to return
* @return a list of certificates
* @exception EBaseException failed to search
*/
public Enumeration searchCertificates(String filter, int maxSize)
- throws EBaseException;
+ throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
- *
+ *
* @param filter search filter
* @param maxSize max size to return
* @param timeLimit timeout value
* @return a list of certificates
* @exception EBaseException failed to search
*/
- public Enumeration searchCertificates(String filter, int maxSize,
- int timeLimit) throws EBaseException;
+ public Enumeration searchCertificates(String filter, int maxSize,
+ int timeLimit) throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
- *
+ *
* @param filter search filter
* @param attrs selected attribute
* @param pageSize page size
@@ -231,12 +232,12 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to search
*/
public ICertRecordList findCertRecordsInList(String filter,
- String attrs[], int pageSize) throws EBaseException;
+ String attrs[], int pageSize) throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
- *
+ *
* @param filter search filter
* @param attrs selected attribute
* @param sortKey key to use for sorting the returned elements
@@ -245,13 +246,13 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to search
*/
public ICertRecordList findCertRecordsInList(String filter,
- String attrs[], String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String sortKey, int pageSize)
+ throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
- *
+ *
* @param filter search filter
* @param attrs selected attribute
* @param jumpTo jump to index
@@ -261,17 +262,17 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to search
*/
public ICertRecordList findCertRecordsInList(String filter,
- String attrs[], String jumpTo, String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String jumpTo, String sortKey, int pageSize)
+ throws EBaseException;
public ICertRecordList findCertRecordsInList(String filter,
- String attrs[], String jumpTo, boolean hardJumpTo, String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String jumpTo, boolean hardJumpTo, String sortKey, int pageSize)
+ throws EBaseException;
/**
* Finds a list of certificate records that satisifies
* the filter.
- *
+ *
* @param filter search filter
* @param attrs selected attribute
* @param jumpTo jump to index
@@ -281,8 +282,8 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to search
*/
public ICertRecordList findCertRecordsInListRawJumpto(String filter,
- String attrs[], String jumpTo, String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String jumpTo, String sortKey, int pageSize)
+ throws EBaseException;
public static final int ALL_CERTS = 0;
public static final int ALL_VALID_CERTS = 1;
@@ -291,110 +292,110 @@ public interface ICertificateRepository extends IRepository {
/**
* Gets all valid and unexpired certificates pertaining
* to a subject DN.
- *
- * @param subjectDN The distinguished name of the subject.
- * @param validityType The type of certificatese to retrieve.
+ *
+ * @param subjectDN The distinguished name of the subject.
+ * @param validityType The type of certificatese to retrieve.
* @return An array of certificates.
* @throws EBaseException on error.
*/
public X509CertImpl[] getX509Certificates(String subjectDN,
- int validityType) throws EBaseException;
+ int validityType) throws EBaseException;
/**
* Retrieves all the revoked certificates that have not expired.
- *
+ *
* @param asOfDate as of date
* @return a list of revoked certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getRevokedCertificates(Date asOfDate)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves all revoked certificates including ones that have expired
* or that are not yet valid.
- *
+ *
* @return a list of revoked certificates
* @exception EBaseException failed to search
*/
public Enumeration getAllRevokedCertificates()
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves all revoked but not expired certificates.
- *
+ *
* @return a list of revoked certificates
* @exception EBaseException failed to search
*/
public Enumeration getAllRevokedNonExpiredCertificates()
- throws EBaseException;
+ throws EBaseException;
/**
- * Finds all certificates given a filter.
- *
+ * Finds all certificates given a filter.
+ *
* @param filter search filter
* @return a list of certificates
* @exception EBaseException failed to search
*/
public Enumeration findCertificates(String filter)
- throws EBaseException;
+ throws EBaseException;
/**
* Finds all certificate records given a filter.
- *
+ *
* @param filter search filter
* @return a list of certificates
* @exception EBaseException failed to search
*/
public Enumeration findCertRecords(String filter)
- throws EBaseException;
+ throws EBaseException;
/**
- * Gets Revoked certs orderes by noAfter date, jumps to records
+ * Gets Revoked certs orderes by noAfter date, jumps to records
* where notAfter date is greater than current.
- *
+ *
* @param date reference date
* @param pageSize page size
* @return a list of certificate records
* @exception EBaseException failed to retrieve
*/
- public ICertRecordList getRevokedCertsByNotAfterDate(Date date,
- int pageSize) throws EBaseException;
+ public ICertRecordList getRevokedCertsByNotAfterDate(Date date,
+ int pageSize) throws EBaseException;
/**
- * Gets Invalid certs orderes by noAfter date, jumps to records
+ * Gets Invalid certs orderes by noAfter date, jumps to records
* where notAfter date is greater than current.
- *
+ *
* @param date reference date
* @param pageSize page size
* @return a list of certificate records
* @exception EBaseException failed to retrieve
*/
- public ICertRecordList getInvalidCertsByNotBeforeDate(Date date,
- int pageSize) throws EBaseException;
+ public ICertRecordList getInvalidCertsByNotBeforeDate(Date date,
+ int pageSize) throws EBaseException;
/**
- * Gets valid certs orderes by noAfter date, jumps to records
+ * Gets valid certs orderes by noAfter date, jumps to records
* where notAfter date is greater than current.
- *
+ *
* @param date reference date
* @param pageSize page size
* @return a list of certificate records
* @exception EBaseException failed to retrieve
*/
- public ICertRecordList getValidCertsByNotAfterDate(Date date,
- int pageSize) throws EBaseException;
+ public ICertRecordList getValidCertsByNotAfterDate(Date date,
+ int pageSize) throws EBaseException;
/**
* Creates certificate record.
- *
+ *
* @param id serial number
* @param cert certificate
* @param meta meta information
* @return certificate record
*/
- public ICertRecord createCertRecord(BigInteger id,
- Certificate cert, MetaInfo meta);
+ public ICertRecord createCertRecord(BigInteger id,
+ Certificate cert, MetaInfo meta);
/**
* Finds certificate records.
@@ -404,21 +405,21 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to retrieve cert records
*/
public Enumeration findCertRecs(String filter)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves renewable certificates.
- *
+ *
* @param renewalTime renewal time
* @return certificates
* @exception EBaseException failed to retrieve
*/
public Hashtable getRenewableCertificates(String renewalTime)
- throws EBaseException;
+ throws EBaseException;
/**
* Unmark a revoked certificates.
- *
+ *
* @param id serial number
* @param info revocation information
* @param revokedOn revocation date
@@ -426,85 +427,85 @@ public interface ICertificateRepository extends IRepository {
* @exception EBaseException failed to unmark
*/
public void unmarkRevoked(BigInteger id, IRevocationInfo info,
- Date revokedOn, String revokedBy)
- throws EBaseException;
+ Date revokedOn, String revokedBy)
+ throws EBaseException;
/**
* Retrieves valid and not published certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getValidNotPublishedCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves expired and published certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getExpiredPublishedCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves revoked and published certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getRevokedPublishedCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves valid certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getValidCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves expired certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getExpiredCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves revoked certificates.
- *
+ *
* @param from starting serial number
* @param to ending serial number
* @return a list of certificates
* @exception EBaseException failed to retrieve
*/
public Enumeration getRevokedCertificates(String from, String to)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves modified certificate records.
- *
+ *
* @param entry LDAPEntry with modified data
*/
- public void getModifications(LDAPEntry entry);
+ public void getModifications(LDAPEntry entry);
/**
* Removes certificate records with this repository.
- *
+ *
* @param beginS BigInteger with radix 16
* @param endS BigInteger with radix 16
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/IRevocationInfo.java b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/IRevocationInfo.java
index 2086cacb..fb773576 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/certdb/IRevocationInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/certdb/IRevocationInfo.java
@@ -17,32 +17,30 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.certdb;
-
import java.util.Date;
import netscape.security.x509.CRLExtensions;
-
/**
* A class represents a certificate revocation info. This
- * object is written as an attribute of certificate record
+ * object is written as an attribute of certificate record
* which essentially signifies a revocation act.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRevocationInfo {
/**
* Retrieves revocation date.
- *
+ *
* @return revocation date
*/
public Date getRevocationDate();
/**
* Retrieves CRL entry extensions.
- *
+ *
* @return CRL entry extensions
*/
public CRLExtensions getCRLEntryExtensions();
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLIssuingPointRecord.java b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLIssuingPointRecord.java
index 78acced0..b990bbf5 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLIssuingPointRecord.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLIssuingPointRecord.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.crldb;
-
import java.math.BigInteger;
import java.util.Date;
import java.util.Hashtable;
@@ -26,11 +25,10 @@ import netscape.security.x509.RevokedCertificate;
import com.netscape.certsrv.dbs.IDBObj;
-
/**
* An interface that defines abilities of
* a CRL issuing point record.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICRLIssuingPointRecord extends IDBObj {
@@ -52,111 +50,112 @@ public interface ICRLIssuingPointRecord extends IDBObj {
public static final String ATTR_DELTA_CRL = "deltaRevocationList";
public static final String CLEAN_CACHE = "-1";
- public static final String NEW_CACHE = "-2";
+ public static final String NEW_CACHE = "-2";
/**
* Retrieve unique CRL identifier.
- *
+ *
* @return unique CRL identifier
*/
public String getId();
/**
* Retrieves current CRL number out of CRL issuing point record.
- *
+ *
* @return current CRL number
*/
public BigInteger getCRLNumber();
/**
* Retrieves CRL size measured by the number of entries.
- *
+ *
* @return CRL size
*/
public Long getCRLSize();
/**
* Retrieves this update time.
- *
+ *
* @return time of this update
*/
public Date getThisUpdate();
/**
* Retrieves next update time.
- *
+ *
* @return time of next update
*/
public Date getNextUpdate();
/**
* Retrieves current delta CRL number out of CRL issuing point record.
- *
+ *
* @return current delta CRL number
*/
public BigInteger getDeltaCRLNumber();
/**
* Retrieves delta CRL size measured by the number of entries.
- *
+ *
* @return delta CRL size
*/
public Long getDeltaCRLSize();
/**
* Retrieve Retrieve reference to the first unsaved data.
- *
+ *
* @return reference to the first unsaved data
*/
public String getFirstUnsaved();
/**
* Retrieves encoded CRL.
- *
+ *
* @return encoded CRL
*/
public byte[] getCRL();
/**
* Retrieves encoded delta CRL.
- *
+ *
* @return encoded delta CRL
*/
public byte[] getDeltaCRL();
/**
* Retrieves encoded CA certificate.
- *
+ *
* @return encoded CA certificate
*/
public byte[] getCACert();
/**
* Retrieves cache information about CRL.
- *
+ *
* @return list of recently revoked certificates
*/
- public Hashtable<BigInteger,RevokedCertificate> getCRLCacheNoClone();
- public Hashtable<BigInteger,RevokedCertificate> getCRLCache();
+ public Hashtable<BigInteger, RevokedCertificate> getCRLCacheNoClone();
+
+ public Hashtable<BigInteger, RevokedCertificate> getCRLCache();
/**
* Retrieves cache information about revoked certificates.
- *
+ *
* @return list of recently revoked certificates
*/
- public Hashtable<BigInteger,RevokedCertificate> getRevokedCerts();
+ public Hashtable<BigInteger, RevokedCertificate> getRevokedCerts();
/**
* Retrieves cache information about certificates released from hold.
- *
+ *
* @return list of certificates recently released from hold
*/
- public Hashtable<BigInteger,RevokedCertificate> getUnrevokedCerts();
+ public Hashtable<BigInteger, RevokedCertificate> getUnrevokedCerts();
/**
* Retrieves cache information about expired certificates.
- *
+ *
* @return list of recently expired certificates
*/
- public Hashtable<BigInteger,RevokedCertificate> getExpiredCerts();
+ public Hashtable<BigInteger, RevokedCertificate> getExpiredCerts();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
index ba245bcf..b58a6e38 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/crldb/ICRLRepository.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.crldb;
-
import java.math.BigInteger;
import java.util.Date;
import java.util.Hashtable;
@@ -26,27 +25,26 @@ import java.util.Vector;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.ModificationSet;
-
/**
- * An interface represents a CMS CRL repository. It stores
+ * An interface represents a CMS CRL repository. It stores
* all the CRL issuing points.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICRLRepository {
/**
* Adds CRL issuing point record.
- *
+ *
* @param rec issuing point record
* @exception EBaseException failed to add new issuing point record
*/
public void addCRLIssuingPointRecord(ICRLIssuingPointRecord rec)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves all the issuing points' names.
- *
+ *
* @return A list of issuing points' names.
* @exception EBaseException failed to retrieve all the issuing points' names.
*/
@@ -54,35 +52,35 @@ public interface ICRLRepository {
/**
* Reads issuing point record.
- *
+ *
* @return issuing point record
* @exception EBaseException failed to read issuing point record
*/
public ICRLIssuingPointRecord readCRLIssuingPointRecord(String id)
- throws EBaseException;
+ throws EBaseException;
/**
* Deletes issuing point record.
- *
+ *
* @param id issuing point record id
* @exception EBaseException failed to delete issuing point record
*/
public void deleteCRLIssuingPointRecord(String id)
- throws EBaseException;
+ throws EBaseException;
/**
* Modifies issuing point record.
- *
+ *
* @param id issuing point record id
* @param mods set of modifications
* @exception EBaseException failed to modify issuing point record
*/
public void modifyCRLIssuingPointRecord(String id, ModificationSet mods)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates CRL issuing point record.
- *
+ *
* @param id issuing point record id
* @param newCRL encoded binary CRL
* @param thisUpdate time of this update
@@ -92,12 +90,12 @@ public interface ICRLRepository {
* @exception EBaseException failed to update issuing point record
*/
public void updateCRLIssuingPointRecord(String id, byte[] newCRL,
- Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize)
- throws EBaseException;
+ Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize)
+ throws EBaseException;
/**
* Updates CRL issuing point record.
- *
+ *
* @param id issuing point record id
* @param newCRL encoded binary CRL
* @param thisUpdate time of this update
@@ -110,34 +108,34 @@ public interface ICRLRepository {
* @exception EBaseException failed to update issuing point record
*/
public void updateCRLIssuingPointRecord(String id, byte[] newCRL,
- Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize,
- Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts)
- throws EBaseException;
+ Date thisUpdate, Date nextUpdate, BigInteger crlNumber, Long crlSize,
+ Hashtable revokedCerts, Hashtable unrevokedCerts, Hashtable expiredCerts)
+ throws EBaseException;
/**
* Updates CRL issuing point record.
- *
+ *
* @param id issuing point record id
* @param revokedCerts list of revoked certificates
* @param unrevokedCerts list of released from hold certificates
* @exception EBaseException failed to update issuing point record
*/
public void updateRevokedCerts(String id, Hashtable revokedCerts, Hashtable unrevokedCerts)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates CRL issuing point record.
- *
+ *
* @param id issuing point record id
* @param expiredCerts list of expired certificates
* @exception EBaseException failed to update issuing point record
*/
public void updateExpiredCerts(String id, Hashtable expiredCerts)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates CRL issuing point record.
- *
+ *
* @param id issuing point record id
* @param crlSize CRL size
* @param revokedCerts list of revoked certificates
@@ -146,14 +144,14 @@ public interface ICRLRepository {
* @exception EBaseException failed to update issuing point record
*/
public void updateCRLCache(String id, Long crlSize,
- Hashtable revokedCerts,
- Hashtable unrevokedCerts,
- Hashtable expiredCerts)
- throws EBaseException;
+ Hashtable revokedCerts,
+ Hashtable unrevokedCerts,
+ Hashtable expiredCerts)
+ throws EBaseException;
/**
* Updates CRL issuing point record with delta-CRL.
- *
+ *
* @param id issuing point record id
* @param deltaCRLNumber delta CRL number
* @param deltaCRLSize delta CRL size
@@ -164,16 +162,16 @@ public interface ICRLRepository {
public void updateDeltaCRL(String id, BigInteger deltaCRLNumber,
Long deltaCRLSize, Date nextUpdate,
byte[] deltaCRL)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates CRL issuing point record with reference to the first
* unsaved data.
- *
+ *
* @param id issuing point record id
* @param firstUnsaved reference to the first unsaved data
* @exception EBaseException failed to update issuing point record
*/
public void updateFirstUnsaved(String id, String firstUnsaved)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecord.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecord.java
index 0edcc187..010661d8 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecord.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecord.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.keydb;
-
import java.math.BigInteger;
import java.util.Date;
import com.netscape.certsrv.base.EBaseException;
-
/**
* An interface contains constants for key record.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IKeyRecord {
@@ -42,15 +40,15 @@ public interface IKeyRecord {
public static final String ATTR_MODIFY_TIME = "keyModifyTime";
public static final String ATTR_META_INFO = "keyMetaInfo";
public static final String ATTR_ARCHIVED_BY = "keyArchivedBy";
-
+
// key state
public static final String STATUS_ANY = "ANY";
public static final String STATUS_VALID = "VALID";
public static final String STATUS_INVALID = "INVALID";
-
+
/**
* Retrieves the state of the key.
- *
+ *
* @return key state
* @exception EBaseException failed to retrieve state of the key
*/
@@ -58,15 +56,15 @@ public interface IKeyRecord {
/**
* Retrieves key identifier.
- *
+ *
* @return key id
* @exception EBaseException failed to retrieve key id
*/
- public BigInteger getSerialNumber() throws EBaseException;
+ public BigInteger getSerialNumber() throws EBaseException;
/**
* Retrieves key owner name.
- *
+ *
* @return key owner name
* @exception EBaseException failed to retrieve key owner name
*/
@@ -74,53 +72,53 @@ public interface IKeyRecord {
/**
* Retrieves key algorithm.
- *
+ *
* @return key algorithm
*/
- public String getAlgorithm();
+ public String getAlgorithm();
/**
* Retrieves key length.
- *
+ *
* @return key length
* @exception EBaseException failed to retrieve key length
*/
- public Integer getKeySize() throws EBaseException;
+ public Integer getKeySize() throws EBaseException;
/**
* Retrieves archiver identifier.
- *
+ *
* @return archiver uid
*/
- public String getArchivedBy();
+ public String getArchivedBy();
/**
* Retrieves creation time.
- *
+ *
* @return creation time
*/
- public Date getCreateTime();
+ public Date getCreateTime();
/**
* Retrieves last modification time.
- *
+ *
* @return modification time
*/
- public Date getModifyTime();
+ public Date getModifyTime();
/**
* Retrieves dates of recovery.
- *
+ *
* @return recovery history
* @exception EBaseException failed to retrieve recovery history
*/
- public Date[] getDateOfRevocation() throws EBaseException;
+ public Date[] getDateOfRevocation() throws EBaseException;
/**
* Retrieves public key data.
- *
+ *
* @return public key data
* @exception EBaseException failed to retrieve public key data
*/
public byte[] getPublicKeyData() throws EBaseException;
-}
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecordList.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecordList.java
index 5da23945..75f83389 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecordList.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRecordList.java
@@ -17,35 +17,33 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.keydb;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a list of key records.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IKeyRecordList {
/**
- * Retrieves the size of key list.
- *
+ * Retrieves the size of key list.
+ *
* @return size of key list
*/
public int getSize();
/**
* Retrieves key records.
- *
+ *
* @param startidx start index
* @param endidx end index
* @return key records
* @exception EBaseException failed to retrieve key records
*/
public Enumeration<IKeyRecord> getKeyRecords(int startidx, int endidx)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
index 093bea25..ca1e2c8a 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/IKeyRepository.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.keydb;
-
import java.math.BigInteger;
import java.security.PublicKey;
import java.util.Enumeration;
@@ -28,12 +27,11 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.ModificationSet;
import com.netscape.certsrv.dbs.repository.IRepository;
-
/**
- * An interface represents a Key repository. This is the
+ * An interface represents a Key repository. This is the
* container of archived keys.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IKeyRepository extends IRepository {
@@ -41,7 +39,7 @@ public interface IKeyRepository extends IRepository {
/**
* Archives a key to the repository.
* <P>
- *
+ *
* @param record key record
* @exception EBaseException failed to archive key
*/
@@ -50,61 +48,61 @@ public interface IKeyRepository extends IRepository {
/**
* Reads an archived key by serial number.
* <P>
- *
+ *
* @param serialNo serial number
* @return key record
* @exception EBaseException failed to recover key
*/
public IKeyRecord readKeyRecord(BigInteger serialNo)
- throws EBaseException;
+ throws EBaseException;
/**
* Reads an archived key by b64 encoded cert.
* <P>
- *
+ *
* @param cert b64 encoded cert
* @return key record
* @exception EBaseException failed to recover key
*/
public IKeyRecord readKeyRecord(String cert)
- throws EBaseException;
+ throws EBaseException;
/**
* Reads an archived key by owner name.
* <P>
- *
+ *
* @param ownerName owner name
* @return key record
* @exception EBaseException failed to recover key
*/
public IKeyRecord readKeyRecord(X500Name ownerName)
- throws EBaseException;
+ throws EBaseException;
/**
* Reads archived key using public key.
- *
- * @param publicKey public key that is corresponding
- * to the private key
+ *
+ * @param publicKey public key that is corresponding
+ * to the private key
* @return key record
* @exception EBaseException failed to read key
*/
public IKeyRecord readKeyRecord(PublicKey publicKey)
- throws EBaseException;
+ throws EBaseException;
/**
* Searches for private keys.
- *
+ *
* @param filter LDAP filter for the search
* @param maxSize maximium number of entries to be returned
* @return a list of private key records
* @exception EBaseException failed to search keys
*/
public Enumeration searchKeys(String filter, int maxSize)
- throws EBaseException;
+ throws EBaseException;
/**
* Searches for private keys.
- *
+ *
* @param filter LDAP filter for the search
* @param maxSize maximium number of entries to be returned
* @param timeLimt timeout value
@@ -112,30 +110,31 @@ public interface IKeyRepository extends IRepository {
* @exception EBaseException failed to search keys
*/
public Enumeration searchKeys(String filter, int maxSize, int timeLimt)
- throws EBaseException;
+ throws EBaseException;
/**
* Deletes a key record.
- *
+ *
* @param serialno key identifier
* @exception EBaseException failed to delete key record
*/
public void deleteKeyRecord(BigInteger serialno)
- throws EBaseException;
+ throws EBaseException;
/**
* Modifies key record in this repository.
- *
+ *
* @param serialNo key identifier
* @param mods modification of key records
* @exception EBaseException failed to modify key record
*/
public void modifyKeyRecord(BigInteger serialNo,
- ModificationSet mods) throws EBaseException;
+ ModificationSet mods) throws EBaseException;
/**
* Searchs for a list of key records.
* Here is a list of supported filter attributes:
+ *
* <pre>
* keySerialNumber
* keyState
@@ -149,7 +148,7 @@ public interface IKeyRepository extends IRepository {
* keyModifyTime
* keyMetaInfo
* </pre>
- *
+ *
* @param filter search filter
* @param attrs list of attributes to be returned
* @param pageSize virtual list page size
@@ -157,11 +156,11 @@ public interface IKeyRepository extends IRepository {
* @exception EBaseException failed to search key records
*/
public IKeyRecordList findKeyRecordsInList(String filter,
- String attrs[], int pageSize) throws EBaseException;
+ String attrs[], int pageSize) throws EBaseException;
/**
* Searchs for a list of key records.
- *
+ *
* @param filter search filter
* @param attrs list of attributes to be returned
* @param sortKey name of attribute that the list should be sorted by
@@ -170,6 +169,6 @@ public interface IKeyRepository extends IRepository {
* @exception EBaseException failed to search key records
*/
public IKeyRecordList findKeyRecordsInList(String filter,
- String attrs[], String sortKey, int pageSize)
- throws EBaseException;
+ String attrs[], String sortKey, int pageSize)
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/KeyState.java b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/KeyState.java
index e4baf91e..fa8a0d76 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/keydb/KeyState.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/keydb/KeyState.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.dbs.keydb;
-
import java.io.Serializable;
-
/**
* A class represents key state. This object is to
* encapsulate the life cycle of a key.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public final class KeyState implements Serializable {
@@ -42,62 +40,67 @@ public final class KeyState implements Serializable {
private KeyState(int code) {
mStateCode = code;
}
-
+
/**
* Request state.
*/
- public final static KeyState ANY = new KeyState(-1);
+ public final static KeyState ANY = new KeyState(-1);
public final static KeyState VALID = new KeyState(0);
public final static KeyState INVALID = new KeyState(1);
-
+
/**
* Checks if the given object equals to this object.
- *
+ *
* @param other object to be compared
* @return true if both objects are the same
*/
public boolean equals(Object other) {
- if (this == other)
+ if (this == other)
return true;
else if (other instanceof KeyState)
return ((KeyState) other).mStateCode == mStateCode;
- else
+ else
return false;
}
/**
* Returns the hash code.
- *
+ *
* @return hash code
*/
public int hashCode() {
return mStateCode;
}
-
+
/**
* Return the string-representation of this object.
- *
+ *
* @return string value
*/
public String toString() {
- if (mStateCode == -1) return "ANY";
- if (mStateCode == 0) return "VALID";
- if (mStateCode == 1) return "INVAILD";
+ if (mStateCode == -1)
+ return "ANY";
+ if (mStateCode == 0)
+ return "VALID";
+ if (mStateCode == 1)
+ return "INVAILD";
return "[UNDEFINED]";
-
+
}
/**
* Converts a string into a key state object.
- *
+ *
* @param state state in string-representation
* @return key state object
*/
public static KeyState toKeyState(String state) {
- if (state.equalsIgnoreCase("ANY")) return ANY;
- if (state.equalsIgnoreCase("VALID")) return VALID;
- if (state.equalsIgnoreCase("INVALID")) return INVALID;
+ if (state.equalsIgnoreCase("ANY"))
+ return ANY;
+ if (state.equalsIgnoreCase("VALID"))
+ return VALID;
+ if (state.equalsIgnoreCase("INVALID"))
+ return INVALID;
return null;
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/replicadb/IReplicaIDRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/replicadb/IReplicaIDRepository.java
index 660b6e9e..574adfae 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/replicadb/IReplicaIDRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/replicadb/IReplicaIDRepository.java
@@ -19,12 +19,11 @@ package com.netscape.certsrv.dbs.replicadb;
import com.netscape.certsrv.dbs.repository.IRepository;
-
/**
- * An interface represents a ReplicaID Repository.
+ * An interface represents a ReplicaID Repository.
* It provides unique managed replica IDs.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IReplicaIDRepository extends IRepository {
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepository.java b/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepository.java
index 5ff90241..943d4a68 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepository.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepository.java
@@ -22,10 +22,10 @@ import java.math.BigInteger;
import com.netscape.certsrv.base.EBaseException;
/**
- * An interface represents a generic repository. It maintains unique
+ * An interface represents a generic repository. It maintains unique
* serial number within repository.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRepository {
@@ -33,7 +33,7 @@ public interface IRepository {
/**
* Retrieves the next serial number, and also increase the
* serial number by one.
- *
+ *
* @return serial number
* @exception EBaseException failed to retrieve next serial number
*/
@@ -58,8 +58,8 @@ public interface IRepository {
* @param serial maximum number
* @exception EBaseException failed to set maximum serial number
*/
- public void setMaxSerial (String serial) throws EBaseException;
-
+ public void setMaxSerial(String serial) throws EBaseException;
+
/**
* Set the maximum serial number in next range.
*
@@ -69,19 +69,19 @@ public interface IRepository {
public void setNextMaxSerial(String serial) throws EBaseException;
/**
- * Checks to see if a new range is needed, or if we have reached the end of the
+ * Checks to see if a new range is needed, or if we have reached the end of the
* current range, or if a range conflict has occurred.
*
* @exception EBaseException failed to check next range for conflicts
*/
public void checkRanges() throws EBaseException;
- /**
+ /**
* Sets whether serial number management is enabled for certs
- * and requests.
- *
- * @param value true/false
- * @exception EBaseException failed to set
+ * and requests.
+ *
+ * @param value true/false
+ * @exception EBaseException failed to set
*/
public void setEnableSerialMgmt(boolean value) throws EBaseException;
diff --git a/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepositoryRecord.java b/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepositoryRecord.java
index 326ea466..c46e8419 100644
--- a/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepositoryRecord.java
+++ b/pki/base/common/src/com/netscape/certsrv/dbs/repository/IRepositoryRecord.java
@@ -22,23 +22,23 @@ import java.math.BigInteger;
import com.netscape.certsrv.dbs.IDBObj;
/**
- * An interface represents a generic repository record.
+ * An interface represents a generic repository record.
* It maintains unique serial number within repository.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRepositoryRecord extends IDBObj {
- public final static String ATTR_SERIALNO = "serialNo";
- public final static String ATTR_PUB_STATUS = "publishingStatus";
+ public final static String ATTR_SERIALNO = "serialNo";
+ public final static String ATTR_PUB_STATUS = "publishingStatus";
- /**
- * Retrieves serial number.
- *
- * @return serial number
- */
- public BigInteger getSerialNumber();
+ /**
+ * Retrieves serial number.
+ *
+ * @return serial number
+ */
+ public BigInteger getSerialNumber();
- public String getPublishingStatus();
+ public String getPublishingStatus();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/evaluators/IAccessEvaluator.java b/pki/base/common/src/com/netscape/certsrv/evaluators/IAccessEvaluator.java
index 8c291447..31f8b8c2 100644
--- a/pki/base/common/src/com/netscape/certsrv/evaluators/IAccessEvaluator.java
+++ b/pki/base/common/src/com/netscape/certsrv/evaluators/IAccessEvaluator.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.evaluators;
-
import com.netscape.certsrv.authentication.IAuthToken;
-
/**
- * A class represents an evaluator. An evaluator is used to
- * evaluate an expression. For example, one can write an evaluator to
- * evaluate if a user belongs to a certain group. An evaluator is
+ * A class represents an evaluator. An evaluator is used to
+ * evaluate an expression. For example, one can write an evaluator to
+ * evaluate if a user belongs to a certain group. An evaluator is
* generally used for access control expression evaluation, however, it
* can be used for other evaluation-related operations.
* <P>
@@ -39,14 +37,16 @@ public interface IAccessEvaluator {
public void init();
/**
- * Gets the type of the evaluator. Type is defined by each
- * evaluator plugin. Each evaluator plugin should have a unique type.
+ * Gets the type of the evaluator. Type is defined by each
+ * evaluator plugin. Each evaluator plugin should have a unique type.
+ *
* @return type of the evaluator
*/
public String getType();
/**
* Gets the description of the evaluator
+ *
* @return a text description for this evaluator
*/
public String getDescription();
@@ -54,12 +54,13 @@ public interface IAccessEvaluator {
/**
* Evaluates if the given value satisfies the access
* control in current context.
+ *
* @param type Type of the evaluator, eg, user, group etc
* @param op Operator of the evaluator, eg, =, !=
* @param value Part of the expression that can be used to
- * evaluate, e.g, value can be the name of the group if the
- * purpose of the evaluator is to evaluate if the user is a member
- * of the group.
+ * evaluate, e.g, value can be the name of the group if the
+ * purpose of the evaluator is to evaluate if the user is a member
+ * of the group.
* @return true if the evaluation expression is matched; false otherwise.
*/
public boolean evaluate(String type, String op, String value);
@@ -67,19 +68,21 @@ public interface IAccessEvaluator {
/**
* Evaluates if the given value satisfies the access
* control in authToken obtained from Authentication.
+ *
* @param authToken Authentication token
* @param type Type of the evaluator, eg, user, group etc
* @param op Operator of the evaluator, eg, =, !=
* @param value Part of the expression that can be used to
- * evaluate, e.g, value can be the name of the group if the
- * purpose of the evaluator is to evaluate if the user is a member
- * of the group.
+ * evaluate, e.g, value can be the name of the group if the
+ * purpose of the evaluator is to evaluate if the user is a member
+ * of the group.
* @return true if the evaluation expression is matched; false otherwise.
*/
public boolean evaluate(IAuthToken authToken, String type, String op, String value);
/**
* Get the supported operators for this evaluator
+ *
* @return Supported operators in string array
*/
public String[] getSupportedOperators();
diff --git a/pki/base/common/src/com/netscape/certsrv/extensions/EExtensionsException.java b/pki/base/common/src/com/netscape/certsrv/extensions/EExtensionsException.java
index df4c1444..40fe80f9 100644
--- a/pki/base/common/src/com/netscape/certsrv/extensions/EExtensionsException.java
+++ b/pki/base/common/src/com/netscape/certsrv/extensions/EExtensionsException.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.extensions;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* This represents the extensions exception.
- *
+ *
* @version $Revision$, $Date$
*/
public class EExtensionsException extends EBaseException {
@@ -36,7 +34,7 @@ public class EExtensionsException extends EBaseException {
* Resource class name.
*/
private static final String EXTENSIONS_RESOURCES =
- ExtensionsResources.class.getName();
+ ExtensionsResources.class.getName();
public EExtensionsException(String msgFormat) {
super(msgFormat);
diff --git a/pki/base/common/src/com/netscape/certsrv/extensions/ExtensionsResources.java b/pki/base/common/src/com/netscape/certsrv/extensions/ExtensionsResources.java
index 4d7ee06c..ca1e4545 100644
--- a/pki/base/common/src/com/netscape/certsrv/extensions/ExtensionsResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/extensions/ExtensionsResources.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.extensions;
-
import java.util.ListResourceBundle;
-
/**
* This represents the resources for extensions.
- *
+ *
* @version $Revision$, $Date$
*/
public class ExtensionsResources extends ListResourceBundle {
diff --git a/pki/base/common/src/com/netscape/certsrv/extensions/ICMSExtension.java b/pki/base/common/src/com/netscape/certsrv/extensions/ICMSExtension.java
index fb4bb1f7..04086adc 100644
--- a/pki/base/common/src/com/netscape/certsrv/extensions/ICMSExtension.java
+++ b/pki/base/common/src/com/netscape/certsrv/extensions/ICMSExtension.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.extensions;
-
import netscape.security.util.ObjectIdentifier;
import netscape.security.x509.Extension;
@@ -26,11 +25,10 @@ import com.netscape.certsrv.base.IArgBlock;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * CMS extension interface, for creating extensions from http input and
- * displaying extensions to html forms.
- *
+ * CMS extension interface, for creating extensions from http input and
+ * displaying extensions to html forms.
+ *
* @version $Revision$, $Date$
*/
public interface ICMSExtension {
@@ -42,11 +40,12 @@ public interface ICMSExtension {
* initialize from configuration file
*/
public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
- * Get name of this extension.
- * @return the name of this CMS extension, for
+ * Get name of this extension.
+ *
+ * @return the name of this CMS extension, for
*/
public String getName();
@@ -54,21 +53,22 @@ public interface ICMSExtension {
* Get object identifier associated with this extension.
*/
public ObjectIdentifier getOID();
-
+
/**
* Get an instance of the extension given http input.
+ *
* @return an instance of the extension.
*/
- public Extension getExtension(IArgBlock argblock)
- throws EBaseException;
+ public Extension getExtension(IArgBlock argblock)
+ throws EBaseException;
/**
- * Get Javascript name value pairs to put into the request processing
+ * Get Javascript name value pairs to put into the request processing
* template.
- * @return name value pairs
+ *
+ * @return name value pairs
*/
public IArgBlock getFormParams(Extension extension)
- throws EBaseException;
+ throws EBaseException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/EJobsException.java b/pki/base/common/src/com/netscape/certsrv/jobs/EJobsException.java
index 154cb4e4..cc0923ae 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/EJobsException.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/EJobsException.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a jobs exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EJobsException extends EBaseException {
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java b/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java
index 1c3842bf..3683b1f0 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/IJob.java
@@ -17,72 +17,77 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* An interface to be implemented from for a job to be scheduled by
* the Jobs Scheduler.
- *
- * @version $Revision$, $Date$
+ *
+ * @version $Revision$, $Date$
*/
public interface IJob {
/**
* Initialize from the configuration file.
+ *
* @param id String name of this instance
* @param implName string name of this implementation
* @param config configuration store for this instance
* @exception EBaseException any initilization failure
*/
public void init(ISubsystem owner, String id, String implName,
- IConfigStore config) throws EBaseException;
+ IConfigStore config) throws EBaseException;
/**
* tells if the job is enabled
+ *
* @return a boolean value indicating whether the job is enabled
- * or not
+ * or not
*/
public boolean isEnabled();
/**
* set instance id.
+ *
* @param id String id of the instance
*/
public void setId(String id);
/**
* get instance id.
+ *
* @return a String identifier
*/
public String getId();
/**
* get cron string associated with this job
+ *
* @return a JobCron object that represents the schedule of this job
*/
public IJobCron getJobCron();
/**
- * Returns a list of configuration parameter names.
- * The list is passed to the configuration console so instances of
+ * Returns a list of configuration parameter names.
+ * The list is passed to the configuration console so instances of
* this implementation can be configured through the console.
- *
+ *
* @return String array of configuration parameter names.
*/
public String[] getConfigParams();
/**
* gets the plugin name of this job.
+ *
* @return a String that is the name of this implementation
*/
public String getImplName();
/**
* Gets the configuration substore used by this job
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/IJobCron.java b/pki/base/common/src/com/netscape/certsrv/jobs/IJobCron.java
index 1e238f60..e0fb0ba4 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/IJobCron.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/IJobCron.java
@@ -17,32 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
-
-
/**
* class representing one Job cron information
- * <p>here, an "item" refers to one of the 5 fields in a cron string;
- * "element" refers to any comma-deliminated element in an
- * "item"...which includes both numbers and '-' separated ranges.
- * A cron string in the configuration takes the following format:
- * <i>minute (0-59),
- * hour (0-23),
- * day of the month (1-31),
- * month of the year (1-12),
- * day of the week (0-6 with 0=Sunday)</i>
* <p>
- * e.g. jobsScheduler.job.rnJob1.cron=30 11,23 * * 1-5
- * In this example, the job "rnJob1" will be executed from Monday
- * through Friday, at 11:30am and 11:30pm.
+ * here, an "item" refers to one of the 5 fields in a cron string; "element" refers to any comma-deliminated element in an "item"...which includes both numbers and '-' separated ranges. A cron string in the configuration takes the following format: <i>minute (0-59), hour (0-23), day of the month (1-31), month of the year (1-12), day of the week (0-6 with 0=Sunday)</i>
+ * <p>
+ * e.g. jobsScheduler.job.rnJob1.cron=30 11,23 * * 1-5 In this example, the job "rnJob1" will be executed from Monday through Friday, at 11:30am and 11:30pm.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IJobCron {
/**
* constant that represents the configuration parameter
- * "cron" for the job that this JobCron is associated with. The
+ * "cron" for the job that this JobCron is associated with. The
* value of which should conform to the cron format specified above.
*/
public static final String PROP_CRON = "cron";
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/IJobsScheduler.java b/pki/base/common/src/com/netscape/certsrv/jobs/IJobsScheduler.java
index 844250de..e4daffbe 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/IJobsScheduler.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/IJobsScheduler.java
@@ -17,32 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
import java.util.Hashtable;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * An interface that represents the job scheduler component. A JobScheduler
+ * An interface that represents the job scheduler component. A JobScheduler
* is a daemon thread that handles scheduled jobs like cron would
- * do with different jobs. This daemon wakes up at a pre-configured
+ * do with different jobs. This daemon wakes up at a pre-configured
* interval to see
* if there is any job to be done, if so, a thread is created to execute
* the job(s).
* <p>
- * The interval <b>jobsScheduler.interval</b> in the configuration is
- * specified as number of minutes. If not set, the default is 1 minute.
- * Note that the cron specification for each job CAN NOT be finer than
- * the granularity of the Scheduler daemon interval. For example, if
- * the daemon interval is set to 5 minute, a job cron for every minute
- * at 7am on each Tuesday (e.g. * 7 * * 2) will result in the
- * execution of the job thread only once every 5 minutes during that
- * hour. <b>The inteval value is recommended at 1 minute, setting it
- * otherwise has the potential of forever missing the beat</b>. Use
- * with caution.
- *
+ * The interval <b>jobsScheduler.interval</b> in the configuration is specified as number of minutes. If not set, the default is 1 minute. Note that the cron specification for each job CAN NOT be finer than the granularity of the Scheduler daemon interval. For example, if the daemon interval is set to 5 minute, a job cron for every minute at 7am on each Tuesday (e.g. * 7 * * 2) will result in the execution of the job thread only once every 5 minutes during that hour. <b>The inteval value is
+ * recommended at 1 minute, setting it otherwise has the potential of forever missing the beat</b>. Use with caution.
+ *
* @version $Revision$, $Date$
*/
public interface IJobsScheduler extends ISubsystem {
@@ -53,14 +43,14 @@ public interface IJobsScheduler extends ISubsystem {
/**
* constant that represents the configuration parameter
- * "enabled" for this component in CMS.cfg. The value of which
+ * "enabled" for this component in CMS.cfg. The value of which
* tells CMS whether the JobsScheduler is enabled or not
*/
public static final String PROP_ENABLED = "enabled";
/**
* constant that represents the configuration parameter
- * "interval" for this component in CMS.cfg. The value of which
+ * "interval" for this component in CMS.cfg. The value of which
* tells CMS the interval that the JobsScheduler thread should
* wake up and look for jobs to execute
*/
@@ -68,14 +58,14 @@ public interface IJobsScheduler extends ISubsystem {
/**
* constant that represents the configuration parameter
- * "class" for this component in CMS.cfg. The values of which are
+ * "class" for this component in CMS.cfg. The values of which are
* the actual implementation classes
*/
public static final String PROP_CLASS = "class";
/**
* constant that represents the configuration parameter
- * "job" for this component in CMS.cfg. The values of which gives
+ * "job" for this component in CMS.cfg. The values of which gives
* configuration information specific to one single job instance.
* There may be multiple jobs served by the jobsScheduler
*/
@@ -83,80 +73,86 @@ public interface IJobsScheduler extends ISubsystem {
/**
* constant that represents the configuration parameter
- * "impl" for this component in CMS.cfg. The values of which are
+ * "impl" for this component in CMS.cfg. The values of which are
* actual plugin implementation(s)
*/
public static final String PROP_IMPL = "impl";
/**
* constant that represents the configuration parameter
- * "pluginName" for this component in CMS.cfg. The value of which
+ * "pluginName" for this component in CMS.cfg. The value of which
* gives the pluginName for the job it associates with
*/
public static final String PROP_PLUGIN = "pluginName";
/**
* Retrieves all the job implementations.
+ *
* @return a Hashtable of available job plugin implementations
*/
public Hashtable<String, JobPlugin> getPlugins();
/**
* Retrieves all the job instances.
+ *
* @return a Hashtable of job instances
*/
- public Hashtable<String, IJob> getInstances();
+ public Hashtable<String, IJob> getInstances();
/**
* Retrieves the configuration parameters of the given
- * implementation. It is used to return to the Console for
+ * implementation. It is used to return to the Console for
* configuration
+ *
* @param implName the pulubin implementation name
* @return a String array of required configuration parameters of
- * the given implementation.
+ * the given implementation.
* @exception EJobsException when job plugin implementation can
- * not be found, instantiation is impossible, permission problem
- * with the class.
+ * not be found, instantiation is impossible, permission problem
+ * with the class.
*/
- public String[] getConfigParams(String implName)
- throws EJobsException;
+ public String[] getConfigParams(String implName)
+ throws EJobsException;
/**
* Writes a message to the system log.
+ *
* @param level an integer representing the log message level.
- * Depending on the configuration set by the administrator, this
- * value is a determining factor for whether this message will be
- * actually logged or not. The lower the level, the higher the
- * priority, and the higher chance it will be logged.
- * @param msg the message to be written. Ideally should call
- * CMS.getLogMessage() to get the localizable message
- * from the log properties file.
+ * Depending on the configuration set by the administrator, this
+ * value is a determining factor for whether this message will be
+ * actually logged or not. The lower the level, the higher the
+ * priority, and the higher chance it will be logged.
+ * @param msg the message to be written. Ideally should call
+ * CMS.getLogMessage() to get the localizable message
+ * from the log properties file.
*/
- public void log(int level, String msg);
+ public void log(int level, String msg);
/**
* Sets daemon's wakeup interval.
+ *
* @param minutes time in minutes that is to be the frequency of
- * JobsScheduler wakeup call.
+ * JobsScheduler wakeup call.
*/
- public void setInterval(int minutes);
+ public void setInterval(int minutes);
/**
- * Starts up the JobsScheduler daemon. Usually called from the
+ * Starts up the JobsScheduler daemon. Usually called from the
* initialization method when it's successfully initialized.
*/
public void startDaemon();
/**
- * Creates a job cron. Each job is associated with a "cron" which
+ * Creates a job cron. Each job is associated with a "cron" which
* specifies the rule of frequency that this job should be
- * executed (e.g. every Sunday at midnight). This method is
+ * executed (e.g. every Sunday at midnight). This method is
* called by each job at initialization time.
- * @param cs the string that represents the cron. See IJobCron
- * for detail of the format.
+ *
+ * @param cs the string that represents the cron. See IJobCron
+ * for detail of the format.
* @return IJobCron an IJobCron
* @exception EBaseException when the cron string, cs, can not be
- * parsed correctly
+ * parsed correctly
*/
public IJobCron createJobCron(String cs) throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/JobPlugin.java b/pki/base/common/src/com/netscape/certsrv/jobs/JobPlugin.java
index 33b7e7f2..46a1b6d7 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/JobPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/JobPlugin.java
@@ -17,15 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
-
-
/**
* This class represents a job plugin registered with the
- * JobScheduler. A Job plugin can be instantiated into a Job instance
+ * JobScheduler. A Job plugin can be instantiated into a Job instance
* and scheduled by the JobScheduler to run at a scheduled interval
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class JobPlugin {
@@ -46,6 +43,7 @@ public class JobPlugin {
/**
* Constructor for a Job plugin.
+ *
* @param id job plugin name
* @param classPath the Java class name of this job plugin
*/
@@ -56,6 +54,7 @@ public class JobPlugin {
/**
* get the job plugin name
+ *
* @return the name of this job plugin
*/
public String getId() {
@@ -64,6 +63,7 @@ public class JobPlugin {
/**
* get the Java class name
+ *
* @return the Java class name of this plugin
*/
public String getClassPath() {
diff --git a/pki/base/common/src/com/netscape/certsrv/jobs/JobsResources.java b/pki/base/common/src/com/netscape/certsrv/jobs/JobsResources.java
index 9bc82826..ec33137c 100644
--- a/pki/base/common/src/com/netscape/certsrv/jobs/JobsResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/jobs/JobsResources.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.jobs;
-
import java.util.ListResourceBundle;
-
/**
- * A class represents a resource bundle for the
+ * A class represents a resource bundle for the
* Jobs package
- *
+ *
* @version $Revision$, $Date$
*/
public class JobsResources extends ListResourceBundle {
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/EKRAException.java b/pki/base/common/src/com/netscape/certsrv/kra/EKRAException.java
index 9ab4a238..3f23bfe7 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/EKRAException.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/EKRAException.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a KRA exception. This is the base
* exception for all the KRA specific exceptions. It is
* associated with <CODE>KRAResources</CODE>.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EKRAException extends EBaseException {
@@ -39,11 +37,12 @@ public class EKRAException extends EBaseException {
* KRA resource class name.
* <P>
*/
- private static final String KRA_RESOURCES = KRAResources.class.getName();
+ private static final String KRA_RESOURCES = KRAResources.class.getName();
/**
* Constructs a KRA exception.
* <P>
+ *
* @param msgFormat constant from KRAResources.
*/
public EKRAException(String msgFormat) {
@@ -53,6 +52,7 @@ public class EKRAException extends EBaseException {
/**
* Constructs a KRA exception.
* <P>
+ *
* @param msgFormat constant from KRAResources.
* @param param additional parameters to the message.
*/
@@ -63,6 +63,7 @@ public class EKRAException extends EBaseException {
/**
* Constructs a KRA exception.
* <P>
+ *
* @param msgFormat constant from KRAResources.
* @param e embedded exception.
*/
@@ -73,6 +74,7 @@ public class EKRAException extends EBaseException {
/**
* Constructs a KRA exception.
* <P>
+ *
* @param msgFormat constant from KRAResources.
* @param params additional parameters to the message.
*/
@@ -83,6 +85,7 @@ public class EKRAException extends EBaseException {
/**
* Returns the bundle file name.
* <P>
+ *
* @return name of bundle class associated with this exception.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/IJoinShares.java b/pki/base/common/src/com/netscape/certsrv/kra/IJoinShares.java
index e130b95c..e9a5ecae 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/IJoinShares.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/IJoinShares.java
@@ -20,14 +20,17 @@ package com.netscape.certsrv.kra;
/**
* Use Java's reflection API to leverage CMS's
* old Share and JoinShares implementations.
- *
+ *
* @deprecated
* @version $Revision$ $Date$
*/
public interface IJoinShares {
public void initialize(int threshold) throws Exception;
+
public void addShare(int shareNum, byte[] share);
+
public int getShareCount();
+
public byte[] recoverSecret();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/IKeyRecoveryAuthority.java b/pki/base/common/src/com/netscape/certsrv/kra/IKeyRecoveryAuthority.java
index 7be3f165..0171115e 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/IKeyRecoveryAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/IKeyRecoveryAuthority.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
@@ -38,13 +37,12 @@ import com.netscape.certsrv.security.Credential;
import com.netscape.certsrv.security.IStorageKeyUnit;
import com.netscape.certsrv.security.ITransportKeyUnit;
-
/**
* An interface represents key recovery authority. The
* key recovery authority is responsibile for archiving
* and recovering user encryption private keys.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IKeyRecoveryAuthority extends ISubsystem {
@@ -71,7 +69,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Returns the name of this subsystem.
* <P>
- *
+ *
* @return KRA name
*/
public X500Name getX500Name();
@@ -79,13 +77,13 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Retrieves KRA request repository.
* <P>
- *
+ *
* @return request repository
*/
public IRequestQueue getRequestQueue();
/**
- * Retrieves the key repository. The key repository
+ * Retrieves the key repository. The key repository
* stores archived keys.
* <P>
*/
@@ -93,13 +91,13 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Retrieves the Replica ID repository.
- *
+ *
* @return KRA's Replica ID repository
*/
public IReplicaIDRepository getReplicaRepository();
/**
- * Enables the auto recovery state. Once KRA is in the auto
+ * Enables the auto recovery state. Once KRA is in the auto
* recovery state, no recovery agents need to be present for
* providing credentials. This feature is for enabling
* user-based recovery operation.
@@ -113,7 +111,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Returns the current auto recovery state.
- *
+ *
* @return true if auto recvoery state is on
*/
public boolean getAutoRecoveryState();
@@ -123,7 +121,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
* In distributed recovery mode, recovery agent login to the
* agent interface and submit its credential for a particular
* recovery operation.
- *
+ *
* @param id authorization identifier
* @param creds list of credentials
*/
@@ -131,7 +129,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Removes a particular auto recovery operation.
- *
+ *
* @param id authorization identifier
*/
public void removeAutoRecovery(String id);
@@ -140,28 +138,28 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
* Returns the number of required agents. In M-out-of-N
* recovery schema, only M agents are required even there
* are N agents. This method returns M.
- *
+ *
* @return number of required agents
*/
public int getNoOfRequiredAgents() throws EBaseException;
/**
* Sets the number of required recovery agents
- *
+ *
* @param number number of agents
*/
public void setNoOfRequiredAgents(int number) throws EBaseException;
/**
* Returns the current recovery identifier.
- *
+ *
* @return recovery identifier
*/
public String getRecoveryID();
/**
* Returns a list of recovery identifiers.
- *
+ *
* @return list of auto recovery identifiers
*/
public Enumeration<String> getAutoRecoveryIDs();
@@ -169,7 +167,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Returns the storage key unit that manages the
* stoarge key.
- *
+ *
* @return storage key unit
*/
public IStorageKeyUnit getStorageKeyUnit();
@@ -177,30 +175,30 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Returns the transport key unit that manages the
* transport key.
- *
+ *
* @return transport key unit
*/
public ITransportKeyUnit getTransportKeyUnit();
/**
* Returns the token that generates user key pairs for supporting server-side keygen
- *
+ *
* @return keygen token
*/
public CryptoToken getKeygenToken();
/**
* Adds entropy to the token used for supporting server-side keygen
- * Parameters are set in the config file
+ * Parameters are set in the config file
+ *
* @param logflag create log messages at info level to report entropy shortage
*/
- public void addEntropy(boolean logflag);
-
+ public void addEntropy(boolean logflag);
/**
* Returns the request listener that listens on
* the request completion event.
- *
+ *
* @return request listener
*/
public IRequestListener getRequestInQListener();
@@ -208,42 +206,42 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Returns policy processor of the key recovery
* authority.
- *
+ *
* @return policy processor
*/
public IPolicyProcessor getPolicyProcessor();
/**
* Returns the nickname of the transport certificate.
- *
+ *
* @return transport certificate nickname.
*/
public String getNickname();
/**
* Sets the nickname of the transport certificate.
- *
+ *
* @param str nickname
*/
public void setNickname(String str);
/**
* Returns the new nickname of the transport certifiate.
- *
+ *
* @return new nickname
*/
public String getNewNickName() throws EBaseException;
/**
* Sets the new nickname of the transport certifiate.
- *
+ *
* @param name new nickname
*/
public void setNewNickName(String name);
/**
* Logs event into key recovery authority logging.
- *
+ *
* @param level log level
* @param msg log message
*/
@@ -255,7 +253,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
* framework will try to serialize all the attribute into
* persistent storage. Things like passwords are not
* desirable to be stored.
- *
+ *
* @param id request id
* @return volatile requests
*/
@@ -263,7 +261,7 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Retrieves the request object.
- *
+ *
* @param id request id
* @return volatile requests
*/
@@ -271,32 +269,32 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
/**
* Destroys the request object.
- *
+ *
* @param id request id
*/
public void destroyVolatileRequest(RequestId id);
public Vector<Credential> getAppAgents(
- String recoveryID) throws EBaseException;
+ String recoveryID) throws EBaseException;
/**
* Creates error for a specific recovery operation.
- *
+ *
* @param recoveryID recovery id
* @param error error
* @exception EBaseException failed to create error
*/
public void createError(String recoveryID, String error)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves error by recovery identifier.
- *
+ *
* @param recoveryID recovery id
* @return error message
*/
public String getError(String recoveryID)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves PKCS12 package by recovery identifier.
@@ -305,16 +303,16 @@ public interface IKeyRecoveryAuthority extends ISubsystem {
* @return pkcs12 package in bytes
*/
public byte[] getPk12(String recoveryID)
- throws EBaseException;
+ throws EBaseException;
/**
* Creates PKCS12 package in memory.
- *
+ *
* @param recoveryID recovery id
* @param pk12 package in bytes
- */
+ */
public void createPk12(String recoveryID, byte[] pk12)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the transport certificate.
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/IKeyService.java b/pki/base/common/src/com/netscape/certsrv/kra/IKeyService.java
index 5ed17453..b8973792 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/IKeyService.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/IKeyService.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import java.math.BigInteger;
import java.util.Hashtable;
@@ -26,11 +25,10 @@ import netscape.security.x509.X509CertImpl;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.security.Credential;
-
/**
* An interface representing a recovery service.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IKeyService {
@@ -44,45 +42,49 @@ public interface IKeyService {
*/
public int getNoOfRequiredAgents() throws EBaseException;
- /**
- * is async recovery request status APPROVED -
- * i.e. all required # of recovery agents approved
- * @param reqID request id
- * @return true if # of recovery required agents approved; false otherwise
- */
+ /**
+ * is async recovery request status APPROVED -
+ * i.e. all required # of recovery agents approved
+ *
+ * @param reqID request id
+ * @return true if # of recovery required agents approved; false otherwise
+ */
public boolean isApprovedAsyncKeyRecovery(String reqID)
- throws EBaseException;
+ throws EBaseException;
- /**
- * get async recovery request initiating agent
- * @param reqID request id
- * @return agentUID
- */
+ /**
+ * get async recovery request initiating agent
+ *
+ * @param reqID request id
+ * @return agentUID
+ */
public String getInitAgentAsyncKeyRecovery(String reqID)
- throws EBaseException;
+ throws EBaseException;
/**
* Initiate asynchronous key recovery
+ *
* @param kid key identifier
* @param cert certificate embedded in PKCS12
* @return requestId
* @exception EBaseException failed to initiate async recovery
*/
public String initAsyncKeyRecovery(BigInteger kid, X509CertImpl cert, String agent)
- throws EBaseException;
+ throws EBaseException;
/**
* add approving agent in asynchronous key recovery
+ *
* @param reqID request id
* @param agentID agent id
* @exception EBaseException failed to initiate async recovery
*/
public void addAgentAsyncKeyRecovery(String reqID, String agentID)
- throws EBaseException;
+ throws EBaseException;
/**
* Performs administrator-initiated key recovery.
- *
+ *
* @param kid key identifier
* @param creds list of credentials (id and password)
* @param pwd password to protect PKCS12
@@ -92,87 +94,84 @@ public interface IKeyService {
* @exception EBaseException failed to perform recovery
*/
public byte[] doKeyRecovery(BigInteger kid,
- Credential creds[], String pwd, X509CertImpl cert,
- String delivery, String nickname, String agent) throws EBaseException;
+ Credential creds[], String pwd, X509CertImpl cert,
+ String delivery, String nickname, String agent) throws EBaseException;
- /**
+ /**
* Async Recovers key for administrators. This method is
* invoked by the agent operation of the key recovery servlet.
* <P>
- *
+ *
* <ul>
- * <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST used whenever
- * a user private key recovery request is made (this is when the DRM
- * receives the request)
- * <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_PROCESSED used whenever
- * a user private key recovery request is processed (this is when the DRM
- * processes the request)
+ * <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST used whenever a user private key recovery request is made (this is when the DRM receives the request)
+ * <li>signed.audit LOGGING_SIGNED_AUDIT_KEY_RECOVERY_REQUEST_PROCESSED used whenever a user private key recovery request is processed (this is when the DRM processes the request)
* </ul>
- * @param reqID request id
+ *
+ * @param reqID request id
* @param password password of the PKCS12 package
- * subsystem
+ * subsystem
* @exception EBaseException failed to recover key
* @return a byte array containing the key
*/
public byte[] doKeyRecovery(
- String reqID,
- String password)
- throws EBaseException;
+ String reqID,
+ String password)
+ throws EBaseException;
/**
* Retrieves recovery identifier.
- *
+ *
* @return recovery id
*/
public String getRecoveryID();
/**
* Creates recovery parameters for the given recovery operation.
- *
+ *
* @param recoveryID recovery id
* @return recovery parameters
* @exception EBaseException failed to create
*/
public Hashtable<String, Object> createRecoveryParams(String recoveryID)
- throws EBaseException;
+ throws EBaseException;
/**
* Destroys recovery parameters for the given recovery operation.
- *
+ *
* @param recoveryID recovery id
* @exception EBaseException failed to destroy
*/
- public void destroyRecoveryParams(String recoveryID)
- throws EBaseException;
+ public void destroyRecoveryParams(String recoveryID)
+ throws EBaseException;
/**
* Retrieves recovery parameters for the given recovery operation.
- *
+ *
* @param recoveryID recovery id
* @return recovery parameters
* @exception EBaseException failed to retrieve
*/
public Hashtable<String, Object> getRecoveryParams(String recoveryID)
- throws EBaseException;
+ throws EBaseException;
/**
* Adds password in the distributed recovery operation.
- *
+ *
* @param recoveryID recovery id
* @param uid agent uid
* @param pwd agent password
* @exception EBaseException failed to add
*/
- public void addDistributedCredential(String recoveryID,
- String uid, String pwd) throws EBaseException;
+ public void addDistributedCredential(String recoveryID,
+ String uid, String pwd) throws EBaseException;
/**
* Retrieves credentials in the distributed recovery operation.
- *
+ *
* @param recoveryID recovery id
* @return agent's credentials
* @exception EBaseException failed to retrieve
*/
- public Credential[] getDistributedCredentials(String recoveryID)
- throws EBaseException;
+ public Credential[] getDistributedCredentials(String recoveryID)
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/IProofOfArchival.java b/pki/base/common/src/com/netscape/certsrv/kra/IProofOfArchival.java
index 1b484b66..20ac336e 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/IProofOfArchival.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/IProofOfArchival.java
@@ -17,15 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import java.math.BigInteger;
import java.util.Date;
-
/**
* An interface represents a proof of archival.
* <P>
* Here is the ASN1 definition of a proof of escrow:
+ *
* <PRE>
* ProofOfArchival ::= SIGNED {
* SEQUENCE {
@@ -46,35 +45,35 @@ public interface IProofOfArchival {
/**
* Retrieves version of this proof.
- *
+ *
* @return version
*/
public BigInteger getVersion();
/**
* Retrieves the serial number.
- *
+ *
* @return serial number
*/
public BigInteger getSerialNumber();
/**
* Retrieves the subject name.
- *
+ *
* @return subject name
*/
public String getSubjectName();
/**
* Retrieves the issuer name.
- *
+ *
* @return issuer name
*/
public String getIssuerName();
/**
* Returns the beginning of the escrowed perioid.
- *
+ *
* @return date of archival
*/
public Date getDateOfArchival();
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/IShare.java b/pki/base/common/src/com/netscape/certsrv/kra/IShare.java
index c4d58f0a..19e7d7ce 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/IShare.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/IShare.java
@@ -20,13 +20,14 @@ package com.netscape.certsrv.kra;
/**
* Use Java's reflection API to leverage CMS's
* old Share and JoinShares implementations.
- *
+ *
* @deprecated
* @version $Revision$ $Date$
*/
public interface IShare {
public void initialize(byte[] secret, int threshold) throws Exception;
+
public byte[] createShare(int sharenumber);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/KRAResources.java b/pki/base/common/src/com/netscape/certsrv/kra/KRAResources.java
index 40e0ee17..14b686e6 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/KRAResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/KRAResources.java
@@ -17,10 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for KRA subsystem.
* <P>
diff --git a/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java b/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
index ca575396..9d17cbbb 100644
--- a/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
+++ b/pki/base/common/src/com/netscape/certsrv/kra/ProofOfArchival.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.kra;
-
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
@@ -42,17 +41,17 @@ import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.IDBObj;
-
/**
* A class represents a proof of escrow. It indicates a key
- * pairs have been escrowed by appropriate authority. The
- * structure of this object is very similar (if not exact) to
- * X.509 certificate. A proof of escrow is signed by an escrow
+ * pairs have been escrowed by appropriate authority. The
+ * structure of this object is very similar (if not exact) to
+ * X.509 certificate. A proof of escrow is signed by an escrow
* authority. It is possible to have a CMS policy to reject
* the certificate issuance request if proof of escrow is not
* presented.
* <P>
* Here is the ASN1 definition of a proof of escrow:
+ *
* <PRE>
* ProofOfEscrow ::= SIGNED {
* SEQUENCE {
@@ -106,13 +105,14 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Constructs a proof of escrow.
* <P>
+ *
* @param serialNo serial number of proof
* @param subject subject name
* @param issuer issuer name
* @param dateOfArchival date of archival
*/
public ProofOfArchival(BigInteger serialNo, String subject,
- String issuer, Date dateOfArchival) {
+ String issuer, Date dateOfArchival) {
mVersion = DEFAULT_VERSION;
mSerialNo = serialNo;
mSubject = subject;
@@ -123,6 +123,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Constructs proof of escrow from input stream.
* <P>
+ *
* @param in encoding source
* @exception EBaseException failed to decode
*/
@@ -133,6 +134,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Sets an attribute value.
* <P>
+ *
* @param name attribute name
* @param obj attribute value
* @exception EBaseException failed to set attribute
@@ -157,6 +159,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Retrieves the value of an named attribute.
* <P>
+ *
* @param name attribute name
* @return attribute value
* @exception EBaseException failed to get attribute
@@ -177,10 +180,11 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
}
}
-
+
/**
* Deletes an attribute.
* <P>
+ *
* @param name attribute name
* @exception EBaseException failed to get attribute
*/
@@ -188,11 +192,11 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
throw new EBaseException(
CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
}
-
+
/**
* Retrieves a list of possible attribute names.
* <P>
- *
+ *
* @return a list of names
*/
public Enumeration<String> getElements() {
@@ -207,11 +211,12 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
public Enumeration<String> getSerializableAttrNames() {
return mNames.elements();
}
-
+
/**
* Retrieves version of this proof.
* <P>
- * @return version
+ *
+ * @return version
*/
public BigInteger getVersion() {
return mVersion;
@@ -220,7 +225,8 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Retrieves the serial number.
* <P>
- * @return serial number
+ *
+ * @return serial number
*/
public BigInteger getSerialNumber() {
return mSerialNo;
@@ -229,6 +235,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Retrieves the subject name.
* <P>
+ *
* @return subject name
*/
public String getSubjectName() {
@@ -238,6 +245,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Retrieves the issuer name.
* <P>
+ *
* @return issuer name
*/
public String getIssuerName() {
@@ -247,6 +255,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
/**
* Returns the beginning of the escrowed perioid.
* <P>
+ *
* @return date of archival
*/
public Date getDateOfArchival() {
@@ -254,7 +263,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
}
/**
- * Encodes this proof of escrow into the given
+ * Encodes this proof of escrow into the given
* output stream.
* <P>
*/
@@ -268,10 +277,10 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
version.putInteger(new BigInt(mVersion));
seq.write(DerValue.createTag(
- DerValue.TAG_CONTEXT, true, (byte) 0),
- version);
+ DerValue.TAG_CONTEXT, true, (byte) 0),
+ version);
}
-
+
// serial number
DerOutputStream serialno = new DerOutputStream();
@@ -289,7 +298,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
// issue date
seq.putUTCTime(mDateOfArchival);
- out.write(DerValue.tag_Sequence, seq);
+ out.write(DerValue.tag_Sequence, seq);
} catch (IOException e) {
throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED", e.toString()));
@@ -300,9 +309,9 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
* Encodes and signs this proof of escrow.
* <P>
*/
- public void encodeAndSign(PrivateKey key, String algorithm,
- String provider, DerOutputStream out)
- throws EBaseException {
+ public void encodeAndSign(PrivateKey key, String algorithm,
+ String provider, DerOutputStream out)
+ throws EBaseException {
try {
Signature sigEngine = null;
@@ -310,7 +319,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
if (provider == null) {
sigEngine = Signature.getInstance(algorithm);
} else {
- sigEngine = Signature.getInstance(algorithm,
+ sigEngine = Signature.getInstance(algorithm,
provider);
}
@@ -357,7 +366,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
DerValue val = new DerValue(in);
- DerValue seq[] = new DerValue[3];
+ DerValue seq[] = new DerValue[3];
seq[0] = val.data.getDerValue();
if (seq[0].tag == DerValue.tag_Sequence) {
@@ -365,12 +374,12 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
seq[1] = val.data.getDerValue();
seq[2] = val.data.getDerValue();
if (seq[1].data.available() != 0) {
- throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
+ throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
"no algorithm found"));
}
if (seq[2].data.available() != 0) {
- throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
+ throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
"no signature found"));
}
@@ -391,14 +400,14 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
* Decodes proof of escrow.
* <P>
*/
- private void decodePOA(DerValue val, DerValue preprocessed)
- throws EBaseException {
+ private void decodePOA(DerValue val, DerValue preprocessed)
+ throws EBaseException {
try {
DerValue tmp = null;
if (preprocessed == null) {
if (val.tag != DerValue.tag_Sequence) {
- throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
+ throw new EKRAException(CMS.getUserMessage("CMS_KRA_POA_DECODE_FAILED_1",
"not start with sequence"));
}
tmp = val.data.getDerValue();
@@ -429,7 +438,7 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
// mSubject = new X500Name(subject); // doesnt work
mSubject = new String(subject.toByteArray());
-
+
// issuer
DerValue issuer = val.data.getDerValue();
@@ -443,15 +452,15 @@ public class ProofOfArchival implements IDBObj, IProofOfArchival, Serializable {
}
/**
- * Retrieves the string reprensetation of this
+ * Retrieves the string reprensetation of this
* proof of archival.
*/
public String toString() {
return "Version: " + mVersion.toString() + "\n" +
- "SerialNo: " + mSerialNo.toString() + "\n" +
- "Subject: " + mSubject + "\n" +
- "Issuer: " + mIssuer + "\n" +
- "DateOfArchival: " + mDateOfArchival.toString();
+ "SerialNo: " + mSerialNo.toString() + "\n" +
+ "Subject: " + mSubject + "\n" +
+ "Issuer: " + mIssuer + "\n" +
+ "DateOfArchival: " + mDateOfArchival.toString();
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java
index ab2d361b..8c1d2d4a 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class that represents a Ldap exception. Various
* errors can occur when interacting with a Ldap directory server.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class ELdapException extends EBaseException {
@@ -37,23 +35,25 @@ public class ELdapException extends EBaseException {
/**
* Ldap resource class name.
*/
- private static final String LDAP_RESOURCES = LdapResources.class.getName();
+ private static final String LDAP_RESOURCES = LdapResources.class.getName();
/**
- * Constructs a Ldap exception.
+ * Constructs a Ldap exception.
+ *
* @param msgFormat Resource Key, if key not present, serves as the message.
- * <P>
+ * <P>
*/
public ELdapException(String msgFormat) {
super(msgFormat);
}
/**
- * Constructs a Ldap exception.
+ * Constructs a Ldap exception.
+ *
* @param msgFormat Resource Key, if key not present, serves as the message.
- * Include a message string parameter for variable content.
+ * Include a message string parameter for variable content.
* @param param Message string parameter.
- * <P>
+ * <P>
*/
public ELdapException(String msgFormat, String param) {
super(msgFormat, param);
@@ -61,19 +61,21 @@ public class ELdapException extends EBaseException {
/**
* Constructs a Ldap exception.
+ *
* @param msgFormat Resource Key, if key not present, serves as the message.
- * @param e Common exception.
- * <P>
+ * @param e Common exception.
+ * <P>
*/
public ELdapException(String msgFormat, Exception e) {
super(msgFormat, e);
}
/**
- * Constructs a Ldap exception.
+ * Constructs a Ldap exception.
+ *
* @param msgFormat Resource Key, if key not present, serves as the message.
* @param params Array of Message string parameters.
- * <P>
+ * <P>
*/
public ELdapException(String msgFormat, Object params[]) {
super(msgFormat, params);
@@ -81,8 +83,9 @@ public class ELdapException extends EBaseException {
/**
* Gets the resource bundle name
+ *
* @return Name of the Ldap Exception resource bundle name.
- * <p>
+ * <p>
*/
protected String getBundleName() {
return LDAP_RESOURCES;
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java
index ead1a020..f347b171 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
/**
* This represents exception which indicates Ldap server is down.
- *
+ *
* @version $Revision$, $Date$
*/
public class ELdapServerDownException extends ELdapException {
@@ -32,6 +31,7 @@ public class ELdapServerDownException extends ELdapException {
/**
* Constructs a ldap server down exception with host & port info.
+ *
* @param errorString Detailed error message.
*/
public ELdapServerDownException(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java
index 46082c73..4325f077 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java
@@ -17,11 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
-
/**
* Class for obtaining ldap authentication info from the configuration store.
* Two types of authentication is basic and SSL client authentication.
@@ -39,28 +37,30 @@ public interface ILdapAuthInfo {
static public final String LDAP_BASICAUTH_STR = "BasicAuth";
static public final String LDAP_SSLCLIENTAUTH_STR = "SslClientAuth";
- static public final int LDAP_AUTHTYPE_NONE = 0; // illegal
+ static public final int LDAP_AUTHTYPE_NONE = 0; // illegal
static public final int LDAP_AUTHTYPE_BASICAUTH = 1;
static public final int LDAP_AUTHTYPE_SSLCLIENTAUTH = 2;
/**
* Initialize this class from the config store.
+ *
* @param config The config store from which to initialize.
* @exception EBaseException Due to failure of the initialization process.
- *
+ *
*/
public void init(IConfigStore config) throws EBaseException;
/**
- * Initialize this class from the config store.
+ * Initialize this class from the config store.
* Based on host, port, and secure boolean info.
* which allows an actual attempt on the server to verify credentials.
+ *
* @param config The config store from which to initialize.
* @exception EBaseException Due to failure of the initialization process.
- *
+ *
*/
public void init(IConfigStore config, String host, int port, boolean secure)
- throws EBaseException;
+ throws EBaseException;
/**
* Reset the connection to the host
@@ -68,28 +68,32 @@ public interface ILdapAuthInfo {
public void reset();
/**
- * Get authentication type.
+ * Get authentication type.
+ *
* @return one of: <br>
- * LdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH or
- * LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH
+ * LdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH or
+ * LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH
*/
public int getAuthType();
/**
* Get params for authentication.
+ *
* @return array of parameters for this authentication as an array of Strings.
*/
public String[] getParms();
/**
* Add password to private password data structure.
+ *
* @param prompt Password prompt.
- * @param pw Password itself.
+ * @param pw Password itself.
*/
public void addPassword(String prompt, String pw);
/**
* Remove password from private password data structure.
+ *
* @param prompt Identify password to remove with prompt.
*/
public void removePassword(String prompt);
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java
index ef3e1742..846f5174 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java
@@ -17,9 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
-
-
/**
* Maintains a pool of connections to the LDAP server.
* CMS requests are processed on a multi threaded basis.
@@ -28,7 +25,7 @@ package com.netscape.certsrv.ldap;
* max size of this connection pool should be configurable. Once
* the maximum limit of connections is exceeded, the factory
* should provide proper synchronization to resolve contention issues.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILdapBoundConnFactory extends ILdapConnFactory {
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java
index f706c2ec..738f5832 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java
@@ -17,76 +17,81 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import netscape.ldap.LDAPConnection;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
-
/**
* Maintains a pool of connections to the LDAP server.
* Multiple threads use this interface to utilize and release
* the Ldap connection resources.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILdapConnFactory {
- /**
+ /**
* Initialize the poll from the config store.
+ *
* @param config The configuration substore.
* @exception EBaseException On configuration error.
- * @exception ELdapException On all other errors.
+ * @exception ELdapException On all other errors.
*/
- public void init(IConfigStore config)
- throws EBaseException, ELdapException;
+ public void init(IConfigStore config)
+ throws EBaseException, ELdapException;
/**
- *
- * Used for disconnecting all connections.
+ *
+ * Used for disconnecting all connections.
* Used just before a subsystem
* shutdown or process exit.
+ *
* @exception EldapException on Ldap failure when closing connections.
*/
- public void reset()
- throws ELdapException;
+ public void reset()
+ throws ELdapException;
/**
* Returns the number of free connections available from this pool.
- * @return Integer number of free connections.
- */
+ *
+ * @return Integer number of free connections.
+ */
public int freeConn();
/**
* Returns the number of total connections available from this pool.
* Includes sum of free and in use connections.
+ *
* @return Integer number of total connections.
*/
public int totalConn();
/**
* Returns the maximum number of connections available from this pool.
+ *
* @return Integer maximum number of connections.
*/
public int maxConn();
- /**
- * Request access to a Ldap connection from the pool.
- * @exception ELdapException if any error occurs, such as a
+ /**
+ * Request access to a Ldap connection from the pool.
+ *
+ * @exception ELdapException if any error occurs, such as a
* @return Ldap connection object.
- * connection is not available
+ * connection is not available
*/
- public LDAPConnection getConn()
- throws ELdapException;
+ public LDAPConnection getConn()
+ throws ELdapException;
/**
* Return connection to the factory. mandatory after a getConn().
+ *
* @param conn Ldap connection object to be returned to the free list of the pool.
* @exception ELdapException On any failure to return the connection.
*/
- public void returnConn(LDAPConnection conn)
- throws ELdapException;
+ public void returnConn(LDAPConnection conn)
+ throws ELdapException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java
index 4cffbe45..aa5b388a 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
-
/**
* Class for reading ldap connection information from the config store.
* Ldap connection info: host name, port number,whether of not it is a secure connection.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILdapConnInfo {
@@ -42,23 +40,23 @@ public interface ILdapConnInfo {
/**
* Initializes an instance from a config store.
+ *
* @param config Configuration store.
* @exception ELdapException Ldap related error found.
- * @exception EBaseException Other errors and errors with params included in the config store.
+ * @exception EBaseException Other errors and errors with params included in the config store.
*/
public void init(IConfigStore config) throws EBaseException, ELdapException;
/**
- * Return the name of the Host.
- *
+ * Return the name of the Host.
+ *
*/
-
public String getHost();
/**
* Return the port number of the host.
- *
+ *
*/
public int getPort();
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java
index 8d912fc5..efa1c271 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java
@@ -17,31 +17,30 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* Class on behalf of the Publishing system that controls an instance of an ILdapConnFactory.
* Allows a factory to be intialized and grants access
* to the factory to other interested parties.
- *
+ *
* @version $Revision$, $Date$
*/
-
+
public interface ILdapConnModule {
/**
* Initialize ldap publishing module with config store.
+ *
* @param owner Entity that is interested in this instance of Publishing.
* @param config Config store containing the info needed to set up Publishing.
* @exception ELdapException Due to Ldap error.
* @exception EBaseException Due to config value errors and all other errors.
*/
- public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException, ELdapException;
+ public void init(ISubsystem owner, IConfigStore config)
+ throws EBaseException, ELdapException;
/**
* Returns the internal ldap connection factory.
@@ -52,10 +51,9 @@ public interface ILdapConnModule {
* Use ILdapConnFactory.getConn() to get a Ldap connection to the ldap
* publishing directory.
* Use ILdapConnFactory.returnConn() to return the connection.
- *
+ *
* @return Instance of ILdapConnFactory.
*/
public ILdapConnFactory getLdapConnFactory();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java b/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java
index 26149738..332fcadd 100644
--- a/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java
@@ -17,10 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;
-
import java.util.ListResourceBundle;
-
/**
* A resource bundle for ldap subsystem.
*
@@ -36,7 +34,7 @@ public class LdapResources extends ListResourceBundle {
}
/**
- * Constants. The suffix represents the number of
+ * Constants. The suffix represents the number of
* possible parameters.
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/listeners/EListenersException.java b/pki/base/common/src/com/netscape/certsrv/listeners/EListenersException.java
index c498ca3d..6aee21ff 100644
--- a/pki/base/common/src/com/netscape/certsrv/listeners/EListenersException.java
+++ b/pki/base/common/src/com/netscape/certsrv/listeners/EListenersException.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.listeners;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a listener exception.
* <P>
+ *
* @version $Revision$, $Date$
*/
public class EListenersException extends EBaseException {
@@ -40,8 +39,9 @@ public class EListenersException extends EBaseException {
/**
* Constructs a listeners exception.
* <P>
+ *
* @param msgFormat The error message resource key.
- */
+ */
public EListenersException(String msgFormat) {
super(msgFormat);
}
@@ -49,6 +49,7 @@ public class EListenersException extends EBaseException {
/**
* Constructs a listeners exception.
* <P>
+ *
* @param msgFormat exception details in message string format.
* @param param message string parameter.
*/
@@ -59,27 +60,31 @@ public class EListenersException extends EBaseException {
/**
* Constructs a Listeners exception.
* <P>
+ *
* @param msgFormat The resource key.
* @param e The parameter as an exception.
*/
public EListenersException(String msgFormat, Exception e) {
super(msgFormat, e);
}
-
+
/**
* Constructs a Listeners exception.
* <P>
+ *
* @param msgFormat The resource key.
* @param params Array of params.
*/
public EListenersException(String msgFormat, Object params[]) {
super(msgFormat, params);
}
+
/**
* get the listener resource class name.
* <P>
+ *
* @return the class name of the resource.
- */
+ */
protected String getBundleName() {
return LISTENERS_RESOURCES;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/listeners/IRequestListenerPlugin.java b/pki/base/common/src/com/netscape/certsrv/listeners/IRequestListenerPlugin.java
index b0cb173c..c615586d 100644
--- a/pki/base/common/src/com/netscape/certsrv/listeners/IRequestListenerPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/listeners/IRequestListenerPlugin.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.listeners;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
@@ -25,54 +24,63 @@ import com.netscape.certsrv.base.IConfigStore;
* This interface represents a plug-in listener. Implement this class to
* add the listener to an ARequestNotifier of a subsystem.
* <P>
+ *
* @version $Revision$, $Date$
*/
public interface IRequestListenerPlugin {
-
+
/**
* get the registered class name set in the init() method.
* <P>
- * @return the Name.
+ *
+ * @return the Name.
*/
public String getName();
-
+
/**
* get the plugin implementaion name set in the init() method.
* <P>
+ *
* @return the plugin implementation name.
*/
public String getImplName();
-
+
/**
* the subsystem call this method to initialize the plug-in.
* <P>
+ *
* @param name the registered class name of the plug-in.
* @param implName the implemetnation name of the plug-in.
* @param config the configuration store where the.
- * properties of the plug-in are stored.
+ * properties of the plug-in are stored.
* @exception EBaseException throws base exception in the certificate server.
*/
- public void init(String name, String implName, IConfigStore config)
- throws EBaseException;
+ public void init(String name, String implName, IConfigStore config)
+ throws EBaseException;
+
/**
* shutdown the plugin.
*/
public void shutdown();
+
/**
* get the configuration parameters of the plug-in.
* <P>
+ *
* @return the configuration parameters.
* @exception EBaseException throws base exception in the certificate server.
*/
public String[] getConfigParams()
- throws EBaseException;
+ throws EBaseException;
+
/**
* get the configuration store of the plugin where the
* configuration parameters of the plug-in are stored.
* <P>
+ *
* @return the configuration store.
*/
-
+
public IConfigStore getConfigStore();
-
+
}
diff --git a/pki/base/common/src/com/netscape/certsrv/listeners/ListenersResources.java b/pki/base/common/src/com/netscape/certsrv/listeners/ListenersResources.java
index 199941be..9eaf4137 100644
--- a/pki/base/common/src/com/netscape/certsrv/listeners/ListenersResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/listeners/ListenersResources.java
@@ -17,13 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.listeners;
-
import java.util.ListResourceBundle;
/**
- * A class represents a resource bundle for the
+ * A class represents a resource bundle for the
* listeners package.
- *
+ *
* @version $Revision$, $Date$
*/
public class ListenersResources extends ListResourceBundle {
@@ -31,11 +30,13 @@ public class ListenersResources extends ListResourceBundle {
/**
* get the content of the resource.
* <P>
+ *
* @return the content of this resource is a value pairs array of keys and values.
*/
public Object[][] getContents() {
return contents;
}
+
static final Object[][] contents = {
};
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
index 4f7e64f2..aa0077b0 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.text.MessageFormat;
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* The log event object that carries message detail of a log event
- * that goes into the Transaction log. Note that the name of this
- * class "AuditEvent" is legacy and has nothing to do with the signed
+ * that goes into the Transaction log. Note that the name of this
+ * class "AuditEvent" is legacy and has nothing to do with the signed
* audit log events, whcih are represented by SignedAuditEvent.
- *
+ *
* @version $Revision$, $Date$
* @see java.text.MessageFormat
* @see com.netscape.certsrv.logging.LogResources
@@ -56,12 +54,12 @@ public class AuditEvent implements IBundleLogEvent {
* The bundle name for this event.
*/
private String mBundleName = LogResources.class.getName();
- private static final String INVALID_LOG_LEVEL="log level: {0} is invalid, should be 0-6";
+ private static final String INVALID_LOG_LEVEL = "log level: {0} is invalid, should be 0-6";
/**
* Constructs a message event
* <P>
- *
+ *
* @param msgFormat the message string
*/
public AuditEvent(String msgFormat) {
@@ -71,11 +69,12 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Constructs a message with a parameter. For example,
+ *
* <PRE>
- * new AuditEvent("failed to load {0}", fileName);
+ * new AuditEvent(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat details in message string format
* @param param message string parameter
*/
@@ -89,6 +88,7 @@ public class AuditEvent implements IBundleLogEvent {
* Constructs a message from an exception. It can be used to carry
* a system exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -97,7 +97,7 @@ public class AuditEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param exception system exception
*/
@@ -110,6 +110,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Constructs a message from a base exception. This will use the msgFormat
* from the exception itself.
+ *
* <PRE>
* try {
* ...
@@ -118,7 +119,7 @@ public class AuditEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param e CMS exception
*/
public AuditEvent(Exception e) {
@@ -135,7 +136,7 @@ public class AuditEvent implements IBundleLogEvent {
* Constructs a message event with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat message string format
* @param params list of message format parameters
*/
@@ -147,7 +148,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Returns the current message format string.
* <P>
- *
+ *
* @return details message
*/
public String getMessage() {
@@ -157,7 +158,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Returns a list of parameters.
* <P>
- *
+ *
* @return list of message format parameters
*/
public Object[] getParameters() {
@@ -168,7 +169,7 @@ public class AuditEvent implements IBundleLogEvent {
* Returns localized message string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return details message
*/
public String toContent() {
@@ -178,7 +179,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale locale
* @return details message
*/
@@ -189,8 +190,9 @@ public class AuditEvent implements IBundleLogEvent {
}
/**
- * Gets the resource bundle name for this class instance. This should
+ * Gets the resource bundle name for this class instance. This should
* be overridden by subclasses who have their own resource bundles.
+ *
* @param bundle String that represents the resource bundle name to be set
*/
public void setBundleName(String bundle) {
@@ -199,6 +201,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Retrieves bundle name.
+ *
* @return a String that represents the resource bundle name
*/
protected String getBundleName() {
@@ -207,8 +210,9 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Retrieves log source.
+ *
* @return an integer that indicates the component source
- * where this message event was triggered
+ * where this message event was triggered
*/
public int getSource() {
return mSource;
@@ -216,18 +220,19 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Sets log source.
+ *
* @param source an integer that represents the component source
- * where this message event was triggered
+ * where this message event was triggered
*/
public void setSource(int source) {
mSource = source;
}
-
/**
* Retrieves log level.
* The log level of an event represents its relative importance
* or severity within CMS.
+ *
* @return Integer log level value.
*/
public int getLevel() {
@@ -236,6 +241,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Retrieves NT specific log event type.
+ *
* @return Integer NTEventType value.
*/
public int getNTEventType() {
@@ -246,6 +252,7 @@ public class AuditEvent implements IBundleLogEvent {
* Sets log level, NT log event type.
* For certain log levels the NT log event type gets
* set as well.
+ *
* @param level Integer log level value.
*/
public void setLevel(int level) {
@@ -273,12 +280,13 @@ public class AuditEvent implements IBundleLogEvent {
break;
}
}
-
+
/**
* Retrieves log multiline attribute.
+ *
* @return Boolean whether or not this event is multiline.
- * A multiline message simply consists of more than one line.
- */
+ * A multiline message simply consists of more than one line.
+ */
public boolean getMultiline() {
return mMultiline;
}
@@ -286,6 +294,7 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Sets log multiline attribute. A multiline message consists of
* more than one line.
+ *
* @param multiline Boolean multiline value.
*/
public void setMultiline(boolean multiline) {
@@ -294,26 +303,27 @@ public class AuditEvent implements IBundleLogEvent {
/**
* Retrieves event time stamp.
+ *
* @return Long integer of the time the event was created.
*/
public long getTimeStamp() {
return mTimeStamp;
}
-
/**
* Retrieves log event type. Each type of event
* has an associated String type value.
+ *
* @return String containing the type of event.
*/
public String getEventType() {
return mEventType;
}
-
/**
* Sets log event type. Each type of event
* has an associated String type value.
+ *
* @param eventType String containing the type of event.
*/
public void setEventType(String eventType) {
@@ -321,9 +331,10 @@ public class AuditEvent implements IBundleLogEvent {
}
/**
- * Return string representation of log message.
- * @return String containing log message.
- */
+ * Return string representation of log message.
+ *
+ * @return String containing log message.
+ */
public String toString() {
if (getBundleName() == null) {
MessageFormat detailMessage = new MessageFormat(mMessage);
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/AuditFormat.java b/pki/base/common/src/com/netscape/certsrv/logging/AuditFormat.java
index 8d870ad9..81253ff5 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/AuditFormat.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/AuditFormat.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
/**
* Define audit log message format. Note that the name of this
- * class "AuditFormat" is legacy and has nothing to do with the signed
+ * class "AuditFormat" is legacy and has nothing to do with the signed
* audit log events format
- *
+ *
* @version $Revision$, $Date$
*/
public class AuditFormat {
@@ -40,18 +39,18 @@ public class AuditFormat {
/**
* initiative: the event is from agent
*/
- public static final String FROMAGENT = "fromAgent";
+ public static final String FROMAGENT = "fromAgent";
/**
* initiative: the event is from router
*/
- public static final String FROMROUTER = "fromRouter";
+ public static final String FROMROUTER = "fromRouter";
/**
* initiative: the event is from remote authority
*/
public static final String FROMRA = "fromRemoteAuthority";
-
+
/**
* authentication module: no Authentication manager
*/
@@ -59,54 +58,54 @@ public class AuditFormat {
// for ProcessCertReq.java ,kra
/**
- 0: request type
- 1: request ID
- 2: initiative
- 3: auth module
- 4: status
- 5: cert dn
- 6: other info. eg cert serial number, violation policies
+ * 0: request type
+ * 1: request ID
+ * 2: initiative
+ * 3: auth module
+ * 4: status
+ * 5: cert dn
+ * 6: other info. eg cert serial number, violation policies
*/
- public static final String FORMAT =
- "{0} reqID {1} {2} authenticated by {3} is {4} DN requested: {5} {6}";
- public static final String NODNFORMAT =
- "{0} reqID {1} {2} authenticated by {3} is {4}";
+ public static final String FORMAT =
+ "{0} reqID {1} {2} authenticated by {3} is {4} DN requested: {5} {6}";
+ public static final String NODNFORMAT =
+ "{0} reqID {1} {2} authenticated by {3} is {4}";
- public static final String ENROLLMENTFORMAT =
- "Enrollment request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} {5}";
- public static final String RENEWALFORMAT =
- "Renewal request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} old serial number: 0x{5} {6}";
- public static final String REVOCATIONFORMAT =
- "Revocation request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} serial number: 0x{5} revocation reason: {6} {7}";
+ public static final String ENROLLMENTFORMAT =
+ "Enrollment request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} {5}";
+ public static final String RENEWALFORMAT =
+ "Renewal request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} old serial number: 0x{5} {6}";
+ public static final String REVOCATIONFORMAT =
+ "Revocation request reqID {0} {1} authenticated by {2} is {3}. DN requested: {4} serial number: 0x{5} revocation reason: {6} {7}";
// 1: fromAgent AgentID: xxx authenticated by xxx
- public static final String DOREVOKEFORMAT =
- "Revocation request reqID {0} {1} is {2}. DN requested: {3} serial number: 0x{4} revocation reason: {5}";
+ public static final String DOREVOKEFORMAT =
+ "Revocation request reqID {0} {1} is {2}. DN requested: {3} serial number: 0x{4} revocation reason: {5}";
// 1: fromAgent AgentID: xxx authenticated by xxx
- public static final String DOUNREVOKEFORMAT =
- "Unrevocation request reqID {0} {1} is {2}. DN requested: {3} serial number: 0x{4}";
+ public static final String DOUNREVOKEFORMAT =
+ "Unrevocation request reqID {0} {1} is {2}. DN requested: {3} serial number: 0x{4}";
// 0:initiative
- public static final String CRLUPDATEFORMAT =
- "CRLUpdate request {0} authenticated by {1} is {2}. Id: {3}\ncrl Number: {4} last update time: {5} next update time: {6} number of entries in the CRL: {7}";
+ public static final String CRLUPDATEFORMAT =
+ "CRLUpdate request {0} authenticated by {1} is {2}. Id: {3}\ncrl Number: {4} last update time: {5} next update time: {6} number of entries in the CRL: {7}";
// audit user/group
public static final String ADDUSERFORMAT =
- "Admin UID: {0} added User UID: {1}";
+ "Admin UID: {0} added User UID: {1}";
public static final String REMOVEUSERFORMAT =
- "Admin UID: {0} removed User UID: {1} ";
+ "Admin UID: {0} removed User UID: {1} ";
public static final String MODIFYUSERFORMAT =
- "Admin UID: {0} modified User UID: {1}";
+ "Admin UID: {0} modified User UID: {1}";
public static final String ADDUSERCERTFORMAT =
- "Admin UID: {0} added cert for User UID: {1}. cert DN: {2} serial number: 0x{3}";
+ "Admin UID: {0} added cert for User UID: {1}. cert DN: {2} serial number: 0x{3}";
public static final String REMOVEUSERCERTFORMAT =
- "Admin UID: {0} removed cert of User UID: {1}. cert DN: {2} serial number: 0x{3}";
+ "Admin UID: {0} removed cert of User UID: {1}. cert DN: {2} serial number: 0x{3}";
public static final String ADDUSERGROUPFORMAT =
- "Admin UID: {0} added User UID: {1} to group: {2}";
+ "Admin UID: {0} added User UID: {1} to group: {2}";
public static final String REMOVEUSERGROUPFORMAT =
- "Admin UID: {0} removed User UID: {1} from group: {2}";
+ "Admin UID: {0} removed User UID: {1} from group: {2}";
// LDAP publishing
- public static final String LDAP_PUBLISHED_FORMAT =
- "{0} successfully published serial number: 0x{1} with DN: {2}";
+ public static final String LDAP_PUBLISHED_FORMAT =
+ "{0} successfully published serial number: 0x{1} with DN: {2}";
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ConsoleError.java b/pki/base/common/src/com/netscape/certsrv/logging/ConsoleError.java
index 146824ac..13e0f3d4 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ConsoleError.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ConsoleError.java
@@ -17,12 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
-
-
/**
* A static class to log error messages to the Console
- *
+ *
* @version $Revision$, $Date$
*/
public class ConsoleError {
@@ -30,8 +27,8 @@ public class ConsoleError {
/**
* Send the given event to the Console.
- *
- * @param ev log event to be sent to the console
+ *
+ * @param ev log event to be sent to the console
*/
public static void send(ILogEvent ev) {
console.log(ev);
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ConsoleLog.java b/pki/base/common/src/com/netscape/certsrv/logging/ConsoleLog.java
index 8dee67ef..2e87fc92 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ConsoleLog.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ConsoleLog.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.io.IOException;
import java.util.Hashtable;
import java.util.Vector;
@@ -29,49 +28,49 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.common.NameValuePairs;
-
/**
* A log event listener which sends all log events to the system console/tty
- *
+ *
* @version $Revision$, $Date$
*/
public class ConsoleLog implements ILogEventListener {
/**
- * Log the given event. Usually called from a log manager.
- *
- * @param ev log event
+ * Log the given event. Usually called from a log manager.
+ *
+ * @param ev log event
*/
public void log(ILogEvent ev) {
System.err.println(Thread.currentThread().getName() + ": " + ev);
}
/**
- * Flush the system output stream.
- *
+ * Flush the system output stream.
+ *
*/
public void flush() {
System.err.flush();
}
- /**
- * All operations need to be cleaned up for shutdown are done here
- */
+ /**
+ * All operations need to be cleaned up for shutdown are done here
+ */
public void shutdown() {
}
- /**
- * get the configuration store that is associated with this
- * log listener
- * @return the configuration store that is associated with this
- * log listener
- */
+ /**
+ * get the configuration store that is associated with this
+ * log listener
+ *
+ * @return the configuration store that is associated with this
+ * log listener
+ */
public IConfigStore getConfigStore() {
return null;
}
- public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException {
+ public void init(ISubsystem owner, IConfigStore config)
+ throws EBaseException {
}
public void startup() throws EBaseException {
@@ -79,14 +78,15 @@ public class ConsoleLog implements ILogEventListener {
/**
* Retrieve last "maxLine" number of system log with log lever >"level"
- * and from source "source". If the parameter is omitted. All entries
+ * and from source "source". If the parameter is omitted. All entries
* are sent back.
- * @param req a Hashtable containing the required information such as
- * log entry, log level, log source, and log name
- * @return the content of the log that match the criteria in req
- * @exception servletException
- * @exception IOException
- * @exception EBaseException
+ *
+ * @param req a Hashtable containing the required information such as
+ * log entry, log level, log source, and log name
+ * @return the content of the log that match the criteria in req
+ * @exception servletException
+ * @exception IOException
+ * @exception EBaseException
*/
public synchronized NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws ServletException,
IOException, EBaseException {
@@ -94,8 +94,8 @@ public class ConsoleLog implements ILogEventListener {
}
/**
- * Retrieve log file list.
- * <br> unimplemented
+ * Retrieve log file list. <br>
+ * unimplemented
*/
public synchronized NameValuePairs retrieveLogList(Hashtable<String, String> req) throws ServletException,
IOException, EBaseException {
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ELogException.java b/pki/base/common/src/com/netscape/certsrv/logging/ELogException.java
index 90a74ba4..717dbdfe 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ELogException.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ELogException.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* This class implements a Log exception. LogExceptions
* should be caught by LogSubsystem managers.
@@ -39,14 +37,14 @@ public class ELogException extends EBaseException {
*/
private static final long serialVersionUID = -8903703675126348145L;
/**
- * Resource bundle class name.
- */
+ * Resource bundle class name.
+ */
private static final String LOG_RESOURCES = LogResources.class.getName();
/**
* Constructs a log exception.
* <P>
- *
+ *
* @param msgFormat Exception details.
*/
public ELogException(String msgFormat) {
@@ -56,11 +54,12 @@ public class ELogException extends EBaseException {
/**
* Constructs a log exception with a parameter. For example,
+ *
* <PRE>
- * new ELogException("failed to load {0}", fileName);
+ * new ELogException(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat Exception details in message string format.
* @param param Message string parameter.
*/
@@ -74,6 +73,7 @@ public class ELogException extends EBaseException {
* Constructs a log exception. It can be used to carry
* a system exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -82,7 +82,7 @@ public class ELogException extends EBaseException {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat Exception details in message string format.
* @param param System exception.
*/
@@ -96,7 +96,7 @@ public class ELogException extends EBaseException {
* Constructs a log exception with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat Exception details in message string format.
* @param params List of message format parameters.
*/
@@ -108,7 +108,7 @@ public class ELogException extends EBaseException {
/**
* Returns a list of parameters.
* <P>
- *
+ *
* @return list of message format parameters.
*/
public Object[] getParameters() {
@@ -119,7 +119,7 @@ public class ELogException extends EBaseException {
* Returns localized exception string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return Details message.
*/
public String toString() {
@@ -129,7 +129,7 @@ public class ELogException extends EBaseException {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale Locale.
* @return Details message.
*/
@@ -141,11 +141,12 @@ public class ELogException extends EBaseException {
/**
* Retrieves resource bundle name.
* Subclasses should override this as necessary
+ *
* @return String containing name of resource bundle.
*/
protected String getBundleName() {
return LOG_RESOURCES;
}
-
+
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ELogNotFound.java b/pki/base/common/src/com/netscape/certsrv/logging/ELogNotFound.java
index 2dad7aec..7de84733 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ELogNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ELogNotFound.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
/**
* Exception for log not found.
- *
+ *
* @version $Revision$, $Date$
*/
public class ELogNotFound extends ELogException {
@@ -32,6 +31,7 @@ public class ELogNotFound extends ELogException {
/**
* Constructs a exception for a missing required log.
+ *
* @param errorString Detailed error message.
*/
public ELogNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ELogPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/logging/ELogPluginNotFound.java
index efac65a2..6c434aff 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ELogPluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ELogPluginNotFound.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
/**
* Exception for log plugin not found.
- *
+ *
* @version $Revision$, $Date$
*/
public class ELogPluginNotFound extends ELogException {
@@ -32,10 +31,10 @@ public class ELogPluginNotFound extends ELogException {
/**
* Constructs a exception for a missing log plugin.
+ *
* @param errorString Detailed error message.
*/
public ELogPluginNotFound(String errorString) {
super(errorString);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/IBundleLogEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/IBundleLogEvent.java
index 44a4283b..9dd8595c 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/IBundleLogEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/IBundleLogEvent.java
@@ -17,23 +17,21 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
-
-
/**
* An interface which all loggable events must implement.
* See ILogEvent class.
* This class maintains a resource bundle name for given
* event type.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IBundleLogEvent extends ILogEvent {
/**
- * Sets the name of the resource bundle to be associated
- * with this event type.
- * @param bundle name of resource bundle.
- */
+ * Sets the name of the resource bundle to be associated
+ * with this event type.
+ *
+ * @param bundle name of resource bundle.
+ */
public void setBundleName(String bundle);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogEvent.java
index d0caca71..42391898 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogEvent.java
@@ -17,25 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.io.Serializable;
import java.util.Locale;
-
/**
* An interface which all loggable events must implement. CMS comes
- * with a limited set of ILogEvent types to implement: audit, system, and
- * signed audit. This is the base class of all the subsequent implemented types.
+ * with a limited set of ILogEvent types to implement: audit, system, and
+ * signed audit. This is the base class of all the subsequent implemented types.
* A log event represents a certain kind of log message designed for a specific purpose.
* For instance, an audit type event represents messages having to do with auditable CMS
- * actions. The resulting message will ultimately appear into a specific log file.
- *
+ * actions. The resulting message will ultimately appear into a specific log file.
+ *
* @version $Revision$, $Date$
*/
public interface ILogEvent extends Serializable {
/**
* Retrieves event time stamp.
+ *
* @return Long integer of the time the event was created.
*/
public long getTimeStamp();
@@ -44,36 +43,39 @@ public interface ILogEvent extends Serializable {
* Retrieves log source.
* This is an id of the subsystem responsible
* for creating the log event.
+ *
* @return Integer source id.
*/
public int getSource();
-
/**
* Retrieves log level.
* The log level of an event represents its relative importance
* or severity within CMS.
+ *
* @return Integer log level value.
*/
public int getLevel();
/**
* Retrieves NT specific log event type.
+ *
* @return Integer NTEventType value.
*/
public int getNTEventType();
/**
- * Retrieves multiline attribute.
- * Does this message consiste of more than one line.
- * @return Boolean of multiline status.
- */
+ * Retrieves multiline attribute.
+ * Does this message consiste of more than one line.
+ *
+ * @return Boolean of multiline status.
+ */
public boolean getMultiline();
-
/**
* Retrieves log event type. Each type of event
* has an associated String type value.
+ *
* @return String containing the type of event.
*/
public String getEventType();
@@ -81,16 +83,16 @@ public interface ILogEvent extends Serializable {
/**
* Sets log event type. Each type of event
* has an associated String type value.
+ *
* @param eventType String containing the type of event.
*/
public void setEventType(String eventType);
-
/**
* Returns localized message string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return Details message.
*/
public String toContent();
@@ -98,7 +100,7 @@ public interface ILogEvent extends Serializable {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale locale
* @return Details message.
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventFactory.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventFactory.java
index f94f20a9..bfd5be93 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventFactory.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventFactory.java
@@ -17,22 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.util.Properties;
-
/**
* An interface represents a log event factory. This
* factory will be responsible for creating and returning ILogEvent objects
* on demand.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILogEventFactory {
/**
* Creates an event of a particular event type/class.
- *
+ *
* @param evtClass The event type.
* @param prop The resource bundle.
* @param source The subsystem ID who creates the log event.
@@ -43,11 +41,11 @@ public interface ILogEventFactory {
* @return The created ILogEvent object.
*/
public ILogEvent create(int evtClass, Properties prop, int source,
- int level, boolean multiline, String msg, Object params[]);
+ int level, boolean multiline, String msg, Object params[]);
/**
* Releases previously created event.
- *
+ *
* @param event The log event.
*/
public void release(ILogEvent event);
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
index 80953ead..15ff08ad 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogEventListener.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.io.IOException;
import java.util.EventListener;
import java.util.Hashtable;
@@ -30,102 +29,107 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.common.NameValuePairs;
-
-
/**
* An interface represents a log event listener.
- * A ILogEventListener is registered to a specific
+ * A ILogEventListener is registered to a specific
* ILogQueue to be notified of created ILogEvents.
* the log queue will notify all its registered listeners
* of the logged event. The listener will then proceed to
* process the event accordingly which will result in a log
* message existing in some file.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILogEventListener extends EventListener {
/**
- * The event notification method: Logs event.
- *
+ * The event notification method: Logs event.
+ *
* @param event The log event to be processed.
*/
public void log(ILogEvent event) throws ELogException;
/**
- * Flushes the log buffers (if any). Will result in the messages
- * being actually written to their destination.
+ * Flushes the log buffers (if any). Will result in the messages
+ * being actually written to their destination.
*/
public void flush();
/**
- * Closes the log file and destroys any associated threads.
+ * Closes the log file and destroys any associated threads.
*/
public void shutdown();
/**
* Get the configuration store for the log event listener.
+ *
* @return The configuration store of this log event listener.
*/
public IConfigStore getConfigStore();
/**
* Initialize this log listener
- * @param owner The subsystem.
- * @param config Configuration store for this log listener.
- * @exception initialization error.
+ *
+ * @param owner The subsystem.
+ * @param config Configuration store for this log listener.
+ * @exception initialization error.
*/
- public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException;
+ public void init(ISubsystem owner, IConfigStore config)
+ throws EBaseException;
/**
* Startup the instance.
*/
public void startup()
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieve last "maxLine" number of system logs with log level >"level"
- * and from source "source". If the parameter is omitted. All entries
+ * and from source "source". If the parameter is omitted. All entries
* are sent back.
- * @param req a Hashtable containing the required information such as
- * log entry, log level, log source, and log name.
- * @return NameValue pair list of log messages.
- * @exception ServletException For Servelet errros.
- * @exception IOException For input/output problems.
- * @exception EBaseException For other problems.
+ *
+ * @param req a Hashtable containing the required information such as
+ * log entry, log level, log source, and log name.
+ * @return NameValue pair list of log messages.
+ * @exception ServletException For Servelet errros.
+ * @exception IOException For input/output problems.
+ * @exception EBaseException For other problems.
*/
public NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws ServletException,
IOException, EBaseException;
/**
- * Retrieve list of log files.
- *
- */
+ * Retrieve list of log files.
+ *
+ */
public NameValuePairs retrieveLogList(Hashtable<String, String> req) throws ServletException,
IOException, EBaseException;
/**
* Returns implementation name.
+ *
* @return String name of event listener implementation.
*/
public String getImplName();
/**
* Returns the description of this log event listener.
+ *
* @return String with listener description.
*/
public String getDescription();
/**
- * Return list of default config parameters for this log event listener.
- * @return Vector of default parameters.
- */
+ * Return list of default config parameters for this log event listener.
+ *
+ * @return Vector of default parameters.
+ */
public Vector<String> getDefaultParams();
/**
- * Return list of instance config parameters for this log event listener.
- * @return Vector of instance parameters.
- */
+ * Return list of instance config parameters for this log event listener.
+ *
+ * @return Vector of instance parameters.
+ */
public Vector<String> getInstanceParams();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogQueue.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogQueue.java
index 878b9ba1..bca7a93d 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogQueue.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogQueue.java
@@ -17,21 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
-
-
/**
* An interface represents a log queue. A log queue
* is a queue of pending log events to be dispatched
* to a set of registered ILogEventListeners.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILogQueue {
/**
* Dispatch the log event to all registered log event listeners.
- *
+ *
* @param evt the log event
*/
public void log(ILogEvent evt);
@@ -44,13 +41,13 @@ public interface ILogQueue {
/**
* Registers an event listener.
- *
+ *
* @param listener The log event listener to be registered
- * to this queue.
+ * to this queue.
*/
public void addLogEventListener(ILogEventListener listener);
- /**
+ /**
* Removes an event listener.
*
* @param listener The log event listener to be removed from this queue.
@@ -60,7 +57,7 @@ public interface ILogQueue {
/**
* Initializes the log queue.
* <P>
- *
+ *
*/
public void init();
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogSubsystem.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogSubsystem.java
index 2bdba0ab..ce317a5b 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogSubsystem.java
@@ -17,21 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.util.Hashtable;
import java.util.Vector;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * An interface that represents a logging component. The logging
+ * An interface that represents a logging component. The logging
* component is a framework that handles different types of log types,
- * each represented by an ILogEventListener, and each implements a log
- * plugin. CMS comes
+ * each represented by an ILogEventListener, and each implements a log
+ * plugin. CMS comes
* with three standard log types: "signedAudit", "system", and
- * "transaction". Each log plugin can be instantiated into log
- * instances. Each log instance can be individually configured and is
+ * "transaction". Each log plugin can be instantiated into log
+ * instances. Each log instance can be individually configured and is
* associated with its own configuration entries in the configuration file.
* <P>
*
@@ -46,14 +44,16 @@ public interface ILogSubsystem extends ISubsystem {
/**
* Retrieve plugin name (implementation name) of the log event
- * listener. If no plug name found, an empty string is returned
+ * listener. If no plug name found, an empty string is returned
+ *
* @param log the log event listener
* @return the log event listener's plugin name
- */
+ */
public String getLogPluginName(ILogEventListener log);
/**
* Retrieve the log event listener by instance name
+ *
* @param insName the log instance name in String
* @return the log instance in ILogEventListener
*/
@@ -61,44 +61,48 @@ public interface ILogSubsystem extends ISubsystem {
/**
* get the list of log plugins that are available
- * @return log plugins in a Hashtable. Each entry in the
- * Hashtable contains the name/value pair of pluginName/LogPlugin
+ *
+ * @return log plugins in a Hashtable. Each entry in the
+ * Hashtable contains the name/value pair of pluginName/LogPlugin
* @see LogPlugin
*/
- public Hashtable<String, LogPlugin> getLogPlugins();
+ public Hashtable<String, LogPlugin> getLogPlugins();
/**
* get the list of log instances that are available
- * @return log instances in a Hashtable. Each entry in the
- * Hashtable contains the name/value pair of instName/ILogEventListener
+ *
+ * @return log instances in a Hashtable. Each entry in the
+ * Hashtable contains the name/value pair of instName/ILogEventListener
* @see LogPlugin
*/
public Hashtable<String, ILogEventListener> getLogInsts();
/**
- * Get the default configuration parameter names associated with a
- * plugin. It is used by
+ * Get the default configuration parameter names associated with a
+ * plugin. It is used by
* administration servlet to handle log configuration when a new
* log instance is added.
+ *
* @param implName The implementation name for which the
- * configuration parameters are to be configured
+ * configuration parameters are to be configured
* @return a Vector of default configuration paramter names
- * associated with this log plugin
+ * associated with this log plugin
* @exception ELogException when instantiation of the plugin
- * implementation fails.
+ * implementation fails.
*/
public Vector<String> getLogDefaultParams(String implName) throws
ELogException;
/**
- * Get the default configuration parameter names associated with a
- * log instance. It is used by administration servlet to handle
+ * Get the default configuration parameter names associated with a
+ * log instance. It is used by administration servlet to handle
* log instance configuration.
+ *
* @param insName The instance name for which the configuration
- * parameters are to be configured
+ * parameters are to be configured
* @return a Vector of default configuration paramter names
- * associated with this log instance.
+ * associated with this log instance.
*/
public Vector<String> getLogInstanceParams(String insName)
- throws ELogException;
+ throws ELogException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/ILogger.java b/pki/base/common/src/com/netscape/certsrv/logging/ILogger.java
index 01fbc6b9..4cdb4b80 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/ILogger.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/ILogger.java
@@ -17,22 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.util.Properties;
-
/**
* An interface represents a logger for certificate server. This object is used to
- * issue log messages for the various types of logging event types. A log message results
- * in a ILogEvent being created. This event is then placed on a ILogQueue to be ultimately
- * written to the destination log file. This object also maintains a collection of ILogFactory objects
+ * issue log messages for the various types of logging event types. A log message results
+ * in a ILogEvent being created. This event is then placed on a ILogQueue to be ultimately
+ * written to the destination log file. This object also maintains a collection of ILogFactory objects
* which are used to create the supported types of ILogEvents. CMS comes out of the box with three event
- * types: "signedAudit", "system", and "audit".
- *
+ * types: "signedAudit", "system", and "audit".
+ *
* @version $Revision$, $Date$
*/
public interface ILogger {
-
+
//List of defined log classes.
/**
* log class: audit event.
@@ -41,20 +39,20 @@ public interface ILogger {
public static final String PROP_AUDIT = "transaction";
/**
- * log class: system event.
+ * log class: system event.
* System event with log level >= LL_FAILURE will also be logged in error log
*/
public static final int EV_SYSTEM = 1;
public static final String PROP_SYSTEM = "system";
/**
- * log class: SignedAudit event.
+ * log class: SignedAudit event.
*/
public static final int EV_SIGNED_AUDIT = 2;
public static final String PROP_SIGNED_AUDIT = "signedAudit";
//List of defined log sources.
-
+
/**
* log source: used by servlet to retrieve all logs
*/
@@ -136,14 +134,13 @@ public interface ILogger {
*/
public static final int S_TKS = 16;
-
+
/**
* log source: identify the log entry is from other subsystem
* eg. policy, security, connector,registration
*/
public static final int S_OTHER = 20;
-
// List of defined log levels.
/**
* log level: used by servlet to retrieve all level logs
@@ -154,12 +151,12 @@ public interface ILogger {
/**
* log level: indicate this log entry is debug info
*/
-
+
/**
* Debug level is depreciated since CMS6.1. Please use
* CMS.debug() to output messages to debugging file.
*/
- public static final int LL_DEBUG = 0; // depreciated
+ public static final int LL_DEBUG = 0; // depreciated
public static final String LL_DEBUG_STRING = "Debug";
/**
@@ -221,7 +218,7 @@ public interface ILogger {
*/
public static final String SUCCESS = "Success";
public static final String FAILURE = "Failure";
-
+
/**
* A constant string value used to denote a "non-applicable"
* data value in signed audit log messages
@@ -258,7 +255,7 @@ public interface ILogger {
* NT event type: correspont to log level LL_FAILURE and above
*/
public static final int NT_ERROR = 1;
-
+
// List of defined log multiline attribute.
/**
* indicate the log message has more than one line
@@ -272,7 +269,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param msg The detail message to be logged.
@@ -281,7 +278,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -291,7 +288,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param level The level of the log event.
@@ -301,7 +298,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -312,7 +309,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param level The level of the log event.
@@ -323,7 +320,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param level The level of the log event.
@@ -334,7 +331,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -345,7 +342,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -354,11 +351,11 @@ public interface ILogger {
* @param param The parameter in the detail message.
*/
public void log(int evtClass, Properties props, int source, int level, String msg,
- Object param);
+ Object param);
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param prop The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -367,13 +364,13 @@ public interface ILogger {
* @param params The parameters in the detail message.
*/
public void log(int evtClass, Properties prop, int source, int level, String msg,
- Object params[]);
+ Object params[]);
//multiline log
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param msg The detail message to be logged.
@@ -383,7 +380,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -394,7 +391,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param level The level of the log event.
@@ -405,7 +402,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -417,7 +414,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param source The source of the log event.
* @param level The level of the log event.
@@ -429,7 +426,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source TTTTsource of the log event.
@@ -441,7 +438,7 @@ public interface ILogger {
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param props The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -451,11 +448,11 @@ public interface ILogger {
* @param multiline True if the message has more than one line, otherwise false.
*/
public void log(int evtClass, Properties props, int source, int level, String msg,
- Object param, boolean multiline);
+ Object param, boolean multiline);
/**
* Logs an event to the log queue.
- *
+ *
* @param evtClass What kind of event it is: EV_AUDIT or EV_SYSTEM or EV_SIGNED_AUDIT.
* @param prop The resource bundle used for the detailed message.
* @param source The source of the log event.
@@ -465,7 +462,7 @@ public interface ILogger {
* @param multiline True if the message has more than one line, otherwise false.
*/
public void log(int evtClass, Properties prop, int source, int level, String msg,
- Object params[], boolean multiline);
+ Object params[], boolean multiline);
/*
* Generates an ILogEvent
@@ -479,7 +476,7 @@ public interface ILogger {
* @return ILogEvent, a log event.
*/
public ILogEvent create(int evtClass, Properties prop, int source, int level,
- String msg, Object params[], boolean multiline);
+ String msg, Object params[], boolean multiline);
/**
* Register a log event factory. Which will create the desired ILogEvents.
@@ -487,7 +484,7 @@ public interface ILogger {
public void register(int evtClass, ILogEventFactory f);
/**
- * Retrieves the associated log queue. The log queue is where issued log events
+ * Retrieves the associated log queue. The log queue is where issued log events
* are collected for later processing.
*/
public ILogQueue getLogQueue();
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/LogPlugin.java b/pki/base/common/src/com/netscape/certsrv/logging/LogPlugin.java
index b8195eec..9d7a5cc4 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/LogPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/LogPlugin.java
@@ -17,18 +17,16 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import com.netscape.certsrv.base.Plugin;
-
/**
* This class represents a registered logger plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class LogPlugin extends Plugin {
- public LogPlugin (String id, String path) {
+ public LogPlugin(String id, String path) {
super(id, path);
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/LogResources.java b/pki/base/common/src/com/netscape/certsrv/logging/LogResources.java
index 6a7472ff..899bf189 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/LogResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/LogResources.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.util.ListResourceBundle;
import java.util.ResourceBundle;
import com.netscape.certsrv.base.BaseResources;
-
/**
* This is the fallback resource bundle for all log events.
* <P>
- *
+ *
* @version $Revision$, $Date$
* @see java.util.ListResourceBundle
*/
@@ -37,7 +35,7 @@ public class LogResources extends ListResourceBundle {
/**
* Contructs a log resource bundle and sets it's parent to the base
* resource bundle.
- *
+ *
* @see com.netscape.certsrv.base.BaseResources
*/
public LogResources() {
@@ -47,6 +45,7 @@ public class LogResources extends ListResourceBundle {
/**
* Returns the content of this resource.
+ *
* @return Array of objects making up the contents of this resource.
*/
public Object[][] getContents() {
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/SignedAuditEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/SignedAuditEvent.java
index ab86a4ce..8541eda3 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/SignedAuditEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/SignedAuditEvent.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.text.MessageFormat;
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* The log event object that carries message detail of a log event
- * that goes into the Signed Audit Event log. This log has the
+ * that goes into the Signed Audit Event log. This log has the
* property of being digitally signed for security considerations.
- *
- *
+ *
+ *
* @version $Revision$, $Date$
* @see java.text.MessageFormat
* @see com.netscape.certsrv.logging.LogResources
@@ -52,7 +50,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
private boolean mMultiline = false;
private long mTimeStamp = System.currentTimeMillis();
- private static final String INVALID_LOG_LEVEL="log level: {0} is invalid, should be 0-6";
+ private static final String INVALID_LOG_LEVEL = "log level: {0} is invalid, should be 0-6";
/**
* The bundle name for this event.
@@ -63,7 +61,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Constructs a SignedAuditEvent message event.
* <P>
- *
+ *
* @param msgFormat The message string.
*/
public SignedAuditEvent(String msgFormat) {
@@ -73,11 +71,12 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Constructs a message with a parameter. For example,
+ *
* <PRE>
- * new SignedAuditEvent("failed to load {0}", fileName);
+ * new SignedAuditEvent(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat Details in message string format.
* @param param Message string parameter.
*/
@@ -91,6 +90,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Constructs a message from an exception. It can be used to carry
* a signed audit exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -99,7 +99,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat Exception details in message string format.
* @param exception System exception.
*/
@@ -112,6 +112,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Constructs a message from a base exception. This will use the msgFormat
* from the exception itself.
+ *
* <PRE>
* try {
* ...
@@ -120,7 +121,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param e CMS exception.
*/
public SignedAuditEvent(Exception e) {
@@ -137,7 +138,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Constructs a message event with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat Message string format.
* @param params List of message format parameters.
*/
@@ -149,7 +150,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Returns the current message format string.
* <P>
- *
+ *
* @return Details message.
*/
public String getMessage() {
@@ -160,7 +161,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Returns a list of parameters. These parameters can be
* used to assist in formatting the message.
* <P>
- *
+ *
* @return List of message format parameters.
*/
public Object[] getParameters() {
@@ -171,7 +172,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Returns localized message string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return Details message.
*/
public String toContent() {
@@ -181,7 +182,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale Locale.
* @return Details message.
*/
@@ -192,8 +193,9 @@ public class SignedAuditEvent implements IBundleLogEvent {
}
/**
- * Sets the resource bundle name for this class instance. This should
+ * Sets the resource bundle name for this class instance. This should
* be overridden by subclasses who have their own resource bundles.
+ *
* @param bundle String with name of resource bundle.
*/
public void setBundleName(String bundle) {
@@ -202,6 +204,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Retrieves bundle name.
+ *
* @return String with name of resource bundle.
*/
protected String getBundleName() {
@@ -212,6 +215,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Retrieves log source.
* This is an id of the subsystem responsible
* for creating the log event.
+ *
* @return Integer source id.
*/
public int getSource() {
@@ -220,6 +224,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Sets log source.
+ *
* @param source Integer id of log source.
*/
public void setSource(int source) {
@@ -230,15 +235,16 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Retrieves log level.
* The log level of an event represents its relative importance
* or severity within CMS.
+ *
* @return Integer log level value.
*/
public int getLevel() {
return mLevel;
}
-
/**
* Retrieves NT specific log event type.
+ *
* @return Integer NTEventType value.
*/
public int getNTEventType() {
@@ -249,6 +255,7 @@ public class SignedAuditEvent implements IBundleLogEvent {
* Sets log level, NT log event type.
* For certain log levels the NT log event type gets
* set as well.
+ *
* @param level Integer log level value.
*/
public void setLevel(int level) {
@@ -279,8 +286,9 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Retrieves log multiline attribute.
+ *
* @return Boolean whether or not this event is multiline.
- * A multiline message simply consists of more than one line.
+ * A multiline message simply consists of more than one line.
*/
public boolean getMultiline() {
return mMultiline;
@@ -289,35 +297,36 @@ public class SignedAuditEvent implements IBundleLogEvent {
/**
* Sets log multiline attribute. A multiline message consists of
* more than one line.
+ *
* @param multiline Boolean multiline value.
*/
public void setMultiline(boolean multiline) {
mMultiline = multiline;
}
-
/**
* Retrieves event time stamp.
+ *
* @return Long integer of the time the event was created.
*/
public long getTimeStamp() {
return mTimeStamp;
}
-
/**
* Retrieves log event type. Each type of event
* has an associated String type value.
+ *
* @return String containing the type of event.
*/
public String getEventType() {
return mEventType;
}
-
/**
* Sets log event type. Each type of event
* has an associated String type value.
+ *
* @param eventType String containing the type of event.
*/
public void setEventType(String eventType) {
@@ -325,9 +334,10 @@ public class SignedAuditEvent implements IBundleLogEvent {
}
/**
- * Return string representation of log message.
- * @return String containing log message.
- */
+ * Return string representation of log message.
+ *
+ * @return String containing log message.
+ */
public String toString() {
if (getBundleName() == null) {
MessageFormat detailMessage = new MessageFormat(mMessage);
diff --git a/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java b/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java
index 83026323..9f625cdf 100644
--- a/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/logging/SystemEvent.java
@@ -17,19 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.logging;
-
import java.text.MessageFormat;
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* The log event object that carries a log message.
* This class represents System events which are CMS events
- * which need to be logged to a log file.
- *
+ * which need to be logged to a log file.
+ *
* @version $Revision$, $Date$
* @see java.text.MessageFormat
* @see com.netscape.certsrv.logging.LogResources
@@ -56,12 +54,12 @@ public class SystemEvent implements IBundleLogEvent {
*/
private String mBundleName = LogResources.class.getName();
- private static final String INVALID_LOG_LEVEL="log level: {0} is invalid, should be 0-6";
+ private static final String INVALID_LOG_LEVEL = "log level: {0} is invalid, should be 0-6";
/**
* Constructs a SystemEvent message event.
* <P>
- *
+ *
* @param msgFormat The message string.
*/
public SystemEvent(String msgFormat) {
@@ -71,11 +69,12 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Constructs a SystemEvent message with a parameter. For example,
+ *
* <PRE>
- * new SystemEvent("failed to load {0}", fileName);
+ * new SystemEvent(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat Details in message string format.
* @param param Message string parameter.
*/
@@ -89,6 +88,7 @@ public class SystemEvent implements IBundleLogEvent {
* Constructs a SystemEvent message from an exception. It can be used to carry
* a system exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -97,7 +97,7 @@ public class SystemEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat Exception details in message string format.
* @param exception System exception.
*/
@@ -110,6 +110,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Constructs a SystemEvent message from a base exception. This will use the msgFormat
* from the exception itself.
+ *
* <PRE>
* try {
* ...
@@ -118,7 +119,7 @@ public class SystemEvent implements IBundleLogEvent {
* }
* </PRE>
* <P>
- *
+ *
* @param e CMS exception.
*/
public SystemEvent(Exception e) {
@@ -135,7 +136,7 @@ public class SystemEvent implements IBundleLogEvent {
* Constructs a SystemEvent message event with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat Message string format.
* @param params List of message format parameters.
*/
@@ -147,7 +148,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Returns the current message format string.
* <P>
- *
+ *
* @return Details message.
*/
public String getMessage() {
@@ -158,7 +159,7 @@ public class SystemEvent implements IBundleLogEvent {
* Returns a list of parameters. These parameters can be
* used to assist in formatting the message.
* <P>
- *
+ *
* @return List of message format parameters.
*/
public Object[] getParameters() {
@@ -169,7 +170,7 @@ public class SystemEvent implements IBundleLogEvent {
* Returns localized message string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return Details message.
*/
public String toContent() {
@@ -179,7 +180,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale Locale.
* @return Details message.
*/
@@ -190,8 +191,9 @@ public class SystemEvent implements IBundleLogEvent {
}
/**
- * Sets the resource bundle name for this class instance. This should
+ * Sets the resource bundle name for this class instance. This should
* be overridden by subclasses who have their own resource bundles.
+ *
* @param bundle String with the name of resource bundle.
*/
public void setBundleName(String bundle) {
@@ -200,6 +202,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Retrieves bundle name.
+ *
* @return String with name of resource bundle.
*/
protected String getBundleName() {
@@ -210,6 +213,7 @@ public class SystemEvent implements IBundleLogEvent {
* Retrieves log source.
* This is an id of the subsystem responsible
* for creating the log event.
+ *
* @return Integer source id.
*/
public int getSource() {
@@ -219,6 +223,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Sets log source.
* Sets the id of the subsystem issuing the event.
+ *
* @param source Integer source id.
*/
public void setSource(int source) {
@@ -229,6 +234,7 @@ public class SystemEvent implements IBundleLogEvent {
* Retrieves log level.
* The log level of an event represents its relative importance
* or severity within CMS.
+ *
* @return Integer log level value.
*/
public int getLevel() {
@@ -237,6 +243,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Retrieves NT specific log event type.
+ *
* @return Integer NTEventType value.
*/
public int getNTEventType() {
@@ -246,7 +253,8 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Sets log level, NT log event type.
* For certain log levels the NT log event type gets
- * set as well.
+ * set as well.
+ *
* @param level Integer log level value.
*/
public void setLevel(int level) {
@@ -277,8 +285,9 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Retrieves log multiline attribute.
+ *
* @return Boolean whether or not this event is multiline.
- * A multiline message simply consists of more than one line.
+ * A multiline message simply consists of more than one line.
*/
public boolean getMultiline() {
return mMultiline;
@@ -287,6 +296,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Sets log multiline attribute. A multiline message consists of
* more than one line.
+ *
* @param multiline Boolean multiline value.
*/
public void setMultiline(boolean multiline) {
@@ -295,6 +305,7 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Retrieves event time stamp.
+ *
* @return Long integer of the time the event was created.
*/
public long getTimeStamp() {
@@ -304,16 +315,17 @@ public class SystemEvent implements IBundleLogEvent {
/**
* Retrieves log event type. Each type of event
* has an associated String type value.
+ *
* @return String containing the type of event.
*/
public String getEventType() {
return mEventType;
}
-
/**
* Sets log event type. Each type of event
* has an associated String type value.
+ *
* @param eventType String containing the type of event.
*/
public void setEventType(String eventType) {
@@ -321,9 +333,10 @@ public class SystemEvent implements IBundleLogEvent {
}
/**
- * Return string representation of log message.
- * @return String containing log message.
- */
+ * Return string representation of log message.
+ *
+ * @return String containing log message.
+ */
public String toString() {
if (getBundleName() == null) {
MessageFormat detailMessage = new MessageFormat(mMessage);
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java b/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java
index 4e34ded3..fffc8ede 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/ENotificationException.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a notification exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class ENotificationException extends EBaseException {
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java
index ace09a8c..40114bd1 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/IEmailFormProcessor.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import java.util.Hashtable;
import java.util.Vector;
-
/**
- * formulates the final email. Escape character '\' is understood.
- * '$' is used preceeding a token name. A token name should not be a
+ * formulates the final email. Escape character '\' is understood.
+ * '$' is used preceeding a token name. A token name should not be a
* substring of any other token name
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEmailFormProcessor {
@@ -67,7 +65,7 @@ public interface IEmailFormProcessor {
* @return mail content
*/
public String getEmailContent(String form,
- Hashtable<String, Object> tok2vals);
+ Hashtable<String, Object> tok2vals);
/**
* takes a vector of strings and concatenate them
@@ -79,4 +77,3 @@ public interface IEmailFormProcessor {
*/
public void log(int level, String msg);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java
index 49d0851e..39e5bed3 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolver.java
@@ -17,25 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* An email resolver that first checks the request email, if none,
* then follows by checking the subjectDN of the certificate
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEmailResolver {
/**
- * returns an email address by using the resolver keys. The
- * return value can possibly be null
+ * returns an email address by using the resolver keys. The
+ * return value can possibly be null
+ *
* @param keys list of keys used for resolving the email address
*/
- public String getEmail(IEmailResolverKeys keys)
- throws EBaseException, ENotificationException;
+ public String getEmail(IEmailResolverKeys keys)
+ throws EBaseException, ENotificationException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java
index d1a6889c..1363a9e0 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/IEmailResolverKeys.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import com.netscape.certsrv.base.IAttrSet;
-
/**
* An interface represents email resolver (ordered) keys for resolving
- * emails
+ * emails
* e.g. request/cert, cert/request, request, request/cert/subjectalternatename etc.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEmailResolverKeys extends IAttrSet {
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java b/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java
index bcda466d..cbdea843 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/IEmailTemplate.java
@@ -17,13 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
-
-
/**
* Files to be processed and returned to the requested parties. It
* is a template with $tokens to be used by the form/template processor.
- *
+ *
* @version $Revision$, $Date$
*/
@@ -36,7 +33,7 @@ public interface IEmailTemplate {
*/
public String getTemplateName();
- /**
+ /**
* @return true if template is an html file, false otherwise
*/
public boolean isHTML();
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java b/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java
index b537fbbd..356a6bba 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/IMailNotification.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import java.io.IOException;
import java.util.Vector;
-
/**
* This class handles mail notification via SMTP.
* This class uses <b>smtp.host</b> in the configuration for smtp
- * host. The port default (25) is used. If no smtp specified, local
+ * host. The port default (25) is used. If no smtp specified, local
* host is used
- *
+ *
* @version $Revision$, $Date$
*/
public interface IMailNotification {
@@ -39,36 +37,42 @@ public interface IMailNotification {
/**
* sets the "From" field
+ *
* @param from email address of the sender
*/
public void setFrom(String from);
/**
* sets the "Subject" field
+ *
* @param subject subject of the email
*/
public void setSubject(String subject);
/**
* sets the "Content-Type" field
+ *
* @param contentType content type of the email
*/
public void setContentType(String contentType);
/**
* sets the content of the email
+ *
* @param content the message content
*/
public void setContent(String content);
/**
* sets the recipients' email addresses
+ *
* @param addresses a list of email addresses of the recipients
*/
public void setTo(Vector<String> addresses);
/**
* sets the recipient's email address
+ *
* @param to address of the recipient email address
*/
public void setTo(String to);
diff --git a/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java b/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java
index 40d9e80e..b8144399 100644
--- a/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/notification/NotificationResources.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.notification;
-
import java.util.ListResourceBundle;
-
/**
- * A class represents a resource bundle for the
+ * A class represents a resource bundle for the
* Mail Notification package
- *
+ *
* @version $Revision$, $Date$
*/
public class NotificationResources extends ListResourceBundle {
diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
index 82c5821b..d971a712 100644
--- a/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
+++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IDefStore.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ocsp;
-
import java.math.BigInteger;
import java.security.cert.X509CRL;
import java.util.Date;
@@ -27,28 +26,26 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord;
import com.netscape.certsrv.dbs.repository.IRepositoryRecord;
-
/**
* This class defines an Online Certificate Status Protocol (OCSP) store which
* has been extended to provide information from the internal database.
- * <P>
- *
+ * <P>
+ *
* @version $Revision$, $Date$
*/
-public interface IDefStore extends IOCSPStore
-{
+public interface IDefStore extends IOCSPStore {
/**
* This method retrieves the number of CRL updates since startup.
* <P>
- *
+ *
* @return count the number of OCSP default stores
*/
- public int getStateCount();
+ public int getStateCount();
/**
* This method retrieves the number of OCSP requests since startup.
* <P>
- *
+ *
* @param id a string associated with an OCSP request
* @return count the number of this type of OCSP requests
*/
@@ -57,30 +54,30 @@ public interface IDefStore extends IOCSPStore
/**
* This method creates a an OCSP default store repository record.
* <P>
- *
+ *
* @return IRepositoryRecord an instance of the repository record object
*/
- public IRepositoryRecord createRepositoryRecord();
+ public IRepositoryRecord createRepositoryRecord();
/**
* This method adds a request to the default OCSP store repository.
* <P>
- *
+ *
* @param name a string representing the name of this request
* @param thisUpdate the current request
* @param rec an instance of the repository record object
* @exception EBaseException occurs when there is an error attempting to
- * add this request to the repository
+ * add this request to the repository
*/
public void addRepository(String name, String thisUpdate,
- IRepositoryRecord rec)
- throws EBaseException;
+ IRepositoryRecord rec)
+ throws EBaseException;
/**
* This method specifies whether or not to wait for the Certificate
* Revocation List (CRL) to be updated.
* <P>
- *
+ *
* @return boolean true or false
*/
public boolean waitOnCRLUpdate();
@@ -88,7 +85,7 @@ public interface IDefStore extends IOCSPStore
/**
* This method updates the specified CRL.
* <P>
- *
+ *
* @param crl the CRL to be updated
* @exception EBaseException occurs when the CRL cannot be updated
*/
@@ -97,44 +94,44 @@ public interface IDefStore extends IOCSPStore
/**
* This method attempts to read the CRL issuing point.
* <P>
- *
+ *
* @param name the name of the CRL to be read
* @return ICRLIssuingPointRecord the CRL issuing point
* @exception EBaseException occurs when the specified CRL cannot be located
*/
public ICRLIssuingPointRecord readCRLIssuingPoint(String name)
- throws EBaseException;
+ throws EBaseException;
/**
* This method searches all CRL issuing points.
* <P>
- *
+ *
* @param maxSize specifies the largest number of hits from the search
* @return Enumeration a list of the CRL issuing points
* @exception EBaseException occurs when no CRL issuing point exists
*/
public Enumeration searchAllCRLIssuingPointRecord(
- int maxSize)
- throws EBaseException;
+ int maxSize)
+ throws EBaseException;
/**
* This method searches all CRL issuing points constrained by the specified
* filtering mechanism.
* <P>
- *
+ *
* @param filter a string which constrains the search
* @param maxSize specifies the largest number of hits from the search
* @return Enumeration a list of the CRL issuing points
* @exception EBaseException occurs when no CRL issuing point exists
*/
public Enumeration searchCRLIssuingPointRecord(String filter,
- int maxSize)
- throws EBaseException;
+ int maxSize)
+ throws EBaseException;
/**
* This method creates a CRL issuing point record.
* <P>
- *
+ *
* @param name a string representation of this CRL issuing point record
* @param crlNumber the number of this CRL issuing point record
* @param crlSize the size of this CRL issuing point record
@@ -143,39 +140,38 @@ public interface IDefStore extends IOCSPStore
* @return ICRLIssuingPointRecord this CRL issuing point record
*/
public ICRLIssuingPointRecord createCRLIssuingPointRecord(
- String name, BigInteger crlNumber,
- Long crlSize, Date thisUpdate, Date nextUpdate);
+ String name, BigInteger crlNumber,
+ Long crlSize, Date thisUpdate, Date nextUpdate);
/**
* This method adds a CRL issuing point
* <P>
- *
+ *
* @param name a string representation of this CRL issuing point record
* @param rec this CRL issuing point record
* @exception EBaseException occurs when the specified CRL issuing point
- * record cannot be added
+ * record cannot be added
*/
public void addCRLIssuingPoint(String name, ICRLIssuingPointRecord rec)
- throws EBaseException;
+ throws EBaseException;
/**
* This method deletes a CRL issuing point record
* <P>
- *
+ *
* @param id a string representation of this CRL issuing point record
* @exception EBaseException occurs when the specified CRL issuing point
- * record cannot be deleted
+ * record cannot be deleted
*/
public void deleteCRLIssuingPointRecord(String id)
- throws EBaseException;
+ throws EBaseException;
/**
* This method checks to see if the OCSP response should return good
* when the certificate is not found.
* <P>
- *
+ *
* @return boolean true or false
*/
public boolean isNotFoundGood();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPAuthority.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPAuthority.java
index b99f6241..0219d357 100644
--- a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPAuthority.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ocsp;
-
import netscape.security.x509.X500Name;
import org.mozilla.jss.asn1.OBJECT_IDENTIFIER;
@@ -30,16 +29,14 @@ import com.netscape.cmsutil.ocsp.BasicOCSPResponse;
import com.netscape.cmsutil.ocsp.ResponderID;
import com.netscape.cmsutil.ocsp.ResponseData;
-
/**
* This class represents the primary interface for the Online Certificate
* Status Protocol (OCSP) server.
- * <P>
- *
+ * <P>
+ *
* @version $Revision$, $Date$
*/
-public interface IOCSPAuthority extends ISubsystem
-{
+public interface IOCSPAuthority extends ISubsystem {
public static final String ID = "ocsp";
public final static OBJECT_IDENTIFIER OCSP_NONCE = new OBJECT_IDENTIFIER("1.3.6.1.5.5.7.48.1.2");
@@ -53,16 +50,16 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves the OCSP store given its name.
* <P>
- *
+ *
* @param id the string representation of an OCSP store
* @return IOCSPStore an instance of an OCSP store object
*/
- public IOCSPStore getOCSPStore(String id);
+ public IOCSPStore getOCSPStore(String id);
/**
* This method retrieves the signing unit.
* <P>
- *
+ *
* @return ISigningUnit an instance of a signing unit object
*/
public ISigningUnit getSigningUnit();
@@ -70,7 +67,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves the responder ID by its name.
* <P>
- *
+ *
* @return ResponderID an instance of a responder ID
*/
public ResponderID getResponderIDByName();
@@ -78,7 +75,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves the responder ID by its hash.
* <P>
- *
+ *
* @return ResponderID an instance of a responder ID
*/
public ResponderID getResponderIDByHash();
@@ -87,7 +84,7 @@ public interface IOCSPAuthority extends ISubsystem
* This method retrieves the default OCSP store
* (i. e. - information from the internal database).
* <P>
- *
+ *
* @return IDefStore an instance of the default OCSP store
*/
public IDefStore getDefaultStore();
@@ -95,17 +92,17 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method sets the supplied algorithm as the default signing algorithm.
* <P>
- *
+ *
* @param algorithm a string representing the requested algorithm
* @exception EBaseException if the algorithm is unknown or disallowed
*/
public void setDefaultAlgorithm(String algorithm)
- throws EBaseException;
+ throws EBaseException;
/**
* This method retrieves the default signing algorithm.
* <P>
- *
+ *
* @return String the name of the default signing algorithm
*/
public String getDefaultAlgorithm();
@@ -113,7 +110,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves all potential OCSP signing algorithms.
* <P>
- *
+ *
* @return String[] the names of all potential OCSP signing algorithms
*/
public String[] getOCSPSigningAlgorithms();
@@ -121,7 +118,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method logs the specified message at the specified level.
* <P>
- *
+ *
* @param level the log level
* @param msg the log message
*/
@@ -131,7 +128,7 @@ public interface IOCSPAuthority extends ISubsystem
* This method logs the specified message at the specified level given
* the specified event.
* <P>
- *
+ *
* @param event the log event
* @param level the log message
* @param msg the log message
@@ -141,7 +138,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves the X500Name of an OCSP server instance.
* <P>
- *
+ *
* @return X500Name an instance of the X500 name object
*/
public X500Name getName();
@@ -149,7 +146,7 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method retrieves an OCSP server instance digest name as a string.
* <P>
- *
+ *
* @param alg the signing algorithm
* @return String the digest name of the related OCSP server
*/
@@ -158,19 +155,19 @@ public interface IOCSPAuthority extends ISubsystem
/**
* This method signs the basic OCSP response data provided as a parameter.
* <P>
- *
+ *
* @param rd response data
* @return BasicOCSPResponse signed response data
* @exception EBaseException error associated with an inability to sign
- * the specified response data
+ * the specified response data
*/
public BasicOCSPResponse sign(ResponseData rd)
- throws EBaseException;
+ throws EBaseException;
/**
* This method compares two byte arrays to see if they are equivalent.
* <P>
- *
+ *
* @param bytes the first byte array
* @param ints the second byte array
* @return boolean true or false
@@ -178,8 +175,10 @@ public interface IOCSPAuthority extends ISubsystem
public boolean arraysEqual(byte[] bytes, byte[] ints);
public void incTotalTime(long inc);
+
public void incSignTime(long inc);
+
public void incLookupTime(long inc);
+
public void incNumOCSPRequest(long inc);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPService.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPService.java
index 8ca8b2f0..574289c2 100644
--- a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPService.java
+++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPService.java
@@ -17,37 +17,34 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ocsp;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.cmsutil.ocsp.OCSPRequest;
import com.netscape.cmsutil.ocsp.OCSPResponse;
-
/**
* This class represents the servlet that serves the Online Certificate
* Status Protocol (OCSP) requests.
- *
+ *
* @version $Revision$ $Date$
*/
-public interface IOCSPService
-{
+public interface IOCSPService {
/**
* This method validates the information associated with the specified
* OCSP request and returns an OCSP response.
* <P>
- *
+ *
* @param r an OCSP request
* @return OCSPResponse the OCSP response associated with the specified
- * OCSP request
+ * OCSP request
* @exception EBaseException an error associated with the inability to
- * process the supplied OCSP request
+ * process the supplied OCSP request
*/
- public OCSPResponse validate(OCSPRequest r)
- throws EBaseException;
+ public OCSPResponse validate(OCSPRequest r)
+ throws EBaseException;
/**
* Returns the in-memory count of the processed OCSP requests.
- *
+ *
* @return number of processed OCSP requests in memory
*/
public long getNumOCSPRequest();
@@ -55,7 +52,7 @@ public interface IOCSPService
/**
* Returns the in-memory time (in mini-second) of
* the processed time for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPRequestTotalTime();
@@ -63,7 +60,7 @@ public interface IOCSPService
/**
* Returns the in-memory time (in mini-second) of
* the signing time for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPTotalSignTime();
@@ -73,9 +70,8 @@ public interface IOCSPService
/**
* Returns the total data signed
* for OCSP requests.
- *
+ *
* @return processed times for OCSP requests
*/
public long getOCSPTotalData();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPStore.java b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPStore.java
index ee60105c..67612210 100644
--- a/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPStore.java
+++ b/pki/base/common/src/com/netscape/certsrv/ocsp/IOCSPStore.java
@@ -17,46 +17,43 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ocsp;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.common.NameValuePairs;
import com.netscape.cmsutil.ocsp.OCSPRequest;
import com.netscape.cmsutil.ocsp.OCSPResponse;
-
/**
* This class represents the generic interface for an Online Certificate
- * Status Protocol (OCSP) store. Users can plugin different OCSP stores
- * by extending this class. For example, imagine that if a user wants to
+ * Status Protocol (OCSP) store. Users can plugin different OCSP stores
+ * by extending this class. For example, imagine that if a user wants to
* use the corporate LDAP server for revocation checking, then the user
* would merely create a new class that extends this class (e. g. -
* "public interface ICorporateLDAPStore extends IOCSPStore").
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
-public interface IOCSPStore extends ISubsystem
-{
+public interface IOCSPStore extends ISubsystem {
/**
* This method validates the information associated with the specified
* OCSP request and returns an OCSP response.
* <P>
- *
+ *
* @param req an OCSP request
* @return OCSPResponse the OCSP response associated with the specified
- * OCSP request
+ * OCSP request
* @exception EBaseException an error associated with the inability to
- * process the supplied OCSP request
+ * process the supplied OCSP request
*/
- public OCSPResponse validate(OCSPRequest req)
- throws EBaseException;
+ public OCSPResponse validate(OCSPRequest req)
+ throws EBaseException;
/**
* This method retrieves the configuration parameters associated with this
* OCSP store.
* <P>
- *
+ *
* @return NameValuePairs all configuration items
*/
public NameValuePairs getConfigParameters();
@@ -65,11 +62,10 @@ public interface IOCSPStore extends ISubsystem
* This method stores the configuration parameters specified by the
* passed-in Name Value pairs object.
* <P>
- *
+ *
* @param pairs a name-value pair object
* @exception EBaseException an illegal name-value pair
*/
- public void setConfigParameters(NameValuePairs pairs)
- throws EBaseException;
+ public void setConfigParameters(NameValuePairs pairs)
+ throws EBaseException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/password/EPasswordCheckException.java b/pki/base/common/src/com/netscape/certsrv/password/EPasswordCheckException.java
index a99fd764..3dc028ff 100644
--- a/pki/base/common/src/com/netscape/certsrv/password/EPasswordCheckException.java
+++ b/pki/base/common/src/com/netscape/certsrv/password/EPasswordCheckException.java
@@ -23,7 +23,7 @@ import com.netscape.certsrv.base.PasswordResources;
/**
* A class represents a password checker exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EPasswordCheckException extends EBaseException {
@@ -40,6 +40,7 @@ public class EPasswordCheckException extends EBaseException {
/**
* Constructs a password checker exception
* <P>
+ *
* @param msgFormat exception details
*/
public EPasswordCheckException(String msgFormat) {
@@ -49,6 +50,7 @@ public class EPasswordCheckException extends EBaseException {
/**
* Constructs a password checker exception.
* <P>
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -59,6 +61,7 @@ public class EPasswordCheckException extends EBaseException {
/**
* Constructs a password checker exception.
* <P>
+ *
* @param msgFormat exception details in message string format
* @param exception system exception
*/
@@ -69,6 +72,7 @@ public class EPasswordCheckException extends EBaseException {
/**
* Constructs a password checker exception.
* <P>
+ *
* @param msgFormat the message format.
* @param params list of message format parameters
*/
@@ -78,6 +82,7 @@ public class EPasswordCheckException extends EBaseException {
/**
* Retrieves bundle name.
+ *
* @return resource bundle name.
*/
protected String getBundleName() {
diff --git a/pki/base/common/src/com/netscape/certsrv/password/IConfigPasswordCheck.java b/pki/base/common/src/com/netscape/certsrv/password/IConfigPasswordCheck.java
index ddf4325c..8b23fa51 100644
--- a/pki/base/common/src/com/netscape/certsrv/password/IConfigPasswordCheck.java
+++ b/pki/base/common/src/com/netscape/certsrv/password/IConfigPasswordCheck.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.password;
-
/**
* Configuration Wizard Password quality checker interface.
* <P>
@@ -28,6 +27,7 @@ public interface IConfigPasswordCheck {
/**
* Check if the password meets the quality requirement
+ *
* @param pwd the given password
* @return true if the password meets the quality requirement; otherwise false
*/
@@ -35,9 +35,9 @@ public interface IConfigPasswordCheck {
/**
* Returns a reason if the password doesnt meet the quality requirement.
+ *
* @param pwd the given password
* @return a reason if the password quality requirement is not met.
*/
public String getConfigReason(String pwd);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/password/IPasswordCheck.java b/pki/base/common/src/com/netscape/certsrv/password/IPasswordCheck.java
index bb84a72f..d885d3fc 100644
--- a/pki/base/common/src/com/netscape/certsrv/password/IPasswordCheck.java
+++ b/pki/base/common/src/com/netscape/certsrv/password/IPasswordCheck.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.password;
-
/**
* Password quality checker interface.
* <P>
@@ -28,6 +27,7 @@ public interface IPasswordCheck {
/**
* Check if the password meets the quality requirement
+ *
* @param pwd the given password
* @return true if the password meets the quality requirement; otherwise false
*/
@@ -35,9 +35,9 @@ public interface IPasswordCheck {
/**
* Returns a reason if the password doesnt meet the quality requirement.
+ *
* @param pwd the given password
* @return a reason if the password quality requirement is not met.
*/
public String getReason(String pwd);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/pattern/AttrSetCollection.java b/pki/base/common/src/com/netscape/certsrv/pattern/AttrSetCollection.java
index 22cfc232..5f73fc25 100644
--- a/pki/base/common/src/com/netscape/certsrv/pattern/AttrSetCollection.java
+++ b/pki/base/common/src/com/netscape/certsrv/pattern/AttrSetCollection.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.pattern;
-
import java.util.Hashtable;
import com.netscape.certsrv.base.IAttrSet;
@@ -25,7 +24,7 @@ import com.netscape.certsrv.base.IAttrSet;
/**
* This class represents a collection of attribute
* sets.
- *
+ *
* @version $Revision$, $Date$
*/
public class AttrSetCollection extends Hashtable<String, IAttrSet> {
@@ -44,7 +43,7 @@ public class AttrSetCollection extends Hashtable<String, IAttrSet> {
/**
* Retrieves a attribute set from this collection.
- *
+ *
* @param name name of the attribute set
* @return attribute set
*/
@@ -54,7 +53,7 @@ public class AttrSetCollection extends Hashtable<String, IAttrSet> {
/**
* Sets attribute set in this collection.
- *
+ *
* @param name set of the attribute set
* @param set attribute set
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/pattern/Pattern.java b/pki/base/common/src/com/netscape/certsrv/pattern/Pattern.java
index 36cc7cb3..bce3a426 100644
--- a/pki/base/common/src/com/netscape/certsrv/pattern/Pattern.java
+++ b/pki/base/common/src/com/netscape/certsrv/pattern/Pattern.java
@@ -17,34 +17,31 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.pattern;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* This is a generic pattern subtitution engine. The
* pattern format should be:
* <p>
- * $[attribute set key].[attribute name]$
+ * $[attribute set key].[attribute name]$
* <p>
* For example,
* <p>
- * $request.requestor_email$
- * $ctx.user_id$
+ * $request.requestor_email$ $ctx.user_id$
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class Pattern {
private String mS = null;
-
+
/**
* Constructs a pattern object with the given string.
- *
+ *
* @param s string with pattern (i.e. $request.requestor_email$)
*/
public Pattern(String s) {
@@ -53,7 +50,7 @@ public class Pattern {
/**
* Subtitutes this pattern with the given attribute set.
- *
+ *
* @param key key name of the given attribute set
* @param attrSet attribute set
* @return substituted string
@@ -64,7 +61,7 @@ public class Pattern {
/**
* Subtitutes this pattern with the given attribute set.
- *
+ *
* @param attrSetCollection attribute set collection
* @return substituted string
*/
@@ -76,24 +73,24 @@ public class Pattern {
String key = (String) keys.nextElement();
Pattern p = new Pattern(temp);
- temp = p.substitute(key,
+ temp = p.substitute(key,
attrSetCollection.getAttrSet(key));
-
+
}
return temp;
}
/**
* Subtitutes this pattern with the given attribute set.
- *
- * This is an extended version of the substitute() method.
- * It takes a more flexible pattern format that could have
- * non-token ($...$) format. e.g.
- * $request.screenname$@redhat.com
- * where "@redhat.com" is not in token pattern format, and will be
- * literally put in place. e.g.
- * TomRiddle@redhat.com
- *
+ *
+ * This is an extended version of the substitute() method.
+ * It takes a more flexible pattern format that could have
+ * non-token ($...$) format. e.g.
+ * $request.screenname$@redhat.com
+ * where "@redhat.com" is not in token pattern format, and will be
+ * literally put in place. e.g.
+ * TomRiddle@redhat.com
+ *
* @param key key name of the given attribute set
* @param attrSet attribute set
* @return substituted string
@@ -105,39 +102,39 @@ public class Pattern {
int lastPos;
do {
- // from startPos to right before '$' or end of string
- // need to be copied over
-
+ // from startPos to right before '$' or end of string
+ // need to be copied over
+
lastPos = mS.indexOf('$', startPos);
- // if no '$', return the entire string
+ // if no '$', return the entire string
if (lastPos == -1 && startPos == 0)
- return mS;
+ return mS;
- // no more '$' found, copy the rest of chars, done
+ // no more '$' found, copy the rest of chars, done
if (lastPos == -1) {
- sb.append(mS.substring(startPos)); //
- return sb.toString(); //
- // continue;
- }
+ sb.append(mS.substring(startPos)); //
+ return sb.toString(); //
+ // continue;
+ }
- // found '$'
+ // found '$'
if (startPos < lastPos) {
- sb.append(mS.substring(startPos, lastPos));
+ sb.append(mS.substring(startPos, lastPos));
}
- // look for the ending '$'
+ // look for the ending '$'
int endPos = mS.indexOf('$', lastPos + 1);
String token = mS.substring(lastPos + 1, endPos);
int dotPos = token.indexOf('.');
- // it's assuming there's always a '.'
+ // it's assuming there's always a '.'
String attrKey = token.substring(0, dotPos);
String attrName = token.substring(dotPos + 1);
if (!key.equals(attrKey)) {
startPos = endPos + 1;
- sb.append("$" + attrKey + "." + attrName + "$");
+ sb.append("$" + attrKey + "." + attrName + "$");
continue;
}
@@ -145,20 +142,19 @@ public class Pattern {
Object o = attrSet.get(attrName);
if (!(o instanceof String)) {
- startPos = endPos + 1;
- // if no such attrName, copy the token pattern over
- sb.append("$" + attrKey + "." + attrName + "$");
+ startPos = endPos + 1;
+ // if no such attrName, copy the token pattern over
+ sb.append("$" + attrKey + "." + attrName + "$");
continue;
}
String val = (String) o;
- sb.append(val);
+ sb.append(val);
} catch (EBaseException e) {
- sb.append("$" + attrKey + "." + attrName + "$");
+ sb.append("$" + attrKey + "." + attrName + "$");
}
- startPos = endPos + 1;
- }
- while (lastPos != -1);
+ startPos = endPos + 1;
+ } while (lastPos != -1);
return sb.toString();
}
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java b/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java
index c8431fcf..f32f4f64 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/EPolicyException.java
@@ -17,25 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Locale;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.MessageFormatter;
-
/**
* This class represents Exceptions used by the policy package.
* The policies themselves do not raise exceptions but use them
* to format error messages.
- *
+ *
* Adapted from EBasException
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
* @see java.text.MessageFormat
@@ -54,7 +53,7 @@ public class EPolicyException extends EBaseException {
/**
* Constructs a base exception.
* <P>
- *
+ *
* @param msgFormat exception details
*/
public EPolicyException(String msgFormat) {
@@ -64,11 +63,12 @@ public class EPolicyException extends EBaseException {
/**
* Constructs a base exception with a parameter. For example,
+ *
* <PRE>
- * new EPolicyException("failed to load {0}", fileName);
+ * new EPolicyException(&quot;failed to load {0}&quot;, fileName);
* </PRE>
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
*/
@@ -81,7 +81,7 @@ public class EPolicyException extends EBaseException {
/**
* Constructs a base exception with two String parameters. For example,
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param param1 message string parameter
* @param param2 message string parameter
@@ -97,6 +97,7 @@ public class EPolicyException extends EBaseException {
* Constructs a base exception. It can be used to carry
* a system exception that may contain information about
* the context. For example,
+ *
* <PRE>
* try {
* ...
@@ -105,7 +106,7 @@ public class EPolicyException extends EBaseException {
* }
* </PRE>
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param param system exception
*/
@@ -119,7 +120,7 @@ public class EPolicyException extends EBaseException {
* Constructs a base exception with a list of parameters
* that will be substituted into the message format.
* <P>
- *
+ *
* @param msgFormat exception details in message string format
* @param params list of message format parameters
*/
@@ -131,7 +132,7 @@ public class EPolicyException extends EBaseException {
/**
* Returns a list of parameters.
* <P>
- *
+ *
* @return list of message format parameters
*/
public Object[] getParameters() {
@@ -142,7 +143,7 @@ public class EPolicyException extends EBaseException {
* Returns localized exception string. This method should
* only be called if a localized string is necessary.
* <P>
- *
+ *
* @return details message
*/
public String toString() {
@@ -152,7 +153,7 @@ public class EPolicyException extends EBaseException {
/**
* Returns the string based on the given locale.
* <P>
- *
+ *
* @param locale locale
* @return details message
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java
index bfd0e7c2..7c789932 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IEnrollmentPolicy.java
@@ -17,20 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for an enrollment policy rule. This provides general
* typing for rules so that a policy processor can group rules
* based on a particular type.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IEnrollmentPolicy extends IPolicyRule {
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java b/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java
index 6bed58c5..4075e868 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IExpression.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import com.netscape.certsrv.request.IRequest;
-
/**
* Interface for a policy expression.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -48,12 +47,12 @@ public interface IExpression {
/**
* Evaluate the Expression.
- *
- * @param req The PKIRequest on which we are applying the condition.
- * @return The return value.
+ *
+ * @param req The PKIRequest on which we are applying the condition.
+ * @return The return value.
*/
boolean evaluate(IRequest req)
- throws EPolicyException;
+ throws EPolicyException;
/**
* Convert to a string.
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java
index 757780d3..78ec3119 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameAsConstraintsConfig.java
@@ -17,21 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Vector;
import netscape.security.x509.GeneralName;
-
-/**
- * Class that can be used to form general names from configuration file.
- * Used by policies and extension commands.
+/**
+ * Class that can be used to form general names from configuration file.
+ * Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -39,14 +38,14 @@ public interface IGeneralNameAsConstraintsConfig {
/**
* Retrieves instance parameters.
- *
+ *
* @param params parameters
*/
public void getInstanceParams(Vector<String> params);
/**
* Retrieves the general name.
- *
+ *
* @return general name
*/
public GeneralName getGeneralName();
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java
index 953bb41e..193269bb 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameConfig.java
@@ -17,23 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Vector;
import netscape.security.x509.GeneralName;
import com.netscape.certsrv.base.EBaseException;
-
-/**
- * Class that can be used to form general names from configuration file.
- * Used by policies and extension commands.
+/**
+ * Class that can be used to form general names from configuration file.
+ * Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -41,27 +40,27 @@ public interface IGeneralNameConfig {
/**
* Forms a general name from string.
- *
+ *
* @param value general name in string
* @return general name object
* @exception EBaseException failed to form general name
*/
- public GeneralName formGeneralName(String value)
- throws EBaseException;
+ public GeneralName formGeneralName(String value)
+ throws EBaseException;
/**
* Forms general names from the given value.
- *
+ *
* @param value general name in string
* @return a vector of general names
* @exception EBaseException failed to form general name
*/
public Vector<GeneralName> formGeneralNames(Object value)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the instance parameters.
- *
+ *
* @param params parameters
*/
public void getInstanceParams(Vector<String> params);
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
index c1526284..26bd8aeb 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNameUtil.java
@@ -17,16 +17,16 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
-/**
- * Class that can be used to form general names from configuration file.
+/**
+ * Class that can be used to form general names from configuration file.
* Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -51,30 +51,26 @@ public interface IGeneralNameUtil {
*/
public static final int DEF_NUM_GENERALNAMES = 8;
- /**
+ /**
* Default extended plugin info.
*/
- public static String
- NUM_GENERALNAMES_INFO = "number;The total number of alternative names or identities permitted in the extension.";
- public static String GENNAME_CHOICE_INFO =
- "choice(" +
- IGeneralNameUtil.GENNAME_CHOICE_RFC822NAME + "," +
- IGeneralNameUtil.GENNAME_CHOICE_DIRECTORYNAME + "," +
- IGeneralNameUtil.GENNAME_CHOICE_DNSNAME + "," +
- IGeneralNameUtil.GENNAME_CHOICE_EDIPARTYNAME + "," +
- IGeneralNameUtil.GENNAME_CHOICE_URL + "," +
- IGeneralNameUtil.GENNAME_CHOICE_IPADDRESS + "," +
- IGeneralNameUtil.GENNAME_CHOICE_REGISTEREDID + "," +
- IGeneralNameUtil.GENNAME_CHOICE_OTHERNAME + ");" +
- "GeneralName choice. See RFC 2459 appendix B2 on GeneralName.";
- public static String GENNAME_VALUE_INFO =
- "string;Value according to the GeneralName choice.";
+ public static String NUM_GENERALNAMES_INFO = "number;The total number of alternative names or identities permitted in the extension.";
+ public static String GENNAME_CHOICE_INFO =
+ "choice(" +
+ IGeneralNameUtil.GENNAME_CHOICE_RFC822NAME + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_DIRECTORYNAME + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_DNSNAME + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_EDIPARTYNAME + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_URL + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_IPADDRESS + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_REGISTEREDID + "," +
+ IGeneralNameUtil.GENNAME_CHOICE_OTHERNAME + ");" +
+ "GeneralName choice. See RFC 2459 appendix B2 on GeneralName.";
+ public static String GENNAME_VALUE_INFO =
+ "string;Value according to the GeneralName choice.";
- public static String
- PROP_NUM_GENERALNAMES_INFO = PROP_NUM_GENERALNAMES + ";" + NUM_GENERALNAMES_INFO;
- public static String
- PROP_GENNAME_CHOICE_INFO = PROP_GENNAME_CHOICE + ";" + GENNAME_CHOICE_INFO;
- public static String
- PROP_GENNAME_VALUE_INFO = PROP_GENNAME_VALUE + ";" + GENNAME_VALUE_INFO;
+ public static String PROP_NUM_GENERALNAMES_INFO = PROP_NUM_GENERALNAMES + ";" + NUM_GENERALNAMES_INFO;
+ public static String PROP_GENNAME_CHOICE_INFO = PROP_GENNAME_CHOICE + ";" + GENNAME_CHOICE_INFO;
+ public static String PROP_GENNAME_VALUE_INFO = PROP_GENNAME_VALUE + ";" + GENNAME_VALUE_INFO;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java
index c461efd3..aeb7867e 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesAsConstraintsConfig.java
@@ -17,21 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Vector;
import netscape.security.x509.GeneralNames;
-
-/**
- * Class that can be used to form general names from configuration file.
+/**
+ * Class that can be used to form general names from configuration file.
* Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -39,14 +38,14 @@ public interface IGeneralNamesAsConstraintsConfig {
/**
* Retrieves a list of configured general names.
- *
+ *
* @return a list of general names
*/
public GeneralNames getGeneralNames();
/**
* Retrieves instance parameters.
- *
+ *
* @param params instance parameters
*/
public void getInstanceParams(Vector<String> params);
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java
index 4c2330df..2074b9d1 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IGeneralNamesConfig.java
@@ -17,21 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Vector;
import netscape.security.x509.GeneralNames;
-
-/**
- * Class that can be used to form general names from configuration file.
+/**
+ * Class that can be used to form general names from configuration file.
* Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -39,14 +38,14 @@ public interface IGeneralNamesConfig {
/**
* Retrieves a list of configured general names.
- *
+ *
* @return general names
*/
public GeneralNames getGeneralNames();
/**
* Retrieves the instance parameters.
- *
+ *
* @param params instance parameters
*/
public void getInstanceParams(Vector<String> params);
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java
index 13ba5f61..14a29256 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IKeyArchivalPolicy.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for a key recovery policy rule.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IKeyArchivalPolicy extends IPolicyRule {
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java
index 1d173f28..6de61567 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IKeyRecoveryPolicy.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for a key recovery policy rule.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IKeyRecoveryPolicy extends IPolicyRule {
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java
index 7b5f4465..0992beae 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyPredicateParser.java
@@ -17,15 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for policy predicate parsers.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -33,11 +33,11 @@ public interface IPolicyPredicateParser {
/**
* Parse the predicate expression and return a vector of expressions.
- *
- * @param predicateExpression The predicate expression as read from the
- * config file.
- * @return expVector The vector of expressions.
+ *
+ * @param predicateExpression The predicate expression as read from the
+ * config file.
+ * @return expVector The vector of expressions.
*/
IExpression parse(String predicateExpression)
- throws EPolicyException;
+ throws EPolicyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java
index 09f2415a..11927a03 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyProcessor.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
@@ -25,22 +24,22 @@ import java.util.Vector;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* A generic interface for a policy processor. By making a processor
* extend the policy interface, we make even the processor a rule -
* which makes sense because a processor may be based on some rule
* such as evaluate all policies before returning the final result or
* return as soon as one of the policies return a failure and so on.
- *
+ *
* By making both processor and policy rules implement a common
* interface, one can write rules that are processors as well.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -61,42 +60,42 @@ public interface IPolicyProcessor extends ISubsystem,
/**
* Returns the policy substore id.
- *
- * @return storeID The policy store id used by this processor.
+ *
+ * @return storeID The policy store id used by this processor.
*/
String getPolicySubstoreId();
/**
* Returns information on Policy impls.
- *
+ *
* @return An enumeration of strings describing the information
- * about policy implementations. Currently only the
- * the implementation id is expected.
+ * about policy implementations. Currently only the
+ * the implementation id is expected.
*/
Enumeration<String> getPolicyImplsInfo();
/**
* Returns the rule implementations registered with this processor.
- *
- * @return An Enumeration of uninitialized IPolicyRule
- * objects.
+ *
+ * @return An Enumeration of uninitialized IPolicyRule
+ * objects.
*/
Enumeration<IPolicyRule> getPolicyImpls();
/**
* Returns an implementation identified by a given id.
- *
- * @param id The implementation id.
+ *
+ * @param id The implementation id.
* @return The uninitialized instance of the policy rule.
*/
IPolicyRule getPolicyImpl(String id);
/**
- * Returns configuration for an implmentation.
- *
- * @param id The implementation id.
+ * Returns configuration for an implmentation.
+ *
+ * @param id The implementation id.
* @return A vector of name/value pairs in the form of
- * name=value.
+ * name=value.
*/
Vector<String> getPolicyImplConfig(String id);
@@ -104,53 +103,53 @@ public interface IPolicyProcessor extends ISubsystem,
* Deletes a policy implementation identified by an impl id.
*
*
- * @param id The impl id of the policy to be deleted.
- * There shouldn't be any active instance for this
- * implementation.
+ * @param id The impl id of the policy to be deleted.
+ * There shouldn't be any active instance for this
+ * implementation.
* @exception EBaseException is thrown if an error occurs in deletion.
*/
void deletePolicyImpl(String id)
- throws EBaseException;
+ throws EBaseException;
/**
* Adds a policy implementation identified by an impl id.
*
- * @param id The impl id of the policy to be added.
- * The id should be unique.
- * @param classPath The fully qualified path for the implementation.
+ * @param id The impl id of the policy to be added.
+ * The id should be unique.
+ * @param classPath The fully qualified path for the implementation.
* @exception EBaseException is thrown if an error occurs in addition.
*/
void addPolicyImpl(String id, String classPath)
- throws EBaseException;
+ throws EBaseException;
/**
* Returns information on Policy instances.
- *
- * @return An Enumeration of Strings describing the information
- * about policy rule instances.
+ *
+ * @return An Enumeration of Strings describing the information
+ * about policy rule instances.
*/
Enumeration<String> getPolicyInstancesInfo();
/**
* Returns policy instances registered with this processor.
- *
+ *
* @return An Enumeration of policy instances.
*/
- Enumeration<IPolicyRule> getPolicyInstances();
+ Enumeration<IPolicyRule> getPolicyInstances();
/**
* Returns instance configuration for a given instance id.
- *
- * @param id The rule id.
+ *
+ * @param id The rule id.
* @return A vector of name/value pairs in the form of
- * name=value.
+ * name=value.
*/
- Vector<String> getPolicyInstanceConfig(String id);
+ Vector<String> getPolicyInstanceConfig(String id);
/**
* Returns instance configuration for a given instance id.
- *
- * @param id The rule id.
+ *
+ * @param id The rule id.
* @return the policy instance identified by the id.
*/
IPolicyRule getPolicyInstance(String id);
@@ -158,41 +157,40 @@ public interface IPolicyProcessor extends ISubsystem,
/**
* Deletes a policy instance identified by an instance id.
*
- * @param id The instance id of the policy to be deleted.
+ * @param id The instance id of the policy to be deleted.
* @exception EBaseException is thrown if an error occurs in deletion.
*/
void deletePolicyInstance(String id)
- throws EBaseException;
+ throws EBaseException;
/**
- * Adds a policy instance
+ * Adds a policy instance
*
- * @param id The impl id of the policy to be added.
- * The id should be unique.
+ * @param id The impl id of the policy to be added.
+ * The id should be unique.
* @param ht a Hashtable of config params.
* @exception EBaseException is thrown if an error occurs in addition.
*/
void addPolicyInstance(String id, Hashtable<String, String> ht)
- throws EBaseException;
+ throws EBaseException;
/**
- * Modifies a policy instance
+ * Modifies a policy instance
*
- * @param id The impl id of the policy to be modified.
- * The policy instance with this id should be present.
+ * @param id The impl id of the policy to be modified.
+ * The policy instance with this id should be present.
* @param ht a Hashtable of config params.
* @exception EBaseException is thrown if an error occurs in addition.
*/
void modifyPolicyInstance(String id, Hashtable<String, String> ht)
- throws EBaseException;
+ throws EBaseException;
/**
* Modifies policy ordering.
- *
+ *
* @param policyOrderStr The comma separated list of instance ids.
- *
+ *
*/
void changePolicyInstanceOrdering(String policyOrderStr)
- throws EBaseException;
+ throws EBaseException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java
index 0babd48a..7f7f888f 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicyRule.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Vector;
import com.netscape.certsrv.base.EBaseException;
@@ -26,20 +25,20 @@ import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.request.IRequest;
import com.netscape.certsrv.request.PolicyResult;
-
/**
* Interface for a policy rule.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IPolicyRule
- extends com.netscape.certsrv.request.IPolicy {
+ extends com.netscape.certsrv.request.IPolicy {
public static final String PROP_ENABLE = "enable";
public static final String PROP_PREDICATE = "predicate";
public static final String PROP_IMPLNAME = "implName";
@@ -47,15 +46,16 @@ public interface IPolicyRule
/**
* Initializes the policy rule.
* <P>
- *
+ *
* @param config The config store reference
*/
void init(ISubsystem owner, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Gets the description for this policy rule.
* <P>
+ *
* @return The Description for this rule.
*/
String getDescription();
@@ -63,7 +63,7 @@ public interface IPolicyRule
/**
* Returns the name of the policy rule class.
* <P>
- *
+ *
* @return The name of the policy class.
*/
String getName();
@@ -71,25 +71,25 @@ public interface IPolicyRule
/**
* Returns the name of the policy rule instance.
* <P>
- *
+ *
* @return The name of the policy rule instance. If none
- * is set the name of the implementation will be returned.
- *
+ * is set the name of the implementation will be returned.
+ *
*/
String getInstanceName();
/**
* Sets a predicate expression for rule matching.
* <P>
- *
- * @param exp The predicate expression for the rule.
+ *
+ * @param exp The predicate expression for the rule.
*/
void setPredicate(IExpression exp);
/**
* Returns the predicate expression for the rule.
* <P>
- *
+ *
* @return The predicate expression for the rule.
*/
IExpression getPredicate();
@@ -98,27 +98,27 @@ public interface IPolicyRule
* Applies the policy on the given Request. This may modify
* the request appropriately.
* <P>
- *
- * @param req The request on which to apply policy.
+ *
+ * @param req The request on which to apply policy.
* @return The PolicyResult object.
*/
PolicyResult apply(IRequest req);
/**
* Return configured parameters for a policy rule instance.
- *
+ *
* @return nvPairs A Vector of name/value pairs. Each name/value
- * pair is constructed as a String in name=value format.
+ * pair is constructed as a String in name=value format.
*/
public Vector<String> getInstanceParams();
/**
* Return default parameters for a policy implementation.
- *
+ *
* @return nvPairs A Vector of name/value pairs. Each name/value
- * pair is constructed as a String in name=value.
+ * pair is constructed as a String in name=value.
*/
- public Vector<String> getDefaultParams();
+ public Vector<String> getDefaultParams();
public void setError(IRequest req, String format, Object[] params);
@@ -126,4 +126,3 @@ public interface IPolicyRule
public void setPolicyException(IRequest req, EBaseException ex);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java b/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java
index dd5a36bc..a9fb6a2d 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IPolicySet.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.Enumeration;
import com.netscape.certsrv.request.IRequest;
import com.netscape.certsrv.request.PolicyResult;
-
/**
* Represents a set of policy rules. Policy rules are ordered from
* lowest priority to highest priority. The priority assignment for rules
@@ -34,11 +32,12 @@ import com.netscape.certsrv.request.PolicyResult;
* them in increasing order of priority and presenting an ordered vector of rules
* via the IPolicySet interface.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -47,7 +46,7 @@ public interface IPolicySet {
/**
* Returns the name of the rule set.
* <P>
- *
+ *
* @return The name of the rule set.
*/
String getName();
@@ -55,6 +54,7 @@ public interface IPolicySet {
/**
* Returns the no of rules in a set.
* <P>
+ *
* @return the no of rules.
*/
int count();
@@ -62,24 +62,24 @@ public interface IPolicySet {
/**
* Add a policy rule.
* <P>
- *
+ *
* @param ruleName The name of the rule to be added.
- * @param rule The rule to be added.
+ * @param rule The rule to be added.
*/
void addRule(String ruleName, IPolicyRule rule);
/**
* Removes a policy rule identified by the given name.
- *
- * @param ruleName The name of the rule to be removed.
+ *
+ * @param ruleName The name of the rule to be removed.
*/
void removeRule(String ruleName);
/**
* Returns the rule identified by a given name.
* <P>
- *
- * @param ruleName The name of the rule to be return.
+ *
+ * @param ruleName The name of the rule to be return.
* @return The rule identified by the given name or null if none exists.
*/
IPolicyRule getRule(String ruleName);
@@ -87,7 +87,7 @@ public interface IPolicySet {
/**
* Returns an enumeration of rules.
* <P>
- *
+ *
* @return An enumeration of rules.
*/
Enumeration<IPolicyRule> getRules();
@@ -95,12 +95,11 @@ public interface IPolicySet {
/**
* Apply policy rules on a request. This call may modify
* the request content.
- *
- * @param req The request to apply policies on.
- *
- * <P>
+ *
+ * @param req The request to apply policies on.
+ *
+ * <P>
* @return The policy result.
*/
PolicyResult apply(IRequest req);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java
index 7bf2026e..28f56fe7 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IRenewalPolicy.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for a renewal policy rule.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IRenewalPolicy extends IPolicyRule {
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java b/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java
index e0ecfb16..7e6084c7 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/IRevocationPolicy.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
/**
* Interface for a revocation policy rule.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
public interface IRevocationPolicy extends IPolicyRule {
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java b/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java
index 75df22de..0fee01be 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/ISubjAltNameConfig.java
@@ -17,18 +17,16 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
-
-
-/**
- * Class that can be used to form general names from configuration file.
+/**
+ * Class that can be used to form general names from configuration file.
* Used by policies and extension commands.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -36,14 +34,14 @@ public interface ISubjAltNameConfig extends IGeneralNameConfig {
/**
* Retrieves configuration prefix.
- *
+ *
* @return prefix
*/
public String getPfx();
/**
* Retrieves configuration attribute.
- *
+ *
* @return attribute
*/
public String getAttr();
diff --git a/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java b/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java
index c8bcec2c..d330b719 100644
--- a/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/policy/PolicyResources.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.policy;
-
import java.util.ListResourceBundle;
-
/**
* Error messages for Policies.
* <P>
+ *
* <PRE>
* NOTE: The Policy Framework has been replaced by the Profile Framework.
* </PRE>
* <P>
- *
+ *
* @deprecated
* @version $Revision$, $Date$
* @see java.util.ListResourceBundle
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 75f134c2..5c192e9c 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<ICertInfoPolicyDefault> mDefaults = new Vector<ICertInfoPolicyDefault>();
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<ICertInfoPolicyDefault> 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());
+ }
}
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java b/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
index f4af86b2..c92630b9 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/EDeferException.java
@@ -17,17 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
- * This represents a profile specific exception. The
- * framework raises this exception when a request is
- * deferred.
+ * This represents a profile specific exception. The
+ * framework raises this exception when a request is
+ * deferred.
* <p>
- * A deferred request will not be processed
- * immediately. Manual approval is required for
- * processing the request again.
+ * A deferred request will not be processed immediately. Manual approval is required for processing the request again.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class EDeferException extends EProfileException {
@@ -39,10 +36,10 @@ public class EDeferException extends EProfileException {
/**
* Creates a defer exception.
- *
- * @param msg localized message that will be
- * displayed to end user. This message
- * should indicate the reason why a request
+ *
+ * @param msg localized message that will be
+ * displayed to end user. This message
+ * should indicate the reason why a request
* is deferred.
*/
public EDeferException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java b/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
index d21d6edb..37f968a6 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/EProfileException.java
@@ -22,10 +22,9 @@ import com.netscape.certsrv.base.EBaseException;
/**
* This represents a generic profile exception.
* <p>
- * This is the base class for all profile-specific
- * exception.
+ * This is the base class for all profile-specific exception.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class EProfileException extends EBaseException {
@@ -37,7 +36,7 @@ public class EProfileException extends EBaseException {
/**
* Creates a profile exception.
- *
+ *
* @param msg additional message for the handler
* of the exception. The message may
* or may not be localized.
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java b/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
index ceea57f2..59b35bcd 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/ERejectException.java
@@ -17,16 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
* This represents a profile specific exception. This
* exception is raised when a request is rejected.
* <p>
- * A rejected request cannot be reprocessed. Rejected
- * request is considered as a request in its terminal
- * state.
+ * A rejected request cannot be reprocessed. Rejected request is considered as a request in its terminal state.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class ERejectException extends EProfileException {
@@ -37,10 +34,10 @@ public class ERejectException extends EProfileException {
private static final long serialVersionUID = -542393641391361342L;
/**
- * Creates a rejection exception.
- *
+ * Creates a rejection exception.
+ *
* @param msg localized message that indicates
- * the reason why a request is
+ * the reason why a request is
* rejected.
*/
public ERejectException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java b/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
index bfd9bdc9..69879129 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/ICertInfoPolicyDefault.java
@@ -27,6 +27,6 @@ public interface ICertInfoPolicyDefault extends IPolicyDefault {
/**
* Populates certificate info directly.
*/
- public void populate(IRequest request, X509CertInfo info)
+ public void populate(IRequest request, X509CertInfo info)
throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
index fb92d53e..7d3d7ff7 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IEnrollProfile.java
@@ -22,27 +22,23 @@ import com.netscape.certsrv.request.IRequest;
/**
* This interface represents an enrollment profile.
* <p>
- * An enrollment profile contains a list of enrollment
- * specific input plugins, default policies, constriant
- * policies and output plugins.
+ * An enrollment profile contains a list of enrollment specific input plugins, default policies, constriant policies and output plugins.
* <p>
- * This interface also defines a set of enrollment specific
- * attribute names that can be used to retrieve values
- * from an enrollment request.
+ * This interface also defines a set of enrollment specific attribute names that can be used to retrieve values from an enrollment request.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEnrollProfile extends IProfile {
/**
- * Name of request attribute that stores the User
+ * Name of request attribute that stores the User
* Supplied Certificate Request Type.
*/
public static final String CTX_CERT_REQUEST_TYPE = "cert_request_type";
/**
- * Name of request attribute that stores the User
+ * Name of request attribute that stores the User
* Supplied Certificate Request.
*/
public static final String CTX_CERT_REQUEST = "cert_request";
@@ -56,7 +52,7 @@ public interface IEnrollProfile extends IProfile {
public static final String REQ_TYPE_KEYGEN = "keygen";
/**
- * Name of request attribute that stores the End-User Locale.
+ * Name of request attribute that stores the End-User Locale.
* <p>
* The value is of type java.util.Locale.
*/
@@ -151,6 +147,7 @@ public interface IEnrollProfile extends IProfile {
/**
* Set Default X509CertInfo in the request.
+ *
* @param request profile-based certificate request.
* @exception EProfileException failed to set the X509CertInfo.
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
index 1af3ef19..bf237465 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyConstraint.java
@@ -17,38 +17,36 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Locale;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.property.IConfigTemplate;
import com.netscape.certsrv.request.IRequest;
-
/**
* This represents a constraint policy. A constraint policy
* validates if the given request conforms to the set
* rules.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPolicyConstraint extends IConfigTemplate {
/**
* Initializes this constraint policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store for this constraint
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Returns the corresponding configuration store
* of this constraint policy.
- *
+ *
* @return config store of this constraint
*/
public IConfigStore getConfigStore();
@@ -56,16 +54,16 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Validates the request. The request is not modified
* during the validation.
- *
+ *
* @param request request to be validated
* @exception ERejectException reject the given request
*/
public void validate(IRequest request)
- throws ERejectException;
+ throws ERejectException;
/**
* Returns localized description of this constraint.
- *
+ *
* @param locale locale of the end-user
* @return localized description of this constraint
*/
@@ -73,7 +71,7 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Returns localized name of this constraint.
- *
+ *
* @param locale locale of the end-user
* @return localized name of this constraint
*/
@@ -82,10 +80,10 @@ public interface IPolicyConstraint extends IConfigTemplate {
/**
* Checks if this constraint is applicable to the
* given default policy.
- *
+ *
* @param def default policy to be checked
* @return true if this constraint can be applied to
- * the given default policy
+ * the given default policy
*/
public boolean isApplicable(IPolicyDefault def);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
index 092b10fd..bf1aefcf 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IPolicyDefault.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Enumeration;
import java.util.Locale;
@@ -27,36 +26,20 @@ import com.netscape.certsrv.property.IConfigTemplate;
import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
-
/**
* This represents a default policy that populates
* the request with additional values.
* <p>
- *
- * During request submission process, a default
- * policy is invoked to populate the default values
- * in the request. The default values will later
- * on be used for execution. The default values
- * are like the parameters for the request.
+ *
+ * During request submission process, a default policy is invoked to populate the default values in the request. The default values will later on be used for execution. The default values are like the parameters for the request.
* <p>
- *
- * This policy is called in 2 places. For
- * automated enrollment request, this policy
- * is invoked to populate the HTTP parameters
- * into the request. For request that cannot
- * be executed immediately, this policy will be
- * invoked again right after the agent's
- * approval.
+ *
+ * This policy is called in 2 places. For automated enrollment request, this policy is invoked to populate the HTTP parameters into the request. For request that cannot be executed immediately, this policy will be invoked again right after the agent's approval.
* <p>
- *
- * Each default policy may contain zero or more
- * properties that describe the default value.
- * For example, a X509 Key can be described by
- * its key type, key length, and key data. The
- * properties help to describe the default value
- * into human readable values.
+ *
+ * Each default policy may contain zero or more properties that describe the default value. For example, a X509 Key can be described by its key type, key length, and key data. The properties help to describe the default value into human readable values.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPolicyDefault extends IConfigTemplate {
@@ -69,27 +52,27 @@ public interface IPolicyDefault extends IConfigTemplate {
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the configuration store of this default.
- *
+ *
* @return configuration store of this default policy
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param request request to be populated
* @exception EProfileException failed to populate
*/
public void populate(IRequest request)
- throws EProfileException;
-
+ throws EProfileException;
+
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale locale of the end user
* @return localized name of this default policy
*/
@@ -105,17 +88,17 @@ public interface IPolicyDefault extends IConfigTemplate {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names. The values are
* of type java.lang.String
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given property
- * by name. The descriptor contains syntax
+ * Retrieves the descriptor of the given property
+ * by name. The descriptor contains syntax
* information.
- *
+ *
* @param locale locale of the end user
* @param name name of property
* @return descriptor of the property
@@ -124,25 +107,25 @@ public interface IPolicyDefault extends IConfigTemplate {
/**
* Sets the value of the given value property by name.
- *
+ *
* @param name name of property
* @param locale locale of the end user
* @param request request
* @param value value to be set in the given request
* @exception EPropertyException failed to set property
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
/**
- * Retrieves the value of the given value
+ * Retrieves the value of the given value
* property by name.
- *
+ *
* @param name name of property
* @param locale locale of the end user
* @param request request
* @exception EPropertyException failed to get property
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EPropertyException;
+ throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
index cc6975cd..779bf6a8 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfile.java
@@ -29,63 +29,59 @@ import com.netscape.certsrv.request.IRequestQueue;
import com.netscape.cms.profile.common.ProfilePolicy;
/**
- * This interface represents a profile. A profile contains
- * a list of input policies, default policies, constraint
+ * This interface represents a profile. A profile contains
+ * a list of input policies, default policies, constraint
* policies and output policies.
* <p>
- *
+ *
* The input policy is for building the enrollment page.
* <p>
- *
- * The default policy is for populating user-supplied and
- * system-supplied values into the request.
+ *
+ * The default policy is for populating user-supplied and system-supplied values into the request.
* <p>
- *
- * The constraint policy is for validating the request before
- * processing.
+ *
+ * The constraint policy is for validating the request before processing.
* <p>
- *
+ *
* The output policy is for building the result page.
* <p>
- *
- * Each profile can have multiple policy set. Each set
- * is composed of zero or more default policies and zero
- * or more constraint policies.
+ *
+ * Each profile can have multiple policy set. Each set is composed of zero or more default policies and zero or more constraint policies.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfile {
/**
* Initializes this profile.
- *
+ *
* @param owner profile subsystem
* @param config configuration store for this profile
* @exception EBaseException failed to initialize
*/
public void init(IProfileSubsystem owner, IConfigStore config)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the request queue that is associated with
* this profile. The request queue is for creating
* new requests.
- *
+ *
* @return request queue
*/
public IRequestQueue getRequestQueue();
/**
* Sets id of this profile.
- *
+ *
* @param id profile identifier
*/
public void setId(String id);
-
+
/**
* Returns the identifier of this profile.
- *
+ *
* @return profile id
*/
public String getId();
@@ -94,7 +90,7 @@ public interface IProfile {
* Retrieves a localized string that represents
* requestor's distinguished name. This string
* displayed in the request listing user interface.
- *
+ *
* @param request request
* @return distringuished name of the request owner
*/
@@ -102,14 +98,14 @@ public interface IProfile {
/**
* Retrieves the configuration store of this profile.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Retrieves the instance id of the authenticator for this profile.
- *
+ *
* @return authenticator instance id
*/
public String getAuthenticatorId();
@@ -118,31 +114,31 @@ public interface IProfile {
/**
* Sets the instance id of the authenticator for this profile.
- *
+ *
* @param id authenticator instance id
*/
public void setAuthenticatorId(String id);
/**
* Retrieves the associated authenticator instance.
- *
- * @return profile authenticator instance.
- * if no associated authenticator, null is returned
+ *
+ * @return profile authenticator instance.
+ * if no associated authenticator, null is returned
* @exception EProfileException failed to retrieve
*/
- public IProfileAuthenticator getAuthenticator()
- throws EProfileException;
+ public IProfileAuthenticator getAuthenticator()
+ throws EProfileException;
/**
* Retrieves a list of input policy IDs.
- *
+ *
* @return input policy id list
*/
public Enumeration<String> getProfileInputIds();
/**
* Retrieves input policy by id.
- *
+ *
* @param id input policy id
* @return input policy instance
*/
@@ -150,14 +146,14 @@ public interface IProfile {
/**
* Retrieves a list of output policy IDs.
- *
+ *
* @return output policy id list
*/
public Enumeration<String> getProfileOutputIds();
/**
* Retrieves output policy by id.
- *
+ *
* @param id output policy id
* @return output policy instance
*/
@@ -168,22 +164,22 @@ public interface IProfile {
* End-user profile will be displayed to the end user.
* Non end-user profile mainly is for registration
* manager.
- *
+ *
* @return end-user profile or not
*/
- public boolean isVisible();
+ public boolean isVisible();
/**
* Sets this profile end-user profile or not.
- *
+ *
* @param v end-user profile or not
*/
- public void setVisible(boolean v);
+ public void setVisible(boolean v);
/**
* Retrieves the user id of the person who
* approves this profile.
- *
+ *
* @return user id of the approver of this profile
*/
public String getApprovedBy();
@@ -200,7 +196,7 @@ public interface IProfile {
/**
* Returns the profile name.
- *
+ *
* @param locale end-user locale
* @param name profile name
*/
@@ -208,7 +204,7 @@ public interface IProfile {
/**
* Retrieves the profile name.
- *
+ *
* @param locale end-user locale
* @return localized profile name
*/
@@ -216,7 +212,7 @@ public interface IProfile {
/**
* Returns the profile description.
- *
+ *
* @param locale end-user locale
* @param desc profile description
*/
@@ -224,7 +220,7 @@ public interface IProfile {
/**
* Retrieves the profile description.
- *
+ *
* @param locale end-user locale
* @return localized profile description
*/
@@ -234,21 +230,21 @@ public interface IProfile {
* Retrieves profile context. The context stores
* information about the requestor before the
* actual request is created.
- *
+ *
* @return profile context.
*/
public IProfileContext createContext();
/**
* Returns the profile policy set identifiers.
- *
+ *
* @return a list of policy set id
*/
public Enumeration<String> getProfilePolicySetIds();
/**
* Creates a profile policy.
- *
+ *
* @param setId id of the policy set that owns this policy
* @param id policy id
* @param defaultClassId id of the registered default implementation
@@ -256,73 +252,73 @@ public interface IProfile {
* @exception EProfileException failed to create policy
* @return profile policy instance
*/
- public IProfilePolicy createProfilePolicy(String setId, String id,
- String defaultClassId, String constraintClassId)
- throws EProfileException;
+ public IProfilePolicy createProfilePolicy(String setId, String id,
+ String defaultClassId, String constraintClassId)
+ throws EProfileException;
/**
* Deletes input policy by id.
- *
+ *
* @param inputId id of the input policy
- * @exception EProfileException failed to delete
+ * @exception EProfileException failed to delete
*/
public void deleteProfileInput(String inputId) throws EProfileException;
/**
* Deletes output policy by id.
- *
+ *
* @param outputId id of the output policy
- * @exception EProfileException failed to delete
+ * @exception EProfileException failed to delete
*/
public void deleteProfileOutput(String outputId) throws EProfileException;
/**
* Creates a input policy.
- *
+ *
* @param id input policy id
* @param inputClassId id of the registered input implementation
* @param nvp default parameters
* @return input policy
* @exception EProfileException failed to create
*/
- public IProfileInput createProfileInput(String id, String inputClassId,
- NameValuePairs nvp)
- throws EProfileException;
+ public IProfileInput createProfileInput(String id, String inputClassId,
+ NameValuePairs nvp)
+ throws EProfileException;
/**
* Creates a output policy.
- *
+ *
* @param id output policy id
* @param outputClassId id of the registered output implementation
* @param nvp default parameters
* @return output policy
* @exception EProfileException failed to create
*/
- public IProfileOutput createProfileOutput(String id, String outputClassId,
- NameValuePairs nvp) throws EProfileException;
+ public IProfileOutput createProfileOutput(String id, String outputClassId,
+ NameValuePairs nvp) throws EProfileException;
/**
* Deletes a policy.
- *
+ *
* @param setId id of the policy set
* @param policyId id of policy to delete
* @exception EProfileException failed to delete
*/
- public void deleteProfilePolicy(String setId, String policyId)
- throws EProfileException;
+ public void deleteProfilePolicy(String setId, String policyId)
+ throws EProfileException;
/**
* Retrieves a policy.
- *
+ *
* @param setId set id
* @param id policy id
* @return profile policy
*/
- public IProfilePolicy getProfilePolicy(String setId, String id);
+ public IProfilePolicy getProfilePolicy(String setId, String id);
/**
* Retrieves all the policy id within a set.
- *
+ *
* @param setId set id
* @return a list of policy id
*/
@@ -332,7 +328,7 @@ public interface IProfile {
* Retrieves a default set id for the given request.
* It is the profile's responsibility to return
* an appropriate set id for the request.
- *
+ *
* @param req request
* @return policy set id
*/
@@ -340,7 +336,7 @@ public interface IProfile {
/**
* Returns a list of profile policies.
- *
+ *
* @param setId set id
* @return a list of policies
*/
@@ -350,62 +346,62 @@ public interface IProfile {
* Creates one or more requests. Normally, only one request will
* be created. In case of CRMF request, multiple requests may be
* created for one submission.
- *
+ *
* @param ctx profile context
* @param locale user locale
* @return a list of requests
* @exception EProfileException failed to create requests
*/
- public IRequest[] createRequests(IProfileContext ctx, Locale locale)
- throws EProfileException;
+ public IRequest[] createRequests(IProfileContext ctx, Locale locale)
+ throws EProfileException;
/**
* Populates user-supplied input values into the requests.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
- public void populateInput(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ public void populateInput(IProfileContext ctx, IRequest request)
+ throws EProfileException;
/**
* Passes the request to the set of default policies that
* populate the profile information against the profile.
- *
+ *
* @param request request
* @exception EProfileException failed to populate default values
- */
- public void populate(IRequest request)
- throws EProfileException;
+ */
+ public void populate(IRequest request)
+ throws EProfileException;
/**
- * Passes the request to the set of constraint policies
+ * Passes the request to the set of constraint policies
* that validate the request against the profile.
- *
+ *
* @param request request
* @exception ERejectException validation violation
- */
- public void validate(IRequest request)
- throws ERejectException;
+ */
+ public void validate(IRequest request)
+ throws ERejectException;
/**
* Process a request after validation.
- *
+ *
* @param request request to be processed
* @exception EProfileException failed to process
*/
- public void execute(IRequest request)
- throws EProfileException;
+ public void execute(IRequest request)
+ throws EProfileException;
/**
* Handles end-user request submission.
- *
+ *
* @param token authentication token
* @param request request to be processed
* @exception EDeferException defer request
* @exception EProfileException failed to submit
*/
public void submit(IAuthToken token, IRequest request)
- throws EDeferException, EProfileException;
+ throws EDeferException, EProfileException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
index 476002e2..98546c60 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileAuthenticator.java
@@ -26,14 +26,13 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.property.IDescriptor;
import com.netscape.certsrv.request.IRequest;
-
/**
* This interface represents an authenticator for profile.
* An authenticator is responsibile for authenting
* the end-user. If authentication is successful, request
* can be processed immediately. Otherwise, the request will
* be defered and manual approval is then required.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileAuthenticator extends IAuthManager {
@@ -42,17 +41,17 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this authenticator
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
@@ -60,17 +59,17 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Populates authentication specific information into the
* request for auditing purposes.
- *
+ *
* @param token authentication token
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IAuthToken token, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale end user locale
* @return localized authenticator name
*/
@@ -78,7 +77,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale end user locale
* @return localized authenticator description
*/
@@ -86,7 +85,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
@@ -96,16 +95,16 @@ public interface IProfileAuthenticator extends IAuthManager {
* serializable into the request. Passsword or other
* security-related value may not be desirable for
* storage.
- *
+ *
* @param name property name
* @return true if the property is not security related
*/
public boolean isValueWriteable(String name);
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* property by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return descriptor of the requested property
@@ -114,7 +113,7 @@ public interface IProfileAuthenticator extends IAuthManager {
/**
* Checks if this authenticator requires SSL client authentication.
- *
+ *
* @return client authentication required or not
*/
public boolean isSSLClientRequired();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
index 906c4816..b3c27d04 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileContext.java
@@ -17,19 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
/**
* This interface represents a profile context which
* stores system-wide and user-provided information for
* assisting request creation.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileContext {
/**
* Sets a value into the context.
- *
+ *
* @param name property name
* @param value property value
*/
@@ -37,7 +36,7 @@ public interface IProfileContext {
/**
* Retrieves a value from the context.
- *
+ *
* @param name property name
* @return property value
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
index 8ce3262e..79e4f417 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileEx.java
@@ -23,7 +23,7 @@ import com.netscape.certsrv.base.EBaseException;
* This interface represents the extension version of
* profile.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileEx extends IProfile {
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
index 35453e7d..4ef59869 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileInput.java
@@ -37,34 +37,34 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this input
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Returns configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return localized input name
*/
@@ -72,7 +72,7 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return localized input description
*/
@@ -80,15 +80,15 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves a list of names of the property.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* property by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return descriptor of the property
@@ -97,24 +97,24 @@ public interface IProfileInput extends IConfigTemplate {
/**
* Retrieves value from the request.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @exception EProfileException failed to get value
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Sets the value of the given property by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @param value value
* @exception EProfileException failed to get value
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
index 6dbfea51..b60e4475 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileOutput.java
@@ -37,34 +37,34 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Populates the request with this policy default.
- *
+ *
* @param ctx profile context
* @param request request
* @exception EProfileException failed to populate
*/
public void populate(IProfileContext ctx, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return output policy name
*/
@@ -72,7 +72,7 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return output policy description
*/
@@ -80,15 +80,15 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves a list of names of the value parameter.
- *
+ *
* @return a list of property names
*/
public Enumeration<String> getValueNames();
/**
- * Retrieves the descriptor of the given value
+ * Retrieves the descriptor of the given value
* parameter by name.
- *
+ *
* @param locale user locale
* @param name property name
* @return property descriptor
@@ -97,7 +97,7 @@ public interface IProfileOutput extends IConfigTemplate {
/**
* Retrieves the value of the given value parameter by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
@@ -105,17 +105,17 @@ public interface IProfileOutput extends IConfigTemplate {
* @exception EProfileException failed to retrieve value
*/
public String getValue(String name, Locale locale, IRequest request)
- throws EProfileException;
+ throws EProfileException;
/**
* Sets the value of the given value parameter by name.
- *
+ *
* @param name property name
* @param locale user locale
* @param request request
* @param value property value
* @exception EProfileException failed to retrieve value
*/
- public void setValue(String name, Locale locale, IRequest request,
- String value) throws EPropertyException;
+ public void setValue(String name, Locale locale, IRequest request,
+ String value) throws EPropertyException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
index 9577cb08..d231f8d5 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfilePolicy.java
@@ -21,28 +21,28 @@ package com.netscape.certsrv.profile;
* This interface represents a profile policy
* which consists a default policy and a
* constraint policy.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfilePolicy {
/**
- * Retrieves the policy id
- *
+ * Retrieves the policy id
+ *
* @return policy id
*/
public String getId();
/**
* Retrieves the default policy.
- *
+ *
* @return default policy
*/
public IPolicyDefault getDefault();
/**
* Retrieves the constraint policy.
- *
+ *
* @return constraint policy
*/
public IPolicyConstraint getConstraint();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
index 6f2fef37..b7a68445 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileSubsystem.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.profile;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * This represents the profile subsystem that manages
+ * This represents the profile subsystem that manages
* a list of profiles.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IProfileSubsystem extends ISubsystem {
@@ -34,16 +32,16 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves a profile by id.
- *
+ *
* @return profile
* @exception EProfileException failed to retrieve
*/
public IProfile getProfile(String id)
- throws EProfileException;
+ throws EProfileException;
/**
* Checks if a profile is approved by an agent or not.
- *
+ *
* @param id profile id
* @return true if profile is approved
*/
@@ -51,7 +49,7 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves the approver of the given profile.
- *
+ *
* @param id profile id
* @return user id of the agent who has approved the profile
*/
@@ -59,60 +57,60 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Creates new profile.
- *
+ *
* @param id profile id
* @param classid implementation id
* @param className class Name
* @param configFile configuration file
* @exception EProfileException failed to create profile
*/
- public IProfile createProfile(String id, String classid,
- String className, String configFile)
- throws EProfileException;
+ public IProfile createProfile(String id, String classid,
+ String className, String configFile)
+ throws EProfileException;
/**
* Deletes profile.
- *
+ *
* @param id profile id
* @param configFile configuration file
* @exception EProfileException failed to delete profile
*/
- public void deleteProfile(String id, String configFile)
- throws EProfileException;
+ public void deleteProfile(String id, String configFile)
+ throws EProfileException;
/**
* Creates a new profile configuration file.
- *
+ *
* @param id profile id
* @param classId implementation id
* @param configPath location to create the configuration file
* @exception failed to create profile
*/
public void createProfileConfig(String id, String classId,
- String configPath) throws EProfileException;
+ String configPath) throws EProfileException;
/**
* Enables a profile.
- *
+ *
* @param id profile id
* @param enableBy agent's user id
* @exception EProfileException failed to enable profile
*/
public void enableProfile(String id, String enableBy)
- throws EProfileException;
+ throws EProfileException;
/**
* Disables a profile.
- *
+ *
* @param id profile id
* @exception EProfileException failed to disable
*/
public void disableProfile(String id)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves the id of the implementation of the given profile.
- *
+ *
* @param id profile id
* @return implementation id managed by the registry
*/
@@ -121,14 +119,14 @@ public interface IProfileSubsystem extends ISubsystem {
/**
* Retrieves a list of profile ids. The return
* list is of type String.
- *
+ *
* @return a list of profile ids
*/
- public Enumeration<String> getProfileIds();
+ public Enumeration<String> getProfileIds();
/**
* Checks if owner id should be enforced during profile approval.
- *
+ *
* @return true if approval should be checked
*/
public boolean checkOwner();
diff --git a/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java b/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
index a36ee196..3749cd1d 100644
--- a/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
+++ b/pki/base/common/src/com/netscape/certsrv/profile/IProfileUpdater.java
@@ -34,34 +34,34 @@ public interface IProfileUpdater extends IConfigTemplate {
/**
* Initializes this default policy.
- *
+ *
* @param profile owner of this policy
* @param config configuration store
* @exception EProfileException failed to initialize
*/
public void init(IProfile profile, IConfigStore config)
- throws EProfileException;
+ throws EProfileException;
/**
* Retrieves configuration store.
- *
+ *
* @return configuration store
*/
public IConfigStore getConfigStore();
/**
* Notifies of state change.
- *
+ *
* @param req request
* @param status The status to check for.
* @exception EProfileException failed to populate
*/
- public void update(IRequest req, RequestStatus status)
- throws EProfileException;
+ public void update(IRequest req, RequestStatus status)
+ throws EProfileException;
/**
* Retrieves the localizable name of this policy.
- *
+ *
* @param locale user locale
* @return output policy name
*/
@@ -69,7 +69,7 @@ public interface IProfileUpdater extends IConfigTemplate {
/**
* Retrieves the localizable description of this policy.
- *
+ *
* @param locale user locale
* @return output policy description
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/property/Descriptor.java b/pki/base/common/src/com/netscape/certsrv/property/Descriptor.java
index 92aeff18..bd2b5634 100644
--- a/pki/base/common/src/com/netscape/certsrv/property/Descriptor.java
+++ b/pki/base/common/src/com/netscape/certsrv/property/Descriptor.java
@@ -19,7 +19,6 @@ package com.netscape.certsrv.property;
import java.util.Locale;
-
/**
* This interface represents a property descriptor. A descriptor
* includes information that describe a property.
@@ -35,7 +34,7 @@ public class Descriptor implements IDescriptor {
/**
* Constructs a descriptor.
- *
+ *
* @param syntax syntax
* @param constraint constraint
* @param defValue default value
@@ -50,16 +49,16 @@ public class Descriptor implements IDescriptor {
/**
* Returns the syntax of the property.
- *
+ *
* @return syntax
*/
public String getSyntax() {
return mSyntax;
}
-
+
/**
* Returns the default value of the property.
- *
+ *
* @return default value
*/
public String getDefaultValue() {
@@ -69,14 +68,13 @@ public class Descriptor implements IDescriptor {
/**
* Constraint for the given syntax. For example,
* <p>
- * - number(1-5): 1-5 is the constraint, and it indicates
- * that the number must be in the range of 1 to 5.
+ * - number(1-5): 1-5 is the constraint, and it indicates that the number must be in the range of 1 to 5.
* <p>
- * - choice(cert,crl): cert,crl is the constraint
- * for choice
+ * - choice(cert,crl): cert,crl is the constraint for choice
* <p>
* If null, no constraint shall be enforced.
* <p>
+ *
* @return constraint
*/
public String getConstraint() {
@@ -85,6 +83,7 @@ public class Descriptor implements IDescriptor {
/**
* Retrieves the description of the property.
+ *
* @param locale user locale
* @return description
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/property/EPropertyException.java b/pki/base/common/src/com/netscape/certsrv/property/EPropertyException.java
index a5847cb2..23f59a25 100644
--- a/pki/base/common/src/com/netscape/certsrv/property/EPropertyException.java
+++ b/pki/base/common/src/com/netscape/certsrv/property/EPropertyException.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.property;
-
import com.netscape.certsrv.base.EBaseException;
/**
* This is the base exception for property handling.
- *
+ *
* @version $Revision$, $Date$
*/
public class EPropertyException extends EBaseException {
@@ -34,7 +33,7 @@ public class EPropertyException extends EBaseException {
/**
* Constructs property exception
- *
+ *
* @param msg exception message
*/
public EPropertyException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/property/IConfigTemplate.java b/pki/base/common/src/com/netscape/certsrv/property/IConfigTemplate.java
index e40c98fa..431c90de 100644
--- a/pki/base/common/src/com/netscape/certsrv/property/IConfigTemplate.java
+++ b/pki/base/common/src/com/netscape/certsrv/property/IConfigTemplate.java
@@ -17,21 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.property;
-
import java.util.Enumeration;
import java.util.Locale;
-
/**
* This interface provides a standard way to describe
* a set of configuration parameters and its associated syntax.
- * It provides programmatic methods for querying
+ * It provides programmatic methods for querying
* template description.
* <p>
- * A plugin, for example, can be described as a
- * property template.
+ * A plugin, for example, can be described as a property template.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IConfigTemplate {
@@ -45,7 +42,7 @@ public interface IConfigTemplate {
/**
* Returns the descriptors of configuration parameter.
- *
+ *
* @param locale user locale
* @param name configuration parameter name
* @return descriptor
@@ -54,17 +51,17 @@ public interface IConfigTemplate {
/**
* Sets configuration parameter.
- *
+ *
* @param name parameter name
* @param value parameter value
* @exception EPropertyException failed to set parameter
*/
public void setConfig(String name, String value)
- throws EPropertyException;
+ throws EPropertyException;
/**
* Retrieves configuration parameter by name.
- *
+ *
* @return parameter
*/
public String getConfig(String name);
diff --git a/pki/base/common/src/com/netscape/certsrv/property/IDescriptor.java b/pki/base/common/src/com/netscape/certsrv/property/IDescriptor.java
index 271c1808..b44d1269 100644
--- a/pki/base/common/src/com/netscape/certsrv/property/IDescriptor.java
+++ b/pki/base/common/src/com/netscape/certsrv/property/IDescriptor.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.property;
-
import java.util.Locale;
-
/**
* This interface represents a property descriptor.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IDescriptor {
@@ -54,26 +52,26 @@ public interface IDescriptor {
/**
* Returns the syntax of the property.
- *
+ *
* @return syntax
*/
public String getSyntax();
/**
* Constraint for the given syntax. For example,
- * - number(1-5): 1-5 is the constraint, and it indicates
- * that the number must be in the range of 1 to 5.
- * - choice(cert,crl): cert,crl is the constraint
- * for choice
+ * - number(1-5): 1-5 is the constraint, and it indicates
+ * that the number must be in the range of 1 to 5.
+ * - choice(cert,crl): cert,crl is the constraint
+ * for choice
* If null, no constraint shall be enforced.
- *
+ *
* @return constraint
*/
public String getConstraint();
/**
* Retrieves the description of the property.
- *
+ *
* @param locale user locale
* @return localized description
*/
@@ -81,7 +79,7 @@ public interface IDescriptor {
/**
* Retrieves the default value of the property.
- *
+ *
* @return default value
*/
public String getDefaultValue();
diff --git a/pki/base/common/src/com/netscape/certsrv/property/PropertySet.java b/pki/base/common/src/com/netscape/certsrv/property/PropertySet.java
index f308a3e7..dc839deb 100644
--- a/pki/base/common/src/com/netscape/certsrv/property/PropertySet.java
+++ b/pki/base/common/src/com/netscape/certsrv/property/PropertySet.java
@@ -20,40 +20,33 @@ package com.netscape.certsrv.property;
import java.util.Enumeration;
import java.util.Hashtable;
-
/**
* A set of properties.
*/
public class PropertySet {
- private Hashtable<String, IDescriptor> mProperties = new Hashtable<String, IDescriptor>();
+ private Hashtable<String, IDescriptor> mProperties = new Hashtable<String, IDescriptor>();
- public PropertySet()
- {
- }
+ public PropertySet() {
+ }
- public void add(String name, IDescriptor desc)
- {
- mProperties.put(name, desc);
- }
+ public void add(String name, IDescriptor desc) {
+ mProperties.put(name, desc);
+ }
- public Enumeration<String> getNames()
- {
- return mProperties.keys();
- }
+ public Enumeration<String> getNames() {
+ return mProperties.keys();
+ }
- public IDescriptor getDescriptor(String name)
- {
- return (IDescriptor)mProperties.get(name);
- }
+ public IDescriptor getDescriptor(String name) {
+ return (IDescriptor) mProperties.get(name);
+ }
- public void remove(String name)
- {
- mProperties.remove(name);
- }
+ public void remove(String name) {
+ mProperties.remove(name);
+ }
- public int size()
- {
- return mProperties.size();
- }
+ public int size() {
+ return mProperties.size();
+ }
}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java b/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java
index 147bdd20..a3a10990 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ECompSyntaxErr.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
- * This type of exception is thrown in cases where an parsing
- * error is found while evaluating a PKI component. An example
+ * This type of exception is thrown in cases where an parsing
+ * error is found while evaluating a PKI component. An example
* would be in trying to evaluate a PKI authentication message and
* the parsing operation fails due to a missing token.
- *
+ *
* @version $Revision$ $Date$
*/
public class ECompSyntaxErr extends ELdapException {
@@ -37,8 +35,9 @@ public class ECompSyntaxErr extends ELdapException {
private static final long serialVersionUID = -2224290038321971845L;
/**
- * Construct a ECompSyntaxErr
- * @param errorString The descriptive error condition.
+ * Construct a ECompSyntaxErr
+ *
+ * @param errorString The descriptive error condition.
*/
public ECompSyntaxErr(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java
index 8c482a4e..fdf4a1b9 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/EMapperNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
- * Exception for Publish Mapper not found.
- *
+ * Exception for Publish Mapper not found.
+ *
* @version $Revision$ $Date$
*/
public class EMapperNotFound extends ELdapException {
@@ -35,6 +33,7 @@ public class EMapperNotFound extends ELdapException {
/**
* Constructs a exception for a missing required mapper
+ *
* @param errorString Detailed error message.
*/
public EMapperNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java
index d487488b..f8f18c5f 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/EMapperPluginNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
* Exception for Mapper Plugin not found.
- *
+ *
* @version $Revision$ $Date$
*/
public class EMapperPluginNotFound extends ELdapException {
@@ -35,10 +33,10 @@ public class EMapperPluginNotFound extends ELdapException {
/**
* Constructs a exception for a missing mapper plugin
+ *
* @param errorString Detailed error message.
*/
public EMapperPluginNotFound(String errorString) {
super(errorString);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java
index 12054dd1..176001e9 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
* Exception for Publisher not found. Required for successful publishing.
- *
+ *
* @version $Revision$ $Date$
*/
public class EPublisherNotFound extends ELdapException {
@@ -35,6 +33,7 @@ public class EPublisherNotFound extends ELdapException {
/**
* Constructs a exception for a missing required publisher.
+ *
* @param errorString Detailed error message.
*/
public EPublisherNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java
index 0a7fa1ca..56076863 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/EPublisherPluginNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
- * Exception for Publisher Plugin not found. Plugin implementation is required to actually publish.
- *
+ * Exception for Publisher Plugin not found. Plugin implementation is required to actually publish.
+ *
* @version $Revision$ $Date$
*/
public class EPublisherPluginNotFound extends ELdapException {
@@ -35,10 +33,10 @@ public class EPublisherPluginNotFound extends ELdapException {
/**
* Constructs a exception for a missing publisher plugin.
+ *
* @param errorString Detailed error message.
*/
public EPublisherPluginNotFound(String errorString) {
super(errorString);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java
index 2094967d..01c9897e 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ERuleNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
* Exception for Ldap Publishing Rule not found.
- *
+ *
* @version $Revision$ $Date$
*/
public class ERuleNotFound extends ELdapException {
@@ -35,6 +33,7 @@ public class ERuleNotFound extends ELdapException {
/**
* Constructs a exception for a missing required rule, which links a publisher and mapper.
+ *
* @param errorString Detailed error message.
*/
public ERuleNotFound(String errorString) {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java b/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java
index 24ffa11a..f619e7f4 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ERulePluginNotFound.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
- * Exception for Publisher Rule plugin not found. Plugin required to implement Ldap Rule.
- *
+ * Exception for Publisher Rule plugin not found. Plugin required to implement Ldap Rule.
+ *
* @version $Revision$ $Date$
*/
public class ERulePluginNotFound extends ELdapException {
@@ -35,10 +33,10 @@ public class ERulePluginNotFound extends ELdapException {
/**
* Constructs a exception for a missing rule plugin.
+ *
* @param errorString Detailed error message.
*/
public ERulePluginNotFound(String errorString) {
super(errorString);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java b/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java
index cae75d2f..cd5763cd 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ICRLPublisher.java
@@ -17,50 +17,48 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import netscape.security.x509.X509CRLImpl;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* This interface represents a CRL publisher that is
* invoked when CRL publishing is requested by CMS.
- * Note that CMS, by default, shipped with a LDAP-based
- * CRL publisher that can be configured via
+ * Note that CMS, by default, shipped with a LDAP-based
+ * CRL publisher that can be configured via
* Certificiate Manager/LDAP Publishing panel. This
- * interface provides administrator additional capability
+ * interface provides administrator additional capability
* of publishing CRL to different destinations.
- *
+ *
* The CRL publishing frequency is configured via
- * Netscape Certificate Server Console's
+ * Netscape Certificate Server Console's
* Certificate Manager/Revocation List panel.
- * The CRL publishing may occur either everytime a
+ * The CRL publishing may occur either everytime a
* certificate is revoked or at a pre-defined interval.
*
* To try out this new CRL publisher mechanism, do
* the following:
* (1) Write a sample CRL publisher class that implements
- * ICRLPublisher interface. For example,
+ * ICRLPublisher interface. For example,
*
* <code>
* public class CRLPublisher implements ICRLPublisher
* {
* public void init(ISubsystem owner, IConfigStore config)
- * throws EBaseException
+ * throws EBaseException
* {
- * log(ILogger.LL_DEBUG, "CRLPublisher: Initialized");
+ * log(ILogger.LL_DEBUG, "CRLPublisher: Initialized");
* }
- *
- * public void publish(String issuingPointId, X509CRLImpl crl)
+ *
+ * public void publish(String issuingPointId, X509CRLImpl crl)
* throws EBaseException
* {
* log(ILogger.LL_DEBUG, "CRLPublisher: " + issuingPointId +
* " crl=" + crl);
* }
- *
+ *
* public void log(int level, String msg)
* {
* Logger.getLogger().log(ILogger.EV_SYSTEM,
@@ -69,14 +67,14 @@ import com.netscape.certsrv.base.ISubsystem;
* }
* }
* </code>
- *
- * (2) Compile the class and place the class into
- * <server-root>\bin\cert\classes directory.
+ *
+ * (2) Compile the class and place the class into
+ * <server-root>\bin\cert\classes directory.
* (3) Add the following parameter to CMS.cfg
- * ca.crlPublisher.class=<implementation class>
- * For example,
- * ca.crlPublisher.class=myCRLPublisher
- *
+ * ca.crlPublisher.class=<implementation class>
+ * For example,
+ * ca.crlPublisher.class=myCRLPublisher
+ *
* @version $Revision$, $Date$
*/
public interface ICRLPublisher {
@@ -84,26 +82,26 @@ public interface ICRLPublisher {
/**
* Initializes this CRL publisher.
*
- * @param owner parent of the publisher. An object of type
- * CertificateAuthority.
+ * @param owner parent of the publisher. An object of type
+ * CertificateAuthority.
* @param config config store for this publisher. If this
- * publisher requires configuration parameters for
- * initialization, the parameters should be placed
- * in CMS.cfg as ca.crlPublisher.<paramType>=<paramValue>
+ * publisher requires configuration parameters for
+ * initialization, the parameters should be placed
+ * in CMS.cfg as ca.crlPublisher.<paramType>=<paramValue>
* @exception EBaseException failed to initialize this publisher
*/
- public void init(ISubsystem owner, IConfigStore config)
- throws EBaseException;
+ public void init(ISubsystem owner, IConfigStore config)
+ throws EBaseException;
/**
* Publishes CRL. This method is invoked by CMS based
* on the configured CRL publishing frequency.
- *
- * @param issuingPointId CRL issuing point identifier
- * (i.e. MasterCRL)
+ *
+ * @param issuingPointId CRL issuing point identifier
+ * (i.e. MasterCRL)
* @param crl CRL that is publishing
* @exception EBaseException failed to publish
*/
- public void publish(String issuingPointId, X509CRLImpl crl)
- throws EBaseException;
-}
+ public void publish(String issuingPointId, X509CRLImpl crl)
+ throws EBaseException;
+}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
index cd4012a4..7e2e1116 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCertMapper.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.security.cert.X509Certificate;
import java.util.Vector;
@@ -25,10 +24,9 @@ import netscape.ldap.LDAPConnection;
import com.netscape.certsrv.ldap.ELdapException;
-
-/**
- * Interface for mapping a X509 certificate to a LDAP entry.
- *
+/**
+ * Interface for mapping a X509 certificate to a LDAP entry.
+ *
* @version $Revision$ $Date$
*/
public interface ILdapCertMapper extends ILdapPlugin {
@@ -56,16 +54,17 @@ public interface ILdapCertMapper extends ILdapPlugin {
/**
* maps a certificate to a LDAP entry.
* returns dn of the mapped LDAP entry.
+ *
* @param conn the LDAP connection
* @param cert the certificate to map
* @param checkForCert whether to check for the presence of the cert
- * @exception ELdapException Failed to map.
+ * @exception ELdapException Failed to map.
* @return LdapCertMapResult indicates whether a mapping was successful
- * and whether a certificate was found if checkForCert was true.
- * If checkForCert was not set the hasCert method in LdapCertMapResult
- * should be ignored.
+ * and whether a certificate was found if checkForCert was true.
+ * If checkForCert was not set the hasCert method in LdapCertMapResult
+ * should be ignored.
*/
- public LdapCertMapResult map(LDAPConnection conn,
- X509Certificate cert, boolean checkForCert)
- throws ELdapException;
+ public LdapCertMapResult map(LDAPConnection conn,
+ X509Certificate cert, boolean checkForCert)
+ throws ELdapException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java
index a15ea0ab..252a09ec 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapCrlMapper.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import netscape.ldap.LDAPConnection;
import netscape.security.x509.X509CRLImpl;
@@ -25,10 +24,9 @@ import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.ldap.ELdapException;
-
-/**
- * Interface for mapping a CRL to a LDAP entry.
- *
+/**
+ * Interface for mapping a CRL to a LDAP entry.
+ *
* @version $Revision$ $Date$
*/
public interface ILdapCrlMapper {
@@ -36,25 +34,27 @@ public interface ILdapCrlMapper {
/**
* maps a crl to a LDAP entry.
* returns dn of the mapped LDAP entry.
+ *
* @param conn the LDAP connection
* @param crl the CRL to map
* @param checkForCrl whether to check for the presence of the CRL
- * @exception ELdapException Failed to map CRL to entry.
+ * @exception ELdapException Failed to map CRL to entry.
* @return LdapCertMapResult indicates whether a mapping was successful
- * and whether a certificate was found if checkForCert was true.
- * If checkForCert was not set the hasCert method in LdapCertMapResult
- * should be ignored.
+ * and whether a certificate was found if checkForCert was true.
+ * If checkForCert was not set the hasCert method in LdapCertMapResult
+ * should be ignored.
*/
- public LdapCertMapResult
- map(LDAPConnection conn, X509CRLImpl crl, boolean checkForCrl)
- throws ELdapException;
+ public LdapCertMapResult
+ map(LDAPConnection conn, X509CRLImpl crl, boolean checkForCrl)
+ throws ELdapException;
/**
* initialize from config store.
+ *
* @param config the configuration store to initialize from.
* @exception ELdapException Initialization failed due to Ldap error.
* @exception EBaseException Initialization failed.
*/
public void init(IConfigStore config)
- throws ELdapException, EBaseException;
+ throws ELdapException, EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java
index 26360fe8..4537636c 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapExpression.java
@@ -17,15 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.SessionContext;
import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.request.IRequest;
-
/**
* Interface for a Ldap predicate expression.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ILdapExpression {
@@ -44,28 +42,28 @@ public interface ILdapExpression {
/**
* Evaluate the Expression.
- *
- * @param sc The SessionContext on which we are applying the condition.
- * @return The return value.
- * @exception ELdapExeption Failed to evaluate expression.
+ *
+ * @param sc The SessionContext on which we are applying the condition.
+ * @return The return value.
+ * @exception ELdapExeption Failed to evaluate expression.
*/
boolean evaluate(SessionContext sc)
- throws ELdapException;
+ throws ELdapException;
/**
* Evaluate the Expression.
- *
- * @param req The PKIRequest on which we are applying the condition.
- * @return The return value.
- * @exception ELdapExeption Failed to evaluate expression.
+ *
+ * @param req The PKIRequest on which we are applying the condition.
+ * @return The return value.
+ * @exception ELdapExeption Failed to evaluate expression.
*/
boolean evaluate(IRequest req)
- throws ELdapException;
+ throws ELdapException;
/**
* Convert to a string.
+ *
* @return String representation of expression.
*/
public String toString();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java
index c4afd039..09238421 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapMapper.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.util.Vector;
import netscape.ldap.LDAPConnection;
@@ -25,10 +24,9 @@ import netscape.ldap.LDAPConnection;
import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.request.IRequest;
-
-/**
- * Interface for mapping a X509 certificate to a LDAP entry.
- *
+/**
+ * Interface for mapping a X509 certificate to a LDAP entry.
+ *
* @version $Revision$ $Date$
*/
public interface ILdapMapper extends ILdapPlugin {
@@ -56,26 +54,27 @@ public interface ILdapMapper extends ILdapPlugin {
/**
* maps a certificate to a LDAP entry.
* returns dn of the mapped LDAP entry.
+ *
* @param conn the LDAP connection
* @param obj the object to map
* @return dn indicates whether a mapping was successful
* @exception ELdapException Map operation failed.
*/
- public String
- map(LDAPConnection conn, Object obj)
- throws ELdapException;
+ public String
+ map(LDAPConnection conn, Object obj)
+ throws ELdapException;
/**
* maps a certificate to a LDAP entry.
* returns dn of the mapped LDAP entry.
+ *
* @param conn the LDAP connection
- * @param r the request to map
- * @param obj the object to map
+ * @param r the request to map
+ * @param obj the object to map
* @return dn indicates whether a mapping was successful
* @exception ELdapException Map operation failed.
*/
- public String
- map(LDAPConnection conn, IRequest r, Object obj)
- throws ELdapException;
+ public String
+ map(LDAPConnection conn, IRequest r, Object obj)
+ throws ELdapException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java
index b73b5ae2..b0a9fe73 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPlugin.java
@@ -17,27 +17,26 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.ldap.ELdapException;
-
-/**
+/**
* Interface for any Ldap plugin.
- *
+ *
* @version $Revision$ $Date$
*/
public interface ILdapPlugin {
/**
* Initialize from config store.
+ *
* @param config the configuration store to initialize from.
* @exception ELdapException initialization failed due to Ldap error.
* @exception EBaseException initialization failed.
*/
public void init(IConfigStore config)
- throws EBaseException, ELdapException;
+ throws EBaseException, ELdapException;
/**
* Return config store.
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java
index e84b62fc..db52a910 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPluginImpl.java
@@ -17,37 +17,37 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.IPluginImpl;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.ldap.ELdapException;
-
-/**
+/**
* Interface for any ldap plugin. Plugin implementation is defined here.
- *
+ *
* @version $Revision$ $Date$
*/
public interface ILdapPluginImpl extends IPluginImpl {
/**
* initialize from config store.
+ *
* @param config the configuration store to initialize from.
* @exception ELdapException initializtion failed due to Ldap error.
* @exception EBaseException initialization failed.
*/
public void init(ISubsystem sys, IConfigStore config)
- throws EBaseException, ELdapException;
+ throws EBaseException, ELdapException;
/**
* initialize from config store and Isubsystem.
+ *
* @param config the configuration store to initialize from.
* @exception ELdapException initializtion failed due to Ldap error.
* @exception EBaseException initialization failed.
*/
public void init(IConfigStore config)
- throws EBaseException, ELdapException;
+ throws EBaseException, ELdapException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java
index 001d472b..81e5be95 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublishModule.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.request.IRequest;
import com.netscape.certsrv.request.IRequestListener;
-
-/**
- * Handles requests to perform Ldap publishing.
- *
+/**
+ * Handles requests to perform Ldap publishing.
+ *
* @version $Revision$ $Date$
*/
public interface ILdapPublishModule extends IRequestListener {
@@ -36,10 +34,10 @@ public interface ILdapPublishModule extends IRequestListener {
// throws EBaseException, ELdapException;
/**
- * Accepts completed requests from an authority and
+ * Accepts completed requests from an authority and
* performs ldap publishing.
- * @param request The publishing request.
+ *
+ * @param request The publishing request.
*/
public void accept(IRequest request);
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java
index 5a1197dc..398d8645 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapPublisher.java
@@ -17,17 +17,15 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.util.Vector;
import netscape.ldap.LDAPConnection;
import com.netscape.certsrv.ldap.ELdapException;
-
-/**
- * Interface for publishing certificate or crl to database store.
- *
+/**
+ * Interface for publishing certificate or crl to database store.
+ *
* @version $Revision$ $Date$
*/
public interface ILdapPublisher extends ILdapPlugin {
@@ -58,30 +56,29 @@ public interface ILdapPublisher extends ILdapPlugin {
/**
* Publish an object.
*
- * @param conn a Ldap connection
- * (null for non-LDAP publishing)
+ * @param conn a Ldap connection
+ * (null for non-LDAP publishing)
* @param dn dn of the ldap entry to publish cert
- * (null for non-LDAP publishing)
+ * (null for non-LDAP publishing)
* @param object object to publish
- * (java.security.cert.X509Certificate or,
- * java.security.cert.X509CRL)
+ * (java.security.cert.X509Certificate or,
+ * java.security.cert.X509CRL)
* @exception ELdapException publish failed.
*/
public void publish(LDAPConnection conn, String dn, Object object)
- throws ELdapException;
+ throws ELdapException;
/**
* Unpublish an object.
- *
+ *
* @param conn the Ldap connection
- * (null for non-LDAP publishing)
+ * (null for non-LDAP publishing)
* @param dn dn of the ldap entry to unpublish cert
- * (null for non-LDAP publishing)
- * @param object object to unpublish
- * (java.security.cert.X509Certificate)
+ * (null for non-LDAP publishing)
+ * @param object object to unpublish
+ * (java.security.cert.X509Certificate)
* @exception ELdapException unpublish failed.
*/
public void unpublish(LDAPConnection conn, String dn, Object object)
- throws ELdapException;
+ throws ELdapException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java b/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java
index 4c5699b1..7bf19b07 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/ILdapRule.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.util.Vector;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
-
-/**
+/**
* Interface for publishing rule which associates a Publisher with a Mapper.
- *
+ *
* @version $Revision$ $Date$
*/
public interface ILdapRule extends ILdapPlugin {
@@ -36,10 +34,11 @@ public interface ILdapRule extends ILdapPlugin {
/**
* Initialize the plugin.
+ *
* @exception EBaseException Initialization failed.
*/
public void init(IPublisherProcessor processor, IConfigStore
- config) throws EBaseException;
+ config) throws EBaseException;
/**
* Returns the implementation name.
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
index 6ff997a1..c1af492b 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublishRuleSet.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.util.Enumeration;
import netscape.ldap.LDAPConnection;
@@ -28,22 +27,21 @@ import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.request.IRequest;
-
/**
* Represents a set of publishing rules. Publishing rules are ordered from
- * lowest priority to highest priority. The priority assignment for publishing
+ * lowest priority to highest priority. The priority assignment for publishing
* rules is not enforced by this interface. Various implementation may
* use different mechanisms such as a linear ordering of publishing rules
* in a configuration file or explicit assignment of priority levels ..etc.
- * The publishing rule initialization needs to deal with reading the
- * publishing rules, sorting them in increasing order of priority and
- * presenting an ordered vector of publishing rules via the IPublishRuleSet
+ * The publishing rule initialization needs to deal with reading the
+ * publishing rules, sorting them in increasing order of priority and
+ * presenting an ordered vector of publishing rules via the IPublishRuleSet
* interface.
- * When a request comes, the predicates of the publishing rules will be
- * checked in the order to find the first matched publishing rule as the
+ * When a request comes, the predicates of the publishing rules will be
+ * checked in the order to find the first matched publishing rule as the
* mapping rule to (un)publish the object.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPublishRuleSet {
@@ -52,7 +50,7 @@ public interface IPublishRuleSet {
/**
* Returns the name of the publishing rule set.
* <P>
- *
+ *
* @return The name of the publishing rule set.
*/
String getName();
@@ -60,6 +58,7 @@ public interface IPublishRuleSet {
/**
* Returns the no of publishing rules in a set.
* <P>
+ *
* @return the no of publishing rules.
*/
int count();
@@ -67,24 +66,24 @@ public interface IPublishRuleSet {
/**
* Add a publishing rule
* <P>
- *
- * @param aliasName The name of the publishing rule to be added.
- * @param rule rule The publishing rule to be added.
+ *
+ * @param aliasName The name of the publishing rule to be added.
+ * @param rule rule The publishing rule to be added.
*/
void addRule(String aliasName, ILdapRule rule);
/**
* Removes a publishing rule identified by the given name.
- *
- * @param ruleName The name of the publishing rule to be removed.
+ *
+ * @param ruleName The name of the publishing rule to be removed.
*/
void removeRule(String ruleName);
/**
* Get the publishing rule identified by a given name.
* <P>
- *
- * @param ruleName The name of the publishing rule to be return.
+ *
+ * @param ruleName The name of the publishing rule to be return.
* @return The publishing rule identified by the given name or null if none exists.
*/
ILdapRule getRule(String ruleName);
@@ -92,8 +91,8 @@ public interface IPublishRuleSet {
/**
* Get the publishing rule identified by a corresponding request.
* <P>
- *
- * @param req The request from which rule will be identified.
+ *
+ * @param req The request from which rule will be identified.
* @return The publishing rule or null if none exists.
*/
ILdapRule getRule(IRequest req);
@@ -101,24 +100,23 @@ public interface IPublishRuleSet {
/**
* Get an enumeration of publishing rules.
* <P>
- *
+ *
* @return An enumeration of publishing rules.
*/
Enumeration getRules();
/**
- * Apply publishing rules on a request.
- * The predicates of the publishing rules will be checked in the order
- * to find the first matched publishing rule.
- * Use the mapper to find the dn of the LDAP entry and use the publisher
+ * Apply publishing rules on a request.
+ * The predicates of the publishing rules will be checked in the order
+ * to find the first matched publishing rule.
+ * Use the mapper to find the dn of the LDAP entry and use the publisher
* to publish the object in the request.
* <P>
- *
- * @param conn The Ldap connection
- * @param req The request to apply policies on.
- * @exception ELdapException publish failed due to Ldap error.
+ *
+ * @param conn The Ldap connection
+ * @param req The request to apply policies on.
+ * @exception ELdapException publish failed due to Ldap error.
*/
public void publish(LDAPConnection conn, IRequest req)
- throws ELdapException;
+ throws ELdapException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java b/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java
index 1da2f346..3ed98540 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/IPublisherProcessor.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import java.math.BigInteger;
import java.security.cert.X509CRL;
import java.security.cert.X509Certificate;
@@ -32,11 +31,10 @@ import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.ldap.ILdapConnModule;
import com.netscape.certsrv.request.IRequest;
-
/**
- * Controls the publishing process from the top level. Maintains
- * a collection of Publishers , Mappers, and Publish Rules.
- *
+ * Controls the publishing process from the top level. Maintains
+ * a collection of Publishers , Mappers, and Publish Rules.
+ *
* @version $Revision$ $Date$
*/
@@ -64,63 +62,66 @@ public interface IPublisherProcessor extends ISubsystem {
public static final String PROP_TYPE = "type";
/**
- *
+ *
* Returns Hashtable of rule plugins.
*/
public Hashtable<String, RulePlugin> getRulePlugins();
/**
- *
- * Returns Hashtable of rule instances.
+ *
+ * Returns Hashtable of rule instances.
*/
public Hashtable<String, ILdapRule> getRuleInsts();
/**
- *
+ *
* Returns Hashtable of mapper plugins.
*/
public Hashtable<String, MapperPlugin> getMapperPlugins();
/**
- *
+ *
* Returns Hashtable of publisher plugins.
*/
public Hashtable<String, PublisherPlugin> getPublisherPlugins();
/**
- *
+ *
* Returns Hashtable of rule mapper instances.
*/
public Hashtable<String, MapperProxy> getMapperInsts();
/**
- *
+ *
* Returns Hashtable of rule publisher instances.
*/
public Hashtable<String, PublisherProxy> getPublisherInsts();
/**
- *
+ *
* Returns list of rules based on publishing type.
+ *
* @param publishingType Type for which to retrieve rule list.
*/
public Enumeration<ILdapRule> getRules(String publishingType);
/**
- *
+ *
* Returns list of rules based on publishing type and publishing request.
+ *
* @param publishingType Type for which to retrieve rule list.
- * @param req Corresponding publish request.
+ * @param req Corresponding publish request.
*/
public Enumeration<ILdapRule> getRules(String publishingType, IRequest req);
/**
- *
+ *
* Returns mapper initial default parameters.
+ *
* @param implName name of MapperPlugin.
*/
@@ -128,8 +129,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- *
- * Returns mapper current instance parameters.
+ *
+ * Returns mapper current instance parameters.
+ *
* @param insName name of MapperProxy.
* @exception ELdapException failed due to Ldap error.
*/
@@ -138,8 +140,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- *
+ *
* Returns publisher initial default parameters.
+ *
* @param implName name of PublisherPlugin.
* @exception ELdapException failed due to Ldap error.
*/
@@ -147,8 +150,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- *
+ *
* Returns true if MapperInstance is enabled.
+ *
* @param insName name of MapperProxy.
* @return true if enabled. false if disabled.
*/
@@ -156,48 +160,54 @@ public interface IPublisherProcessor extends ISubsystem {
public boolean isMapperInstanceEnable(String insName);
/**
- *
+ *
* Returns ILdapMapper instance that is currently active.
+ *
* @param insName name of MapperProxy.
* @return instance of ILdapMapper.
- */
+ */
public ILdapMapper getActiveMapperInstance(String insName);
/**
- *
+ *
* Returns ILdapMapper instance based on name of MapperProxy.
+ *
* @param insName name of MapperProxy.
* @return instance of ILdapMapper.
*/
public ILdapMapper getMapperInstance(String insName);
/**
- *
+ *
* Returns true publisher instance is currently enabled.
+ *
* @param insName name of PublisherProxy.
* @return true if enabled.
*/
public boolean isPublisherInstanceEnable(String insName);
/**
- *
+ *
* Returns ILdapPublisher instance that is currently active.
+ *
* @param insName name of PublisherProxy.
* @return instance of ILdapPublisher.
*/
public ILdapPublisher getActivePublisherInstance(String insName);
/**
- *
+ *
* Returns ILdapPublisher instance.
+ *
* @param insName name of PublisherProxy.
* @return instance of ILdapPublisher.
*/
public ILdapPublisher getPublisherInstance(String insName);
/**
- *
+ *
* Returns Vector of PublisherIntance's current instance parameters.
+ *
* @param insName name of PublisherProxy.
* @return Vector of current instance parameters.
*/
@@ -205,8 +215,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- *
+ *
* Returns Vector of RulePlugin's initial default parameters.
+ *
* @param implName name of RulePlugin.
* @return Vector of initial default parameters.
* @exception ELdapException failed due to Ldap error.
@@ -215,8 +226,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- *
+ *
* Returns Vector of RulePlugin's current instance parameters.
+ *
* @param implName name of RulePlugin.
* @return Vector of current instance parameters.
* @exception ELdapException failed due to Ldap error.
@@ -225,8 +237,9 @@ public interface IPublisherProcessor extends ISubsystem {
ELdapException;
/**
- * Set published flag - true when published, false when unpublished.
- * Not exist means not published.
+ * Set published flag - true when published, false when unpublished.
+ * Not exist means not published.
+ *
* @param serialNo serial number of publishable object.
* @param published true for published, false for not.
*/
@@ -234,102 +247,113 @@ public interface IPublisherProcessor extends ISubsystem {
/**
* Publish ca cert, UpdateDir.java, jobs, request listeners
+ *
* @param cert X509 certificate to be published.
* @exception ELdapException publish failed due to Ldap error.
*/
public void publishCACert(X509Certificate cert)
- throws ELdapException;
+ throws ELdapException;
/**
* This function is never called. CMS does not unpublish
* CA certificate.
*/
public void unpublishCACert(X509Certificate cert)
- throws ELdapException;
+ throws ELdapException;
/**
* Publishs regular user certificate based on the criteria
* set in the request.
+ *
* @param cert X509 certificate to be published.
- * @param req request which provides the criteria
+ * @param req request which provides the criteria
* @exception ELdapException publish failed due to Ldap error.
*/
public void publishCert(X509Certificate cert, IRequest req)
- throws ELdapException;
+ throws ELdapException;
/**
- * Unpublish user certificate. This is used by
+ * Unpublish user certificate. This is used by
* UnpublishExpiredJob.
+ *
* @param cert X509 certificate to be unpublished.
- * @param req request which provides the criteria
+ * @param req request which provides the criteria
* @exception ELdapException unpublish failed due to Ldap error.
*/
public void unpublishCert(X509Certificate cert, IRequest req)
- throws ELdapException;
+ throws ELdapException;
/**
* publishes a crl by mapping the issuer name in the crl to an entry
* and publishing it there. entry must be a certificate authority.
* Note that this is used by cmsgateway/cert/UpdateDir.java
+ *
* @param crl Certificate Revocation List
* @param crlIssuingPointId name of the issuing point.
- * @exception ELdapException publish failed due to Ldap error.
+ * @exception ELdapException publish failed due to Ldap error.
*/
- public void publishCRL(X509CRLImpl crl,String crlIssuingPointId)
- throws ELdapException;
+ public void publishCRL(X509CRLImpl crl, String crlIssuingPointId)
+ throws ELdapException;
/**
* publishes a crl by mapping the issuer name in the crl to an entry
* and publishing it there. entry must be a certificate authority.
- * @param dn Distinguished name to publish.
+ *
+ * @param dn Distinguished name to publish.
* @param crl Certificate Revocation List
* @exception ELdapException publish failed due to Ldap error.
*/
- public void publishCRL(String dn, X509CRL crl)
- throws ELdapException;
+ public void publishCRL(String dn, X509CRL crl)
+ throws ELdapException;
/**
- *
+ *
* Return true if Ldap is enabled.
+ *
* @return true if Ldap is enabled,otherwise false.
*/
public boolean ldapEnabled();
/**
- *
+ *
* Return true of PublisherProcessor is enabled.
+ *
* @return true if is enabled, otherwise false.
- *
+ *
*/
public boolean enabled();
/**
- *
- * Return Authority for which this Processor operates.
+ *
+ * Return Authority for which this Processor operates.
+ *
* @return Authority.
*/
public ISubsystem getAuthority();
/**
- *
+ *
* Perform logging function for this Processor.
- * @param level Log level to be used for this message
- * @param msg Message to be logged.
+ *
+ * @param level Log level to be used for this message
+ * @param msg Message to be logged.
*/
public void log(int level, String msg);
/**
- *
+ *
* Returns LdapConnModule belonging to this Processor.
+ *
* @return LdapConnModule.
*/
public ILdapConnModule getLdapConnModule();
/**
* Sets the LdapConnModule belonging to this Processor.
+ *
* @param m ILdapConnModule.
*/
public void setLdapConnModule(ILdapConnModule m);
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java b/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java
index ce72ed8a..b70a0626 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/IXcertPublisherProcessor.java
@@ -17,23 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.ldap.ELdapException;
-
/**
* Interface for a publisher that has the capability of publishing
* cross certs
- *
+ *
* @version $Revision$, $Date$
*/
public interface IXcertPublisherProcessor extends IPublisherProcessor {
/**
* Publish crossCertificatePair.
+ *
* @param pair Byte array representing cert pair.
* @exception EldapException publish failed due to Ldap error.
*/
public void publishXCertPair(byte[] pair)
- throws ELdapException;
+ throws ELdapException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java b/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java
index 559cd8c0..84a86609 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/LdapCertMapResult.java
@@ -17,14 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
-
-
-/**
+/**
* Class that represents the result of a Ldap Mapping operation.
- * certificate map result:
- * Represented by a mapped entry as a DN and whether entry has the certificate.
- *
+ * certificate map result:
+ * Represented by a mapped entry as a DN and whether entry has the certificate.
+ *
* @version $Revision$ $Date$
*/
public class LdapCertMapResult {
@@ -38,9 +35,10 @@ public class LdapCertMapResult {
mDn = dn;
mHasCert = hasCert;
}
-
+
/**
* Gets DN from the result.
+ *
* @return Distinguished Name.
*/
public String getDn() {
@@ -49,6 +47,7 @@ public class LdapCertMapResult {
/**
* Gets whether the ldap entry had a certificate from result.
+ *
* @return true if cert is present, false otherwise.
*/
public boolean hasCert() {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java
index 282db3cd..b193e1b5 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/MapperPlugin.java
@@ -17,25 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.Plugin;
-
/**
* This class represents a registered mapper plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class MapperPlugin extends Plugin {
/**
* Constructs a MapperPlugin based on a name and a path.
+ *
* @param id Name of plugin.
* @param path Classpath of plugin.
*/
- public MapperPlugin (String id, String path) {
+ public MapperPlugin(String id, String path) {
super(id, path);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java b/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java
index bd8ea741..95dc98d9 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/MapperProxy.java
@@ -17,13 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
-
-
/**
- *
- * Class representing a LdapMapper.
- *
+ *
+ * Class representing a LdapMapper.
+ *
* @version $Revision$ $Date$
*/
@@ -32,8 +29,9 @@ public class MapperProxy {
private ILdapMapper mMapper;
/**
- *
+ *
* Contructs MapperProxy .
+ *
* @param enable Enabled or not.
* @param mapper Corresponding ILdapMapper object.
*/
@@ -43,8 +41,9 @@ public class MapperProxy {
}
/**
- *
+ *
* Returns if enabled.
+ *
* @return true if enabled, otherwise false.
*/
public boolean isEnable() {
@@ -52,8 +51,9 @@ public class MapperProxy {
}
/**
- *
+ *
* Returns ILdapMapper object.
+ *
* @return Intance of ILdapMapper object.
*/
public ILdapMapper getMapper() {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java
index d6864326..5a163b80 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/PublisherPlugin.java
@@ -17,26 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.Plugin;
-
/**
* This class represents a registered publisher plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class PublisherPlugin extends Plugin {
/**
- *
- * Constructs a PublisherPlugin based on name and classpath.
- * @param id name of plugin.
- * @param path Classpath of plugin.
+ *
+ * Constructs a PublisherPlugin based on name and classpath.
+ *
+ * @param id name of plugin.
+ * @param path Classpath of plugin.
*/
- public PublisherPlugin (String id, String path) {
+ public PublisherPlugin(String id, String path) {
super(id, path);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java b/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java
index 06e08c31..eb71f3e5 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/PublisherProxy.java
@@ -17,24 +17,21 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
-
-
/**
- *
+ *
* Class representing a proxy for a ILdapPublisher.
- *
+ *
* @version $Revision$ $Date$
*/
-
public class PublisherProxy {
private boolean mEnable;
private ILdapPublisher mPublisher;
/**
- *
+ *
* Constructs a PublisherProxy based on a ILdapPublisher object and enabled boolean.
+ *
* @param enable Proxy is enabled or not.
* @param publisher Corresponding ILdapPublisher object.
*/
@@ -45,6 +42,7 @@ public class PublisherProxy {
/**
* Return if enabled or not.
+ *
* @return true if enabled, otherwise false.
*/
public boolean isEnable() {
@@ -53,6 +51,7 @@ public class PublisherProxy {
/**
* Return ILdapPublisher object.
+ *
* @return Instance of ILdapPublisher.
*/
public ILdapPublisher getPublisher() {
diff --git a/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java b/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java
index 8e515726..b37a24d5 100644
--- a/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java
+++ b/pki/base/common/src/com/netscape/certsrv/publish/RulePlugin.java
@@ -17,25 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.publish;
-
import com.netscape.certsrv.base.Plugin;
-
/**
* This class represents a registered Publishing Rule plugin.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class RulePlugin extends Plugin {
/**
- *
+ *
* Constructs a RulePlugin based on name and classpath.
+ *
* @param id name of RulePlugin.
* @param path Classpath of RulePlugin.
*/
- public RulePlugin (String id, String path) {
+ public RulePlugin(String id, String path) {
super(id, path);
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/ra/IRAService.java b/pki/base/common/src/com/netscape/certsrv/ra/IRAService.java
index 92ccd558..4bab4745 100644
--- a/pki/base/common/src/com/netscape/certsrv/ra/IRAService.java
+++ b/pki/base/common/src/com/netscape/certsrv/ra/IRAService.java
@@ -17,47 +17,45 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ra;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.connector.IConnector;
import com.netscape.certsrv.request.IRequest;
import com.netscape.certsrv.request.IService;
-
/**
* An interface representing a RA request services.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
-public interface IRAService extends IService {
+public interface IRAService extends IService {
/**
* Services request.
- *
+ *
* @param req request data
*/
public boolean serviceRequest(IRequest req);
/**
* Services profile request.
- *
+ *
* @param request profile enrollment request information
* @exception EBaseException failed to service profile enrollment request
*/
public void serviceProfileRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
* Returns CA connector.
- *
+ *
* @return CA connector
*/
public IConnector getCAConnector();
/**
* Returns KRA connector.
- *
+ *
* @return KRA connector
*/
public IConnector getKRAConnector();
diff --git a/pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java b/pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java
index 3ab3a084..193a6d9b 100644
--- a/pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ra;
-
import java.util.Enumeration;
import netscape.security.x509.X500Name;
@@ -29,12 +28,11 @@ import com.netscape.certsrv.publish.IPublisherProcessor;
import com.netscape.certsrv.request.IRequestListener;
import com.netscape.certsrv.request.IRequestQueue;
-
/**
* An interface represents a Registration Authority that is
* responsible for certificate enrollment operations.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRegistrationAuthority extends ISubsystem {
@@ -57,63 +55,63 @@ public interface IRegistrationAuthority extends ISubsystem {
/**
* Retrieves the request queue of this registration authority.
- *
+ *
* @return RA's request queue
*/
public IRequestQueue getRequestQueue();
/**
* Retrieves the publishing processor of this registration authority.
- *
+ *
* @return RA's publishing processor
*/
public IPublisherProcessor getPublisherProcessor();
/**
* Retrieves the policy processor of this registration authority.
- *
+ *
* @return RA's policy processor
*/
public IPolicyProcessor getPolicyProcessor();
/**
* Retrieves the RA certificate.
- *
+ *
* @return the RA certificate
*/
public org.mozilla.jss.crypto.X509Certificate getRACert();
/**
* Retrieves the request in queue listener.
- *
+ *
* @return the request in queue listener
*/
public IRequestListener getRequestInQListener();
/**
* Retrieves the request listener for issued certificates.
- *
+ *
* @return the request listener for issued certificates
*/
public IRequestListener getCertIssuedListener();
/**
* Retrieves the request listener for revoked certificates.
- *
+ *
* @return the request listener for revoked certificates
*/
public IRequestListener getCertRevokedListener();
/**
* Returns the nickname of the RA certificate.
- *
+ *
* @return the nickname of the RA certificate
*/
public String getNickname();
/**
* Retrieves the nickname of the RA certificate from configuration store.
- *
+ *
* @return the nickname of the RA certificate
* @exception EBaseException failed to get nickname
*/
@@ -121,28 +119,28 @@ public interface IRegistrationAuthority extends ISubsystem {
/**
* Sets the new nickname of the RA certifiate.
- *
+ *
* @param name new nickname
*/
public void setNewNickName(String name);
/**
* Sets the nickname of the RA certifiate.
- *
+ *
* @param str nickname
*/
public void setNickname(String str);
/**
* Retrieves the default validity period.
- *
+ *
* @return the default validity length in days
*/
public long getDefaultValidity();
/**
* Retrieves the issuer name of this registration authority.
- *
+ *
* @return the issuer name of this registration authority
*/
public X500Name getX500Name();
@@ -150,22 +148,22 @@ public interface IRegistrationAuthority extends ISubsystem {
/**
* Retrieves the RA service object that is responsible for
* processing requests.
- *
+ *
* @return RA service object
*/
- public IRAService getRAService();
+ public IRAService getRAService();
/**
* Retrieves the request listener by name.
- *
+ *
* @param name request listener name
* @return the request listener
*/
- public IRequestListener getRequestListener(String name);
+ public IRequestListener getRequestListener(String name);
/**
* Retrieves all request listeners.
- *
+ *
* @return name enumeration of all request listeners
*/
public Enumeration<String> getRequestListenerNames();
diff --git a/pki/base/common/src/com/netscape/certsrv/registry/ERegistryException.java b/pki/base/common/src/com/netscape/certsrv/registry/ERegistryException.java
index a4574981..5d2e2c91 100644
--- a/pki/base/common/src/com/netscape/certsrv/registry/ERegistryException.java
+++ b/pki/base/common/src/com/netscape/certsrv/registry/ERegistryException.java
@@ -17,13 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.registry;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* This represents a registry exception.
- *
+ *
* @version $Revision$, $Date$
*/
public class ERegistryException extends EBaseException {
@@ -35,7 +33,7 @@ public class ERegistryException extends EBaseException {
/**
* Constructs a registry exception.
- *
+ *
* @param msg message carried along with the exception
*/
public ERegistryException(String msg) {
diff --git a/pki/base/common/src/com/netscape/certsrv/registry/IPluginInfo.java b/pki/base/common/src/com/netscape/certsrv/registry/IPluginInfo.java
index 774b3f9b..8e6a8736 100644
--- a/pki/base/common/src/com/netscape/certsrv/registry/IPluginInfo.java
+++ b/pki/base/common/src/com/netscape/certsrv/registry/IPluginInfo.java
@@ -17,28 +17,25 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.registry;
-
import java.util.Locale;
-
/**
- * The plugin information includes name,
+ * The plugin information includes name,
* class name, and description. The localizable
* name and description are information
* for end-users.
* <p>
- *
- * The class name can be used to create
- * an instance of the plugin.
+ *
+ * The class name can be used to create an instance of the plugin.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPluginInfo {
/**
* Retrieves the localized plugin name.
- *
+ *
* @param locale end-user locale
* @return plugin name
*/
@@ -46,7 +43,7 @@ public interface IPluginInfo {
/**
* Retrieves the localized plugin description.
- *
+ *
* @param locale end-user locale
* @return plugin description
*/
@@ -57,7 +54,7 @@ public interface IPluginInfo {
* Instance of plugin can be created with
* <p>
* Class.forName(info.getClassName());
- *
+ *
* @return java class name
*/
public String getClassName();
diff --git a/pki/base/common/src/com/netscape/certsrv/registry/IPluginRegistry.java b/pki/base/common/src/com/netscape/certsrv/registry/IPluginRegistry.java
index 7631f3ea..1c85aeba 100644
--- a/pki/base/common/src/com/netscape/certsrv/registry/IPluginRegistry.java
+++ b/pki/base/common/src/com/netscape/certsrv/registry/IPluginRegistry.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.registry;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
- * This represents the registry subsystem that manages
+ * This represents the registry subsystem that manages
* mulitple types of plugin information.
- *
- * The plugin information includes id, name,
+ *
+ * The plugin information includes id, name,
* classname, and description.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPluginRegistry extends ISubsystem {
@@ -39,21 +37,21 @@ public interface IPluginRegistry extends ISubsystem {
/**
* Returns handle to the registry configuration file.
- *
+ *
* @return configuration store of registry subsystem
*/
public IConfigStore getFileConfigStore();
/**
* Returns all type names.
- *
+ *
* @return a list of String-based names
*/
public Enumeration<String> getTypeNames();
/**
* Returns a list of plugin identifiers of the given type.
- *
+ *
* @param type plugin type
* @return a list of plugin IDs
*/
@@ -61,7 +59,7 @@ public interface IPluginRegistry extends ISubsystem {
/**
* Retrieves the plugin information.
- *
+ *
* @param type plugin type
* @param id plugin id
* @return plugin info
@@ -70,24 +68,24 @@ public interface IPluginRegistry extends ISubsystem {
/**
* Adds plugin info.
- *
+ *
* @param type plugin type
* @param id plugin id
* @param info plugin info
* @exception ERegistryException failed to add plugin
*/
public void addPluginInfo(String type, String id, IPluginInfo info)
- throws ERegistryException;
+ throws ERegistryException;
/**
* Removes plugin info.
*/
public void removePluginInfo(String type, String id)
- throws ERegistryException;
+ throws ERegistryException;
/**
* Creates a pluginInfo
*/
- public IPluginInfo createPluginInfo(String name, String desc,
- String classPath);
+ public IPluginInfo createPluginInfo(String name, String desc,
+ String classPath);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java b/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
index 65ddeac9..47f54a6d 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/ARequestNotifier.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.math.BigInteger;
import java.util.Enumeration;
import java.util.Hashtable;
@@ -33,7 +32,7 @@ import com.netscape.certsrv.publish.IPublisherProcessor;
/**
* The ARequestNotifier class implements the IRequestNotifier interface,
* which notifies all registered request listeners.
- *
+ *
* @version $Revision$, $Date$
*/
public class ARequestNotifier implements IRequestNotifier {
@@ -52,25 +51,25 @@ public class ARequestNotifier implements IRequestNotifier {
private int mSavePublishingStatus = 0;
private int mSavePublishingCounter = 0;
-
public ARequestNotifier() {
mPublishingQueuePriority = Thread.currentThread().getPriority();
}
- public ARequestNotifier (ICertificateAuthority ca) {
+ public ARequestNotifier(ICertificateAuthority ca) {
mCA = ca;
- if (mCA != null) mRequestQueue = mCA.getRequestQueue();
+ if (mCA != null)
+ mRequestQueue = mCA.getRequestQueue();
}
- public void setPublishingQueue (boolean isPublishingQueueEnabled,
+ public void setPublishingQueue(boolean isPublishingQueueEnabled,
int publishingQueuePriorityLevel,
int maxNumberOfPublishingThreads,
int publishingQueuePageSize,
int savePublishingStatus) {
- CMS.debug("setPublishingQueue: Publishing Queue Enabled: " + isPublishingQueueEnabled+
- " Priority Level: " + publishingQueuePriorityLevel+
- " Maximum Number of Threads: " + maxNumberOfPublishingThreads+
- " Page Size: "+ publishingQueuePageSize);
+ CMS.debug("setPublishingQueue: Publishing Queue Enabled: " + isPublishingQueueEnabled +
+ " Priority Level: " + publishingQueuePriorityLevel +
+ " Maximum Number of Threads: " + maxNumberOfPublishingThreads +
+ " Page Size: " + publishingQueuePageSize);
mIsPublishingQueueEnabled = isPublishingQueueEnabled;
mMaxThreads = maxNumberOfPublishingThreads;
mMaxRequests = publishingQueuePageSize;
@@ -89,7 +88,8 @@ public class ARequestNotifier implements IRequestNotifier {
mPublishingQueuePriority = Thread.currentThread().getPriority();
}
- if (mCA != null && mRequestQueue == null) mRequestQueue = mCA.getRequestQueue();
+ if (mCA != null && mRequestQueue == null)
+ mRequestQueue = mCA.getRequestQueue();
if (mIsPublishingQueueEnabled && mSavePublishingStatus > 0 && mRequestQueue != null) {
mPublishingStatus = mRequestQueue.getPublishingStatus();
BigInteger status = new BigInteger("-2");
@@ -101,12 +101,12 @@ public class ARequestNotifier implements IRequestNotifier {
} catch (Exception e) {
}
}
-
+
}
/**
* Registers a request listener.
- *
+ *
* @param listener listener to be registered
*/
public void registerListener(IRequestListener listener) {
@@ -117,7 +117,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Registers a request listener.
- *
+ *
* @param name listener name
* @param listener listener to be registered
*/
@@ -127,7 +127,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Removes listener from the list of registered listeners.
- *
+ *
* @param listener listener to be removed from the list
*/
public void removeListener(IRequestListener listener) {
@@ -138,7 +138,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Gets list of listener names.
- *
+ *
* @return enumeration of listener names
*/
public Enumeration<String> getListenerNames() {
@@ -147,7 +147,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Removes listener from the list of registered listeners.
- *
+ *
* @param name listener name to be removed from the list
*/
public void removeListener(String name) {
@@ -156,7 +156,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Gets listener from the list of registered listeners.
- *
+ *
* @param name listener name
* @return listener
*/
@@ -166,26 +166,25 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Gets list of listeners.
- *
+ *
* @return enumeration of listeners
*/
public Enumeration<IRequestListener> getListeners() {
return mListeners.elements();
}
-
private Object publishingCounterMonitor = new Object();
public void updatePublishingStatus(String id) {
if (mRequestQueue != null) {
synchronized (publishingCounterMonitor) {
if (mSavePublishingCounter == 0) {
- CMS.debug("updatePublishingStatus requestId: "+id);
+ CMS.debug("updatePublishingStatus requestId: " + id);
mRequestQueue.setPublishingStatus(id);
}
mSavePublishingCounter++;
- CMS.debug("updatePublishingStatus mSavePublishingCounter: "+mSavePublishingCounter+
- " mSavePublishingStatus: "+mSavePublishingStatus);
+ CMS.debug("updatePublishingStatus mSavePublishingCounter: " + mSavePublishingCounter +
+ " mSavePublishingStatus: " + mSavePublishingStatus);
if (mSavePublishingCounter >= mSavePublishingStatus) {
mSavePublishingCounter = 0;
}
@@ -197,24 +196,25 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Gets request from publishing queue.
- *
+ *
* @return request
*/
public synchronized IRequest getRequest() {
- IRequest r = null;
- String id = null;
+ IRequest r = null;
+ String id = null;
CMS.debug("getRequest mRequests=" + mRequests.size() + " mSearchForRequests=" + mSearchForRequests);
if (mSearchForRequests && mRequests.size() == 1) {
- id = (String)mRequests.elementAt(0);
- if (mCA != null && mRequestQueue == null) mRequestQueue = mCA.getRequestQueue();
+ id = (String) mRequests.elementAt(0);
+ if (mCA != null && mRequestQueue == null)
+ mRequestQueue = mCA.getRequestQueue();
if (id != null && mRequestQueue != null) {
CMS.debug("getRequest request id=" + id);
IRequestVirtualList list = mRequestQueue.getPagedRequestsByFilter(
new RequestId(id),
"(requeststate=complete)", mMaxRequests, "requestId");
int s = list.getSize() - list.getCurrentIndex();
- CMS.debug("getRequest list size: "+s);
+ CMS.debug("getRequest list size: " + s);
for (int i = 0; i < s; i++) {
r = null;
try {
@@ -230,10 +230,9 @@ public class ARequestNotifier implements IRequestNotifier {
continue;
}
if (!(requestType.equals(IRequest.ENROLLMENT_REQUEST) ||
- requestType.equals(IRequest.RENEWAL_REQUEST) ||
- requestType.equals(IRequest.REVOCATION_REQUEST) ||
- requestType.equals(IRequest.CMCREVOKE_REQUEST) ||
- requestType.equals(IRequest.UNREVOCATION_REQUEST))) {
+ requestType.equals(IRequest.RENEWAL_REQUEST) ||
+ requestType.equals(IRequest.REVOCATION_REQUEST) ||
+ requestType.equals(IRequest.CMCREVOKE_REQUEST) || requestType.equals(IRequest.UNREVOCATION_REQUEST))) {
continue;
}
if (i == 0 && id.equals(r.getRequestId().toString())) {
@@ -245,8 +244,8 @@ public class ARequestNotifier implements IRequestNotifier {
}
if (mRequests.size() < mMaxRequests) {
mRequests.addElement(r.getRequestId().toString());
- CMS.debug("getRequest added "+r.getRequestType()+" request "+r.getRequestId().toString()+
- " to mRequests: " + mRequests.size()+" ("+mMaxRequests+")");
+ CMS.debug("getRequest added " + r.getRequestType() + " request " + r.getRequestId().toString() +
+ " to mRequests: " + mRequests.size() + " (" + mMaxRequests + ")");
} else {
break;
}
@@ -257,15 +256,16 @@ public class ARequestNotifier implements IRequestNotifier {
}
}
if (mRequests.size() > 0) {
- id = (String)mRequests.elementAt(0);
+ id = (String) mRequests.elementAt(0);
if (id != null) {
CMS.debug("getRequest getting request: " + id);
- if (mCA != null && mRequestQueue == null) mRequestQueue = mCA.getRequestQueue();
+ if (mCA != null && mRequestQueue == null)
+ mRequestQueue = mCA.getRequestQueue();
if (mRequestQueue != null) {
try {
r = mRequestQueue.findRequest(new RequestId(id));
mRequests.remove(0);
- CMS.debug("getRequest request "+ id + ((r != null)?" found":" not found"));
+ CMS.debug("getRequest request " + id + ((r != null) ? " found" : " not found"));
//updatePublishingStatus(id);
} catch (EBaseException e) {
CMS.debug("getRequest EBaseException " + e.toString());
@@ -285,7 +285,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Gets number of requests in publishing queue.
- *
+ *
* @return number of requests in publishing queue
*/
public int getNumberOfRequests() {
@@ -294,7 +294,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Checks if publishing queue is enabled.
- *
+ *
* @return true if publishing queue is enabled, false otherwise
*/
public boolean isPublishingQueueEnabled() {
@@ -303,7 +303,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Removes a notifier thread from the pool of publishing queue threads.
- *
+ *
* @param notifierThread Thread
*/
public void removeNotifierThread(Thread notifierThread) {
@@ -318,12 +318,12 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Notifies all registered listeners about request.
- *
+ *
* @param r request
*/
public void notify(IRequest r) {
- CMS.debug("ARequestNotifier notify mIsPublishingQueueEnabled="+mIsPublishingQueueEnabled+
- " mMaxThreads="+mMaxThreads);
+ CMS.debug("ARequestNotifier notify mIsPublishingQueueEnabled=" + mIsPublishingQueueEnabled +
+ " mMaxThreads=" + mMaxThreads);
if (mIsPublishingQueueEnabled) {
addToNotify(r);
} else if (mMaxThreads == 0) {
@@ -341,26 +341,27 @@ public class ARequestNotifier implements IRequestNotifier {
new Thread(new RunListeners(r, mListeners.elements())).start();
} catch (Throwable e) {
- /*
- CMS.getLogger().log(
- ILogger.EV_SYSTEM, ILogger.S_REQQUEUE, ILogger.LL_FAILURE,
- "Could not run listeners for request " + r.getRequestId() +
- ". Error " + e + ";" + e.getMessage());
- */
+ /*
+ CMS.getLogger().log(
+ ILogger.EV_SYSTEM, ILogger.S_REQQUEUE, ILogger.LL_FAILURE,
+ "Could not run listeners for request " + r.getRequestId() +
+ ". Error " + e + ";" + e.getMessage());
+ */
}
}
}
/**
* Checks for available publishing connections
- *
+ *
* @return true if there are available publishing connections, false otherwise
*/
private boolean checkAvailablePublishingConnections() {
boolean availableConnections = false;
IPublisherProcessor pp = null;
- if (mCA != null) pp = mCA.getPublisherProcessor();
+ if (mCA != null)
+ pp = mCA.getPublisherProcessor();
if (pp != null && pp.enabled()) {
ILdapConnModule ldapConnModule = pp.getLdapConnModule();
if (ldapConnModule != null) {
@@ -378,8 +379,8 @@ public class ARequestNotifier implements IRequestNotifier {
CMS.debug("checkAvailablePublishingConnections ldapConnModule is not accessible");
}
} else {
- CMS.debug("checkAvailablePublishingConnections PublisherProcessor is not " +
- ((pp != null)?"enabled":"accessible"));
+ CMS.debug("checkAvailablePublishingConnections PublisherProcessor is not " +
+ ((pp != null) ? "enabled" : "accessible"));
}
return availableConnections;
@@ -387,7 +388,7 @@ public class ARequestNotifier implements IRequestNotifier {
/**
* Checks if more publishing threads can be added.
- *
+ *
* @return true if more publishing threads can be added, false otherwise
*/
private boolean morePublishingThreads() {
@@ -396,9 +397,9 @@ public class ARequestNotifier implements IRequestNotifier {
if (mNotifierThreads.size() == 0) {
moreThreads = true;
} else if (mNotifierThreads.size() < mMaxThreads) {
- CMS.debug("morePublishingThreads ("+mRequests.size()+">"+
- ((mMaxRequests * mNotifierThreads.size()) / mMaxThreads)+
- " "+"("+mMaxRequests+"*"+mNotifierThreads.size()+"):"+mMaxThreads);
+ CMS.debug("morePublishingThreads (" + mRequests.size() + ">" +
+ ((mMaxRequests * mNotifierThreads.size()) / mMaxThreads) +
+ " " + "(" + mMaxRequests + "*" + mNotifierThreads.size() + "):" + mMaxThreads);
// gradually add new publishing threads
if (mRequests.size() > ((mMaxRequests * mNotifierThreads.size()) / mMaxThreads)) {
// check for available publishing connections
@@ -412,21 +413,20 @@ public class ARequestNotifier implements IRequestNotifier {
return moreThreads;
}
-
/**
* Notifies all registered listeners about request.
- *
+ *
* @param r request
*/
public synchronized void addToNotify(IRequest r) {
if (!mSearchForRequests) {
if (mRequests.size() < mMaxRequests) {
mRequests.addElement(r.getRequestId().toString());
- CMS.debug("addToNotify extended buffer to "+mRequests.size()+"("+mMaxRequests+")"+
- " requests by adding request "+r.getRequestId().toString());
+ CMS.debug("addToNotify extended buffer to " + mRequests.size() + "(" + mMaxRequests + ")" +
+ " requests by adding request " + r.getRequestId().toString());
if (morePublishingThreads()) {
try {
- Thread notifierThread = new Thread(new RunListeners((IRequestNotifier)this));
+ Thread notifierThread = new Thread(new RunListeners((IRequestNotifier) this));
if (notifierThread != null) {
mNotifierThreads.addElement(notifierThread);
CMS.debug("Number of publishing threads: " + mNotifierThreads.size());
@@ -445,23 +445,22 @@ public class ARequestNotifier implements IRequestNotifier {
}
}
-
/**
* Recovers publishing queue.
- *
+ *
* @param id request request
*/
public void recoverPublishingQueue(String id) {
- CMS.debug("recoverPublishingQueue mRequests.size()="+mRequests.size()+"("+mMaxRequests+")"+
- " requests by adding request "+id);
+ CMS.debug("recoverPublishingQueue mRequests.size()=" + mRequests.size() + "(" + mMaxRequests + ")" +
+ " requests by adding request " + id);
if (mRequests.size() == 0) {
mRequests.addElement(id);
- CMS.debug("recoverPublishingQueue extended buffer to "+mRequests.size()+"("+mMaxRequests+")"+
- " requests by adding request "+id);
+ CMS.debug("recoverPublishingQueue extended buffer to " + mRequests.size() + "(" + mMaxRequests + ")" +
+ " requests by adding request " + id);
if (morePublishingThreads()) {
mSearchForRequests = true;
try {
- Thread notifierThread = new Thread(new RunListeners((IRequestNotifier)this));
+ Thread notifierThread = new Thread(new RunListeners((IRequestNotifier) this));
if (notifierThread != null) {
mNotifierThreads.addElement(notifierThread);
CMS.debug("Number of publishing threads: " + mNotifierThreads.size());
@@ -478,7 +477,6 @@ public class ARequestNotifier implements IRequestNotifier {
}
}
-
/**
* The RunListeners class implements Runnable interface.
* This class executes notification of registered listeners.
@@ -490,7 +488,7 @@ class RunListeners implements Runnable {
/**
* RunListeners class constructor.
- *
+ *
* @param r request
* @param listeners list of listeners
*/
@@ -501,7 +499,7 @@ class RunListeners implements Runnable {
/**
* RunListeners class constructor.
- *
+ *
* @param r request
* @param listeners list of listeners
*/
@@ -514,10 +512,11 @@ class RunListeners implements Runnable {
* RunListeners thread implementation.
*/
public void run() {
- CMS.debug("RunListeners::"+((mRequestNotifier != null && mRequestNotifier.getNumberOfRequests() > 0)?" Queue: "+mRequestNotifier.getNumberOfRequests():" noQueue")+
- " "+((mRequest != null)?" SingleRequest":" noSingleRequest"));
+ CMS.debug("RunListeners::" + ((mRequestNotifier != null && mRequestNotifier.getNumberOfRequests() > 0) ? " Queue: " + mRequestNotifier.getNumberOfRequests() : " noQueue") +
+ " " + ((mRequest != null) ? " SingleRequest" : " noSingleRequest"));
do {
- if (mRequestNotifier != null) mRequest = (IRequest)mRequestNotifier.getRequest();
+ if (mRequestNotifier != null)
+ mRequest = (IRequest) mRequestNotifier.getRequest();
if (mListeners != null && mRequest != null) {
while (mListeners.hasMoreElements()) {
IRequestListener l = (IRequestListener) mListeners.nextElement();
@@ -529,11 +528,13 @@ class RunListeners implements Runnable {
mRequestNotifier.updatePublishingStatus(mRequest.getRequestId().toString());
}
}
- CMS.debug("RunListeners: "+((mRequestNotifier != null && mRequestNotifier.getNumberOfRequests() > 0)?" Queue: "+mRequestNotifier.getNumberOfRequests():" noQueue")+
- " "+((mRequest != null)?" SingleRequest":" noSingleRequest"));
- if (mRequestNotifier != null) mListeners = mRequestNotifier.getListeners();
+ CMS.debug("RunListeners: " + ((mRequestNotifier != null && mRequestNotifier.getNumberOfRequests() > 0) ? " Queue: " + mRequestNotifier.getNumberOfRequests() : " noQueue") +
+ " " + ((mRequest != null) ? " SingleRequest" : " noSingleRequest"));
+ if (mRequestNotifier != null)
+ mListeners = mRequestNotifier.getListeners();
} while (mRequestNotifier != null && mRequestNotifier.getNumberOfRequests() > 0);
- if (mRequestNotifier != null) mRequestNotifier.removeNotifierThread(Thread.currentThread());
+ if (mRequestNotifier != null)
+ mRequestNotifier.removeNotifierThread(Thread.currentThread());
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/AgentApproval.java b/pki/base/common/src/com/netscape/certsrv/request/AgentApproval.java
index c884ebbf..eb3ca06a 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/AgentApproval.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/AgentApproval.java
@@ -17,27 +17,26 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.io.Serializable;
import java.util.Date;
-
/**
* The AgentApproval class contains the record of a
* single agent approval.
- *
+ *
* @version $Revision$, $Date$
*/
public class AgentApproval
- implements Serializable {
+ implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3444654917454805225L;
+
/**
* Returns the approving agent's user name.
- *
+ *
* @return an identifier for the agent
*/
public String getUserName() {
@@ -46,7 +45,7 @@ public class AgentApproval
/**
* Returns the date of the approval
- *
+ *
* @return date and time of the approval
*/
public Date getDate() {
@@ -55,7 +54,7 @@ public class AgentApproval
/**
* AgentApproval class constructor
- *
+ *
* @param userName user name of the approving agent
*/
AgentApproval(String userName) {
diff --git a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
index 410e3b2c..ddb1dae2 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/AgentApprovals.java
@@ -17,21 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.io.Serializable;
import java.util.Date;
import java.util.Enumeration;
import java.util.Vector;
-
/**
- * A collection of AgentApproval objects.
+ * A collection of AgentApproval objects.
* <single-threaded>
- *
+ *
* @version $Revision$, $Date$
*/
public class AgentApprovals
- implements Serializable {
+ implements Serializable {
/**
*
@@ -41,15 +39,13 @@ public class AgentApprovals
/**
* Adds an approval to approval's list.
* <p>
- * If an approval is already present for this user,
- * it is updated with a new date. Otherwise a new
- * value is inserted.
- *
+ * If an approval is already present for this user, it is updated with a new date. Otherwise a new value is inserted.
+ *
* @param userName user name of the approving agent
*/
public void addApproval(String userName) {
AgentApproval a = findApproval(userName);
-
+
// update existing approval
if (a != null) {
a.mDate = new Date(); /* CMS.getCurrentDate(); */
@@ -63,9 +59,8 @@ public class AgentApprovals
/**
* Removes an approval from approval's list.
* <p>
- * If there is no approval for this userName, this
- * call does nothing.
- *
+ * If there is no approval for this userName, this call does nothing.
+ *
* @param userName user name of the approving agent
*/
public void removeApproval(String userName) {
@@ -77,7 +72,7 @@ public class AgentApprovals
/**
* Finds an existing AgentApproval for the named user.
- *
+ *
* @param userName user name of the approving agent
* @return an AgentApproval object
*/
@@ -88,7 +83,8 @@ public class AgentApprovals
for (int i = 0; i < mVector.size(); i++) {
a = (AgentApproval) mVector.elementAt(i);
- if (a.mUserName.equals(userName)) break;
+ if (a.mUserName.equals(userName))
+ break;
}
return a;
@@ -96,7 +92,7 @@ public class AgentApprovals
/**
* Returns an enumeration of the agent approvals
- *
+ *
* @return an enumeration of the agent approvals
*/
public Enumeration elements() {
@@ -106,10 +102,11 @@ public class AgentApprovals
/**
* Returns the AgentApprovals as a Vector of strings.
* Each entry in the vector is of the format:
- * epoch;username
+ * epoch;username
* where epoch is the date.getTime()
* <p>
* This is used for serialization in Request.setExtData().
+ *
* @return The string vector.
*/
public Vector toStringVector() {
@@ -125,6 +122,7 @@ public class AgentApprovals
/**
* Recreates an AgentApprovals instance from a Vector of strings that
* was created by toStringVector().
+ *
* @param stringVector The vector of strings to translate
* @return the AgentApprovals instance or null if it can't be translated.
*/
@@ -135,7 +133,7 @@ public class AgentApprovals
AgentApprovals approvals = new AgentApprovals();
for (int i = 0; i < stringVector.size(); i++) {
try {
- String approvalString = (String)stringVector.get(i);
+ String approvalString = (String) stringVector.get(i);
String[] parts = approvalString.split(";", 2);
if (parts.length != 2) {
return null;
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IEnrollmentRequest.java b/pki/base/common/src/com/netscape/certsrv/request/IEnrollmentRequest.java
index e7036d1e..32c3f53a 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IEnrollmentRequest.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IEnrollmentRequest.java
@@ -17,15 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* An example of a more specialized request interface.
* This version (currently) doesn't supply any additional
* data, but is implementated only for testing and
* demonstration purposes.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEnrollmentRequest
- extends IRequest {
+ extends IRequest {
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/INotify.java b/pki/base/common/src/com/netscape/certsrv/request/INotify.java
index d4ff15b7..938cd855 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/INotify.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/INotify.java
@@ -17,14 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* The INotify interface defines operations that are invoked
- * when a request is completely processed. A class implementing
+ * when a request is completely processed. A class implementing
* this interface may be registered with a IRequestQueue.
* The interface will be invoked when a request is completely
* serviced by the IService object.
- *
+ *
* @version $Revision$ $Date$
*/
public interface INotify {
@@ -34,7 +33,7 @@ public interface INotify {
* The implementation may use values stored in the IRequest
* object, and may implement any type publishing (such as email
* or writing values into a directory)
- *
+ *
* @param request the request that is completed.
*/
public void notify(IRequest request);
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IPolicy.java b/pki/base/common/src/com/netscape/certsrv/request/IPolicy.java
index d74a32a4..4d23c903 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IPolicy.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IPolicy.java
@@ -17,37 +17,36 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
- * Interface to a policy. The policy evaluates the request for
- * correctness and completeness. It may change or add to values
- * stored in the request. The policy object also decides
+ * Interface to a policy. The policy evaluates the request for
+ * correctness and completeness. It may change or add to values
+ * stored in the request. The policy object also decides
* whether a request should be queue to await approval by
* an agent.
- * FUTURE: In this case, the policy should set the
+ * FUTURE: In this case, the policy should set the
* 'agentGroup' entry in the request to indicate the group
- * of agents allowed to perform further processing. If none
+ * of agents allowed to perform further processing. If none
* is set, a default value ("defaultAgentGroup") will be
* set instead.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IPolicy {
/**
- * Applies the policy check to the request. The policy should
+ * Applies the policy check to the request. The policy should
* determine whether the request can be processed immediately,
* or should be held pending manual approval.
* <p>
- * The policy can update fields in the request, to add additional values
- * or to restrict the values to pre-determined ranges.
+ * The policy can update fields in the request, to add additional values or to restrict the values to pre-determined ranges.
* <p>
+ *
* @param request
- * the request to check
+ * the request to check
* @return
- * a result code indicating the result of the evaluation. The
- * processor will determine the next request processing step based
- * on this value
+ * a result code indicating the result of the evaluation. The
+ * processor will determine the next request processing step based
+ * on this value
*/
PolicyResult apply(IRequest request);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
index 1174778a..60c332c9 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequest.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
//import java.io.Serializable;
import java.math.BigInteger;
@@ -36,10 +35,9 @@ import netscape.security.x509.X509CertInfo;
import com.netscape.certsrv.authentication.IAuthToken;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* An interface that defines abilities of request objects,
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRequest {
@@ -84,11 +82,11 @@ public interface IRequest {
// Params added by agents on agent approval page
public static final String AGENT_PARAMS = "AGENT_PARAMS";
// server attributes: attributes generated by server modules.
- public static final String SERVER_ATTRS = "SERVER_ATTRS";
+ public static final String SERVER_ATTRS = "SERVER_ATTRS";
- public static final String RESULT = "Result"; // service result.
- public static final Integer RES_SUCCESS = Integer.valueOf(1); // result value
- public static final Integer RES_ERROR = Integer.valueOf(2); // result value
+ public static final String RESULT = "Result"; // service result.
+ public static final Integer RES_SUCCESS = Integer.valueOf(1); // result value
+ public static final Integer RES_ERROR = Integer.valueOf(2); // result value
public static final String REMOTE_SERVICE_AUTHORITY = "RemServiceAuthority";
public static final String SVCERRORS = "serviceErrors";
public static final String REMOTE_STATUS = "remoteStatus";
@@ -110,10 +108,9 @@ public interface IRequest {
// also used for renewal
public static final String CERT_INFO = "CERT_INFO";
public static final String ISSUED_CERTS = "issuedCerts";
- public static final String
- REQUEST_TRUSTEDMGR_PRIVILEGE = "requestTrustedManagerPrivilege";
+ public static final String REQUEST_TRUSTEDMGR_PRIVILEGE = "requestTrustedManagerPrivilege";
public static final String FINGERPRINTS = "fingerprints";
-
+
// enrollment request values
public static final String SERVER_CERT = "server";
public static final String CLIENT_CERT = "client";
@@ -124,7 +121,7 @@ public interface IRequest {
public static final String OTHER_CERT = "other";
public static final String ROUTER_CERT = "router"; // deprecated
public static final String CEP_CERT = "CEP-Request";
-
+
// renewal request attributes. (internally set)
// also used for revocation
public static final String OLD_CERTS = "OLD_CERTS";
@@ -143,13 +140,13 @@ public interface IRequest {
public final static String CRL_PUBLISH_ERROR = "crlPublishError";
public static final String REQUESTOR_TYPE = "requestorType";
- // Netkey request attributes
+ // Netkey request attributes
public final static String NETKEY_ATTR_CUID = "CUID";
public final static String NETKEY_ATTR_USERID = "USERID";
public final static String NETKEY_ATTR_DRMTRANS_DES_KEY = "drm_trans_desKey";
- public final static String NETKEY_ATTR_ARCHIVE_FLAG ="archive";
- public final static String NETKEY_ATTR_SERVERSIDE_MUSCLE_FLAG ="serverSideMuscle";
- public final static String NETKEY_ATTR_ENC_PRIVKEY_FLAG ="encryptPrivKey";
+ public final static String NETKEY_ATTR_ARCHIVE_FLAG = "archive";
+ public final static String NETKEY_ATTR_SERVERSIDE_MUSCLE_FLAG = "serverSideMuscle";
+ public final static String NETKEY_ATTR_ENC_PRIVKEY_FLAG = "encryptPrivKey";
public final static String NETKEY_ATTR_USER_CERT = "cert";
public final static String NETKEY_ATTR_KEY_SIZE = "keysize";
@@ -174,90 +171,89 @@ public interface IRequest {
/**
* Gets the primary identifier for this request.
- *
+ *
* @return request id
*/
RequestId getRequestId();
/**
* Gets the current state of this request.
- *
+ *
* @return request status
*/
RequestStatus getRequestStatus();
/**
- * Gets the "sourceId" for the request. The sourceId is
+ * Gets the "sourceId" for the request. The sourceId is
* assigned by the originator of the request (for example,
* the EE servlet or the RA servlet.
* <p>
- * The sourceId should be unique so that it can be used
- * to retrieve request later without knowing the locally
- * assigned primary id (RequestID)
+ * The sourceId should be unique so that it can be used to retrieve request later without knowing the locally assigned primary id (RequestID)
* <p>
+ *
* @return
- * the sourceId value (or null if none has been set)
+ * the sourceId value (or null if none has been set)
*/
public String getSourceId();
/**
- * Sets the "sourceId" for this request. The request must be updated
- * in the database for this change to take effect. This can be done
+ * Sets the "sourceId" for this request. The request must be updated
+ * in the database for this change to take effect. This can be done
* by calling IRequestQueue.update() or by performing one of the
* other operations like processRequest or approveRequest.
- *
+ *
* @param id source id for this request
*/
public void setSourceId(String id);
/**
* Gets the current owner of this request.
- *
+ *
* @return request owner
*/
public String getRequestOwner();
/**
* Sets the current owner of this request.
- *
+ *
* @param owner
- * The new owner of this request. If this value is set to null
- * there will be no current owner
+ * The new owner of this request. If this value is set to null
+ * there will be no current owner
*/
public void setRequestOwner(String owner);
/**
* Gets the type of this request.
- *
+ *
* @return request type
*/
public String getRequestType();
/**
* Sets the type or this request.
- *
+ *
* @param type request type
*/
public void setRequestType(String type);
/**
* Gets the version of this request.
- *
+ *
* @return request version
*/
public String getRequestVersion();
/**
* Gets the time this request was created.
- *
+ *
* @return request creation time
*/
Date getCreationTime();
/**
* Gets the time this request was last modified (defined
- * as updated in the queue) (See IRequestQueue.update)
- *
+ * as updated in the queue) (See IRequestQueue.update)
+ *
* @return request last modification time
*/
Date getModificationTime();
@@ -278,61 +274,60 @@ public interface IRequest {
public static final String ERROR = "Error";
/**
- * Copies meta attributes (excluding request Id, etc.) of another request
+ * Copies meta attributes (excluding request Id, etc.) of another request
* to this request.
- *
+ *
* @param req another request
*/
public void copyContents(IRequest req);
/**
* Gets context of this request.
- *
+ *
* @return request context
*/
public String getContext();
/**
* Sets context of this request.
- *
+ *
* @param ctx request context
*/
public void setContext(String ctx);
/**
* Sets status of this request.
- *
+ *
* @param s request status
*/
public void setRequestStatus(RequestStatus s);
/**
* Gets status of connector transfer.
- *
+ *
* @return status of connector transfer
*/
public boolean isSuccess();
/**
* Gets localized error message from connector transfer.
- *
+ *
* @param locale request locale
* @return error message from connector transfer
*/
public String getError(Locale locale);
-
/**************************************************************
* ExtData data methods:
- *
+ *
* These methods should be used in place of the mAttrData methods
* deprecated above.
- *
- * These methods all store Strings in LDAP. This means they can no longer
- * be used as a garbage dump for all sorts of objects. A limited number
+ *
+ * These methods all store Strings in LDAP. This means they can no longer
+ * be used as a garbage dump for all sorts of objects. A limited number
* of helper methods are provided for Vectors/Arrays/Hashtables but the
* keys and values for all of these should be Strings.
- *
+ *
* The keys are used in the LDAP attribute names, and so much obey LDAP
* key syntax rules: A-Za-z0-9 and hyphen.
*/
@@ -340,8 +335,8 @@ public interface IRequest {
/**
* Sets an Extended Data string-key string-value pair.
* All keys are lower cased because LDAP does not preserve case.
- *
- * @param key The extended data key
+ *
+ * @param key The extended data key
* @param value The extended data value
* @return false if key is invalid.
*/
@@ -351,10 +346,10 @@ public interface IRequest {
* Sets an Extended Data string-key string-value pair.
* The key and hashtable keys are all lowercased because LDAP does not
* preserve case.
- *
- * @param key The extended data key
+ *
+ * @param key The extended data key
* @param value The extended data value
- * the Hashtable contains an illegal key.
+ * the Hashtable contains an illegal key.
* @return false if the key or hashtable keys are invalid
*/
public boolean setExtData(String key, Hashtable<String, ?> value);
@@ -362,40 +357,42 @@ public interface IRequest {
/**
* Checks whether the key is storing a simple String value, or a complex
* (Vector/hashtable) structure.
- * @param key The key to check for.
- * @return True if the key maps to a string. False if it maps to a
+ *
+ * @param key The key to check for.
+ * @return True if the key maps to a string. False if it maps to a
* hashtable.
*/
public boolean isSimpleExtDataValue(String key);
/**
- * Returns the String value stored for the String key. Returns null
- * if not found. Throws exception if key stores a complex data structure
+ * Returns the String value stored for the String key. Returns null
+ * if not found. Throws exception if key stores a complex data structure
* (Vector/Hashtable).
- * @param key The key to lookup (case-insensitive)
- * @return The value associated with the key. null if not found or if the
- * key is associated with a non-string value.
+ *
+ * @param key The key to lookup (case-insensitive)
+ * @return The value associated with the key. null if not found or if the
+ * key is associated with a non-string value.
*/
public String getExtDataInString(String key);
/**
- * Returns the Hashtable value for the String key. Returns null if not
- * found. Throws exception if the key stores a String value.
- *
+ * Returns the Hashtable value for the String key. Returns null if not
+ * found. Throws exception if the key stores a String value.
+ *
* The Hashtable returned is actually a subclass of Hashtable that
- * lowercases all keys used to access the hashtable. Its purpose is to
+ * lowercases all keys used to access the hashtable. Its purpose is to
* to make lookups seemless, but be aware it is not a normal hashtable and
* might behave strangely in some cases (e.g., iterating keys)
- *
- * @param key The key to lookup (case-insensitive)
- * @return The hashtable value associated with the key. null if not found
+ *
+ * @param key The key to lookup (case-insensitive)
+ * @return The hashtable value associated with the key. null if not found
* or if the key is associated with a string-value.
*/
public <V> Hashtable<String, V> getExtDataInHashtable(String key);
-
/**
* Returns all the keys stored in ExtData
+ *
* @return Enumeration of all the keys.
*/
public Enumeration<String> getExtDataKeys();
@@ -403,24 +400,26 @@ public interface IRequest {
/**
* Stores an array of Strings in ExtData.
* The indices of the array are used as subkeys.
- * @param key the ExtData key
- * @param values the array of string values to store
+ *
+ * @param key the ExtData key
+ * @param values the array of string values to store
* @return False if the key is invalid
*/
public boolean setExtData(String key, String[] values);
/**
* Retrieves an array of Strings stored with the key.
- * This only works if the data was stored as an array. If the data
+ * This only works if the data was stored as an array. If the data
* is not correct, this method will return null.
- * @param key The ExtData key
- * @return The value. Null if not found or the data isn't an array.
+ *
+ * @param key The ExtData key
+ * @return The value. Null if not found or the data isn't an array.
*/
public String[] getExtDataInStringArray(String key);
/**
* Removes the value of an extdata attribute.
- *
+ *
* @param type key to delete
*/
void deleteExtData(String type);
@@ -431,90 +430,95 @@ public interface IRequest {
/**
* Helper method to add subkey/value pair to a ExtData hashtable.
- * If the hashtable it exists, the subkey/value are added to it. Otherwise
+ * If the hashtable it exists, the subkey/value are added to it. Otherwise
* a new hashtable is created.
- *
+ *
* The key and subkey are lowercased because LDAP does not preserve case.
- *
- * @param key The top level key
+ *
+ * @param key The top level key
* @param subkey The hashtable data key
- * @param value The hashtable value
+ * @param value The hashtable value
* @return False if the key or subkey are invalid
*/
public boolean setExtData(String key, String subkey, String value);
/**
* Helper method to retrieve an individual value from a Hashtable value.
- * @param key the ExtData key
- * @param subkey the key in the Hashtable value (case insensitive)
+ *
+ * @param key the ExtData key
+ * @param subkey the key in the Hashtable value (case insensitive)
* @return the value corresponding to the key/subkey
*/
public String getExtDataInString(String key, String subkey);
/**
- * Helper method to store an Integer value. It converts the integer value
+ * Helper method to store an Integer value. It converts the integer value
* to a String and stores it.
- *
- * @param key the ExtData key
- * @param value the Integer to store (as a String)
+ *
+ * @param key the ExtData key
+ * @param value the Integer to store (as a String)
* @return False if the key or value are invalid
*/
public boolean setExtData(String key, Integer value);
/**
- * Retrieves an integer value. Returns null if not found or
+ * Retrieves an integer value. Returns null if not found or
* the value can't be represented as an Integer.
- *
- * @param key The ExtData key to lookup
- * @return The integer value or null if not possible.
+ *
+ * @param key The ExtData key to lookup
+ * @return The integer value or null if not possible.
*/
public Integer getExtDataInInteger(String key);
/**
* Stores an array of Integers
- * @param key The extdata key
- * @param values The array of Integers to store
- * @return false if the key is invalid
+ *
+ * @param key The extdata key
+ * @param values The array of Integers to store
+ * @return false if the key is invalid
*/
public boolean setExtData(String key, Integer[] values);
/**
* Retrieves an array of Integers
- * @param key The extdata key
+ *
+ * @param key The extdata key
* @return The array of Integers or null on error.
*/
public Integer[] getExtDataInIntegerArray(String key);
/**
- * Helper method to store a BigInteger value. It converts the integer value
+ * Helper method to store a BigInteger value. It converts the integer value
* to a String and stores it.
- *
- * @param key the ExtData key
- * @param value the BigInteger to store (as a String)
+ *
+ * @param key the ExtData key
+ * @param value the BigInteger to store (as a String)
* @return False if the key or value are invalid
*/
public boolean setExtData(String key, BigInteger value);
/**
- * Retrieves a BigInteger value. Returns null if not found or
+ * Retrieves a BigInteger value. Returns null if not found or
* the value can't be represented as a BigInteger.
- *
- * @param key The ExtData key to lookup
- * @return The integer value or null if not possible.
+ *
+ * @param key The ExtData key to lookup
+ * @return The integer value or null if not possible.
*/
public BigInteger getExtDataInBigInteger(String key);
/**
* Stores an array of BigIntegers
- * @param key The extdata key
- * @param values The array of BigIntegers to store
- * @return false if the key is invalid
+ *
+ * @param key The extdata key
+ * @param values The array of BigIntegers to store
+ * @return false if the key is invalid
*/
public boolean setExtData(String key, BigInteger[] values);
/**
* Retrieves an array of BigIntegers
- * @param key The extdata key
+ *
+ * @param key The extdata key
* @return The array of BigIntegers or null on error.
*/
public BigInteger[] getExtDataInBigIntegerArray(String key);
@@ -522,102 +526,114 @@ public interface IRequest {
/**
* Helper method to store an exception.
* It actually stores the e.toString() value.
- *
- * @param key The ExtData key to store under
- * @param e The throwable to store
- * @return False if the key is invalid.
+ *
+ * @param key The ExtData key to store under
+ * @param e The throwable to store
+ * @return False if the key is invalid.
*/
public boolean setExtData(String key, Throwable e);
/**
* Stores a byte array as base64 encoded text
- * @param key The ExtData key
- * @param data The byte array to store
- * @return False if the key is invalid.
+ *
+ * @param key The ExtData key
+ * @param data The byte array to store
+ * @return False if the key is invalid.
*/
public boolean setExtData(String key, byte[] data);
/**
* Retrieves the data, which should be base64 encoded as a byte array.
- * @param key The ExtData key
- * @return The data, or null if an error occurs.
+ *
+ * @param key The ExtData key
+ * @return The data, or null if an error occurs.
*/
public byte[] getExtDataInByteArray(String key);
/**
* Stores a X509CertImpl as base64 encoded text using the getEncode()
* method.
- * @param key The ExtData key
- * @param data certificate
- * @return False if the key is invalid.
+ *
+ * @param key The ExtData key
+ * @param data certificate
+ * @return False if the key is invalid.
*/
public boolean setExtData(String key, X509CertImpl data);
/**
* Retrieves the data, which should be base64 encoded as a byte array.
- * @param key The ExtData key
- * @return The data, or null if an error occurs.
+ *
+ * @param key The ExtData key
+ * @return The data, or null if an error occurs.
*/
public X509CertImpl getExtDataInCert(String key);
/**
* Stores an array of X509CertImpls as a base64 encoded text.
+ *
* @param key The ExtData key
- * @param data The array of certs to store
+ * @param data The array of certs to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, X509CertImpl[] data);
/**
* Retrieves an array of X509CertImpl.
- * @param key The ExtData key
- * @return Array of certs, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return Array of certs, or null if not found or invalid data.
*/
public X509CertImpl[] getExtDataInCertArray(String key);
/**
* Stores a X509CertInfo as base64 encoded text using the getEncodedInfo()
* method.
- * @param key The ExtData key
- * @param data certificate
- * @return False if the key is invalid.
+ *
+ * @param key The ExtData key
+ * @param data certificate
+ * @return False if the key is invalid.
*/
public boolean setExtData(String key, X509CertInfo data);
/**
* Retrieves the data, which should be base64 encoded as a byte array.
- * @param key The ExtData key
- * @return The data, or null if an error occurs.
+ *
+ * @param key The ExtData key
+ * @return The data, or null if an error occurs.
*/
public X509CertInfo getExtDataInCertInfo(String key);
/**
* Stores an array of X509CertInfos as a base64 encoded text.
+ *
* @param key The ExtData key
- * @param data The array of cert infos to store
+ * @param data The array of cert infos to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, X509CertInfo[] data);
/**
* Retrieves an array of X509CertInfo.
- * @param key The ExtData key
- * @return Array of cert infos, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return Array of cert infos, or null if not found or invalid data.
*/
public X509CertInfo[] getExtDataInCertInfoArray(String key);
/**
* Stores an array of RevokedCertImpls as a base64 encoded text.
+ *
* @param key The ExtData key
- * @param data The array of cert infos to store
+ * @param data The array of cert infos to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, RevokedCertImpl[] data);
/**
* Retrieves an array of RevokedCertImpl.
- * @param key The ExtData key
- * @return Array of cert infos, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return Array of cert infos, or null if not found or invalid data.
*/
public RevokedCertImpl[] getExtDataInRevokedCertArray(String key);
@@ -625,42 +641,41 @@ public interface IRequest {
* Stores the contents of the String Vector in ExtData.
* TODO - as soon as we're allowed to use JDK5 this should be changed
* to use Vector<String> data.
- *
+ *
* Note that modifications to the Vector are not automatically reflected
- * after it is stored. You must call set() again to make the changes.
- *
- * @param key The extdata key to store
+ * after it is stored. You must call set() again to make the changes.
+ *
+ * @param key The extdata key to store
* @param data A vector of Strings to store
- * @return False on key error or invalid data.
+ * @return False on key error or invalid data.
*/
public boolean setExtData(String key, Vector<?> data);
/**
* Returns a vector of strings for the key.
* Note that the returned vector, if modified, does not make changes
- * in ExtData. You must call setExtData() to propogate changes back
+ * in ExtData. You must call setExtData() to propogate changes back
* into ExtData.
- *
- * @param key The extdata key
- * @return A Vector of strings, or null on error.
+ *
+ * @param key The extdata key
+ * @return A Vector of strings, or null on error.
*/
public Vector<String> getExtDataInStringVector(String key);
/**
* Gets boolean value for given type or default value
- * if attribute is absent.
- *
+ * if attribute is absent.
+ *
* @param type attribute type
* @param defVal default attribute value
* @return attribute value
*/
boolean getExtDataInBoolean(String type, boolean defVal);
-
/**
* Gets extdata boolean value for given type or default value
- * if attribute is absent for this request with this prefix.
- *
+ * if attribute is absent for this request with this prefix.
+ *
* @param prefix request prefix
* @param type attribute type
* @param defVal default attribute value
@@ -668,59 +683,64 @@ public interface IRequest {
*/
public boolean getExtDataInBoolean(String prefix, String type, boolean defVal);
-
/**
* Stores an AuthToken the same as a Hashtable.
+ *
* @param key The ExtData key
- * @param data The authtoken to store
+ * @param data The authtoken to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, IAuthToken data);
/**
* Retrieves an authtoken.
- * @param key The ExtData key
- * @return AuthToken, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return AuthToken, or null if not found or invalid data.
*/
public IAuthToken getExtDataInAuthToken(String key);
/**
* Stores a CertificateExtensions in extdata.
+ *
* @param key The ExtData key
- * @param data The CertificateExtensions to store
+ * @param data The CertificateExtensions to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, CertificateExtensions data);
/**
* Retrieves the CertificateExtensions associated with the key.
- * @param key The ExtData key
- * @return the object, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return the object, or null if not found or invalid data.
*/
public CertificateExtensions getExtDataInCertExts(String key);
/**
* Stores a CertificateSubjectName in extdata.
+ *
* @param key The ExtData key
- * @param data The CertificateSubjectName to store
+ * @param data The CertificateSubjectName to store
* @return False if the key or data is invalid.
*/
public boolean setExtData(String key, CertificateSubjectName data);
/**
* Retrieves the CertificateSubjectName associated with the key.
- * @param key The ExtData key
- * @return the object, or null if not found or invalid data.
+ *
+ * @param key The ExtData key
+ * @return the object, or null if not found or invalid data.
*/
public CertificateSubjectName getExtDataInCertSubjectName(String key);
/**
* This method returns an IAttrSet wrapper for the IRequest.
- * Use of this method is strongly discouraged. It provides extremely
+ * Use of this method is strongly discouraged. It provides extremely
* limited functionality, and is only provided for the two places IRequest
- * is being used as such in the code. If you are considering using this
+ * is being used as such in the code. If you are considering using this
* method, please don't.
- *
+ *
* @return IAttrSet wrapper with basic "get" functionality.
* @deprecated
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
index a01ceb8c..e207c001 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestList.java
@@ -17,41 +17,39 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.util.Enumeration;
-
/**
* An interface providing a list of RequestIds that match
- * some criteria. It could be a list of all elements in a
+ * some criteria. It could be a list of all elements in a
* queue, or just some defined sub-set.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRequestList
- extends Enumeration {
+ extends Enumeration {
/**
- * Gets the next RequestId from this list. null is
- * returned when there are no more elements in the list.
- * <p>
- * Callers should be sure there is another element in the
- * list by calling hasMoreElements first.
+ * Gets the next RequestId from this list. null is
+ * returned when there are no more elements in the list.
+ * <p>
+ * Callers should be sure there is another element in the list by calling hasMoreElements first.
* <p>
+ *
* @return next request id
*/
RequestId nextRequestId();
/**
* Gets next request from the list.
- *
+ *
* @return next request
*/
public Object nextRequest();
/**
* Gets next request Object from the list.
- *
+ *
* @return next request
*/
public IRequest nextRequestObject();
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestListener.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestListener.java
index a98cd747..8dc8a42a 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestListener.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestListener.java
@@ -17,23 +17,21 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* An interface that defines abilities of request listener,
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRequestListener {
/**
* Initializes request listener for the specific subsystem
- * and configuration store.
- *
+ * and configuration store.
+ *
* @param sub subsystem
* @param config configuration store
*/
@@ -41,14 +39,14 @@ public interface IRequestListener {
/**
* Accepts request.
- *
+ *
* @param request request
*/
- public void accept(IRequest request);
+ public void accept(IRequest request);
/**
* Sets attribute.
- *
+ *
* @param name attribute name
* @param val attribute value
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestNotifier.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestNotifier.java
index ba06c626..66bd3543 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestNotifier.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestNotifier.java
@@ -17,27 +17,25 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.util.Enumeration;
-
/**
* IRequestNotifier interface defines methods to register listeners,
- *
+ *
* @version $Revision$, $Date$
*/
public interface IRequestNotifier extends INotify {
/**
* Registers a request listener.
- *
+ *
* @param listener listener to be registered
*/
public void registerListener(IRequestListener listener);
/**
* Registers a request listener.
- *
+ *
* @param name listener name
* @param listener listener to be registered
*/
@@ -45,28 +43,28 @@ public interface IRequestNotifier extends INotify {
/**
* Removes listener from the list of registered listeners.
- *
+ *
* @param listener listener to be removed from the list
*/
public void removeListener(IRequestListener listener);
/**
* Removes listener from the list of registered listeners.
- *
+ *
* @param name listener name to be removed from the list
*/
public void removeListener(String name);
/**
* Gets list of listener names.
- *
+ *
* @return enumeration of listener names
*/
- public Enumeration<String> getListenerNames();
+ public Enumeration<String> getListenerNames();
/**
* Gets listener from the list of registered listeners.
- *
+ *
* @param name listener name
* @return listener
*/
@@ -74,55 +72,55 @@ public interface IRequestNotifier extends INotify {
/**
* Gets list of listeners.
- *
+ *
* @return enumeration of listeners
*/
- public Enumeration<IRequestListener> getListeners();
+ public Enumeration<IRequestListener> getListeners();
/**
* Gets request from publishing queue.
- *
+ *
* @return request
*/
public IRequest getRequest();
/**
* Gets number of requests in publishing queue.
- *
+ *
* @return number of requests in publishing queue
*/
public int getNumberOfRequests();
/**
* Checks if publishing queue is enabled.
- *
+ *
* @return true if publishing queue is enabled, false otherwise
*/
public boolean isPublishingQueueEnabled();
/**
* Removes a notifier thread from the pool of publishing queue threads.
- *
+ *
* @param notifierThread Thread
*/
public void removeNotifierThread(Thread notifierThread);
/**
* Notifies all registered listeners about request.
- *
+ *
* @param r request
*/
public void addToNotify(IRequest r);
/**
* Sets publishing queue parameters.
- *
+ *
* @param isPublishingQueueEnabled publishing queue switch
* @param publishingQueuePriorityLevel publishing queue priority level
* @param maxNumberOfPublishingThreads maximum number of publishing threads
* @param publishingQueuePageSize publishing queue page size
*/
- public void setPublishingQueue (boolean isPublishingQueueEnabled,
+ public void setPublishingQueue(boolean isPublishingQueueEnabled,
int publishingQueuePriorityLevel,
int maxNumberOfPublishingThreads,
int publishingQueuePageSize,
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestQueue.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestQueue.java
index 468336b4..5c5d13a6 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestQueue.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestQueue.java
@@ -22,54 +22,51 @@ import java.math.BigInteger;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.repository.IRepository;
-
/**
* The IRequestQueue interface defines the operations on
* a collection of requests within the certificate server.
* There are may several collections, such as KRA, RA and CA
- * requests. Each of these request collection has a defined
+ * requests. Each of these request collection has a defined
* set of policies, a notification service (for request
- * completion) and a service routine. The request queue
+ * completion) and a service routine. The request queue
* provides an interface for creating and viewing requests,
* as well as performing operations on them.
* <p>
+ *
* @version $Revision$ $Date$
*/
public interface IRequestQueue {
/**
- * Creates a new request object. A request id is
+ * Creates a new request object. A request id is
* assigned to it - see IRequest.getRequestId, and
* the status is set to RequestStatus.BEGIN
* <p>
- * The request is LOCKED. The caller MUST release the
- * request object by calling releaseRequest().
+ * The request is LOCKED. The caller MUST release the request object by calling releaseRequest().
* <p>
- * TODO: provide other required values (such as type
- * and sourceId)
- *
+ * TODO: provide other required values (such as type and sourceId)
+ *
* @param requestType request type
* @return new request
* @exception EBaseException failed to create new request
*/
public IRequest newRequest(String requestType)
- throws EBaseException;
+ throws EBaseException;
/**
- * Clones a request object. A new request id is assigned
- * and all attributes of the request is copied to cloned request,
- * except for the sourceID of the original request
+ * Clones a request object. A new request id is assigned
+ * and all attributes of the request is copied to cloned request,
+ * except for the sourceID of the original request
* (remote authority's request Id).
* <p>
- * The cloned request that is returned is LOCKED. The caller MUST
- * release the request object by calling releaseRequest().
- *
+ * The cloned request that is returned is LOCKED. The caller MUST release the request object by calling releaseRequest().
+ *
* @param r request to be cloned
* @return cloned request
* @exception EBaseException failed to clone request
*/
- public IRequest cloneRequest(IRequest r)
- throws EBaseException;
+ public IRequest cloneRequest(IRequest r)
+ throws EBaseException;
/**
* Gets the Request corresponding to id.
@@ -77,163 +74,145 @@ public interface IRequestQueue {
* to a valid request id.
* <p>
* Errors may be generated for other conditions.
- *
+ *
* @param id request id
* @return found request
* @exception EBaseException failed to access request queue
*/
public IRequest findRequest(RequestId id)
- throws EBaseException;
+ throws EBaseException;
/**
- * Begins processing for this request. This call
+ * Begins processing for this request. This call
* is valid only on requests with status BEGIN
* An error is generated for other cases.
- *
+ *
* @param req request to be processed
* @exception EBaseException failed to process request
*/
public void processRequest(IRequest req)
- throws EBaseException;
+ throws EBaseException;
/**
* Sets request scheduler.
- *
+ *
* @param scheduler request scheduler
*/
public void setRequestScheduler(IRequestScheduler scheduler);
/**
* Gets request scheduler.
- *
+ *
* @return request scheduler
*/
public IRequestScheduler getRequestScheduler();
/**
- * Puts a new request into the PENDING state. This call is
- * only valid for requests with status BEGIN. An error is
+ * Puts a new request into the PENDING state. This call is
+ * only valid for requests with status BEGIN. An error is
* generated for other cases.
* <p>
- * This call might be used by agent servlets that want to
- * copy a previous request, and resubmit it. By putting it
- * into PENDING state, the normal agent screens can be used
- * for further processing.
- *
+ * This call might be used by agent servlets that want to copy a previous request, and resubmit it. By putting it into PENDING state, the normal agent screens can be used for further processing.
+ *
* @param req
- * the request to mark PENDING
+ * the request to mark PENDING
* @exception EBaseException failed to mark request as pending
*/
public void markRequestPending(IRequest req)
- throws EBaseException;
+ throws EBaseException;
/**
- * Clones a request object and mark it pending. A new request id is assigned
- * and all attributes of the request is copied to cloned request,
- * except for the sourceID of the original request
+ * Clones a request object and mark it pending. A new request id is assigned
+ * and all attributes of the request is copied to cloned request,
+ * except for the sourceID of the original request
* (remote authority's request Id).
* <p>
- * The cloned request that is returned is LOCKED. The caller MUST
- * release the request object by calling releaseRequest().
- *
+ * The cloned request that is returned is LOCKED. The caller MUST release the request object by calling releaseRequest().
+ *
* @param r request to be cloned
* @return cloned request mark PENDING
* @exception EBaseException failed to clone or mark request
*/
- public IRequest cloneAndMarkPending(IRequest r)
- throws EBaseException;
+ public IRequest cloneAndMarkPending(IRequest r)
+ throws EBaseException;
/**
- * Approves a request. The request must be locked.
+ * Approves a request. The request must be locked.
* <p>
- * This call will fail if:
- * the request is not in PENDING state
- * the policy modules do not accept the request
+ * This call will fail if: the request is not in PENDING state the policy modules do not accept the request
* <p>
- * If the policy modules reject the request, then the request
- * will remain in the PENDING state. Messages from the policy
- * module can be display to the agent to indicate the source
- * of the problem.
+ * If the policy modules reject the request, then the request will remain in the PENDING state. Messages from the policy module can be display to the agent to indicate the source of the problem.
* <p>
- * The request processing code adds an AgentApproval to this
- * request that contains the authentication id of the agent. This
- * data is retrieved from the Session object (qv).
- *
+ * The request processing code adds an AgentApproval to this request that contains the authentication id of the agent. This data is retrieved from the Session object (qv).
+ *
* @param request
- * the request that is being approved
+ * the request that is being approved
* @exception EBaseException failed to approve request
*/
public void approveRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
- * Rejects a request. The request must be locked.
+ * Rejects a request. The request must be locked.
* <p>
- * This call will fail if:
- * the request is not in PENDING state
+ * This call will fail if: the request is not in PENDING state
* <p>
- * The agent servlet (or other application) may wish to store
- * AgentMessage values to indicate the reason for the action
- *
+ * The agent servlet (or other application) may wish to store AgentMessage values to indicate the reason for the action
+ *
* @param request
- * the request that is being rejected
+ * the request that is being rejected
* @exception EBaseException failed to reject request
*/
public void rejectRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
- * Cancels a request. The request must be locked.
+ * Cancels a request. The request must be locked.
* <p>
- * This call will fail if:
- * the request is not in PENDING state
+ * This call will fail if: the request is not in PENDING state
* <p>
- * The agent servlet (or other application) may wish to store
- * AgentMessage values to indicate the reason for the action
- *
+ * The agent servlet (or other application) may wish to store AgentMessage values to indicate the reason for the action
+ *
* @param request
- * the request that is being canceled
+ * the request that is being canceled
* @exception EBaseException failed to cancel request
*/
public void cancelRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
* Updates the request in the permanent data store.
* <p>
- * This call can be made after changing a value like source
- * id or owner, to force the new value to be written.
+ * This call can be made after changing a value like source id or owner, to force the new value to be written.
* <p>
* The request must be locked to make this call.
- *
+ *
* @param request
- * the request that is being updated
+ * the request that is being updated
* @exception EBaseException failed to update request
*/
public void updateRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
/**
* Returns an enumerator that lists all RequestIds in the
- * queue. The caller should use the RequestIds to locate
+ * queue. The caller should use the RequestIds to locate
* each request by calling findRequest().
* <p>
- * NOTE: This interface will not be useful for large databases.
- * This needs to be replace by a VLV (paged) search object.
- *
+ * NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
+ *
* @return request list
*/
public IRequestList listRequests();
/**
* Returns an enumerator that lists all RequestIds for requests
- * that are in the given status. For example, all the PENDING
+ * that are in the given status. For example, all the PENDING
* requests could be listed by specifying RequestStatus.PENDING
* as the <i>status</i> argument
* <p>
- * NOTE: This interface will not be useful for large databases.
- * This needs to be replace by a VLV (paged) search object.
- *
+ * NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
+ *
* @param status request status
* @return request list
*/
@@ -243,9 +222,8 @@ public interface IRequestQueue {
* Returns an enumerator that lists all RequestIds for requests
* that match the filter.
* <p>
- * NOTE: This interface will not be useful for large databases.
- * This needs to be replace by a VLV (paged) search object.
- *
+ * NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
+ *
* @param filter search filter
* @return request list
*/
@@ -255,9 +233,8 @@ public interface IRequestQueue {
* Returns an enumerator that lists all RequestIds for requests
* that match the filter.
* <p>
- * NOTE: This interface will not be useful for large databases.
- * This needs to be replace by a VLV (paged) search object.
- *
+ * NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
+ *
* @param filter search filter
* @param maxSize max size to return
* @return request list
@@ -268,9 +245,8 @@ public interface IRequestQueue {
* Returns an enumerator that lists all RequestIds for requests
* that match the filter.
* <p>
- * NOTE: This interface will not be useful for large databases.
- * This needs to be replace by a VLV (paged) search object.
- *
+ * NOTE: This interface will not be useful for large databases. This needs to be replace by a VLV (paged) search object.
+ *
* @param filter search filter
* @param maxSize max size to return
* @param timeLimit timeout value for the search
@@ -281,31 +257,33 @@ public interface IRequestQueue {
/**
* Gets requests that are pending on handling by the service
* <p>
+ *
* @return list of pending requests
*/
// public IRequestList listServicePendingRequests();
/**
* Locates a request from the SourceId.
- *
+ *
* @param id
- * a unique identifier for the record that is based on the source
- * of the request, and possibly an identify assigned by the source.
+ * a unique identifier for the record that is based on the source
+ * of the request, and possibly an identify assigned by the source.
* @return
- * The requestid corresponding to this source id. null is
- * returned if the source id does not exist.
+ * The requestid corresponding to this source id. null is
+ * returned if the source id does not exist.
*/
public RequestId findRequestBySourceId(String id);
/**
* Locates all requests with a particular SourceId.
* <p>
+ *
* @param id
- * an identifier for the record that is based on the source
- * of the request
+ * an identifier for the record that is based on the source
+ * of the request
* @return
- * A list of requests corresponding to this source id. null is
- * returned if the source id does not exist.
+ * A list of requests corresponding to this source id. null is
+ * returned if the source id does not exist.
*/
public IRequestList findRequestsBySourceId(String id);
@@ -313,6 +291,7 @@ public interface IRequestQueue {
* Releases the LOCK on a request obtained from findRequest() or
* newRequest()
* <p>
+ *
* @param r request
*/
public void releaseRequest(IRequest r);
@@ -320,19 +299,19 @@ public interface IRequestQueue {
/**
* Marks as serviced after destination authority has serviced request.
* Used by connector.
- *
+ *
* @param r request
*/
public void markAsServiced(IRequest r);
/**
- * Resends requests
+ * Resends requests
*/
public void recover();
/**
* Gets a pageable list of IRequest entries in this queue.
- *
+ *
* @param pageSize page size
* @return request list
*/
@@ -340,18 +319,19 @@ public interface IRequestQueue {
/**
* Gets a pageable list of IRequest entries in this queue.
- *
+ *
* @param filter search filter
* @param pageSize page size
* @param sortKey the attributes to sort by
* @return request list
*/
public IRequestVirtualList getPagedRequestsByFilter(String filter,
- int pageSize,
- String sortKey);
+ int pageSize,
+ String sortKey);
+
/**
* Gets a pageable list of IRequest entries in this queue.
- *
+ *
* @param fromId request id to start with
* @param filter search filter
* @param pageSize page size
@@ -359,14 +339,14 @@ public interface IRequestQueue {
* @return request list
*/
public IRequestVirtualList getPagedRequestsByFilter(RequestId fromId,
- String filter,
- int pageSize,
+ String filter,
+ int pageSize,
String sortKey);
/**
* Gets a pageable list of IRequest entries in this queue. This
* jumps right to the end of the list
- *
+ *
* @param fromId request id to start with
* @param jumpToEnd jump to end of list (set fromId to null)
* @param filter search filter
@@ -375,26 +355,24 @@ public interface IRequestQueue {
* @return request list
*/
public IRequestVirtualList getPagedRequestsByFilter(RequestId fromId,
- boolean jumpToEnd, String filter,
- int pageSize,
+ boolean jumpToEnd, String filter,
+ int pageSize,
String sortKey);
-
/**
* Retrieves the notifier for pending request.
- *
+ *
* @return notifier for pending request
*/
public INotify getPendingNotify();
-
- public BigInteger getLastRequestIdInRange(BigInteger reqId_low_bound, BigInteger reqId_upper_bound);
+ public BigInteger getLastRequestIdInRange(BigInteger reqId_low_bound, BigInteger reqId_upper_bound);
/**
* Resets serial number.
*/
public void resetSerialNumber(BigInteger serial) throws EBaseException;
-
+
/**
* Removes all objects with this repository.
*/
@@ -402,7 +380,7 @@ public interface IRequestQueue {
/**
* Gets request repository.
- *
+ *
* @return request repository
*/
public IRepository getRequestRepository();
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestRecord.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestRecord.java
index 53a3e37b..53531b13 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestRecord.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestRecord.java
@@ -17,22 +17,21 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.dbs.IDBObj;
-
/**
* A request record is the stored version of a request.
* It has a set of attributes that are mapped into LDAP
* attributes for actual directory operations.
* <p>
+ *
* @version $Revision$ $Date$
*/
public interface IRequestRecord
- extends IDBObj {
+ extends IDBObj {
//
// The names of the attributes stored in this record
//
@@ -64,21 +63,21 @@ public interface IRequestRecord
/**
* Gets the request id.
- *
+ *
* @return request id
*/
public RequestId getRequestId();
/**
* Gets attribute names of the request.
- *
+ *
* @return list of attribute names
*/
public Enumeration<String> getAttrNames();
/**
* Gets the request attribute value by the name.
- *
+ *
* @param name attribute name
* @return attribute value
*/
@@ -86,7 +85,7 @@ public interface IRequestRecord
/**
* Sets new attribute for the request.
- *
+ *
* @param name attribute name
* @param o attribute value
*/
@@ -94,15 +93,15 @@ public interface IRequestRecord
/**
* Removes attribute from the request.
- *
+ *
* @param name attribute name
*/
public void delete(String name)
- throws EBaseException;
+ throws EBaseException;
/**
* Gets attribute list of the request.
- *
+ *
* @return attribute list
*/
public Enumeration<String> getElements();
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestScheduler.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestScheduler.java
index 198092fc..5012f5b0 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestScheduler.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestScheduler.java
@@ -17,11 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
//import java.io.Serializable;
-
-
/**
* This is an interface to a request scheduler that prioritizes
* the threads based on the request processing order.
@@ -34,14 +31,14 @@ public interface IRequestScheduler {
/**
* Request entered the request queue processing.
- *
+ *
* @param r request
*/
public void requestIn(IRequest r);
/**
* Request exited the request queue processing.
- *
+ *
* @param r request
*/
public void requestOut(IRequest r);
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
index c32c6698..164e84a3 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestSubsystem.java
@@ -17,14 +17,13 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* This interface defines storage of request objects
* in the local database.
* <p>
+ *
* @version $Revision$, $Date$
*/
public interface IRequestSubsystem {
@@ -32,74 +31,75 @@ public interface IRequestSubsystem {
/**
* Creates a new request queue.
- * (Currently unimplemented. Just use getRequestQueue to create
- * an in-memory queue.)
+ * (Currently unimplemented. Just use getRequestQueue to create
+ * an in-memory queue.)
* <p>
+ *
* @param name The name of the queue object. This name can be used
- * in getRequestQueue to retrieve the queue later.
+ * in getRequestQueue to retrieve the queue later.
* @exception EBaseException failed to create request queue
*/
public void createRequestQueue(String name)
- throws EBaseException;
+ throws EBaseException;
/**
- * Retrieves a request queue. This operation should only be done
- * once on each queue. For example, the RA subsystem should retrieve
+ * Retrieves a request queue. This operation should only be done
+ * once on each queue. For example, the RA subsystem should retrieve
* its queue, and store it somewhere for use by related services, and
* servlets.
* <p>
- * WARNING: retrieving the same queue twice with result in multi-thread
- * race conditions.
+ * WARNING: retrieving the same queue twice with result in multi-thread race conditions.
* <p>
+ *
* @param name
- * the name of the request queue. (Ex: "ca" "ra")
+ * the name of the request queue. (Ex: "ca" "ra")
* @param p
- * A policy enforcement module. This object is called to make
- * adjustments to the request, and decide whether it needs agent
- * approval.
+ * A policy enforcement module. This object is called to make
+ * adjustments to the request, and decide whether it needs agent
+ * approval.
* @param s
- * The service object. This object actually performs the request
- * after it is finalized and approved.
+ * The service object. This object actually performs the request
+ * after it is finalized and approved.
* @param n
- * A notifier object (optional). The notify() method of this object
- * is invoked when the request is completed (COMPLETE, REJECTED or
- * CANCELED states).
+ * A notifier object (optional). The notify() method of this object
+ * is invoked when the request is completed (COMPLETE, REJECTED or
+ * CANCELED states).
* @exception EBaseException failed to retrieve request queue
*/
public IRequestQueue
- getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n)
- throws EBaseException;
+ getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n)
+ throws EBaseException;
/**
- * Retrieves a request queue. This operation should only be done
- * once on each queue. For example, the RA subsystem should retrieve
+ * Retrieves a request queue. This operation should only be done
+ * once on each queue. For example, the RA subsystem should retrieve
* its queue, and store it somewhere for use by related services, and
* servlets.
* <p>
- * WARNING: retrieving the same queue twice with result in multi-thread
- * race conditions.
+ * WARNING: retrieving the same queue twice with result in multi-thread race conditions.
* <p>
+ *
* @param name
- * the name of the request queue. (Ex: "ca" "ra")
+ * the name of the request queue. (Ex: "ca" "ra")
* @param p
- * A policy enforcement module. This object is called to make
- * adjustments to the request, and decide whether it needs agent
- * approval.
+ * A policy enforcement module. This object is called to make
+ * adjustments to the request, and decide whether it needs agent
+ * approval.
* @param s
- * The service object. This object actually performs the request
- * after it is finalized and approved.
+ * The service object. This object actually performs the request
+ * after it is finalized and approved.
* @param n
- * A notifier object (optional). The notify() method of this object
- * is invoked when the request is completed (COMPLETE, REJECTED or
- * CANCELED states).
+ * A notifier object (optional). The notify() method of this object
+ * is invoked when the request is completed (COMPLETE, REJECTED or
+ * CANCELED states).
* @param pendingNotifier
- * A notifier object (optional). Like the 'n' argument, except the
- * notification happens if the request is made PENDING. May be the
- * same as the 'n' argument if desired.
+ * A notifier object (optional). Like the 'n' argument, except the
+ * notification happens if the request is made PENDING. May be the
+ * same as the 'n' argument if desired.
* @exception EBaseException failed to retrieve request queue
*/
public IRequestQueue
- getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n,
- INotify pendingNotifier)
- throws EBaseException;
+ getRequestQueue(String name, int increment, IPolicy p, IService s, INotify n,
+ INotify pendingNotifier)
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IRequestVirtualList.java b/pki/base/common/src/com/netscape/certsrv/request/IRequestVirtualList.java
index 4d877a77..540ec679 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IRequestVirtualList.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IRequestVirtualList.java
@@ -17,25 +17,25 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* This interface defines access to request virtual list.
* <p>
+ *
* @version $Revision$, $Date$
*/
public interface IRequestVirtualList {
/**
- * Gets the total size of the result set. Elements of the
+ * Gets the total size of the result set. Elements of the
* list are numbered from 0..(size-1)
- *
+ *
* @return size of the result set
*/
int getSize();
/**
* Gets the element at the specified index
- *
+ *
* @param index index of the element
* @return specified request
*/
@@ -43,7 +43,7 @@ public interface IRequestVirtualList {
/**
* Gets the current index
- *
+ *
* @return current index
*/
int getCurrentIndex();
diff --git a/pki/base/common/src/com/netscape/certsrv/request/IService.java b/pki/base/common/src/com/netscape/certsrv/request/IService.java
index aeaf757a..adf2c509 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/IService.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/IService.java
@@ -17,15 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* This interface defines how requests are serviced.
* This covers certificate generation, revocation, renewals,
* revocation checking, and much more.
* <p>
+ *
* @version $Revision$, $Date$
*/
public interface IService {
@@ -34,15 +33,16 @@ public interface IService {
* Performs the service (such as certificate generation)
* represented by this request.
* <p>
+ *
* @param request
- * The request that needs service. The service may use
- * attributes stored in the request, and may update the
- * values, or store new ones.
+ * The request that needs service. The service may use
+ * attributes stored in the request, and may update the
+ * values, or store new ones.
* @return
- * an indication of whether this request is still pending.
- * 'false' means the request will wait for further notification.
+ * an indication of whether this request is still pending.
+ * 'false' means the request will wait for further notification.
* @exception EBaseException indicates major processing failure.
*/
boolean serviceRequest(IRequest request)
- throws EBaseException;
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/PolicyMessage.java b/pki/base/common/src/com/netscape/certsrv/request/PolicyMessage.java
index 13cec161..c21b8ca4 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/PolicyMessage.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/PolicyMessage.java
@@ -17,18 +17,17 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A (localizable) message recorded by a policy module that describes
* the reason for rejecting a request.
* <p>
+ *
* @version $Revision$, $Date$
*/
public class PolicyMessage
- extends EBaseException {
+ extends EBaseException {
/**
*
@@ -38,6 +37,7 @@ public class PolicyMessage
/**
* Class constructor that registers policy message.
* <p>
+ *
* @param message message string
*/
public PolicyMessage(String message) {
diff --git a/pki/base/common/src/com/netscape/certsrv/request/PolicyResult.java b/pki/base/common/src/com/netscape/certsrv/request/PolicyResult.java
index 2750e3d8..c7cad94f 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/PolicyResult.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/PolicyResult.java
@@ -17,10 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* This class defines results for policy actions.
- *
+ *
* @version $Revision$, $Date$
*/
public final class PolicyResult {
diff --git a/pki/base/common/src/com/netscape/certsrv/request/RequestId.java b/pki/base/common/src/com/netscape/certsrv/request/RequestId.java
index 01bd65d3..31681675 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/RequestId.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/RequestId.java
@@ -17,32 +17,34 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* The RequestId class represents the identifier for a particular
- * request within a request queue. This identifier may be used to
+ * request within a request queue. This identifier may be used to
* retrieve the request object itself from the request queue.
* <p>
+ *
* @version $Revision$ $Date$
*/
public final class RequestId {
/**
- * Creates a new RequestId from its string representation.
+ * Creates a new RequestId from its string representation.
* <p>
- * @param id
- * a string containing the decimal (base 10) value for the identifier.
+ *
+ * @param id
+ * a string containing the decimal (base 10) value for the identifier.
*/
public RequestId(String id) {
mString = id;
}
/**
- * Converts the RequestId into its string representation. The string
+ * Converts the RequestId into its string representation. The string
* form can be stored in a database (such as the LDAP directory)
* <p>
+ *
* @return
- * a string containing the decimal (base 10) value for the identifier.
+ * a string containing the decimal (base 10) value for the identifier.
*/
public String toString() {
return mString;
@@ -51,6 +53,7 @@ public final class RequestId {
/**
* Implements Object.hashCode.
* <p>
+ *
* @return hash code of the object
*/
public int hashCode() {
@@ -60,7 +63,8 @@ public final class RequestId {
/**
* Implements Object.equals.
* <p>
- * @param obj object to compare
+ *
+ * @param obj object to compare
* @return true if objects are equal
*/
public boolean equals(Object obj) {
diff --git a/pki/base/common/src/com/netscape/certsrv/request/RequestStatus.java b/pki/base/common/src/com/netscape/certsrv/request/RequestStatus.java
index ad3b91e7..f58a568d 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/RequestStatus.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/RequestStatus.java
@@ -17,21 +17,20 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.request;
-
/**
* The RequestStatus class represents the current state of a request
- * in a request queue. The state of the request changes as actions
+ * in a request queue. The state of the request changes as actions
* are performed on it.
- *
+ *
* The request is created in the BEGIN state, then general progresses
* through the PENDING, APPROVED, SVC_PENDING, and COMPLETE states.
* Some requests may bypass the PENDING state if no agent action is
* required.
- *
- * Requests may be CANCELED (not implemented) or REJECTED. These are
+ *
+ * Requests may be CANCELED (not implemented) or REJECTED. These are
* error conditions, and usually result because the request was invalid
* or was not approved by an agent.
- *
+ *
* @version $Revision$ $Date$
*/
public final class RequestStatus {
@@ -46,7 +45,7 @@ public final class RequestStatus {
/**
* The initial state of a request. Requests in this state have not
* been review by policy.
- *
+ *
* While in this state the source of the request (usually the servlet,
* but it could be some other protocol module, such as email)
* should populate the request with data need to service it.
@@ -57,7 +56,7 @@ public final class RequestStatus {
* The state of a request that is waiting for action by an agent.
* When the agent approves or rejects the request, process will
* continue as appropriate.
- *
+ *
* In this state there may be PolicyMessages present that indicate
* the reason for the pending status.
*/
@@ -67,7 +66,7 @@ public final class RequestStatus {
* The state of a request that has been approved by an agent, or
* automatically by the policy engine, but have not been successfully
* transmitted to the service module.
- *
+ *
* These requests are resent to the service during the recovery
* process that runs at server startup.
*/
@@ -75,24 +74,24 @@ public final class RequestStatus {
/**
* The state of a request that has been sent to the service, but
- * has not been fully processed. The service will invoke the
+ * has not been fully processed. The service will invoke the
* serviceComplete() method to cause processing to continue.
*/
public static RequestStatus SVC_PENDING =
- new RequestStatus(SVC_PENDING_STRING);
+ new RequestStatus(SVC_PENDING_STRING);
/**
- * Not implemented. This is intended to be a final state that is
+ * Not implemented. This is intended to be a final state that is
* reached when a request is removed from the processing queue without
- * normal notification occurring. (see REJECTED)
+ * normal notification occurring. (see REJECTED)
*/
public static RequestStatus CANCELED = new RequestStatus(CANCELED_STRING);
/**
- * The state of a request after it is rejected. When a request is
+ * The state of a request after it is rejected. When a request is
* rejected, the notifier is called prior to making the finl status
* change.
- *
+ *
* Rejected requests may have PolicyMessages indicating the reason for
* the rejection, or AgentMessages, which allow the agent to give
* reasons for the action.
@@ -100,8 +99,8 @@ public final class RequestStatus {
public static RequestStatus REJECTED = new RequestStatus(REJECTED_STRING);
/**
- * The normal final state of a request. The completion status attribute
- * gives other information about the request. The request is not
+ * The normal final state of a request. The completion status attribute
+ * gives other information about the request. The request is not
* necessarily successful, but may indicated that service processing
* did not succeed.
*/
@@ -111,19 +110,27 @@ public final class RequestStatus {
* Converts a string name for a request status into the
* request status enum object.
* <p>
+ *
* @param s
- * The string representation of the state.
+ * The string representation of the state.
* @return
- * request status
+ * request status
*/
public static RequestStatus fromString(String s) {
- if (s.equals(BEGIN_STRING)) return BEGIN;
- if (s.equals(PENDING_STRING)) return PENDING;
- if (s.equals(APPROVED_STRING)) return APPROVED;
- if (s.equals(SVC_PENDING_STRING)) return SVC_PENDING;
- if (s.equals(CANCELED_STRING)) return CANCELED;
- if (s.equals(REJECTED_STRING)) return REJECTED;
- if (s.equals(COMPLETE_STRING)) return COMPLETE;
+ if (s.equals(BEGIN_STRING))
+ return BEGIN;
+ if (s.equals(PENDING_STRING))
+ return PENDING;
+ if (s.equals(APPROVED_STRING))
+ return APPROVED;
+ if (s.equals(SVC_PENDING_STRING))
+ return SVC_PENDING;
+ if (s.equals(CANCELED_STRING))
+ return CANCELED;
+ if (s.equals(REJECTED_STRING))
+ return REJECTED;
+ if (s.equals(COMPLETE_STRING))
+ return COMPLETE;
return null;
}
@@ -131,16 +138,16 @@ public final class RequestStatus {
/**
* Returns the string form of the RequestStatus, which may be used
* to record the status in a database.
- *
+ *
* @return request status
*/
public String toString() {
return mString;
}
-
+
/**
* Class constructor. Creates request status from the string.
- *
+ *
* @param string string describing request status
*/
private RequestStatus(String string) {
@@ -151,21 +158,25 @@ public final class RequestStatus {
/**
* Compares request status with specified string.
- *
+ *
* @param string string describing request status
*/
public boolean equals(String string) {
- if (string.equals(mString)) return true;
- else return false;
+ if (string.equals(mString))
+ return true;
+ else
+ return false;
}
-
+
/**
* Compares current request status with request status.
- *
+ *
* @param rs request status
*/
public boolean equals(RequestStatus rs) {
- if (mString.equals(rs.mString)) return true;
- else return false;
+ if (mString.equals(rs.mString))
+ return true;
+ else
+ return false;
}
}
diff --git a/pki/base/common/src/com/netscape/certsrv/request/ldap/IRequestMod.java b/pki/base/common/src/com/netscape/certsrv/request/ldap/IRequestMod.java
index 1fc0657f..c1e153a8 100644
--- a/pki/base/common/src/com/netscape/certsrv/request/ldap/IRequestMod.java
+++ b/pki/base/common/src/com/netscape/certsrv/request/ldap/IRequestMod.java
@@ -25,31 +25,31 @@ import com.netscape.certsrv.request.RequestStatus;
/**
* This interface defines how to update request record.
* <p>
+ *
* @version $Revision$, $Date$
*/
-public interface IRequestMod
-{
- /**
+public interface IRequestMod {
+ /**
* Modifies request status.
- *
+ *
* @param r request
* @param s request status
*/
- void modRequestStatus(IRequest r, RequestStatus s);
+ void modRequestStatus(IRequest r, RequestStatus s);
- /**
+ /**
* Modifies request creation time.
- *
+ *
* @param r request
* @param d date
*/
- void modCreationTime(IRequest r, Date d);
+ void modCreationTime(IRequest r, Date d);
- /**
+ /**
* Modifies request modification time.
- *
+ *
* @param r request
* @param d date
*/
- void modModificationTime(IRequest r, Date d);
+ void modModificationTime(IRequest r, Date d);
}
diff --git a/pki/base/common/src/com/netscape/certsrv/security/Credential.java b/pki/base/common/src/com/netscape/certsrv/security/Credential.java
index 9aff49ad..48038a40 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/Credential.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/Credential.java
@@ -17,12 +17,11 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
/**
* A class represents a credential. A credential contains
* information that identifies a user. In this case,
* identifier and password are used.
- *
+ *
* @version $Revision$, $Date$
*/
public class Credential implements java.io.Serializable {
@@ -36,7 +35,7 @@ public class Credential implements java.io.Serializable {
/**
* Constructs credential object.
- *
+ *
* @param id user id
* @param password user password
*/
@@ -44,10 +43,10 @@ public class Credential implements java.io.Serializable {
mId = id;
mPassword = password;
}
-
+
/**
* Retrieves identifier.
- *
+ *
* @return user id
*/
public String getIdentifier() {
@@ -56,7 +55,7 @@ public class Credential implements java.io.Serializable {
/**
* Retrieves password.
- *
+ *
* @return user password
*/
public String getPassword() {
diff --git a/pki/base/common/src/com/netscape/certsrv/security/ICryptoSubsystem.java b/pki/base/common/src/com/netscape/certsrv/security/ICryptoSubsystem.java
index ab910b37..50a0e1a1 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/ICryptoSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/ICryptoSubsystem.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.io.IOException;
import java.security.KeyPair;
import java.security.cert.CertificateException;
@@ -37,11 +36,10 @@ import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.common.NameValuePairs;
-
/**
* This interface represents the cryptographics subsystem
* that provides all the security related functions.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICryptoSubsystem extends ISubsystem {
@@ -51,7 +49,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves a list of nicknames of certificates that are
* in the installed tokens.
- *
+ *
* @return a list of comma-separated nicknames
* @exception EBaseException failed to retrieve nicknames
*/
@@ -59,7 +57,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves certificate in pretty-print format by the nickname.
- *
+ *
* @param nickname nickname of certificate
* @param date not after of the returned certificate must be date
* @param locale user locale
@@ -67,50 +65,53 @@ public interface ICryptoSubsystem extends ISubsystem {
* @exception EBaseException failed to retrieve certificate
*/
public String getCertPrettyPrint(String nickname, String date,
- Locale locale) throws EBaseException;
+ Locale locale) throws EBaseException;
+
public String getRootCertTrustBit(String nickname, String serialno,
- String issuerName) throws EBaseException;
- public String getCertPrettyPrint(String nickname, String serialno,
- String issuername, Locale locale) throws EBaseException;
- public String getCertPrettyPrintAndFingerPrint(String nickname, String serialno,
- String issuername, Locale locale) throws EBaseException;
+ String issuerName) throws EBaseException;
+
+ public String getCertPrettyPrint(String nickname, String serialno,
+ String issuername, Locale locale) throws EBaseException;
+
+ public String getCertPrettyPrintAndFingerPrint(String nickname, String serialno,
+ String issuername, Locale locale) throws EBaseException;
/**
* Retrieves the certificate in the pretty print format.
- *
+ *
* @param b64E certificate in mime-64 encoded format
* @param locale end user locale
* @return certificate in pretty-print format
* @exception EBaseException failed to retrieve certificate
*/
- public String getCertPrettyPrint(String b64E, Locale locale)
- throws EBaseException;
+ public String getCertPrettyPrint(String b64E, Locale locale)
+ throws EBaseException;
/**
* Imports certificate into the server.
- *
+ *
* @param b64E certificate in mime-64 encoded format
* @param nickname nickname for the importing certificate
* @param certType certificate type
* @exception EBaseException failed to import certificate
*/
public void importCert(String b64E, String nickname, String certType)
- throws EBaseException;
+ throws EBaseException;
/**
* Imports certificate into the server.
- *
+ *
* @param signedCert certificate
* @param nickname nickname for the importing certificate
* @param certType certificate type
* @exception EBaseException failed to import certificate
*/
public void importCert(X509CertImpl signedCert, String nickname,
- String certType) throws EBaseException;
+ String certType) throws EBaseException;
/**
* Generates a key pair based on the given parameters.
- *
+ *
* @param properties key parameters
* @return key pair
* @exception EBaseException failed to generate key pair
@@ -119,7 +120,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves the key pair based on the given nickname.
- *
+ *
* @param nickname nickname of the public key
* @exception EBaseException failed to retrieve key pair
*/
@@ -127,7 +128,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Generates a key pair based on the given parameters.
- *
+ *
* @param tokenName name of token where key is generated
* @param alg key algorithm
* @param keySize key size
@@ -135,11 +136,11 @@ public interface ICryptoSubsystem extends ISubsystem {
* @exception EBaseException failed to generate key pair
*/
public KeyPair getKeyPair(String tokenName, String alg,
- int keySize) throws EBaseException;
+ int keySize) throws EBaseException;
/**
* Generates a key pair based on the given parameters.
- *
+ *
* @param tokenName name of token where key is generated
* @param alg key algorithm
* @param keySize key size
@@ -148,11 +149,11 @@ public interface ICryptoSubsystem extends ISubsystem {
* @exception EBaseException failed to generate key pair
*/
public KeyPair getKeyPair(String tokenName, String alg,
- int keySize, PQGParams pqg) throws EBaseException;
+ int keySize, PQGParams pqg) throws EBaseException;
/**
* Generates an ECC key pair based on the given parameters.
- *
+ *
* @param properties key parameters
* @return key pair
* @exception EBaseException failed to generate key pair
@@ -161,7 +162,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Generates an ECC key pair based on the given parameters.
- *
+ *
* @param token token name
* @param curveName curve name
* @param certType type of cert(sslserver etc..)
@@ -173,16 +174,16 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves the signature algorithm of the certificate named
* by the given nickname.
- *
+ *
* @param nickname nickname of the certificate
* @return signature algorithm
- * @exception EBaseException failed to retrieve signature
+ * @exception EBaseException failed to retrieve signature
*/
public String getSignatureAlgorithm(String nickname) throws EBaseException;
/**
* Checks if the given dn is a valid distinguished name.
- *
+ *
* @param dn distinguished name
* @exception EBaseException failed to check
*/
@@ -192,7 +193,7 @@ public interface ICryptoSubsystem extends ISubsystem {
* Retrieves CA's signing algorithm id. If it is DSA algorithm,
* algorithm is constructed by reading the parameters
* ca.dsaP, ca.dsaQ, ca.dsaG.
- *
+ *
* @param algname DSA or RSA
* @param store configuration store.
* @return algorithm id
@@ -203,57 +204,57 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves subject name of the certificate that is identified by
* the given nickname.
- *
+ *
* @param tokenname name of token where the nickname is valid
* @param nickname nickname of the certificate
* @return subject name
* @exception EBaseException failed to get subject name
*/
public String getCertSubjectName(String tokenname, String nickname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves extensions of the certificate that is identified by
* the given nickname.
- *
+ *
* @param tokenname name of token where the nickname is valid
* @param nickname nickname of the certificate
* @return certificate extensions
* @exception EBaseException failed to get extensions
*/
public CertificateExtensions getExtensions(String tokenname, String nickname
- )
- throws EBaseException;
+ )
+ throws EBaseException;
/**
* Deletes certificate of the given nickname.
- *
+ *
* @param nickname nickname of the certificate
* @param pathname path where a copy of the deleted certificate is stored
* @exception EBaseException failed to delete certificate
*/
- public void deleteTokenCertificate(String nickname, String pathname)
- throws EBaseException;
+ public void deleteTokenCertificate(String nickname, String pathname)
+ throws EBaseException;
/**
* Delete certificate of the given nickname.
- *
+ *
* @param nickname nickname of the certificate
- * @param notAfterTime The notAfter of the certificate. It
- * is possible to ge t multiple certificates under
- * the same nickname. If one of the certificates match
- * the notAfterTime, then the certificate will get
- * deleted. The format of the notAfterTime has to be
- * in "MMMMM dd, yyyy HH:mm:ss" format.
+ * @param notAfterTime The notAfter of the certificate. It
+ * is possible to ge t multiple certificates under
+ * the same nickname. If one of the certificates match
+ * the notAfterTime, then the certificate will get
+ * deleted. The format of the notAfterTime has to be
+ * in "MMMMM dd, yyyy HH:mm:ss" format.
* @exception EBaseException failed to delete certificate
*/
- public void deleteCert(String nickname, String notAfterTime)
- throws EBaseException;
+ public void deleteCert(String nickname, String notAfterTime)
+ throws EBaseException;
/**
* Retrieves the subject DN of the certificate identified by
* the nickname.
- *
+ *
* @param nickname nickname of the certificate
* @return subject distinguished name
* @exception EBaseException failed to retrieve subject DN
@@ -262,19 +263,19 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Trusts a certificate for all available purposes.
- *
+ *
* @param nickname nickname of the certificate
* @param date certificate's not before
* @param trust "Trust" or other
* @exception EBaseException failed to trust certificate
*/
- public void trustCert(String nickname, String date, String trust)
- throws EBaseException;
+ public void trustCert(String nickname, String date, String trust)
+ throws EBaseException;
/**
* Checks if the given base-64 encoded string contains an extension
* or a sequence of extensions.
- *
+ *
* @param ext extension or sequence of extension encoded in base-64
* @exception EBaseException failed to check encoding
*/
@@ -282,16 +283,17 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Gets all certificates on all tokens for Certificate Database Management.
- *
+ *
* @return all certificates
* @exception EBaseException failed to retrieve certificates
*/
public NameValuePairs getAllCertsManage() throws EBaseException;
+
public NameValuePairs getUserCerts() throws EBaseException;
/**
* Gets all CA certificates on all tokens.
- *
+ *
* @return all CA certificates
* @exception EBaseException failed to retrieve certificates
*/
@@ -300,17 +302,17 @@ public interface ICryptoSubsystem extends ISubsystem {
public NameValuePairs getRootCerts() throws EBaseException;
public void setRootCertTrust(String nickname, String serialno,
- String issuername, String trust) throws EBaseException;
+ String issuername, String trust) throws EBaseException;
public void deleteRootCert(String nickname, String serialno,
- String issuername) throws EBaseException;
+ String issuername) throws EBaseException;
public void deleteUserCert(String nickname, String serialno,
- String issuername) throws EBaseException;
+ String issuername) throws EBaseException;
/**
* Retrieves PQG parameters based on key size.
- *
+ *
* @param keysize key size
* @return pqg parameters
*/
@@ -318,91 +320,91 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves PQG parameters based on key size.
- *
+ *
* @param keysize key size
* @param store configuration store
* @return pqg parameters
*/
public PQGParams getCAPQG(int keysize, IConfigStore store)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves extensions of the certificate that is identified by
* the given nickname.
- *
+ *
* @param tokenname token name
* @param nickname nickname
* @return certificate extensions
*/
public CertificateExtensions getCertExtensions(String tokenname, String nickname
- )
- throws NotInitializedException, TokenException, ObjectNotFoundException,
+ )
+ throws NotInitializedException, TokenException, ObjectNotFoundException,
- IOException, CertificateException;
+ IOException, CertificateException;
/**
* Checks if the given token is logged in.
- *
+ *
* @param name token name
* @return true if token is logged in
- * @exception EBaseException failed to login
+ * @exception EBaseException failed to login
*/
public boolean isTokenLoggedIn(String name) throws EBaseException;
/**
* Logs into token.
- *
+ *
* @param tokenName name of the token
* @param pwd token password
* @exception EBaseException failed to login
*/
- public void loggedInToken(String tokenName, String pwd)
- throws EBaseException;
+ public void loggedInToken(String tokenName, String pwd)
+ throws EBaseException;
/**
* Generates certificate request from the given key pair.
- *
+ *
* @param subjectName subject name to use in the request
* @param kp key pair that contains public key material
* @return certificate request in base-64 encoded format
* @exception EBaseException failed to generate request
*/
public String getCertRequest(String subjectName, KeyPair kp)
- throws EBaseException;
+ throws EBaseException;
/**
* Checks if fortezza is enabled.
- *
+ *
* @return "true" if fortezza is enabled
*/
public String isCipherFortezza() throws EBaseException;
/**
* Retrieves the SSL cipher version.
- *
+ *
* @return cipher version (i.e. "cipherdomestic")
*/
public String getCipherVersion() throws EBaseException;
/**
* Retrieves the cipher preferences.
- *
+ *
* @return cipher preferences (i.e. "rc4export,rc2export,...")
*/
public String getCipherPreferences() throws EBaseException;
/**
* Sets the current SSL cipher preferences.
- *
+ *
* @param cipherPrefs cipher preferences (i.e. "rc4export,rc2export,...")
* @exception EBaseException failed to set cipher preferences
*/
public void setCipherPreferences(String cipherPrefs)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves a list of currently registered token names.
- *
+ *
* @return list of token names
* @exception EBaseException failed to retrieve token list
*/
@@ -411,7 +413,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves all certificates. The result list will not
* contain the token tag.
- *
+ *
* @param name token name
* @return list of certificates without token tag
* @exception EBaseException failed to retrieve
@@ -420,7 +422,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Retrieves the token name of the internal (software) token.
- *
+ *
* @return the token name
* @exception EBaseException failed to retrieve token name
*/
@@ -429,7 +431,7 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Checks to see if the certificate of the given nickname is a
* CA certificate.
- *
+ *
* @param fullNickname nickname of the certificate to check
* @return true if it is a CA certificate
* @exception EBaseException failed to check
@@ -438,27 +440,27 @@ public interface ICryptoSubsystem extends ISubsystem {
/**
* Adds the specified number of bits of entropy from the system
- * entropy generator to the RNG of the default PKCS#11 RNG token.
+ * entropy generator to the RNG of the default PKCS#11 RNG token.
* The default token is set using the modutil command.
- * Note that the system entropy generator (usually /dev/random)
- * will block until sufficient entropy is collected.
- *
+ * Note that the system entropy generator (usually /dev/random)
+ * will block until sufficient entropy is collected.
+ *
* @param bits number of bits of entropy
* @exception org.mozilla.jss.util.NotImplementedException If the Crypto device does not support
- * adding entropy
- * @exception TokenException If there was some other problem with the Crypto device
- * @exception IOException If there was a problem reading from the /dev/random
+ * adding entropy
+ * @exception TokenException If there was some other problem with the Crypto device
+ * @exception IOException If there was a problem reading from the /dev/random
*/
public void addEntropy(int bits)
- throws org.mozilla.jss.util.NotImplementedException,
+ throws org.mozilla.jss.util.NotImplementedException,
IOException,
TokenException;
/**
* Signs the certificate template into the given data and returns
* a signed certificate.
- *
+ *
* @param data data that contains certificate template
* @param certType certificate type
* @param priKey CA signing key
diff --git a/pki/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java b/pki/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
index 984425a5..e318188a 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/IEncryptionUnit.java
@@ -17,24 +17,22 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.security.PublicKey;
import org.mozilla.jss.crypto.PrivateKey;
import com.netscape.certsrv.base.EBaseException;
-
/**
* An interface represents a encryption unit.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IEncryptionUnit extends IToken {
/**
* Retrieves the public key in this unit.
- *
+ *
* @return public key
*/
public PublicKey getPublicKey();
@@ -42,16 +40,16 @@ public interface IEncryptionUnit extends IToken {
/**
* Wraps data. The given key will be wrapped by the
* private key in this unit.
- *
+ *
* @param priKey private key to be wrapped
- * @return wrapped data
+ * @return wrapped data
* @exception EBaseException failed to wrap
*/
public byte[] wrap(PrivateKey priKey) throws EBaseException;
/**
- * Verifies the given key pair.
- *
+ * Verifies the given key pair.
+ *
* @param publicKey public key
* @param privateKey private key
*/
@@ -61,9 +59,9 @@ public interface IEncryptionUnit extends IToken {
/**
* Unwraps data. This method rebuilds the private key by
* unwrapping the private key data.
- *
+ *
* @param sessionKey session key that unwrap the private key
- * @param symmAlgOID symmetric algorithm
+ * @param symmAlgOID symmetric algorithm
* @param symmAlgParams symmetric algorithm parameters
* @param privateKey private key data
* @param pubKey public key
@@ -71,56 +69,56 @@ public interface IEncryptionUnit extends IToken {
* @exception EBaseException failed to unwrap
*/
public PrivateKey unwrap(byte sessionKey[], String symmAlgOID,
- byte symmAlgParams[], byte privateKey[],
- PublicKey pubKey)
- throws EBaseException;
+ byte symmAlgParams[], byte privateKey[],
+ PublicKey pubKey)
+ throws EBaseException;
/**
* Unwraps data. This method rebuilds the private key by
* unwrapping the private key data.
- *
+ *
* @param privateKey private key data
* @param pubKey public key object
* @return private key object
* @exception EBaseException failed to unwrap
*/
public PrivateKey unwrap(byte privateKey[], PublicKey pubKey)
- throws EBaseException;
-
+ throws EBaseException;
+
/**
* Encrypts the internal private key (private key to the KRA's
* internal storage).
- *
+ *
* @param rawPrivate user's private key (key to be archived)
* @return encrypted data
* @exception EBaseException failed to encrypt
*/
public byte[] encryptInternalPrivate(byte rawPrivate[])
- throws EBaseException;
+ throws EBaseException;
/**
* Decrypts the internal private key (private key from the KRA's
* internal storage).
- *
+ *
* @param wrappedPrivateData unwrapped private key data (key to be recovered)
* @return raw private key
* @exception EBaseException failed to decrypt
*/
public byte[] decryptInternalPrivate(byte wrappedPrivateData[])
- throws EBaseException;
+ throws EBaseException;
/**
* Decrypts the external private key (private key from the end-user).
- *
+ *
* @param sessionKey session key that protects the user private
- * @param symmAlgOID symmetric algorithm
+ * @param symmAlgOID symmetric algorithm
* @param symmAlgParams symmetric algorithm parameters
* @param privateKey private key data
* @return private key data
* @exception EBaseException failed to decrypt
*/
- public byte[] decryptExternalPrivate(byte sessionKey[],
- String symmAlgOID,
- byte symmAlgParams[], byte privateKey[])
- throws EBaseException;
+ public byte[] decryptExternalPrivate(byte sessionKey[],
+ String symmAlgOID,
+ byte symmAlgParams[], byte privateKey[])
+ throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java b/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
index 664d5c1f..7fbed0b6 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/ISigningUnit.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.security.PublicKey;
import netscape.security.x509.X509CertImpl;
@@ -30,7 +29,7 @@ import com.netscape.certsrv.base.EBaseException;
/**
* A class represents the signing unit which is
* capable of signing data.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ISigningUnit {
@@ -46,11 +45,11 @@ public interface ISigningUnit {
/**
* Retrieves the nickname of the signing certificate.
*/
- public String getNickname();
+ public String getNickname();
/**
* Retrieves the new nickname in the renewal process.
- *
+ *
* @return new nickname
* @exception EBaseException failed to get new nickname
*/
@@ -58,39 +57,39 @@ public interface ISigningUnit {
/**
* Sets new nickname of the signing certificate.
- *
+ *
* @param name nickname
*/
public void setNewNickName(String name);
/**
* Retrieves the signing certificate.
- *
+ *
* @return signing certificate
*/
public X509Certificate getCert();
/**
* Retrieves the signing certificate.
- *
+ *
* @return signing certificate
*/
public X509CertImpl getCertImpl();
/**
* Signs the given data in specific algorithm.
- *
+ *
* @param data data to be signed
* @param algname signing algorithm to be used
* @return signed data
* @exception EBaseException failed to sign
*/
public byte[] sign(byte[] data, String algname)
- throws EBaseException;
-
+ throws EBaseException;
+
/**
* Verifies the signed data.
- *
+ *
* @param data signed data
* @param signature signature
* @param algname signing algorithm
@@ -98,18 +97,18 @@ public interface ISigningUnit {
* @exception EBaseException failed to verify
*/
public boolean verify(byte[] data, byte[] signature, String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the default algorithm.
- *
+ *
* @return default signing algorithm
*/
public SignatureAlgorithm getDefaultSignatureAlgorithm();
/**
* Retrieves the default algorithm name.
- *
+ *
* @return default signing algorithm name
*/
public String getDefaultAlgorithm();
@@ -124,15 +123,15 @@ public interface ISigningUnit {
/**
* Retrieves all supported signing algorithm of this unit.
- *
+ *
* @return a list of signing algorithms
* @exception EBaseException failed to list
- */
+ */
public String[] getAllAlgorithms() throws EBaseException;
/**
* Retrieves the token name of this unit.
- *
+ *
* @return token name
* @exception EBaseException failed to retrieve name
*/
@@ -140,7 +139,7 @@ public interface ISigningUnit {
/**
* Updates new nickname and tokename in the configuration file.
- *
+ *
* @param nickname new nickname
* @param tokenname new tokenname
*/
@@ -148,19 +147,18 @@ public interface ISigningUnit {
/**
* Checks if the given algorithm name is supported.
- *
+ *
* @param algname algorithm name
* @return signing algorithm
* @exception EBaseException failed to check signing algorithm
*/
public SignatureAlgorithm checkSigningAlgorithmFromName(String algname)
- throws EBaseException;
+ throws EBaseException;
/**
* Retrieves the public key associated in this unit.
- *
+ *
* @return public key
*/
public PublicKey getPublicKey();
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
index 02ebc616..336bf57a 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/IStorageKeyUnit.java
@@ -17,26 +17,24 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.util.Enumeration;
import org.mozilla.jss.crypto.CryptoToken;
import com.netscape.certsrv.base.EBaseException;
-
/**
* An interface represents a storage key unit. This storage
* unit contains a storage key pair that is used for
* encrypting the user private key for long term storage.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IStorageKeyUnit extends IEncryptionUnit {
/**
* Retrieves total number of recovery agents.
- *
+ *
* @return total number of recovery agents
*/
public int getNoOfAgents() throws EBaseException;
@@ -51,33 +49,33 @@ public interface IStorageKeyUnit extends IEncryptionUnit {
/**
* Sets the numer of required recovery agents
- *
+ *
* @param number number of required agents
*/
public void setNoOfRequiredAgents(int number);
/**
* Retrieves a list of agents in this unit.
- *
+ *
* @return a list of string-based agent identifiers
*/
public Enumeration getAgentIdentifiers();
/**
* Changes agent password.
- *
+ *
* @param id agent id
* @param oldpwd old password
* @param newpwd new password
* @return true if operation successful
* @exception EBaseException failed to change password
*/
- public boolean changeAgentPassword(String id, String oldpwd,
- String newpwd) throws EBaseException;
+ public boolean changeAgentPassword(String id, String oldpwd,
+ String newpwd) throws EBaseException;
/**
* Changes M-N recovery scheme.
- *
+ *
* @param n total number of agents
* @param m required number of agents for recovery operation
* @param oldcreds all old credentials
@@ -86,11 +84,11 @@ public interface IStorageKeyUnit extends IEncryptionUnit {
* @exception EBaseException failed to change schema
*/
public boolean changeAgentMN(int n, int m, Credential oldcreds[],
- Credential newcreds[]) throws EBaseException;
-
+ Credential newcreds[]) throws EBaseException;
+
/**
* Logins to this unit.
- *
+ *
* @param ac agent's credentials
* @exception EBaseException failed to login
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/security/IToken.java b/pki/base/common/src/com/netscape/certsrv/security/IToken.java
index 0b79cfcf..05aff64f 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/IToken.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/IToken.java
@@ -17,20 +17,18 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* An interface represents a generic token unit.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IToken {
/**
* Logins to the token unit.
- *
+ *
* @param pin password to access the token
* @exception EBaseException failed to login to this token
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/security/ITransportKeyUnit.java b/pki/base/common/src/com/netscape/certsrv/security/ITransportKeyUnit.java
index 2edfa12a..0a012e8a 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/ITransportKeyUnit.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/ITransportKeyUnit.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.security.PublicKey;
import org.mozilla.jss.crypto.CryptoToken;
@@ -26,27 +25,32 @@ import org.mozilla.jss.crypto.SymmetricKey;
import com.netscape.certsrv.base.EBaseException;
-
/**
- * An interface represents the transport key pair.
- * This key pair is used to protected EE's private
+ * An interface represents the transport key pair.
+ * This key pair is used to protected EE's private
* key in transit.
- *
+ *
* @version $Revision$, $Date$
*/
public interface ITransportKeyUnit extends IEncryptionUnit {
/**
* Retrieves public key.
- *
+ *
* @return certificate
*/
public org.mozilla.jss.crypto.X509Certificate getCertificate();
+
public SymmetricKey unwrap_sym(byte encSymmKey[]);
+
public SymmetricKey unwrap_encrypt_sym(byte encSymmKey[]);
+
public PrivateKey unwrap_temp(byte wrappedKeyData[], PublicKey
- pubKey) throws EBaseException;
+ pubKey) throws EBaseException;
+
public CryptoToken getToken();
- public String getSigningAlgorithm() throws EBaseException;
- public void setSigningAlgorithm(String str) throws EBaseException;
+
+ public String getSigningAlgorithm() throws EBaseException;
+
+ public void setSigningAlgorithm(String str) throws EBaseException;
}
diff --git a/pki/base/common/src/com/netscape/certsrv/security/KeyCertData.java b/pki/base/common/src/com/netscape/certsrv/security/KeyCertData.java
index 484e5e73..dbcc0118 100644
--- a/pki/base/common/src/com/netscape/certsrv/security/KeyCertData.java
+++ b/pki/base/common/src/com/netscape/certsrv/security/KeyCertData.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.security;
-
import java.math.BigInteger;
import java.security.KeyPair;
import java.util.Properties;
@@ -53,7 +52,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves the key pair from this container.
- *
+ *
* @return key pair
*/
public KeyPair getKeyPair() {
@@ -62,7 +61,7 @@ public class KeyCertData extends Properties {
/**
* Sets key pair into this container.
- *
+ *
* @param keypair key pair
*/
public void setKeyPair(KeyPair keypair) {
@@ -71,7 +70,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves the issuer name from this container.
- *
+ *
* @return issuer name
*/
public String getIssuerName() {
@@ -80,7 +79,7 @@ public class KeyCertData extends Properties {
/**
* Sets the issuer name in this container.
- *
+ *
* @param name issuer name
*/
public void setIssuerName(String name) {
@@ -89,7 +88,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves certificate server instance name.
- *
+ *
* @return instance name
*/
public String getCertInstanceName() {
@@ -98,7 +97,7 @@ public class KeyCertData extends Properties {
/**
* Sets certificate server instance name.
- *
+ *
* @param name instance name
*/
public void setCertInstanceName(String name) {
@@ -107,16 +106,16 @@ public class KeyCertData extends Properties {
/**
* Retrieves certificate nickname.
- *
+ *
* @return certificate nickname
*/
public String getCertNickname() {
return (String) get(Constants.PR_NICKNAME);
}
-
+
/**
* Sets certificate nickname.
- *
+ *
* @param nickname certificate nickname
*/
public void setCertNickname(String nickname) {
@@ -125,7 +124,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves key length.
- *
+ *
* @return key length
*/
public String getKeyLength() {
@@ -134,7 +133,7 @@ public class KeyCertData extends Properties {
/**
* Sets key length.
- *
+ *
* @param len key length
*/
public void setKeyLength(String len) {
@@ -143,7 +142,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves key type.
- *
+ *
* @return key type
*/
public String getKeyType() {
@@ -152,7 +151,7 @@ public class KeyCertData extends Properties {
/**
* Sets key type.
- *
+ *
* @param type key type
*/
public void setKeyType(String type) {
@@ -161,7 +160,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves key curve name.
- *
+ *
* @return key curve name
*/
public String getKeyCurveName() {
@@ -170,7 +169,7 @@ public class KeyCertData extends Properties {
/**
* Sets key curvename.
- *
+ *
* @param len key curvename
*/
public void setKeyCurveName(String len) {
@@ -179,7 +178,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves signature algorithm.
- *
+ *
* @return signature algorithm
*/
public SignatureAlgorithm getSignatureAlgorithm() {
@@ -188,7 +187,7 @@ public class KeyCertData extends Properties {
/**
* Sets signature algorithm
- *
+ *
* @param alg signature algorithm
*/
public void setSignatureAlgorithm(SignatureAlgorithm alg) {
@@ -197,7 +196,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves algorithm used to sign the root CA Cert.
- *
+ *
* @return signature algorithm
*/
public String getSignedBy() {
@@ -206,7 +205,7 @@ public class KeyCertData extends Properties {
/**
* Sets signature algorithm used to sign root CA cert
- *
+ *
* @param alg signature algorithm
*/
public void setSignedBy(String alg) {
@@ -215,7 +214,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves signature algorithm.
- *
+ *
* @return signature algorithm
*/
public AlgorithmId getAlgorithmId() {
@@ -224,7 +223,7 @@ public class KeyCertData extends Properties {
/**
* Sets algorithm identifier
- *
+ *
* @param id signature algorithm
*/
public void setAlgorithmId(AlgorithmId id) {
@@ -233,7 +232,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves serial number.
- *
+ *
* @return serial number
*/
public BigInteger getSerialNumber() {
@@ -242,7 +241,7 @@ public class KeyCertData extends Properties {
/**
* Sets serial number.
- *
+ *
* @param num serial number
*/
public void setSerialNumber(BigInteger num) {
@@ -251,16 +250,16 @@ public class KeyCertData extends Properties {
/**
* Retrieves configuration file.
- *
+ *
* @return configuration file
*/
public IConfigStore getConfigFile() {
- return (IConfigStore)(get("cmsFile"));
+ return (IConfigStore) (get("cmsFile"));
}
/**
* Sets configuration file.
- *
+ *
* @param file configuration file
*/
public void setConfigFile(IConfigStore file) {
@@ -269,7 +268,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves begining year of validity.
- *
+ *
* @return begining year
*/
public String getBeginYear() {
@@ -278,7 +277,7 @@ public class KeyCertData extends Properties {
/**
* Sets begining year of validity.
- *
+ *
* @param year begining year
*/
public void setBeginYear(String year) {
@@ -287,7 +286,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending year of validity.
- *
+ *
* @return ending year
*/
public String getAfterYear() {
@@ -296,7 +295,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending year of validity.
- *
+ *
* @param year ending year
*/
public void setAfterYear(String year) {
@@ -305,7 +304,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves begining month of validity.
- *
+ *
* @return begining month
*/
public String getBeginMonth() {
@@ -314,7 +313,7 @@ public class KeyCertData extends Properties {
/**
* Sets begining month of validity.
- *
+ *
* @param month begining month
*/
public void setBeginMonth(String month) {
@@ -323,7 +322,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending month of validity.
- *
+ *
* @return ending month
*/
public String getAfterMonth() {
@@ -332,7 +331,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending month of validity.
- *
+ *
* @param month ending month
*/
public void setAfterMonth(String month) {
@@ -341,7 +340,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves begining date of validity.
- *
+ *
* @return begining date
*/
public String getBeginDate() {
@@ -350,7 +349,7 @@ public class KeyCertData extends Properties {
/**
* Sets begining date of validity.
- *
+ *
* @param date begining date
*/
public void setBeginDate(String date) {
@@ -359,7 +358,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending date of validity.
- *
+ *
* @return ending date
*/
public String getAfterDate() {
@@ -368,7 +367,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending date of validity.
- *
+ *
* @param date ending date
*/
public void setAfterDate(String date) {
@@ -377,7 +376,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves starting hour of validity.
- *
+ *
* @return starting hour
*/
public String getBeginHour() {
@@ -386,7 +385,7 @@ public class KeyCertData extends Properties {
/**
* Sets starting hour of validity.
- *
+ *
* @param hour starting hour
*/
public void setBeginHour(String hour) {
@@ -395,7 +394,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending hour of validity.
- *
+ *
* @return ending hour
*/
public String getAfterHour() {
@@ -404,7 +403,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending hour of validity.
- *
+ *
* @param hour ending hour
*/
public void setAfterHour(String hour) {
@@ -413,16 +412,16 @@ public class KeyCertData extends Properties {
/**
* Retrieves starting minute of validity.
- *
+ *
* @return starting minute
*/
public String getBeginMin() {
return (String) get(Constants.PR_BEGIN_MIN);
}
-
+
/**
* Sets starting minute of validity.
- *
+ *
* @param min starting minute
*/
public void setBeginMin(String min) {
@@ -431,7 +430,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending minute of validity.
- *
+ *
* @return ending minute
*/
public String getAfterMin() {
@@ -440,7 +439,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending minute of validity.
- *
+ *
* @param min ending minute
*/
public void setAfterMin(String min) {
@@ -449,7 +448,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves starting second of validity.
- *
+ *
* @return starting second
*/
public String getBeginSec() {
@@ -458,7 +457,7 @@ public class KeyCertData extends Properties {
/**
* Sets starting second of validity.
- *
+ *
* @param sec starting second
*/
public void setBeginSec(String sec) {
@@ -467,7 +466,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves ending second of validity.
- *
+ *
* @return ending second
*/
public String getAfterSec() {
@@ -476,7 +475,7 @@ public class KeyCertData extends Properties {
/**
* Sets ending second of validity.
- *
+ *
* @param sec ending second
*/
public void setAfterSec(String sec) {
@@ -485,7 +484,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves CA key pair
- *
+ *
* @return CA key pair
*/
public KeyPair getCAKeyPair() {
@@ -494,7 +493,7 @@ public class KeyCertData extends Properties {
/**
* Sets CA key pair
- *
+ *
* @param keypair key pair
*/
public void setCAKeyPair(KeyPair keypair) {
@@ -503,7 +502,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves extensions
- *
+ *
* @return extensions
*/
public String getDerExtension() {
@@ -512,7 +511,7 @@ public class KeyCertData extends Properties {
/**
* Sets extensions
- *
+ *
* @param ext extensions
*/
public void setDerExtension(String ext) {
@@ -521,7 +520,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves isCA
- *
+ *
* @return "true" if it is CA
*/
public String isCA() {
@@ -530,7 +529,7 @@ public class KeyCertData extends Properties {
/**
* Sets isCA
- *
+ *
* @param ext "true" if it is CA
*/
public void setCA(String ext) {
@@ -539,7 +538,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves key length
- *
+ *
* @return certificate's key length
*/
public String getCertLen() {
@@ -548,7 +547,7 @@ public class KeyCertData extends Properties {
/**
* Sets key length
- *
+ *
* @param len certificate's key length
*/
public void setCertLen(String len) {
@@ -557,7 +556,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Client bit
- *
+ *
* @return SSL Client bit
*/
public String getSSLClientBit() {
@@ -566,7 +565,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Client bit
- *
+ *
* @param sslClientBit SSL Client bit
*/
public void setSSLClientBit(String sslClientBit) {
@@ -575,7 +574,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Server bit
- *
+ *
* @return SSL Server bit
*/
public String getSSLServerBit() {
@@ -584,7 +583,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Server bit
- *
+ *
* @param sslServerBit SSL Server bit
*/
public void setSSLServerBit(String sslServerBit) {
@@ -593,7 +592,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Mail bit
- *
+ *
* @return SSL Mail bit
*/
public String getSSLMailBit() {
@@ -602,7 +601,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Mail bit
- *
+ *
* @param sslMailBit SSL Mail bit
*/
public void setSSLMailBit(String sslMailBit) {
@@ -611,7 +610,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL CA bit
- *
+ *
* @return SSL CA bit
*/
public String getSSLCABit() {
@@ -620,7 +619,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL CA bit
- *
+ *
* @param cabit SSL CA bit
*/
public void setSSLCABit(String cabit) {
@@ -629,16 +628,16 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Signing bit
- *
+ *
* @return SSL Signing bit
*/
public String getObjectSigningBit() {
return (String) get(Constants.PR_OBJECT_SIGNING_BIT);
}
- /**
+ /**
* Retrieves Time Stamping bit
- *
+ *
* @return Time Stamping bit
*/
public String getTimeStampingBit() {
@@ -647,7 +646,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Signing bit
- *
+ *
* @param objectSigningBit SSL Signing bit
*/
public void setObjectSigningBit(String objectSigningBit) {
@@ -656,7 +655,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Mail CA bit
- *
+ *
* @return SSL Mail CA bit
*/
public String getMailCABit() {
@@ -665,7 +664,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Mail CA bit
- *
+ *
* @param mailCABit SSL Mail CA bit
*/
public void setMailCABit(String mailCABit) {
@@ -674,7 +673,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves SSL Object Signing bit
- *
+ *
* @return SSL Object Signing bit
*/
public String getObjectSigningCABit() {
@@ -683,7 +682,7 @@ public class KeyCertData extends Properties {
/**
* Sets SSL Object Signing bit
- *
+ *
* @param bit SSL Object Signing bit
*/
public void setObjectSigningCABit(String bit) {
@@ -692,7 +691,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves OCSP Signing flag
- *
+ *
* @return OCSP Signing flag
*/
public String getOCSPSigning() {
@@ -701,7 +700,7 @@ public class KeyCertData extends Properties {
/**
* Sets OCSP Signing flag
- *
+ *
* @param aki OCSP Signing flag
*/
public void setOCSPSigning(String aki) {
@@ -710,7 +709,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves OCSP No Check flag
- *
+ *
* @return OCSP No Check flag
*/
public String getOCSPNoCheck() {
@@ -719,7 +718,7 @@ public class KeyCertData extends Properties {
/**
* Sets OCSP No Check flag
- *
+ *
* @param noCheck OCSP No Check flag
*/
public void setOCSPNoCheck(String noCheck) {
@@ -728,7 +727,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves Authority Information Access flag
- *
+ *
* @return Authority Information Access flag
*/
public String getAIA() {
@@ -737,7 +736,7 @@ public class KeyCertData extends Properties {
/**
* Sets Authority Information Access flag
- *
+ *
* @param aia Authority Information Access flag
*/
public void setAIA(String aia) {
@@ -746,7 +745,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves Authority Key Identifier flag
- *
+ *
* @return Authority Key Identifier flag
*/
public String getAKI() {
@@ -755,7 +754,7 @@ public class KeyCertData extends Properties {
/**
* Sets Authority Key Identifier flag
- *
+ *
* @param aki Authority Key Identifier flag
*/
public void setAKI(String aki) {
@@ -764,7 +763,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves Subject Key Identifier flag
- *
+ *
* @return Subject Key Identifier flag
*/
public String getSKI() {
@@ -773,7 +772,7 @@ public class KeyCertData extends Properties {
/**
* Sets Subject Key Identifier flag
- *
+ *
* @param ski Subject Key Identifier flag
*/
public void setSKI(String ski) {
@@ -782,7 +781,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves key usage extension
- *
+ *
* @return true if key usage extension set
*/
public boolean getKeyUsageExtension() {
@@ -795,7 +794,7 @@ public class KeyCertData extends Properties {
/**
* Sets CA extensions
- *
+ *
* @param ext CA extensions
*/
public void setCAExtensions(CertificateExtensions ext) {
@@ -804,7 +803,7 @@ public class KeyCertData extends Properties {
/**
* Retrieves CA extensions
- *
+ *
* @return CA extensions
*/
public CertificateExtensions getCAExtensions() {
@@ -813,11 +812,10 @@ public class KeyCertData extends Properties {
/**
* Retrieves hash type
- *
+ *
* @return hash type
*/
public String getHashType() {
return (String) get(ConfigConstants.PR_HASH_TYPE);
}
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
index d0f6b4c3..958919e1 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EDuplicateSelfTestException.java
@@ -20,13 +20,10 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
@@ -35,20 +32,18 @@ package com.netscape.certsrv.selftests;
* This class implements a duplicate self test exception.
* EDuplicateSelfTestExceptions are derived from ESelfTestExceptions
* in order to allow users to easily do self tests without try-catch clauses.
- *
+ *
* EDuplicateSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EDuplicateSelfTestException
- extends ESelfTestException {
+ extends ESelfTestException {
////////////////////////
// default parameters //
////////////////////////
-
-
///////////////////////
// helper parameters //
///////////////////////
@@ -66,14 +61,10 @@ public class EDuplicateSelfTestException
// EDuplicateSelfTestException parameters //
////////////////////////////////////////////
-
-
///////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
///////////////////////////////////////////////
-
-
/////////////////////
// default methods //
/////////////////////
@@ -81,13 +72,13 @@ public class EDuplicateSelfTestException
/**
* Constructs a "duplicate" self test exception.
* <P>
- *
+ *
* @param instanceName duplicate "instanceName" exception details
*/
public EDuplicateSelfTestException(String instanceName) {
super("The self test plugin property named "
- + instanceName
- + " already exists.");
+ + instanceName
+ + " already exists.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -103,17 +94,17 @@ public class EDuplicateSelfTestException
* Constructs a "duplicate" self test exception where the value is always
* a duplicate from a name/value pair
* <P>
- *
+ *
* @param instanceName duplicate "instanceName" exception details
* @param instanceValue duplicate "instanceValue" exception details
*/
public EDuplicateSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin property named "
- + instanceName
- + " contains a value of "
- + instanceValue
- + " which already exists.");
+ + instanceName
+ + " contains a value of "
+ + instanceValue
+ + " which already exists.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -134,18 +125,18 @@ public class EDuplicateSelfTestException
* duplicate from a substore.parameter/value pair; (the value passed in may
* be null).
* <P>
- *
+ *
* @param instanceStore duplicate "instanceStore" exception details
* @param instanceParameter duplicate "instanceParameter" exception details
* @param instanceValue duplicate "instanceValue" exception details
- * (may be null)
+ * (may be null)
*/
public EDuplicateSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin property named "
- + instanceStore + "." + instanceParameter
- + " is a duplicate.");
+ + instanceStore + "." + instanceParameter
+ + " is a duplicate.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -172,7 +163,7 @@ public class EDuplicateSelfTestException
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -182,7 +173,7 @@ public class EDuplicateSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -192,7 +183,7 @@ public class EDuplicateSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -202,7 +193,7 @@ public class EDuplicateSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
@@ -213,8 +204,6 @@ public class EDuplicateSelfTestException
// EDuplicateSelfTestException methods //
/////////////////////////////////////////
-
-
////////////////////////////////////////////
// ESelfTestException methods (inherited) //
////////////////////////////////////////////
@@ -225,4 +214,3 @@ public class EDuplicateSelfTestException
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
index 11907695..58592b89 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EInvalidSelfTestException.java
@@ -20,13 +20,10 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
@@ -35,20 +32,18 @@ package com.netscape.certsrv.selftests;
* This class implements an invalid self test exception.
* EInvalidSelfTestExceptions are derived from ESelfTestExceptions
* in order to allow users to easily do self tests without try-catch clauses.
- *
+ *
* EInvalidSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EInvalidSelfTestException
- extends ESelfTestException {
+ extends ESelfTestException {
////////////////////////
// default parameters //
////////////////////////
-
-
///////////////////////
// helper parameters //
///////////////////////
@@ -66,14 +61,10 @@ public class EInvalidSelfTestException
// EInvalidSelfTestException parameters //
//////////////////////////////////////////
-
-
///////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
///////////////////////////////////////////////
-
-
/////////////////////
// default methods //
/////////////////////
@@ -81,13 +72,13 @@ public class EInvalidSelfTestException
/**
* Constructs an "invalid" self test exception.
* <P>
- *
+ *
* @param instanceName invalid "instanceName" exception details
*/
public EInvalidSelfTestException(String instanceName) {
super("The self test plugin named "
- + instanceName
- + " is invalid.");
+ + instanceName
+ + " is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -103,17 +94,17 @@ public class EInvalidSelfTestException
* Constructs a "invalid" self test exception where the value is always
* invalid from a name/value pair
* <P>
- *
+ *
* @param instanceName invalid "instanceName" exception details
* @param instanceValue invalid "instanceValue" exception details
*/
public EInvalidSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin named "
- + instanceName
- + " contains a value "
- + instanceValue
- + " which is invalid.");
+ + instanceName
+ + " contains a value "
+ + instanceValue
+ + " which is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -134,18 +125,18 @@ public class EInvalidSelfTestException
* invalid from a substore.parameter/value pair; (the value passed in may
* be null).
* <P>
- *
+ *
* @param instanceStore invalid "instanceStore" exception details
* @param instanceParameter invalid "instanceParameter" exception details
* @param instanceValue invalid "instanceValue" exception details
- * (may be null)
+ * (may be null)
*/
public EInvalidSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin parameter named "
- + instanceStore + "." + instanceParameter
- + " is invalid.");
+ + instanceStore + "." + instanceParameter
+ + " is invalid.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -172,7 +163,7 @@ public class EInvalidSelfTestException
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -182,7 +173,7 @@ public class EInvalidSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -192,7 +183,7 @@ public class EInvalidSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -202,7 +193,7 @@ public class EInvalidSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
@@ -213,8 +204,6 @@ public class EInvalidSelfTestException
// EInvalidSelfTestException methods //
///////////////////////////////////////
-
-
////////////////////////////////////////////
// ESelfTestException methods (inherited) //
////////////////////////////////////////////
@@ -225,4 +214,3 @@ public class EInvalidSelfTestException
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
index 88fa14cb..c15852f4 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/EMissingSelfTestException.java
@@ -20,13 +20,10 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
-
-
//////////////////////
// class definition //
//////////////////////
@@ -35,20 +32,18 @@ package com.netscape.certsrv.selftests;
* This class implements a missing self test exception.
* EMissingSelfTestExceptions are derived from ESelfTestExceptions
* in order to allow users to easily do self tests without try-catch clauses.
- *
+ *
* EMissingSelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class EMissingSelfTestException
- extends ESelfTestException {
+ extends ESelfTestException {
////////////////////////
// default parameters //
////////////////////////
-
-
///////////////////////
// helper parameters //
///////////////////////
@@ -66,14 +61,10 @@ public class EMissingSelfTestException
// EMissingSelfTestException parameters //
//////////////////////////////////////////
-
-
///////////////////////////////////////////////
// ESelfTestException parameters (inherited) //
///////////////////////////////////////////////
-
-
/////////////////////
// default methods //
/////////////////////
@@ -81,7 +72,7 @@ public class EMissingSelfTestException
/**
* Constructs a "missing" self test exception where the name is null
* <P>
- *
+ *
*/
public EMissingSelfTestException() {
super("The self test plugin property name is null.");
@@ -91,13 +82,13 @@ public class EMissingSelfTestException
* Constructs a "missing" self test exception where the name is always
* missing from a name/value pair.
* <P>
- *
+ *
* @param instanceName missing "instanceName" exception details
*/
public EMissingSelfTestException(String instanceName) {
super("The self test plugin property named "
- + instanceName
- + " does not exist.");
+ + instanceName
+ + " does not exist.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -113,16 +104,16 @@ public class EMissingSelfTestException
* Constructs a "missing" self test exception where the value is always
* missing from a name/value pair; (the value passed in is always null).
* <P>
- *
+ *
* @param instanceName missing "instanceName" exception details
* @param instanceValue missing "instanceValue" exception details
- * (always null)
+ * (always null)
*/
public EMissingSelfTestException(String instanceName,
- String instanceValue) {
+ String instanceValue) {
super("The self test plugin property named "
- + instanceName
- + " contains no values.");
+ + instanceName
+ + " contains no values.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -143,18 +134,18 @@ public class EMissingSelfTestException
* missing from a substore.parameter/value pair; (the value passed in may
* be null).
* <P>
- *
+ *
* @param instanceStore missing "instanceStore" exception details
* @param instanceParameter missing "instanceParameter" exception details
* @param instanceValue missing "instanceValue" exception details
- * (may be null)
+ * (may be null)
*/
public EMissingSelfTestException(String instanceStore,
- String instanceParameter,
- String instanceValue) {
+ String instanceParameter,
+ String instanceValue) {
super("The self test plugin property named "
- + instanceStore + "." + instanceParameter
- + " is missing.");
+ + instanceStore + "." + instanceParameter
+ + " is missing.");
// strip preceding/trailing whitespace
// from passed-in String parameters
@@ -181,7 +172,7 @@ public class EMissingSelfTestException
/**
* Returns the instance name associated with this self test.
* <P>
- *
+ *
* @return name portion of the name/value pair
*/
public String getInstanceName() {
@@ -191,7 +182,7 @@ public class EMissingSelfTestException
/**
* Returns the store associated with this self test.
* <P>
- *
+ *
* @return substore portion of the substore.parameter/value pair
*/
public String getInstanceStore() {
@@ -201,7 +192,7 @@ public class EMissingSelfTestException
/**
* Returns the parameter associated with this self test.
* <P>
- *
+ *
* @return parameter portion of the substore.parameter/value pair
*/
public String getInstanceParameter() {
@@ -211,7 +202,7 @@ public class EMissingSelfTestException
/**
* Returns the value associated with this self test.
* <P>
- *
+ *
* @return value portion of the name/value pair
*/
public String getInstanceValue() {
@@ -222,8 +213,6 @@ public class EMissingSelfTestException
// EMissingSelfTestException methods //
///////////////////////////////////////
-
-
////////////////////////////////////////////
// ESelfTestException methods (inherited) //
////////////////////////////////////////////
@@ -234,4 +223,3 @@ public class EMissingSelfTestException
* public ESelfTestException( String msg );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java b/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
index e465517c..6c4f6bf2 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ESelfTestException.java
@@ -20,14 +20,12 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
import com.netscape.certsrv.base.EBaseException;
-
//////////////////////
// class definition //
//////////////////////
@@ -36,20 +34,18 @@ import com.netscape.certsrv.base.EBaseException;
* This class implements a self test exception. ESelfTestExceptions
* are derived from EBaseExceptions in order to allow users
* to easily do self tests without try-catch clauses.
- *
+ *
* ESelfTestExceptions should be caught by SelfTestSubsystem managers.
* <P>
*
* @version $Revision$, $Date$
*/
public class ESelfTestException
- extends EBaseException {
+ extends EBaseException {
////////////////////////
// default parameters //
////////////////////////
-
-
///////////////////////////////////
// ESelfTestException parameters //
///////////////////////////////////
@@ -60,7 +56,6 @@ public class ESelfTestException
private static final long serialVersionUID = -8001373369705595891L;
private static final String SELFTEST_RESOURCES = SelfTestResources.class.getName();
-
///////////////////////////////////////////
// EBaseException parameters (inherited) //
///////////////////////////////////////////
@@ -71,8 +66,6 @@ public class ESelfTestException
* public Object mParams[];
*/
-
-
/////////////////////
// default methods //
/////////////////////
@@ -80,14 +73,13 @@ public class ESelfTestException
/**
* Constructs a self test exception.
* <P>
- *
+ *
* @param msg exception details
*/
public ESelfTestException(String msg) {
super(msg);
}
-
////////////////////////////////
// ESelfTestException methods //
////////////////////////////////
@@ -95,13 +87,13 @@ public class ESelfTestException
/**
* Returns the bundle file name.
* <P>
+ *
* @return name of bundle class associated with this exception.
*/
protected String getBundleName() {
return SELFTEST_RESOURCES;
}
-
////////////////////////////////////////
// EBaseException methods (inherited) //
////////////////////////////////////////
@@ -124,4 +116,3 @@ public class ESelfTestException
* public String toString( Locale locale );
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
index f881a285..04285a9d 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTest.java
@@ -20,7 +20,6 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
@@ -30,7 +29,6 @@ import java.util.Locale;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.logging.ILogEventListener;
-
//////////////////////
// class definition //
//////////////////////
@@ -46,8 +44,6 @@ public interface ISelfTest {
// default parameters //
////////////////////////
-
-
//////////////////////////
// ISelfTest parameters //
//////////////////////////
@@ -58,8 +54,6 @@ public interface ISelfTest {
// default methods //
/////////////////////
-
-
///////////////////////
// ISelfTest methods //
///////////////////////
@@ -68,29 +62,29 @@ public interface ISelfTest {
* Initializes this subsystem with the configuration store
* associated with this instance name.
* <P>
- *
+ *
* @param subsystem the associated subsystem
- * @param instanceName the name of this self test instance
+ * @param instanceName the name of this self test instance
* @param parameters configuration store (self test parameters)
* @exception EDuplicateSelfTestException subsystem has duplicate name/value
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
public void initSelfTest(ISelfTestSubsystem subsystem,
- String instanceName,
- IConfigStore parameters)
- throws EDuplicateSelfTestException,
+ String instanceName,
+ IConfigStore parameters)
+ throws EDuplicateSelfTestException,
EInvalidSelfTestException,
EMissingSelfTestException;
/**
* Notifies this subsystem if it is in execution mode.
* <P>
- *
+ *
* @exception ESelfTestException failed to start
*/
public void startupSelfTest()
- throws ESelfTestException;
+ throws ESelfTestException;
/**
* Stops this subsystem. The subsystem may call shutdownSelfTest
@@ -103,7 +97,7 @@ public interface ISelfTest {
* Returns the name associated with this self test. This method may
* return null if the self test has not been intialized.
* <P>
- *
+ *
* @return instanceName of this self test
*/
public String getSelfTestName();
@@ -112,7 +106,7 @@ public interface ISelfTest {
* Returns the root configuration storage (self test parameters)
* associated with this subsystem.
* <P>
- *
+ *
* @return configuration store (self test parameters) of this subsystem
*/
public IConfigStore getSelfTestConfigStore();
@@ -121,7 +115,7 @@ public interface ISelfTest {
* Retrieves description associated with an individual self test.
* This method may return null.
* <P>
- *
+ *
* @param locale locale of the client that requests the description
* @return description of self test
*/
@@ -130,11 +124,10 @@ public interface ISelfTest {
/**
* Execute an individual self test.
* <P>
- *
+ *
* @param logger specifies logging subsystem
* @exception ESelfTestException self test exception
*/
public void runSelfTest(ILogEventListener logger)
- throws ESelfTestException;
+ throws ESelfTestException;
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
index 3391bdd1..d16627ab 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/ISelfTestSubsystem.java
@@ -20,7 +20,6 @@
package com.netscape.certsrv.selftests;
-
///////////////////////
// import statements //
///////////////////////
@@ -28,7 +27,6 @@ package com.netscape.certsrv.selftests;
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.logging.ILogEventListener;
-
//////////////////////
// class definition //
//////////////////////
@@ -40,13 +38,11 @@ import com.netscape.certsrv.logging.ILogEventListener;
* @version $Revision$, $Date$
*/
public interface ISelfTestSubsystem
- extends ISubsystem {
+ extends ISubsystem {
////////////////////////
// default parameters //
////////////////////////
-
-
//////////////////////////////////
// ISelfTestSubsystem constants //
//////////////////////////////////
@@ -64,14 +60,10 @@ public interface ISelfTestSubsystem
// ISubsystem parameters (inherited) //
///////////////////////////////////////
-
-
/////////////////////
// default methods //
/////////////////////
-
-
////////////////////////////////
// ISelfTestSubsystem methods //
////////////////////////////////
@@ -84,7 +76,7 @@ public interface ISelfTestSubsystem
* List the instance names of all the self tests enabled to run on demand
* (in execution order); may return null.
* <P>
- *
+ *
* @return list of self test instance names run on demand
*/
public String[] listSelfTestsEnabledOnDemand();
@@ -92,10 +84,10 @@ public interface ISelfTestSubsystem
/**
* Enable the specified self test to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * a non-critical failure (false)
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
@@ -103,51 +95,49 @@ public interface ISelfTestSubsystem
// boolean isCritical )
// throws EInvalidSelfTestException, EMissingSelfTestException;
-
/**
* Disable the specified self test from being able to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
// public void disableSelfTestOnDemand( String instanceName )
// throws EMissingSelfTestException;
-
/**
* Determine if the specified self test is enabled to be executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if the specified self test is enabled on demand
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestEnabledOnDemand(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
- * Determine if failure of the specified self test is fatal when
+ * Determine if failure of the specified self test is fatal when
* it is executed on demand.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if failure of the specified self test is fatal when
- * it is executed on demand
+ * it is executed on demand
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestCriticalOnDemand(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
* Execute all self tests specified to be run on demand.
* <P>
- *
+ *
* @exception EMissingSelfTestException subsystem has missing name
* @exception ESelfTestException self test exception
*/
public void runSelfTestsOnDemand()
- throws EMissingSelfTestException, ESelfTestException;
+ throws EMissingSelfTestException, ESelfTestException;
//
// methods associated with the list of startup self tests
@@ -157,7 +147,7 @@ public interface ISelfTestSubsystem
* List the instance names of all the self tests enabled to run
* at server startup (in execution order); may return null.
* <P>
- *
+ *
* @return list of self test instance names run at server startup
*/
public String[] listSelfTestsEnabledAtStartup();
@@ -165,10 +155,10 @@ public interface ISelfTestSubsystem
/**
* Enable the specified self test at server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * a non-critical failure (false)
* @exception EInvalidSelfTestException subsystem has invalid name/value
* @exception EMissingSelfTestException subsystem has missing name/value
*/
@@ -176,52 +166,50 @@ public interface ISelfTestSubsystem
// boolean isCritical )
// throws EInvalidSelfTestException, EMissingSelfTestException;
-
/**
* Disable the specified self test at server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
// public void disableSelfTestAtStartup( String instanceName )
// throws EMissingSelfTestException;
-
/**
* Determine if the specified self test is executed automatically
* at server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if the specified self test is executed at server startup
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestEnabledAtStartup(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
* Determine if failure of the specified self test is fatal to
* server startup.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return true if failure of the specified self test is fatal to
- * server startup
+ * server startup
* @exception EMissingSelfTestException subsystem has missing name
*/
public boolean isSelfTestCriticalAtStartup(String instanceName)
- throws EMissingSelfTestException;
+ throws EMissingSelfTestException;
/**
* Execute all self tests specified to be run at server startup.
* <P>
- *
+ *
* @exception EMissingSelfTestException subsystem has missing name
* @exception ESelfTestException self test exception
*/
public void runSelfTestsAtStartup()
- throws EMissingSelfTestException, ESelfTestException;
+ throws EMissingSelfTestException, ESelfTestException;
//
// methods associated with the list of self test instances
@@ -231,7 +219,7 @@ public interface ISelfTestSubsystem
* Retrieve an individual self test from the instances list
* given its instance name.
* <P>
- *
+ *
* @param instanceName instance name of self test
* @return individual self test
*/
@@ -245,7 +233,7 @@ public interface ISelfTestSubsystem
* Returns the ILogEventListener of this subsystem.
* This method may return null.
* <P>
- *
+ *
* @return ILogEventListener of this subsystem
*/
public ILogEventListener getSelfTestLogger();
@@ -253,7 +241,7 @@ public interface ISelfTestSubsystem
/**
* This method represents the log interface for the self test subsystem.
* <P>
- *
+ *
* @param logger log event listener
* @param msg self test log message
*/
@@ -264,10 +252,10 @@ public interface ISelfTestSubsystem
* on the "on demand" list (note that the specified self test
* will be appended to the end of each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * a non-critical failure (false)
* @param instance individual self test
* @exception EDuplicateSelfTestException subsystem has duplicate name
* @exception EInvalidSelfTestException subsystem has invalid name/value
@@ -280,29 +268,27 @@ public interface ISelfTestSubsystem
// EInvalidSelfTestException,
// EMissingSelfTestException;
-
/**
* Deregister an individual self test on the instances list AND
* on the "on demand" list (note that the specified self test
* will be removed from each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
// public void deregisterSelfTestOnDemand( String instanceName )
// throws EMissingSelfTestException;
-
/**
* Register an individual self test on the instances list AND
* on the "startup" list (note that the specified self test
* will be appended to the end of each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @param isCritical isCritical is either a critical failure (true) or
- * a non-critical failure (false)
+ * a non-critical failure (false)
* @param instance individual self test
* @exception EDuplicateSelfTestException subsystem has duplicate name
* @exception EInvalidSelfTestException subsystem has invalid name/value
@@ -315,21 +301,18 @@ public interface ISelfTestSubsystem
// EInvalidSelfTestException,
// EMissingSelfTestException;
-
/**
* Deregister an individual self test on the instances list AND
* on the "startup" list (note that the specified self test
* will be removed from each list).
* <P>
- *
+ *
* @param instanceName instance name of self test
* @exception EMissingSelfTestException subsystem has missing name
*/
// public void deregisterSelfTestAtStartup( String instanceName )
// throws EMissingSelfTestException;
-
-
////////////////////////////////////
// ISubsystem methods (inherited) //
////////////////////////////////////
@@ -353,4 +336,3 @@ public interface ISelfTestSubsystem
* public IConfigStore getConfigStore();
*/
}
-
diff --git a/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java b/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
index c396c14b..c7c4d372 100644
--- a/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/selftests/SelfTestResources.java
@@ -17,10 +17,8 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.selftests;
-
import java.util.ListResourceBundle;
-
/**
* A class represents a resource bundle for Self Tests.
* <P>
diff --git a/pki/base/common/src/com/netscape/certsrv/template/ArgList.java b/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
index 72288a73..aa0be2d5 100644
--- a/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
+++ b/pki/base/common/src/com/netscape/certsrv/template/ArgList.java
@@ -24,7 +24,7 @@ import java.util.Vector;
* that will be returned to the end-user via
* the template framework.
* <p>
- *
+ *
* @version $Revision$, $Date$
*/
public class ArgList implements IArgValue {
@@ -39,16 +39,16 @@ public class ArgList implements IArgValue {
/**
* Adds an argument to the list.
- *
+ *
* @param arg argument to be added
*/
public void add(IArgValue arg) {
mList.addElement(arg);
}
- /**
+ /**
* Returns the number of arguments in the list.
- *
+ *
* @return size of the list
*/
public int size() {
@@ -58,7 +58,7 @@ public class ArgList implements IArgValue {
/**
* Returns the argument at the given position
* Position starts from 0.
- *
+ *
* @param pos position
* @return argument
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/template/ArgSet.java b/pki/base/common/src/com/netscape/certsrv/template/ArgSet.java
index 471371f9..333a51e5 100644
--- a/pki/base/common/src/com/netscape/certsrv/template/ArgSet.java
+++ b/pki/base/common/src/com/netscape/certsrv/template/ArgSet.java
@@ -22,11 +22,10 @@ import java.util.Hashtable;
/**
* This class represents a set of arguments.
- * Unlike ArgList, this set of arguments is
+ * Unlike ArgList, this set of arguments is
* not ordered.
* <p>
- * Each argument in the set is tagged with
- * a name (key).
+ * Each argument in the set is tagged with a name (key).
* <p>
*
* @version $Revision$, $Date$
@@ -36,7 +35,7 @@ public class ArgSet implements IArgValue {
/**
* Returns a list of argument names.
- *
+ *
* @return list of argument names
*/
public Enumeration<String> getNames() {
@@ -45,17 +44,17 @@ public class ArgSet implements IArgValue {
/**
* Sets string argument into the set with the given name.
- *
+ *
* @param name argument name
* @param arg argument in string
*/
public void set(String name, String arg) {
- mArgs.put(name, new ArgString (arg));
+ mArgs.put(name, new ArgString(arg));
}
/**
* Sets argument into the set with the given name.
- *
+ *
* @param name argument name
* @param arg argument value
*/
@@ -65,7 +64,7 @@ public class ArgSet implements IArgValue {
/**
* Retrieves argument from the set.
- *
+ *
* @param name argument name
* @return argument value
*/
diff --git a/pki/base/common/src/com/netscape/certsrv/template/ArgString.java b/pki/base/common/src/com/netscape/certsrv/template/ArgString.java
index 385338ca..4fb982eb 100644
--- a/pki/base/common/src/com/netscape/certsrv/template/ArgString.java
+++ b/pki/base/common/src/com/netscape/certsrv/template/ArgString.java
@@ -17,11 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.template;
-
-
/**
* This class represents a string-based argument.
- *
+ *
* @version $Revision$, $Date$
*/
public class ArgString implements IArgValue {
@@ -29,7 +27,7 @@ public class ArgString implements IArgValue {
/**
* Constructs a string-based argument value.
- *
+ *
* @param value argument value
*/
public ArgString(String value) {
@@ -38,7 +36,7 @@ public class ArgString implements IArgValue {
/**
* Returns the argument value.
- *
+ *
* @return argument value
*/
public String getValue() {
diff --git a/pki/base/common/src/com/netscape/certsrv/template/IArgValue.java b/pki/base/common/src/com/netscape/certsrv/template/IArgValue.java
index d679f0a1..e820ce69 100644
--- a/pki/base/common/src/com/netscape/certsrv/template/IArgValue.java
+++ b/pki/base/common/src/com/netscape/certsrv/template/IArgValue.java
@@ -19,9 +19,9 @@ package com.netscape.certsrv.template;
/**
* This interface presents a generic argument value.
- * Argument value can be in string, in a list, or
+ * Argument value can be in string, in a list, or
* in a set.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IArgValue {
diff --git a/pki/base/common/src/com/netscape/certsrv/tks/ITKSAuthority.java b/pki/base/common/src/com/netscape/certsrv/tks/ITKSAuthority.java
index 0fec3043..0a045a6f 100644
--- a/pki/base/common/src/com/netscape/certsrv/tks/ITKSAuthority.java
+++ b/pki/base/common/src/com/netscape/certsrv/tks/ITKSAuthority.java
@@ -17,16 +17,14 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.tks;
-
import com.netscape.certsrv.base.ISubsystem;
import com.netscape.certsrv.request.IRequestQueue;
-
/**
* An interface represents a Registration Authority that is
* responsible for certificate enrollment operations.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public interface ITKSAuthority extends ISubsystem {
@@ -41,18 +39,16 @@ public interface ITKSAuthority extends ISubsystem {
public final static String PROP_CONNECTOR = "connector";
public final static String PROP_NEW_NICKNAME = "newNickname";
-
-
/**
* Retrieves the request queue of this registration authority.
- *
+ *
* @return RA's request queue
*/
public IRequestQueue getRequestQueue();
/**
* Returns the nickname of the RA certificate.
- *
+ *
* @return the nickname of the RA certificate
*/
public String getNickname();
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java
index c5711725..fdfa3cd3 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/Certificates.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import java.security.cert.X509Certificate;
-
/**
* This class defines the strong authentication basic elements,
* the X509 certificates.
- *
+ *
* @version $Revision$, $Date$
*/
public class Certificates {
@@ -33,6 +31,7 @@ public class Certificates {
/**
* Constructs strong authenticator.
+ *
* @param certs a list of X509Certificates
*/
public Certificates(X509Certificate certs[]) {
@@ -41,6 +40,7 @@ public class Certificates {
/**
* Retrieves certificates.
+ *
* @return a list of X509Certificates
*/
public X509Certificate[] getCertificates() {
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java
index ca4634a6..a25a1a6b 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/EUsrGrpException.java
@@ -17,14 +17,12 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import com.netscape.certsrv.base.EBaseException;
-
/**
* A class represents a Identity exception.
* <P>
- *
+ *
* @version $Revision$, $Date$
*/
public class EUsrGrpException extends EBaseException {
@@ -40,8 +38,9 @@ public class EUsrGrpException extends EBaseException {
/**
* Constructs a usr/grp management exception
+ *
* @param msgFormat exception details in message string format
- * <P>
+ * <P>
*/
public EUsrGrpException(String msgFormat) {
super(msgFormat);
@@ -49,9 +48,10 @@ public class EUsrGrpException extends EBaseException {
/**
* Constructs a Identity exception.
+ *
* @param msgFormat exception details in message string format
* @param param message string parameter
- * <P>
+ * <P>
*/
public EUsrGrpException(String msgFormat, String param) {
super(msgFormat, param);
@@ -59,8 +59,9 @@ public class EUsrGrpException extends EBaseException {
/**
* Constructs a Identity exception.
+ *
* @param e system exception
- * <P>
+ * <P>
*/
public EUsrGrpException(String msgFormat, Exception e) {
super(msgFormat, e);
@@ -68,9 +69,10 @@ public class EUsrGrpException extends EBaseException {
/**
* Constructs a Identity exception.
+ *
* @param msgFormat exception details in message string format
* @param params list of message format parameters
- * <P>
+ * <P>
*/
public EUsrGrpException(String msgFormat, Object params[]) {
super(msgFormat, params);
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java
index a9d789e6..dbbd068c 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/ICertUserLocator.java
@@ -17,24 +17,23 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import netscape.ldap.LDAPException;
import com.netscape.certsrv.ldap.ELdapException;
-
/**
* This interface defines a certificate mapping strategy to locate
* a user
- *
+ *
* @version $Revision$, $Date$
*/
public interface ICertUserLocator {
/**
* Returns a user whose certificates match with the given certificates
+ *
* @return an user interface
- * @exception EUsrGrpException thrown when failed to build user
+ * @exception EUsrGrpException thrown when failed to build user
* @exception LDAPException thrown when LDAP internal database is not available
* @exception ELdapException thrown when the LDAP search failed
*/
@@ -43,6 +42,7 @@ public interface ICertUserLocator {
/**
* Retrieves description.
+ *
* @return description
*/
public String getDescription();
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
index 778b9aab..18903f4a 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroup.java
@@ -17,40 +17,42 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import java.util.Enumeration;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* This interface defines the basic interfaces for
* an identity group. (get/set methods for a group entry attributes)
- *
+ *
* @version $Revision$, $Date$
*/
public interface IGroup extends IAttrSet, IGroupConstants {
/**
* Retrieves the group name.
+ *
* @return the group name
*/
public String getName();
/**
* Retrieves group identifier.
+ *
* @return the group id
*/
public String getGroupID();
/**
* Retrieves group description.
+ *
* @return description
*/
public String getDescription();
/**
* Checks if the given name is member of this group.
+ *
* @param name the given name
* @return true if the given name is the member of this group; otherwise false.
*/
@@ -58,12 +60,14 @@ public interface IGroup extends IAttrSet, IGroupConstants {
/**
* Adds new member.
+ *
* @param name the given name.
*/
public void addMemberName(String name);
/**
* Retrieves a list of member names.
+ *
* @return a list of member names for this group.
*/
public Enumeration getMemberNames();
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java
index 2f8711ce..22d89455 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IGroupConstants.java
@@ -17,12 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
-
-
/**
* This interface defines the attribute names for a group entry
- *
+ *
* @version $Revision$, $Date$
*/
public interface IGroupConstants {
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java
index 94bdf885..41209b4b 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IIdEvaluator.java
@@ -17,9 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
-
-
/**
* A class represents an ID evaluator.
* <P>
@@ -31,6 +28,7 @@ public interface IIdEvaluator {
/**
* Evaluates if the given value satisfies the ID evaluation:
* is a user a member of a group
+ *
* @param type the type of evaluator, in this case, it is group
* @param id the user id for the given user
* @param op operator, only "=" and "!=" are supported
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
index ff6f7be6..fee5627a 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUGSubsystem.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import java.security.cert.X509Certificate;
import java.util.Enumeration;
@@ -25,12 +24,11 @@ import netscape.ldap.LDAPException;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* This class defines low-level LDAP usr/grp management
* usr/grp information is located remotely on another
* LDAP server.
- *
+ *
* @version $Revision$, $Date$
*/
public interface IUGSubsystem extends ISubsystem, IUsrGrp {
@@ -47,6 +45,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Retrieves a user from LDAP
+ *
* @param userid the given user id
* @exception EUsrGrpException thrown when failed to find the user
*/
@@ -54,6 +53,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Searches for users that matches the filter.
+ *
* @param filter search filter for efficiency
* @return list of users
* @exception EUsrGrpException thrown when any internal error occurs
@@ -62,6 +62,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Adds the given user to the internal database
+ *
* @param identity the given user
* @exception EUsrGrpException thrown when failed to add user to the group
* @exception LDAPException thrown when the LDAP internal database is not available
@@ -70,6 +71,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Adds a user certificate to user
+ *
* @param identity user interface
* @exception EUsrGrpException thrown when failed to add the user certificate to the given user
* @exception LDAPException thrown when the LDAP internal database is not available
@@ -81,29 +83,33 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
* Removes a user certificate for a user entry
* given a user certificate DN (actually, a combination of version,
* serialNumber, issuerDN, and SubjectDN), and it gets removed
+ *
* @param identity the given user whose user certificate is going to be
- * be removed.
+ * be removed.
* @exception EUsrGrpException thrown when failed to remove user certificate
*/
public void removeUserCert(IUser identity) throws EUsrGrpException;
/**
* Removes identity.
+ *
* @param userid the given user id
* @exception EUsrGrpException thrown when failed to remove user
*/
public void removeUser(String userid) throws EUsrGrpException;
/**
- * Modifies user attributes. Certs are handled separately
+ * Modifies user attributes. Certs are handled separately
+ *
* @param identity the given identity which contains all the user
- * attributes being modified
+ * attributes being modified
* @exception EUsrGrpException thrown when modification failed
*/
public void modifyUser(IUser identity) throws EUsrGrpException;
/**
* Finds groups that match the filter.
+ *
* @param filter the search filter
* @return a list of groups that match the given search filter
*/
@@ -111,24 +117,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Find a group for the given name
+ *
* @param name the given name
* @return a group that matched the given name
*/
public IGroup findGroup(String name);
/**
- * List groups. This method is more efficient than findGroups because
- * this method retrieves group names and description only. Each
+ * List groups. This method is more efficient than findGroups because
+ * this method retrieves group names and description only. Each
* retrieved group just contains group name and description.
+ *
* @param filter the search filter
* @return a list of groups, each group just contains group name and
- * its description.
+ * its description.
* @exception EUsrGrpException thrown when failed to list groups
*/
public Enumeration<IGroup> listGroups(String filter) throws EUsrGrpException;
/**
* Retrieves a group from LDAP for the given group name
+ *
* @param name the given group name
* @return a group interface
*/
@@ -136,13 +145,15 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Retrieves a group from LDAP for the given DN.
- * @param DN the given DN
+ *
+ * @param DN the given DN
* @return a group interface for the given DN.
*/
public IGroup getGroup(String DN);
/**
* Checks if the given group exists.
+ *
* @param name the given group name
* @return true if the given group exists in the internal database; otherwise false.
*/
@@ -150,23 +161,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Checks if the given context is a member of the given group
+ *
* @param uid the given user id
* @param name the given group name
- * @return true if the user with the given user id is a member of the given
- * group
+ * @return true if the user with the given user id is a member of the given
+ * group
*/
public boolean isMemberOf(String uid, String name);
+
public boolean isMemberOf(IUser id, String name);
/**
* Adds a group of identities.
+ *
* @param group the given group
* @exception EUsrGrpException thrown when failed to add group.
*/
public void addGroup(IGroup group) throws EUsrGrpException;
/**
- * Removes a group. Can't remove SUPER_CERT_ADMINS
+ * Removes a group. Can't remove SUPER_CERT_ADMINS
+ *
* @param name the given group name
* @exception EUsrGrpException thrown when the given group failed to remove
*/
@@ -174,24 +189,27 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Modifies a group.
+ *
* @param group the given group which contain all group attributes being
- * modified.
+ * modified.
* @exception EUsrGrpException thrown when failed to modify group.
*/
public void modifyGroup(IGroup group) throws EUsrGrpException;
/**
* Removes the user with the given id from the given group
+ *
* @param grp the given group
* @param userid the given user id
* @exception EUsrGrpException thrown when failed to remove the user from
- * the given group
+ * the given group
*/
public void removeUserFromGroup(IGroup grp, String userid)
- throws EUsrGrpException;
+ throws EUsrGrpException;
/**
* Create user with the given id.
+ *
* @param id the user with the given id.
* @return a new user
*/
@@ -199,6 +217,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Create group with the given id.
+ *
* @param id the group with the given id.
* @return a new group
*/
@@ -206,6 +225,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Get string representation of the given certificate
+ *
* @param cert given certificate
* @return the string representation of the given certificate
*/
@@ -214,6 +234,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Searchs for identities that matches the certificate locater
* generated filter.
+ *
* @param filter search filter
* @return an user
* @exception EUsrGrpException thrown when failed to find user
@@ -224,6 +245,7 @@ public interface IUGSubsystem extends ISubsystem, IUsrGrp {
/**
* Get user locator which does the mapping between the user and the certificate.
+ *
* @return CertUserLocator
*/
public ICertUserLocator getCertUserLocator();
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java
index 398ccb71..9370a671 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUser.java
@@ -17,136 +17,154 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
import java.security.cert.X509Certificate;
import com.netscape.certsrv.base.IAttrSet;
-
/**
* This interface defines the basic interfaces for
* a user identity. (get/set methods for a user entry attributes)
- *
+ *
* @version $Revision$, $Date$
*/
public interface IUser extends IAttrSet, IUserConstants {
/**
* Retrieves name.
+ *
* @return user name
*/
public String getName();
/**
* Retrieves user identifier.
+ *
* @return user id
*/
public String getUserID();
/**
* Retrieves user full name.
+ *
* @return user fullname
*/
public String getFullName();
/**
* Retrieves user phonenumber.
+ *
* @return user phonenumber
*/
public String getPhone();
/**
* Retrieves user state
+ *
* @return user state
*/
public String getState();
/**
* Sets user full name.
+ *
* @param name the given full name
*/
public void setFullName(String name);
/**
* Sets user ldap DN.
+ *
* @param userdn the given user DN
*/
public void setUserDN(String userdn);
/**
* Gets user ldap dn
+ *
* @return user DN
*/
public String getUserDN();
/**
* Retrieves user password.
+ *
* @return user password
*/
public String getPassword();
/**
* Sets user password.
+ *
* @param p the given password
*/
public void setPassword(String p);
/**
* Sets user phonenumber
- * @param p user phonenumber
+ *
+ * @param p user phonenumber
*/
public void setPhone(String p);
/**
* Sets user state
+ *
* @param p the given user state
*/
public void setState(String p);
/**
* Sets user type
+ *
* @param userType the given user type
*/
public void setUserType(String userType);
/**
* Gets user email address.
+ *
* @return email address
*/
public String getEmail();
/**
* Sets user email address.
+ *
* @param email the given email address
*/
public void setEmail(String email);
/**
* Gets list of certificates from this user
+ *
* @return list of certificates
*/
public X509Certificate[] getX509Certificates();
/**
* Sets list of certificates in this user
+ *
* @param certs list of certificates
*/
public void setX509Certificates(X509Certificate certs[]);
/**
* Get certificate DN
+ *
* @return certificate DN
*/
public String getCertDN();
/**
* Set certificate DN
+ *
* @param userdn the given DN
*/
public void setCertDN(String userdn);
/**
* Get user type
+ *
* @return user type.
*/
public String getUserType();
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java
index f24e9fb4..f66f01c7 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUserConstants.java
@@ -17,12 +17,9 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.usrgrp;
-
-
-
/**
* This interface defines the attribute names for a user entry
- *
+ *
* @version $Revision$, $Date$
*/
public interface IUserConstants {
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
index 17b00c88..f6cef0d4 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/IUsrGrp.java
@@ -22,48 +22,52 @@ import netscape.ldap.LDAPException;
/**
* This interface defines the basic capabilities of
* a usr/group manager. (get/add/modify/remove users or groups)
- *
+ *
* @version $Revision$, $Date$
*/
public interface IUsrGrp extends IIdEvaluator {
/**
* Retrieves usr/grp manager identifier.
+ *
* @return id
*/
public String getId();
/**
* Retrieves the description
+ *
* @return description
*/
public String getDescription();
/**
* Retrieves an identity
+ *
* @param userid the user id for the given user
* @return user interface
*/
public IUser getUser(String userid) throws EUsrGrpException;
/**
- * Adds a user identity to the LDAP server. For example,
- * <code>
+ * Adds a user identity to the LDAP server. For example, <code>
* User user = new User("joe");
* user.setFullName("joe doe");
* user.setPassword("secret");
* usrgrp.addUser(user);
* </code>
+ *
* @param user an user interface
* @exception EUsrGrpException thrown when some of the user attribute values
- * are null
+ * are null
* @exception LDAPException thrown when the LDAP internal database is not
- * available, or the add operation failed
+ * available, or the add operation failed
*/
public void addUser(IUser user) throws EUsrGrpException, LDAPException;
/**
* Removes a user.
+ *
* @param userid the user id for the given user
* @exception EUsrGrpException thrown when failed to remove user
*/
@@ -71,6 +75,7 @@ public interface IUsrGrp extends IIdEvaluator {
/**
* Modifies user.
+ *
* @param user the user interface which contains the modified information
* @exception EUsrGrpException thrown when failed to modify user
*/
@@ -78,6 +83,7 @@ public interface IUsrGrp extends IIdEvaluator {
/**
* Retrieves an identity group
+ *
* @param groupid the given group id.
* @return the group interface
*/
@@ -85,6 +91,7 @@ public interface IUsrGrp extends IIdEvaluator {
/**
* Adds a group
+ *
* @param group the given group
* @exception EUsrGrpException thrown when failed to add the group.
*/
@@ -92,6 +99,7 @@ public interface IUsrGrp extends IIdEvaluator {
/**
* Modifies a group
+ *
* @param group the given group contains the new information for modification.
* @exception EUsrGrpException thrown when failed to modify the group.
*/
@@ -99,9 +107,10 @@ public interface IUsrGrp extends IIdEvaluator {
/**
* Removes a group
+ *
* @param name the group name
* @exception EUsrGrpException thrown when failed to remove the given
- * group.
+ * group.
*/
public void removeGroup(String name) throws EUsrGrpException;
diff --git a/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java b/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java
index ed4f28b8..11a3da23 100644
--- a/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java
+++ b/pki/base/common/src/com/netscape/certsrv/usrgrp/UsrGrpResources.java
@@ -20,9 +20,9 @@ package com.netscape.certsrv.usrgrp;
import java.util.ListResourceBundle;
/**
- * A class represents a resource bundle for the
+ * A class represents a resource bundle for the
* user/group manager
- *
+ *
* @deprecated
* @version $Revision$, $Date$
*/
@@ -30,6 +30,7 @@ public class UsrGrpResources extends ListResourceBundle {
/**
* Returns the content of this resource.
+ *
* @return the content of this resource.
*/
public Object[][] getContents() {
diff --git a/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java b/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
index 4f68bf63..9b7eec1d 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/HttpInput.java
@@ -26,19 +26,16 @@ import javax.servlet.http.HttpServletRequest;
import netscape.ldap.LDAPDN;
-public class HttpInput
-{
- public static int getPortNumberInInt(HttpServletRequest request, String name)
- throws IOException
- {
+public class HttpInput {
+ public static int getPortNumberInInt(HttpServletRequest request, String name)
+ throws IOException {
String val = request.getParameter(name);
int p = Integer.parseInt(val);
return p;
}
-
+
public static String getBoolean(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String val = request.getParameter(name);
if (val.equals("true") || val.equals("false")) {
return val;
@@ -47,8 +44,7 @@ public class HttpInput
}
public static String getCheckbox(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String val = request.getParameter(name);
if (val == null || val.equals("")) {
return "off";
@@ -59,8 +55,7 @@ public class HttpInput
}
public static String getInteger(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String val = request.getParameter(name);
int p = 0;
try {
@@ -75,9 +70,8 @@ public class HttpInput
return val;
}
- public static String getInteger(HttpServletRequest request, String name,
- int min, int max) throws IOException
- {
+ public static String getInteger(HttpServletRequest request, String name,
+ int min, int max) throws IOException {
String val = getInteger(request, name);
int p = Integer.parseInt(val);
if (p < min || p > max) {
@@ -85,41 +79,36 @@ public class HttpInput
}
return val;
}
-
+
public static String getPortNumber(HttpServletRequest request, String name)
- throws IOException
- {
- String v = getInteger(request, name);
+ throws IOException {
+ String v = getInteger(request, name);
return v;
}
-
+
public static String getString(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String val = request.getParameter(name);
return val;
}
public static String getString(HttpServletRequest request, String name,
- int minlen, int maxlen) throws IOException
- {
+ int minlen, int maxlen) throws IOException {
String val = request.getParameter(name);
if (val.length() < minlen || val.length() > maxlen) {
- throw new IOException("String length of '" + val +
- "' is out of range");
+ throw new IOException("String length of '" + val +
+ "' is out of range");
}
return val;
}
-
+
public static String getLdapDatabase(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getURL(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String v = getString(request, name);
try {
URL u = new URL(v);
@@ -128,163 +117,145 @@ public class HttpInput
}
return v;
}
-
+
public static String getUID(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getPassword(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
public static String getKeyType(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String v = getString(request, name);
if (v.equals("rsa")) {
- return v;
+ return v;
}
if (v.equals("ecc")) {
- return v;
+ return v;
}
throw new IOException("Invalid key type '" + v + "' not supported.");
}
-
+
public static String getKeySize(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String i = getInteger(request, name);
if (i.equals("256") || i.equals("512") || i.equals("1024") ||
- i.equals("2048") || i.equals("4096")) {
- return i;
+ i.equals("2048") || i.equals("4096")) {
+ return i;
}
throw new IOException("Invalid key length '" + i + "'. Currently supported key lengths are 256, 512, 1024, 2048, 4096.");
}
public static String getKeySize(HttpServletRequest request, String name, String keyType)
- throws IOException
- {
+ throws IOException {
String i = getInteger(request, name);
if (keyType.equals("rsa")) {
- if (i.equals("256") || i.equals("512") || i.equals("1024") ||
- i.equals("2048") || i.equals("4096")) {
- return i;
- } else {
- throw new IOException("Invalid key length '" + i + "'. Currently supported RSA key lengths are 256, 512, 1024, 2048, 4096.");
- }
+ if (i.equals("256") || i.equals("512") || i.equals("1024") ||
+ i.equals("2048") || i.equals("4096")) {
+ return i;
+ } else {
+ throw new IOException("Invalid key length '" + i + "'. Currently supported RSA key lengths are 256, 512, 1024, 2048, 4096.");
+ }
}
if (keyType.equals("ecc")) {
- int p = 0;
- try {
- p = Integer.parseInt(i);
- } catch (NumberFormatException e) {
- throw new IOException("Input '" + i + "' is not an integer");
- }
- if ((p >= 112) && (p <= 571))
- return i;
- else {
- throw new IOException("Invalid key length '" + i + "'. Please consult your security officer for a proper length, or take the default value. Here are examples of some commonly used key lengths: 256, 384, 521.");
- }
-/*
+ int p = 0;
+ try {
+ p = Integer.parseInt(i);
+ } catch (NumberFormatException e) {
+ throw new IOException("Input '" + i + "' is not an integer");
+ }
+ if ((p >= 112) && (p <= 571))
+ return i;
+ else {
+ throw new IOException("Invalid key length '" + i + "'. Please consult your security officer for a proper length, or take the default value. Here are examples of some commonly used key lengths: 256, 384, 521.");
+ }
+ /*
- if (i.equals("256") || i.equals("384") || i.equals("521")) {
- return i;
- } else {
- throw new IOException("Invalid key length '" + i + "'. Currently supported ECC key lengths are 256, 384, 521.");
- }
-*/
+ if (i.equals("256") || i.equals("384") || i.equals("521")) {
+ return i;
+ } else {
+ throw new IOException("Invalid key length '" + i + "'. Currently supported ECC key lengths are 256, 384, 521.");
+ }
+ */
}
throw new IOException("Invalid key type '" + keyType + "'");
}
-
+
public static String getDN(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String v = getString(request, name);
String dn[] = LDAPDN.explodeDN(v, true);
if (dn == null || dn.length <= 0) {
- throw new IOException("Invalid DN " + v + " in " + name);
+ throw new IOException("Invalid DN " + v + " in " + name);
}
return v;
}
-
+
public static String getID(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getName(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getCertRequest(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getCertChain(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getCert(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
public static String getNickname(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getHostname(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getTokenName(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
public static String getReplicationAgreementName(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
+
public static String getEmail(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
String v = getString(request, name);
if (v.indexOf('@') == -1) {
- throw new IOException("Invalid email " + v);
+ throw new IOException("Invalid email " + v);
}
return v;
}
-
+
public static String getDomainName(HttpServletRequest request, String name)
- throws IOException
- {
+ throws IOException {
return getString(request, name);
}
-
- public static String getSecurityDomainName(HttpServletRequest request, String name)
- throws IOException
- {
+
+ public static String getSecurityDomainName(HttpServletRequest request, String name)
+ throws IOException {
String v = getName(request, name);
Pattern p = Pattern.compile("[A-Za-z0-9]+[A-Za-z0-9 -]*");
Matcher m = p.matcher(v);
diff --git a/pki/base/common/src/com/netscape/certsrv/util/IStatsSubsystem.java b/pki/base/common/src/com/netscape/certsrv/util/IStatsSubsystem.java
index c9881236..989d7a4a 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/IStatsSubsystem.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/IStatsSubsystem.java
@@ -17,12 +17,10 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.util;
-
import java.util.Date;
import com.netscape.certsrv.base.ISubsystem;
-
/**
* A class represents a internal subsystem. This subsystem
* can be loaded into cert server kernel to perform
@@ -32,10 +30,9 @@ import com.netscape.certsrv.base.ISubsystem;
* @author thomask
* @version $Revision$, $Date$
*/
-public interface IStatsSubsystem extends ISubsystem
-{
+public interface IStatsSubsystem extends ISubsystem {
/**
- * Retrieves the start time since startup or
+ * Retrieves the start time since startup or
* clearing of statistics.
*/
public Date getStartTime();
diff --git a/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java b/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
index 7c510b88..9e004b62 100644
--- a/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
+++ b/pki/base/common/src/com/netscape/certsrv/util/StatsEvent.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.util;
-
import java.util.Enumeration;
import java.util.Vector;
@@ -28,167 +27,149 @@ import java.util.Vector;
* @author thomask
* @version $Revision$, $Date$
*/
-public class StatsEvent
-{
- private String mName = null;
- private long mMin = -1;
- private long mMax = -1;
- private long mTimeTaken = 0;
- private long mTimeTakenSqSum = 0;
- private long mNoOfOperations = 0;
- private Vector mSubEvents = new Vector();
- private StatsEvent mParent = null;
-
- public StatsEvent(StatsEvent parent)
- {
- mParent = parent;
- }
-
- public void setName(String name)
- {
- mName = name;
- }
-
- /**
- * Retrieves Transaction name.
- */
- public String getName()
- {
- return mName;
- }
-
- public void addSubEvent(StatsEvent st)
- {
- mSubEvents.addElement(st);
- }
-
- /**
- * Retrieves a list of sub transaction names.
- */
- public Enumeration getSubEventNames()
- {
- Vector names = new Vector();
- Enumeration e = mSubEvents.elements();
- while (e.hasMoreElements()) {
- StatsEvent st = (StatsEvent)e.nextElement();
- names.addElement(st.getName());
- }
- return names.elements();
- }
-
- /**
- * Retrieves a sub transaction.
- */
- public StatsEvent getSubEvent(String name)
- {
- Enumeration e = mSubEvents.elements();
- while (e.hasMoreElements()) {
- StatsEvent st = (StatsEvent)e.nextElement();
- if (st.getName().equals(name)) {
- return st;
- }
- }
- return null;
- }
-
- public void resetCounters()
- {
- mMin = -1;
- mMax = -1;
- mNoOfOperations = 0;
- mTimeTaken = 0;
- mTimeTakenSqSum = 0;
- Enumeration e = getSubEventNames();
- while (e.hasMoreElements()) {
- String n = (String)e.nextElement();
- StatsEvent c = getSubEvent(n);
- c.resetCounters();
- }
- }
-
- public long getMax()
- {
- return mMax;
- }
-
- public long getMin()
- {
- return mMin;
- }
-
- public void incNoOfOperations(long c)
- {
- mNoOfOperations += c;
- }
-
- public long getTimeTakenSqSum()
- {
- return mTimeTakenSqSum;
- }
-
- public long getPercentage()
- {
- if (mParent == null || mParent.getTimeTaken() == 0) {
- return 100;
- } else {
- return (mTimeTaken * 100 / mParent.getTimeTaken());
- }
- }
-
- public long getStdDev()
- {
- if (getNoOfOperations() == 0) {
- return 0;
- } else {
- long a = getTimeTakenSqSum();
- long b = (-2 * getAvg() *getTimeTaken());
- long c = getAvg() * getAvg() * getNoOfOperations();
- return (long)Math.sqrt((a + b + c)/getNoOfOperations());
- }
- }
-
- public long getAvg()
- {
- if (mNoOfOperations == 0) {
- return -1;
- } else {
- return mTimeTaken/mNoOfOperations;
- }
- }
-
- /**
- * Retrieves number of operations performed.
- */
- public long getNoOfOperations()
- {
- return mNoOfOperations;
- }
-
- public void incTimeTaken(long c)
- {
- if (mMin == -1) {
- mMin = c;
- } else {
- if (c < mMin) {
- mMin = c;
- }
- }
- if (mMax == -1) {
- mMax = c;
- } else {
- if (c > mMax) {
- mMax = c;
- }
- }
- mTimeTaken += c;
- mTimeTakenSqSum += (c * c);
- }
-
- /**
- * Retrieves total time token in msec.
- */
- public long getTimeTaken()
- {
- return mTimeTaken;
- }
+public class StatsEvent {
+ private String mName = null;
+ private long mMin = -1;
+ private long mMax = -1;
+ private long mTimeTaken = 0;
+ private long mTimeTakenSqSum = 0;
+ private long mNoOfOperations = 0;
+ private Vector mSubEvents = new Vector();
+ private StatsEvent mParent = null;
+
+ public StatsEvent(StatsEvent parent) {
+ mParent = parent;
+ }
+
+ public void setName(String name) {
+ mName = name;
+ }
+
+ /**
+ * Retrieves Transaction name.
+ */
+ public String getName() {
+ return mName;
+ }
+
+ public void addSubEvent(StatsEvent st) {
+ mSubEvents.addElement(st);
+ }
+
+ /**
+ * Retrieves a list of sub transaction names.
+ */
+ public Enumeration getSubEventNames() {
+ Vector names = new Vector();
+ Enumeration e = mSubEvents.elements();
+ while (e.hasMoreElements()) {
+ StatsEvent st = (StatsEvent) e.nextElement();
+ names.addElement(st.getName());
+ }
+ return names.elements();
+ }
+
+ /**
+ * Retrieves a sub transaction.
+ */
+ public StatsEvent getSubEvent(String name) {
+ Enumeration e = mSubEvents.elements();
+ while (e.hasMoreElements()) {
+ StatsEvent st = (StatsEvent) e.nextElement();
+ if (st.getName().equals(name)) {
+ return st;
+ }
+ }
+ return null;
+ }
+
+ public void resetCounters() {
+ mMin = -1;
+ mMax = -1;
+ mNoOfOperations = 0;
+ mTimeTaken = 0;
+ mTimeTakenSqSum = 0;
+ Enumeration e = getSubEventNames();
+ while (e.hasMoreElements()) {
+ String n = (String) e.nextElement();
+ StatsEvent c = getSubEvent(n);
+ c.resetCounters();
+ }
+ }
+
+ public long getMax() {
+ return mMax;
+ }
+
+ public long getMin() {
+ return mMin;
+ }
+
+ public void incNoOfOperations(long c) {
+ mNoOfOperations += c;
+ }
+
+ public long getTimeTakenSqSum() {
+ return mTimeTakenSqSum;
+ }
+
+ public long getPercentage() {
+ if (mParent == null || mParent.getTimeTaken() == 0) {
+ return 100;
+ } else {
+ return (mTimeTaken * 100 / mParent.getTimeTaken());
+ }
+ }
+
+ public long getStdDev() {
+ if (getNoOfOperations() == 0) {
+ return 0;
+ } else {
+ long a = getTimeTakenSqSum();
+ long b = (-2 * getAvg() * getTimeTaken());
+ long c = getAvg() * getAvg() * getNoOfOperations();
+ return (long) Math.sqrt((a + b + c) / getNoOfOperations());
+ }
+ }
+
+ public long getAvg() {
+ if (mNoOfOperations == 0) {
+ return -1;
+ } else {
+ return mTimeTaken / mNoOfOperations;
+ }
+ }
+
+ /**
+ * Retrieves number of operations performed.
+ */
+ public long getNoOfOperations() {
+ return mNoOfOperations;
+ }
+
+ public void incTimeTaken(long c) {
+ if (mMin == -1) {
+ mMin = c;
+ } else {
+ if (c < mMin) {
+ mMin = c;
+ }
+ }
+ if (mMax == -1) {
+ mMax = c;
+ } else {
+ if (c > mMax) {
+ mMax = c;
+ }
+ }
+ mTimeTaken += c;
+ mTimeTakenSqSum += (c * c);
+ }
+
+ /**
+ * Retrieves total time token in msec.
+ */
+ public long getTimeTaken() {
+ return mTimeTaken;
+ }
}