From 455897cc245b67d929f409a93cfa7106e835cc1f Mon Sep 17 00:00:00 2001
From: boli <boli@localhost>
Date: Thu, 01 Mar 2007 03:27:06 +0000
Subject: [PATCH] This removes old debug logging framework method calls that are going to be automatically instrumented by AspectJ. Non instrumented debug method calls are updated to use the new debug framework methods. However, the new debug logging framework is not yet active as the Aspects are not weaved in. After this revision, debug logging will be disabled in the server until the new AOP framework is complete.
---
opends/src/server/org/opends/server/types/AuthenticationType.java | 2
opends/src/server/org/opends/server/synchronization/plugin/AttrInfoWithOptions.java | 2
opends/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java | 20
opends/src/server/org/opends/server/synchronization/protocol/DeleteContext.java | 2
opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java | 60
opends/src/server/org/opends/server/types/SearchFilter.java | 685
opends/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java | 19
opends/src/server/org/opends/server/util/Validator.java | 14
opends/src/server/org/opends/server/util/package-info.java | 2
opends/src/server/org/opends/server/types/ObjectClassType.java | 2
opends/src/server/org/opends/server/backends/jeb/PresenceIndexer.java | 7
opends/src/server/org/opends/server/types/WritabilityMode.java | 2
opends/src/server/org/opends/server/types/operation/PreOperationBindOperation.java | 2
opends/src/server/org/opends/server/schema/BitStringSyntax.java | 20
opends/src/server/org/opends/server/tools/makeldif/GUIDTag.java | 2
opends/src/server/org/opends/server/api/InvokableComponent.java | 3
opends/src/server/org/opends/server/extensions/TLSConnectionSecurityProvider.java | 72
opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java | 2
opends/src/server/org/opends/server/tools/makeldif/RandomTag.java | 2
opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java | 2
opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java | 48
opends/src/server/org/opends/server/tools/makeldif/TemplateLine.java | 2
opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java | 43
opends/src/server/org/opends/server/messages/JebMessages.java | 2
opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java | 56
opends/src/server/org/opends/server/loggers/RotationActionThread.java | 14
opends/src/server/org/opends/server/api/VirtualAttribute.java | 2
opends/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java | 23
opends/src/server/org/opends/server/loggers/RotationConfigUtil.java | 24
opends/src/server/org/opends/server/util/args/IntegerArgument.java | 2
opends/src/server/org/opends/server/types/DITContentRule.java | 56
opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java | 20
opends/src/server/org/opends/server/types/RDN.java | 99
opends/ext/aspectj/lib/aspectjlib.jar | 0
opends/src/quicksetup/org/opends/quicksetup/installer/InstallException.java | 2
opends/src/server/org/opends/server/tools/makeldif/Branch.java | 2
opends/src/server/org/opends/server/loggers/StartupErrorLogger.java | 2
opends/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java | 22
opends/src/server/org/opends/server/api/LogPublisher.java | 54
opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateEvent.java | 2
opends/src/server/org/opends/server/synchronization/protocol/ModifyDnContext.java | 2
opends/src/server/org/opends/server/core/PersistentSearch.java | 92
opends/src/server/org/opends/server/backends/jeb/IndexConfig.java | 7
opends/src/server/org/opends/server/types/operation/PreOperationCompareOperation.java | 2
opends/src/server/org/opends/server/extensions/ConfigFileHandler.java | 290
opends/src/server/org/opends/server/types/AttributeValueIterable.java | 18
opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserLauncher.java | 2
opends/src/server/org/opends/server/loggers/LogLevel.java | 222
opends/ext/aspectj/lib/aspectjtools.jar | 0
opends/src/server/org/opends/server/loggers/TextLogFormatter.java | 42
opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java | 28
opends/src/server/org/opends/server/config/ConfigEntry.java | 55
opends/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java | 96
opends/src/server/org/opends/server/api/plugin/PluginType.java | 2
opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java | 34
opends/src/server/org/opends/server/tasks/RestartTaskThread.java | 7
opends/src/server/org/opends/server/api/IdentityMapper.java | 9
opends/src/server/org/opends/server/backends/jeb/DbPreloadComparator.java | 16
opends/src/server/org/opends/server/loggers/LogRecord.java | 153
opends/src/server/org/opends/server/synchronization/changelog/UpdateComparator.java | 2
opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java | 78
opends/src/server/org/opends/server/types/AttributeType.java | 59
opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java | 2
opends/src/server/org/opends/server/controls/PersistentSearchControl.java | 43
opends/src/server/org/opends/server/types/operation/package-info.java | 2
opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java | 179
opends/src/server/org/opends/server/synchronization/plugin/HistKey.java | 2
opends/src/server/org/opends/server/api/ConfigAddListener.java | 2
opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java | 58
opends/src/server/org/opends/server/backends/jeb/BufferedIndex.java | 2
opends/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/util/args/StringArgument.java | 2
opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java | 43
opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java | 2
opends/src/server/org/opends/server/core/RootDNConfigManager.java | 83
opends/src/server/org/opends/server/backends/jeb/Index.java | 26
opends/src/server/org/opends/server/schema/TelephoneNumberEqualityMatchingRule.java | 19
opends/src/server/org/opends/server/types/operation/PostResponseOperation.java | 2
opends/src/server/org/opends/server/schema/OctetStringSubstringMatchingRule.java | 20
opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java | 28
opends/src/server/org/opends/server/types/DebugLogLevel.java | 81
opends/src/server/org/opends/server/loggers/DirectoryFileHandler.java | 2
opends/src/server/org/opends/server/util/MultiOutputStream.java | 43
opends/src/server/org/opends/server/types/DirectoryException.java | 35
opends/src/server/org/opends/server/backends/task/TaskScheduler.java | 167
opends/src/server/org/opends/server/synchronization/plugin/ValueInfo.java | 2
opends/src/server/org/opends/server/protocols/ldap/LDAPConstants.java | 2
opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java | 426
opends/src/server/org/opends/server/core/BindOperation.java | 140
opends/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java | 55
opends/src/server/org/opends/server/loggers/LoggerThread.java | 40
opends/src/server/org/opends/server/loggers/debug/DebugStackTraceFormatter.java | 178
opends/src/server/org/opends/server/backends/jeb/VerifyConfig.java | 2
opends/src/server/org/opends/server/api/SubtreeSpecificationSet.java | 15
opends/src/server/org/opends/server/protocols/asn1/ASN1Set.java | 24
opends/src/server/org/opends/server/schema/NumericStringSyntax.java | 20
opends/src/server/org/opends/server/tools/makeldif/StaticTextTag.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationAbandonOperation.java | 2
opends/src/server/org/opends/server/backends/jeb/EnvManager.java | 21
opends/src/server/org/opends/server/protocols/asn1/ASN1Boolean.java | 24
opends/src/server/org/opends/server/types/operation/PreOperationModifyOperation.java | 2
opends/src/server/org/opends/server/tools/VerifyIndex.java | 2
opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java | 18
opends/src/server/org/opends/server/synchronization/protocol/ModifyMsg.java | 2
opends/src/server/org/opends/server/types/AuthenticationInfo.java | 53
opends/src/server/org/opends/server/backends/jeb/JebException.java | 14
opends/src/server/org/opends/server/util/args/ArgumentException.java | 2
opends/src/server/org/opends/server/extensions/InternalConnectionSecurityProvider.java | 17
opends/src/server/org/opends/server/core/EntryCacheConfigManager.java | 70
opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java | 34
opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java | 66
opends/src/server/org/opends/server/schema/BooleanSyntax.java | 23
opends/src/server/org/opends/server/types/operation/PostResponseSearchOperation.java | 2
opends/src/server/org/opends/server/api/SubtreeSpecification.java | 2
opends/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java | 32
opends/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java | 66
opends/src/server/org/opends/server/loggers/package-info.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java | 2
opends/src/server/org/opends/server/core/RelativeSubtreeSpecification.java | 16
opends/src/server/org/opends/server/types/InitializationException.java | 16
opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java | 109
opends/src/server/org/opends/server/backends/RootDSEBackend.java | 117
opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateListener.java | 2
opends/src/server/org/opends/server/tools/LDAPCompare.java | 57
opends/src/server/org/opends/server/api/CertificateMapper.java | 9
opends/src/server/org/opends/server/loggers/LogErrorHandler.java | 45
opends/src/server/org/opends/server/api/AttributeValueDecoder.java | 2
opends/src/server/org/opends/server/types/operation/PreOperationOperation.java | 2
opends/src/server/org/opends/server/controls/PasswordExpiredControl.java | 14
opends/src/server/org/opends/server/synchronization/protocol/AddMsg.java | 2
opends/src/server/org/opends/server/api/ConnectionSecurityProvider.java | 2
opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java | 2
opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java | 68
opends/src/server/org/opends/server/backends/MemoryBackend.java | 71
opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java | 33
opends/src/server/org/opends/server/schema/BinarySyntax.java | 21
opends/src/server/org/opends/server/backends/jeb/IndexMod.java | 2
opends/src/server/org/opends/server/synchronization/common/ChangeNumber.java | 2
opends/src/server/org/opends/server/types/MemberList.java | 13
opends/src/server/org/opends/server/authorization/dseecompat/AciException.java | 12
opends/src/server/org/opends/server/backends/task/TaskState.java | 20
opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java | 48
opends/src/server/org/opends/server/core/SearchOperation.java | 161
opends/src/quicksetup/org/opends/quicksetup/Step.java | 2
opends/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java | 20
opends/src/server/org/opends/server/types/operation/PostResponseCompareOperation.java | 2
opends/src/server/org/opends/server/tools/LDAPToolOptions.java | 7
opends/src/server/org/opends/server/tools/makeldif/DNTag.java | 2
opends/src/server/org/opends/server/tools/makeldif/LastNameTag.java | 2
opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java | 70
opends/src/server/org/opends/server/extensions/CancelExtendedOperation.java | 22
opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationBindOperation.java | 2
opends/src/quicksetup/org/opends/quicksetup/event/ButtonEvent.java | 2
opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java | 2
opends/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java | 2
opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java | 23
opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java | 14
opends/src/server/org/opends/server/loggers/Access.java | 2
opends/src/server/org/opends/server/types/DereferencePolicy.java | 2
opends/src/server/org/opends/server/types/NamedCharacterSet.java | 19
opends/src/server/org/opends/server/controls/AccountUsableRequestControl.java | 14
opends/src/server/org/opends/server/loggers/LogFileFilter.java | 2
opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserException.java | 2
opends/src/server/org/opends/server/core/RFC3672SubtreeSpecification.java | 28
opends/src/server/org/opends/server/controls/MatchedValuesControl.java | 35
opends/ext/aspectj/lib/aspectjweaver.jar | 0
opends/src/server/org/opends/server/types/ConfigChangeResult.java | 25
opends/src/server/org/opends/server/synchronization/plugin/ModifyFakeOperation.java | 2
opends/src/server/org/opends/server/config/IntegerConfigAttribute.java | 128
opends/src/server/org/opends/server/core/DefaultAccessControlProvider.java | 26
opends/src/server/org/opends/server/synchronization/package-info.java | 2
opends/src/server/org/opends/server/util/EMailMessage.java | 64
opends/src/server/org/opends/server/core/SASLConfigManager.java | 111
opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java | 47
opends/src/server/org/opends/server/synchronization/plugin/package-info.java | 2
opends/src/server/org/opends/server/extensions/ExtensionsConstants.java | 2
opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java | 26
opends/src/server/org/opends/server/backends/task/TaskThread.java | 32
opends/src/server/org/opends/server/api/SynchronizationProvider.java | 17
opends/src/server/org/opends/server/types/DN.java | 84
opends/src/server/org/opends/server/util/args/package-info.java | 2
opends/src/server/org/opends/server/extensions/BlindTrustManagerProvider.java | 20
opends/src/server/org/opends/server/schema/UserPasswordExactEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java | 14
opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java | 2
opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/DataOptions.java | 2
opends/src/quicksetup/org/opends/quicksetup/ui/StepsPanel.java | 2
opends/src/server/org/opends/server/api/ConnectionHandler.java | 13
opends/src/server/org/opends/server/authorization/BasicAccessControlProvider.java | 12
opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java | 57
opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java | 12
opends/src/server/org/opends/server/api/ConfigDeleteListener.java | 2
opends/src/server/org/opends/server/backends/jeb/IndexBuilder.java | 2
opends/src/server/org/opends/server/loggers/Logger.java | 180
opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java | 69
opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java | 20
opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java | 66
opends/src/server/org/opends/server/core/package-info.java | 2
opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java | 15
opends/src/server/org/opends/server/api/AlertGenerator.java | 3
opends/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java | 19
opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupPanel.java | 2
opends/src/server/org/opends/server/extensions/TLSCapableConnection.java | 2
opends/src/server/org/opends/server/plugins/package-info.java | 2
opends/src/server/org/opends/server/tools/ConfigureDS.java | 4
opends/src/server/org/opends/server/types/CryptoManager.java | 67
opends/src/server/org/opends/server/api/plugin/package-info.java | 2
opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java | 110
opends/src/server/org/opends/server/api/plugin/IntermediateResponsePluginResult.java | 21
opends/src/server/org/opends/server/types/operation/PostResponseExtendedOperation.java | 2
opends/src/quicksetup/org/opends/quicksetup/util/URLWorker.java | 2
opends/src/server/org/opends/server/api/SASLMechanismHandler.java | 7
opends/src/server/org/opends/server/controls/PasswordPolicyErrorType.java | 2
opends/src/server/org/opends/server/protocols/asn1/ASN1Enumerated.java | 23
opends/src/server/org/opends/server/protocols/jmx/OpendsJmxPrincipal.java | 2
opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java | 44
opends/src/server/org/opends/server/types/operation/PreOperationModifyDNOperation.java | 2
opends/src/server/org/opends/server/loggers/DirectoryFileFormatter.java | 2
opends/src/server/org/opends/server/types/ExistingFileBehavior.java | 2
opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java | 20
opends/src/server/org/opends/server/authorization/package-info.java | 2
opends/src/server/org/opends/server/messages/CoreMessages.java | 308
opends/src/server/org/opends/server/tools/makeldif/SequentialTag.java | 2
opends/src/server/org/opends/server/controls/PasswordPolicyWarningType.java | 2
opends/src/server/org/opends/server/types/ResultCode.java | 2
opends/src/server/org/opends/server/core/ModifyOperation.java | 197
opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java | 241
opends/src/server/org/opends/server/types/HostPort.java | 19
opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java | 48
opends/src/server/org/opends/server/tools/makeldif/FirstNameTag.java | 2
opends/src/server/org/opends/server/synchronization/changelog/ChangelogIterator.java | 2
opends/src/server/org/opends/server/loggers/RetentionPolicy.java | 2
opends/src/server/org/opends/server/tools/LDAPSearch.java | 57
opends/src/server/org/opends/server/types/operation/InProgressOperation.java | 2
opends/src/server/org/opends/server/plugins/LastModPlugin.java | 31
opends/src/server/org/opends/server/core/AbsoluteSubtreeSpecification.java | 15
opends/src/server/org/opends/server/types/SearchScope.java | 2
opends/src/server/org/opends/server/api/AlertHandler.java | 2
opends/src/server/org/opends/server/extensions/GSSAPIStateInfo.java | 77
opends/src/server/org/opends/server/api/Group.java | 9
opends/src/server/org/opends/server/api/MonitorProvider.java | 22
opends/src/server/org/opends/server/synchronization/plugin/PendingChange.java | 2
opends/src/server/org/opends/server/core/DirectoryServerShutdownHook.java | 15
opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressDescriptor.java | 2
opends/src/server/org/opends/server/loggers/InitializationErrorManager.java | 2
opends/src/server/org/opends/server/types/ErrorLogSeverity.java | 2
opends/src/server/org/opends/server/api/DirectoryServerMBean.java | 2
opends/src/server/org/opends/server/protocols/internal/InternalSearchListener.java | 2
opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java | 14
opends/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/synchronization/protocol/SynchronizationMessage.java | 2
opends/src/server/org/opends/server/synchronization/protocol/DeleteMsg.java | 2
opends/src/server/org/opends/server/messages/LoggerMessages.java | 2
opends/src/server/org/opends/server/backends/jeb/JebFormat.java | 19
opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java | 31
opends/src/server/org/opends/server/core/LockFileManager.java | 69
opends/src/server/org/opends/server/config/DNConfigAttribute.java | 115
opends/src/server/org/opends/server/core/AbandonOperation.java | 26
opends/src/server/org/opends/server/types/CancelResult.java | 2
opends/src/server/org/opends/server/api/PasswordValidator.java | 9
opends/src/server/org/opends/server/loggers/debug/DebugErrorHandler.java | 65
opends/src/server/org/opends/server/synchronization/plugin/FakeOperationComparator.java | 2
opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java | 102
opends/src/server/org/opends/server/loggers/DirectoryErrorLogger.java | 2
opends/src/server/org/opends/server/schema/IA5StringSyntax.java | 20
opends/src/quicksetup/org/opends/quicksetup/util/PlainTextProgressMessageFormatter.java | 2
opends/src/server/org/opends/server/schema/CaseIgnoreListEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/extensions/package-info.java | 2
opends/src/server/org/opends/server/tools/makeldif/PresenceTag.java | 2
opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java | 105
opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java | 95
opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java | 83
opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java | 71
opends/src/server/org/opends/server/core/CoreConstants.java | 2
opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java | 2
opends/src/server/org/opends/server/protocols/package-info.java | 2
opends/src/server/org/opends/server/types/ModificationType.java | 2
opends/src/server/org/opends/server/core/AddOperation.java | 172
opends/src/server/org/opends/server/backends/jeb/DN2ID.java | 2
opends/src/server/org/opends/server/schema/UserPasswordSyntax.java | 23
opends/src/quicksetup/org/opends/quicksetup/ui/InstallWelcomePanel.java | 2
opends/src/server/org/opends/server/core/MonitorConfigManager.java | 110
opends/src/server/org/opends/server/schema/FaxSyntax.java | 20
opends/src/server/org/opends/server/tools/LDAPDelete.java | 46
opends/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java | 20
opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java | 109
opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java | 69
opends/src/server/org/opends/server/tasks/ExportTask.java | 8
opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java | 2
opends/src/server/org/opends/server/util/LDIFReader.java | 205
opends/src/server/org/opends/server/loggers/RotationPolicy.java | 2
opends/src/server/org/opends/server/util/args/FileBasedArgument.java | 2
opends/src/server/org/opends/server/core/BackendConfigManager.java | 293
opends/src/server/org/opends/server/schema/CaseExactEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/types/Modification.java | 31
opends/src/server/org/opends/server/backends/jeb/MergeValue.java | 2
opends/src/server/org/opends/server/tools/LDAPModifyOptions.java | 9
opends/src/server/org/opends/server/types/NullOutputStream.java | 2
opends/src/server/org/opends/server/authorization/dseecompat/AciProvider.java | 4
opends/src/server/org/opends/server/monitors/ConnectionHandlerMonitor.java | 16
opends/src/server/org/opends/server/backends/jeb/Longs.java | 2
opends/src/server/org/opends/server/core/Operation.java | 61
opends/src/server/org/opends/server/config/JMXMBean.java | 106
opends/src/server/org/opends/server/synchronization/protocol/ServerStartMessage.java | 2
opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java | 38
opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java | 18
opends/src/server/org/opends/server/schema/OIDSyntax.java | 20
opends/src/server/org/opends/server/messages/UtilityMessages.java | 2
opends/src/server/org/opends/server/loggers/LogCategory.java | 71
opends/src/server/org/opends/server/protocols/jmx/Credential.java | 2
opends/src/server/org/opends/server/extensions/FIFOEntryCache.java | 258
opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java | 92
opends/src/server/org/opends/server/loggers/debug/TraceConfiguration.java | 165
opends/src/server/org/opends/server/synchronization/plugin/Historical.java | 2
opends/src/server/org/opends/server/schema/JPEGSyntax.java | 20
opends/src/server/org/opends/server/types/operation/PostOperationAddOperation.java | 2
opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java | 111
opends/src/server/org/opends/server/synchronization/changelog/package-info.java | 2
opends/src/server/org/opends/server/schema/PresentationAddressEqualityMatchingRule.java | 19
opends/src/server/org/opends/server/protocols/internal/package-info.java | 2
opends/src/server/org/opends/server/types/AttributeUsage.java | 2
opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java | 77
opends/src/server/org/opends/server/schema/IntegerSyntax.java | 20
opends/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java | 20
opends/src/server/org/opends/server/tools/LDAPConnection.java | 39
opends/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java | 66
opends/src/server/org/opends/server/messages/MessageHandler.java | 2
opends/src/server/org/opends/server/protocols/ldap/LDAPException.java | 15
opends/src/server/org/opends/server/types/operation/PostOperationModifyDNOperation.java | 2
opends/src/server/org/opends/server/messages/package-info.java | 2
opends/src/server/org/opends/server/schema/CertificateListSyntax.java | 20
opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java | 57
opends/src/server/org/opends/server/monitors/package-info.java | 2
opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java | 78
opends/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java | 21
opends/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java | 43
opends/src/server/org/opends/server/tools/ImportLDIF.java | 2
opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java | 225
opends/ext/aspectj/lib/aspectjrt.jar | 0
opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java | 96
opends/src/server/org/opends/server/loggers/FileComparator.java | 2
opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java | 32
opends/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java | 2
opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java | 139
opends/src/server/org/opends/server/synchronization/protocol/UpdateMessage.java | 2
opends/src/server/org/opends/server/tools/LDAPDeleteOptions.java | 9
opends/src/quicksetup/org/opends/quicksetup/ui/ServerSettingsPanel.java | 2
opends/src/server/org/opends/server/tools/package-info.java | 2
opends/src/server/org/opends/server/types/operation/PreParseOperation.java | 2
opends/lib/aspectjrt.jar | 0
opends/src/server/org/opends/server/types/NameForm.java | 50
opends/src/server/org/opends/server/tools/makeldif/TemplateFile.java | 2
opends/src/server/org/opends/server/protocols/ldap/package-info.java | 2
opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java | 40
opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java | 28
opends/src/server/org/opends/server/backends/jeb/EntryContainer.java | 277
opends/src/server/org/opends/server/backends/jeb/IndexMergeThread.java | 21
opends/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/schema/package-info.java | 2
opends/src/server/org/opends/server/protocols/asn1/ASN1Long.java | 22
opends/src/server/org/opends/server/types/AccountStatusNotificationType.java | 2
opends/src/server/org/opends/server/synchronization/plugin/AttrInfo.java | 2
opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java | 2
opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java | 66
opends/src/server/org/opends/server/schema/KeywordEqualityMatchingRule.java | 11
opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java | 20
opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java | 2
opends/src/server/org/opends/server/util/TimeThread.java | 16
opends/src/server/org/opends/server/loggers/PostRotationAction.java | 2
opends/src/server/org/opends/server/backends/jeb/BackupManager.java | 142
opends/src/server/org/opends/server/core/UnbindOperation.java | 22
opends/src/server/org/opends/server/protocols/asn1/ASN1Exception.java | 12
opends/src/server/org/opends/server/types/RestoreConfig.java | 18
opends/src/server/org/opends/server/schema/CertificatePairSyntax.java | 20
opends/src/server/org/opends/server/tools/LDAPPasswordModify.java | 2
opends/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java | 18
opends/src/server/org/opends/server/api/EqualityMatchingRule.java | 28
opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java | 2
opends/src/server/org/opends/server/config/package-info.java | 2
opends/src/server/org/opends/server/tools/LDAPModify.java | 96
opends/src/server/org/opends/server/interop/LazyDN.java | 35
opends/src/quicksetup/org/opends/quicksetup/ui/DataOptionsPanel.java | 2
opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java | 30
opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java | 40
opends/src/server/org/opends/server/backends/jeb/BackendImpl.java | 213
opends/src/server/org/opends/server/backends/jeb/ID2Entry.java | 2
opends/src/server/org/opends/server/types/AttributeValue.java | 42
opends/src/server/org/opends/server/backends/jeb/ImportThread.java | 26
opends/src/server/org/opends/server/types/CommonSchemaElements.java | 41
opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java | 2
opends/src/server/org/opends/server/types/operation/PostResponseAddOperation.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallDataException.java | 2
opends/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java | 19
opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java | 111
opends/src/server/org/opends/server/core/SchemaConfigManager.java | 283
opends/src/server/org/opends/server/loggers/debug/TraceSettings.java | 118
opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java | 94
opends/src/server/org/opends/server/protocols/asn1/ASN1Sequence.java | 26
opends/src/server/org/opends/server/backends/jeb/IndexFilter.java | 2
opends/src/server/org/opends/server/types/operation/PostResponseModifyDNOperation.java | 2
opends/src/server/org/opends/server/tasks/ShutdownTaskThread.java | 7
opends/src/server/org/opends/server/loggers/debug/DebugLogFormatter.java | 103
opends/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java | 2
opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java | 16
opends/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java | 36
opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java | 28
opends/src/server/org/opends/server/authorization/BasicAccessControlHandler.java | 17
opends/src/server/org/opends/server/synchronization/plugin/MultimasterSynchronization.java | 2
opends/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java | 27
opends/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java | 25
opends/src/server/org/opends/server/backends/task/TaskBackend.java | 123
opends/src/server/org/opends/server/types/DITStructureRule.java | 43
opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java | 2
opends/src/server/org/opends/server/synchronization/protocol/ChangelogStartMessage.java | 2
opends/src/server/org/opends/server/loggers/ZIPAction.java | 36
opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java | 42
opends/src/server/org/opends/server/api/package-info.java | 2
opends/src/server/org/opends/server/types/LDAPURL.java | 88
opends/src/server/org/opends/server/core/AccessControlConfigManager.java | 52
opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java | 390
opends/src/server/org/opends/server/api/OrderingMatchingRule.java | 11
opends/src/server/org/opends/server/synchronization/changelog/ServerReader.java | 2
opends/src/server/org/opends/server/core/ExtendedOperation.java | 49
opends/src/server/org/opends/server/types/operation/PostResponseBindOperation.java | 2
opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStreamThread.java | 2
opends/src/server/org/opends/server/core/PasswordPolicy.java | 210
opends/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java | 20
opends/src/server/org/opends/server/monitors/StackTraceMonitorProvider.java | 15
opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java | 2
opends/src/server/org/opends/server/backends/BackupBackend.java | 121
opends/src/server/org/opends/server/loggers/MeteredStream.java | 2
opends/src/server/org/opends/server/api/WorkQueue.java | 10
opends/src/server/org/opends/server/api/PasswordStorageScheme.java | 10
opends/src/server/org/opends/server/tasks/BackupTask.java | 8
opends/src/quicksetup/org/opends/quicksetup/installer/LabelFieldDescriptor.java | 2
opends/src/server/org/opends/server/schema/FaxNumberSyntax.java | 20
opends/src/server/org/opends/server/config/ConfigException.java | 13
opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java | 88
opends/src/server/org/opends/server/api/ClientConnection.java | 72
opends/src/server/org/opends/server/schema/CaseIgnoreEqualityMatchingRule.java | 18
opends/src/quicksetup/org/opends/quicksetup/event/BrowseActionListener.java | 2
opends/src/server/org/opends/server/api/EntryCache.java | 2
opends/src/quicksetup/org/opends/quicksetup/event/MinimumSizeComponentListener.java | 2
opends/src/server/org/opends/server/backends/package-info.java | 2
opends/src/server/org/opends/server/loggers/TimeStampNaming.java | 69
opends/src/server/org/opends/server/schema/PrintableStringSyntax.java | 20
opends/src/server/org/opends/server/synchronization/protocol/WindowMessage.java | 2
opends/src/server/org/opends/server/synchronization/plugin/HistVal.java | 2
opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java | 30
opends/src/server/org/opends/server/api/DirectoryThread.java | 16
opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java | 36
opends/ext/aspectj/bin/aj | 10
opends/src/server/org/opends/server/util/LDIFException.java | 26
opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java | 72
opends/src/server/org/opends/server/api/TrustManagerProvider.java | 2
opends/src/server/org/opends/server/plugins/profiler/ProfileViewer.java | 2
opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java | 8
opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java | 143
opends/src/server/org/opends/server/types/operation/PostOperationSearchOperation.java | 2
opends/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java | 16
opends/src/dsml/org/opends/dsml/protocol/NamespacePrefixMapperImpl.java | 2
opends/src/server/org/opends/server/tools/makeldif/Template.java | 2
opends/src/server/org/opends/server/synchronization/protocol/HeartbeatThread.java | 56
opends/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java | 29
opends/src/server/org/opends/server/util/args/MultiChoiceArgument.java | 2
opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressDescriptor.java | 2
opends/src/server/org/opends/server/backends/jeb/IndexModComparator.java | 2
opends/src/server/org/opends/server/synchronization/protocol/ModifyDNMsg.java | 2
opends/src/server/org/opends/server/types/operation/PostResponseModifyOperation.java | 2
opends/src/server/org/opends/server/extensions/NullConnectionSecurityProvider.java | 47
opends/src/server/org/opends/server/backends/jeb/VerifyJob.java | 156
opends/src/server/org/opends/server/core/AuthenticatedUsers.java | 11
opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java | 53
opends/src/server/org/opends/server/types/operation/PreParseAbandonOperation.java | 2
opends/src/server/org/opends/server/protocols/asn1/ASN1Null.java | 17
opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java | 2
opends/src/server/org/opends/server/backends/jeb/ImportJob.java | 45
opends/src/server/org/opends/server/synchronization/changelog/AckMessageList.java | 2
opends/src/server/org/opends/server/types/Schema.java | 160
opends/src/server/org/opends/server/backends/jeb/RootContainer.java | 40
opends/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java | 36
opends/src/server/org/opends/server/util/args/Argument.java | 2
opends/src/server/org/opends/server/loggers/MultifileTextWriter.java | 437
opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java | 196
opends/src/server/org/opends/server/core/DeleteOperation.java | 126
opends/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java | 19
opends/src/server/org/opends/server/backends/jeb/package-info.java | 2
opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java | 2
opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java | 2
opends/src/server/org/opends/server/config/StringConfigAttribute.java | 88
opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java | 111
opends/src/server/org/opends/server/backends/jeb/ExportJob.java | 21
opends/src/server/org/opends/server/schema/GuideSyntax.java | 22
opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java | 20
opends/src/server/org/opends/server/core/PasswordPolicyState.java | 1388 +-
opends/src/server/org/opends/server/util/Base64.java | 9
opends/src/server/org/opends/server/schema/CaseIgnoreSubstringMatchingRule.java | 20
opends/src/server/org/opends/server/synchronization/common/package-info.java | 2
opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallDataException.java | 2
opends/src/server/org/opends/server/monitors/TraditionalWorkQueueMonitor.java | 15
opends/src/server/org/opends/server/tasks/RestoreTask.java | 28
opends/src/server/org/opends/server/types/FilterType.java | 2
opends/src/server/org/opends/server/plugins/profiler/package-info.java | 2
opends/src/server/org/opends/server/types/MatchingRuleUse.java | 40
opends/src/server/org/opends/server/backends/jeb/ID2CIndexer.java | 2
opends/src/server/org/opends/server/tools/InstallDS.java | 4
opends/src/server/org/opends/server/api/AccessControlProvider.java | 2
opends/src/server/org/opends/server/core/LoggerConfigManager.java | 366
opends/src/server/org/opends/server/protocols/ldap/LDAPModification.java | 45
opends/src/server/org/opends/server/synchronization/protocol/OperationContext.java | 2
opends/src/server/org/opends/server/loggers/DirectoryAuditLogger.java | 2
opends/src/server/org/opends/server/tasks/ShutdownTask.java | 8
opends/src/server/org/opends/server/types/LDIFExportConfig.java | 69
opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java | 20
opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateListener.java | 2
opends/src/server/org/opends/server/schema/CountryStringSyntax.java | 20
opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java | 40
opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java | 16
opends/src/server/org/opends/server/backends/jeb/ImportContext.java | 2
opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java | 39
opends/src/server/org/opends/server/tools/PromptTrustManager.java | 13
opends/src/server/org/opends/server/types/SearchResultReference.java | 15
opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java | 37
opends/src/server/org/opends/server/tools/WaitForFileDelete.java | 4
opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressStep.java | 2
opends/src/server/org/opends/server/util/PasswordReader.java | 2
opends/src/server/org/opends/server/backends/jeb/IndexIteratorRange.java | 2
opends/src/server/org/opends/server/types/BackupConfig.java | 34
opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java | 41
opends/src/server/org/opends/server/controls/PasswordExpiringControl.java | 25
opends/src/server/org/opends/server/extensions/DefaultEntryCache.java | 29
opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java | 2
opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java | 25
opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStream.java | 2
opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java | 156
opends/src/server/org/opends/server/tools/LDAPToolUtils.java | 8
opends/src/server/org/opends/server/api/SubstringMatchingRule.java | 11
opends/src/server/org/opends/server/api/ConfigChangeListener.java | 2
opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java | 20
opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java | 43
opends/src/server/org/opends/server/types/MembershipException.java | 24
opends/src/server/org/opends/server/api/plugin/PostResponsePluginResult.java | 16
opends/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java | 38
opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java | 30
opends/src/server/org/opends/server/tools/LDIFSearch.java | 4
opends/src/server/org/opends/server/schema/ObjectClassSyntax.java | 42
opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java | 78
opends/src/server/org/opends/server/util/args/ArgumentParser.java | 2
opends/src/server/org/opends/server/types/FilePermission.java | 54
opends/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java | 2
opends/src/server/org/opends/server/api/plugin/SearchEntryPluginResult.java | 20
opends/src/server/org/opends/server/api/ConfigurableComponent.java | 3
opends/src/server/org/opends/server/schema/OctetStringEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java | 70
opends/src/server/org/opends/server/loggers/DirectoryAccessLogger.java | 2
opends/src/server/org/opends/server/schema/CaseIgnoreListSubstringMatchingRule.java | 20
opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java | 2
opends/src/server/org/opends/server/synchronization/common/ServerState.java | 2
opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java | 20
opends/src/server/org/opends/server/loggers/AsyncronousLogPublisher.java | 262
opends/src/server/org/opends/server/tools/makeldif/MakeLDIF.java | 4
opends/src/server/org/opends/server/backends/jeb/IndexIteratorAllIds.java | 2
opends/ext/aspectj/LICENSE-AspectJ.html | 91
opends/src/server/org/opends/server/types/operation/PostOperationExtendedOperation.java | 2
opends/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java | 2
opends/src/server/org/opends/server/controls/package-info.java | 2
opends/src/quicksetup/org/opends/quicksetup/ui/ButtonsPanel.java | 2
opends/src/server/org/opends/server/types/LockType.java | 2
opends/src/server/org/opends/server/schema/UTCTimeSyntax.java | 39
opends/src/server/org/opends/server/tools/makeldif/TagResult.java | 2
opends/src/server/org/opends/server/tools/ExportLDIF.java | 2
opends/src/server/org/opends/server/loggers/debug/DebugLogger.java | 339
opends/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java | 16
opends/src/server/org/opends/server/types/OperationType.java | 2
opends/src/server/org/opends/server/controls/AccountUsableResponseControl.java | 70
opends/ext/aspectj/README-AspectJ.html | 346
opends/src/quicksetup/org/opends/quicksetup/util/ProgressMessageFormatter.java | 2
opends/src/server/org/opends/server/loggers/EncryptAction.java | 9
opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java | 32
opends/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java | 66
opends/src/server/org/opends/server/backends/jeb/MergeReader.java | 2
opends/src/server/org/opends/server/types/Entry.java | 316
opends/src/server/org/opends/server/extensions/NullKeyManagerProvider.java | 12
opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java | 25
opends/src/server/org/opends/server/util/args/BooleanArgument.java | 2
opends/src/server/org/opends/server/backends/jeb/SubstringIndexer.java | 16
opends/src/server/org/opends/server/api/PasswordGenerator.java | 9
opends/src/server/org/opends/server/loggers/TextLogPublisher.java | 81
opends/src/server/org/opends/server/synchronization/plugin/HistoricalCsnOrderingMatchingRule.java | 2
opends/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java | 2
opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallData.java | 2
opends/src/server/org/opends/server/protocols/asn1/ASN1Integer.java | 22
opends/src/server/org/opends/server/core/CompareOperation.java | 102
opends/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java | 18
opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateEvent.java | 2
opends/src/server/org/opends/server/tools/SSLConnectionFactory.java | 27
opends/src/server/org/opends/server/tools/makeldif/TemplateValue.java | 2
opends/src/server/org/opends/server/util/ModifyChangeRecordEntry.java | 15
opends/src/server/org/opends/server/monitors/BackendMonitor.java | 16
opends/src/server/org/opends/server/synchronization/changelog/ChangelogAckMessageList.java | 2
opends/src/server/org/opends/server/extensions/DigestMD5StateInfo.java | 17
opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java | 111
opends/src/server/org/opends/server/controls/PersistentSearchChangeType.java | 2
opends/src/server/org/opends/server/api/AttributeSyntax.java | 14
opends/src/server/org/opends/server/util/ChangeRecordEntry.java | 13
opends/src/server/org/opends/server/types/DisconnectReason.java | 2
opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java | 101
opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java | 88
opends/src/server/org/opends/server/synchronization/changelog/MsgQueue.java | 2
opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java | 91
opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java | 28
opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java | 23
opends/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/synchronization/changelog/ChangelogDBException.java | 2
opends/src/server/org/opends/server/controls/PagedResultsControl.java | 31
opends/src/server/org/opends/server/core/PluginConfigManager.java | 467
opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java | 2
opends/src/server/org/opends/server/backends/MonitorBackend.java | 103
opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java | 21
opends/src/server/org/opends/server/synchronization/changelog/AckMessageListComparator.java | 2
opends/src/server/org/opends/server/synchronization/plugin/ListenerThread.java | 2
opends/src/server/org/opends/server/config/ConfigConstants.java | 22
opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java | 20
opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java | 29
opends/src/server/org/opends/server/types/AddressMask.java | 8
opends/src/server/org/opends/server/protocols/asn1/package-info.java | 2
opends/src/server/org/opends/server/api/plugin/PostConnectPluginResult.java | 16
opends/src/server/org/opends/server/util/ServerConstants.java | 152
opends/ext/aspectj/bin/aj5 | 10
opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java | 2
opends/src/server/org/opends/server/core/SimpleSubtreeSpecification.java | 17
opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java | 24
opends/ext/aspectj/bin/ajc | 10
opends/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java | 32
opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java | 70
opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java | 127
opends/src/server/org/opends/server/messages/PluginMessages.java | 2
opends/src/server/org/opends/server/schema/SchemaConstants.java | 2
opends/src/server/org/opends/server/loggers/GZIPAction.java | 36
opends/src/server/org/opends/server/loggers/LoggerAlarmHandler.java | 2
opends/src/server/org/opends/server/types/InvokableMethod.java | 43
opends/src/server/org/opends/server/tools/ListBackends.java | 2
opends/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java | 20
opends/src/server/org/opends/server/extensions/AnonymousSASLMechanismHandler.java | 14
opends/src/server/org/opends/server/tools/LDAPConnectionOptions.java | 9
opends/src/server/org/opends/server/extensions/JMXAlertHandler.java | 29
opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java | 20
opends/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java | 19
opends/src/server/org/opends/server/controls/EntryChangeNotificationControl.java | 44
opends/src/server/org/opends/server/types/operation/PreOperationDeleteOperation.java | 2
opends/src/server/org/opends/server/tools/makeldif/ParentDNTag.java | 2
opends/src/server/org/opends/server/util/AddChangeRecordEntry.java | 16
opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallException.java | 2
opends/resource/config/config.ldif | 1627 +-
opends/src/server/org/opends/server/synchronization/changelog/ChangelogData.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/JnlpProperties.java | 2
opends/src/server/org/opends/server/loggers/TextWriter.java | 113
opends/src/server/org/opends/server/protocols/jmx/OpendsJmxConnector.java | 2
opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java | 22
opends/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java | 15
opends/src/server/org/opends/server/api/ServerShutdownListener.java | 2
opends/src/server/org/opends/server/tools/ClientException.java | 2
opends/src/server/org/opends/server/types/AccountStatusNotification.java | 20
opends/src/quicksetup/org/opends/quicksetup/ui/ConfirmUninstallPanel.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressStep.java | 2
opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java | 31
opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java | 34
opends/src/server/org/opends/server/synchronization/changelog/ServerWriter.java | 2
opends/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java | 31
opends/src/server/org/opends/server/core/PasswordPolicyConfig.java | 38
opends/src/server/org/opends/server/tools/LDAPSearchOptions.java | 9
opends/src/server/org/opends/server/tools/StopDS.java | 2
opends/src/server/org/opends/server/api/ExtendedOperationHandler.java | 15
opends/src/server/org/opends/server/tools/SSLConnectionException.java | 15
opends/src/server/org/opends/server/extensions/StaticGroup.java | 39
opends/src/server/org/opends/server/tools/makeldif/RDNTag.java | 2
opends/src/server/org/opends/server/types/operation/PreOperationAddOperation.java | 2
opends/src/server/org/opends/server/backends/SchemaBackend.java | 361
opends/src/server/org/opends/server/tools/LDAPCompareOptions.java | 9
opends/src/server/org/opends/server/api/Backend.java | 43
opends/src/server/org/opends/server/config/ConfigAttribute.java | 53
opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java | 109
opends/src/server/org/opends/server/types/LDIFImportConfig.java | 85
opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java | 22
opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java | 70
opends/src/server/org/opends/server/tools/makeldif/Tag.java | 2
opends/src/server/org/opends/server/api/ConfigHandler.java | 2
opends/src/server/org/opends/server/backends/jeb/DataConfig.java | 2
opends/src/server/org/opends/server/core/ModifyDNOperation.java | 184
opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java | 16
opends/src/server/org/opends/server/backends/task/RecurringTask.java | 31
opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java | 113
opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java | 2
opends/src/server/org/opends/server/types/operation/PostResponseDeleteOperation.java | 2
opends/src/server/org/opends/server/loggers/ActionType.java | 2
opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java | 29
opends/src/quicksetup/org/opends/quicksetup/util/ExtensionFileFilter.java | 2
opends/src/server/org/opends/server/tools/LDAPConnectionException.java | 18
opends/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java | 45
opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java | 26
opends/src/server/org/opends/server/config/BooleanConfigAttribute.java | 46
opends/src/server/org/opends/server/types/DirectoryConfig.java | 122
opends/src/server/org/opends/server/api/KeyManagerProvider.java | 2
opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java | 2
opends/src/server/org/opends/server/types/Control.java | 24
opends/src/server/org/opends/server/synchronization/plugin/FakeOperation.java | 2
opends/src/server/org/opends/server/schema/PostalAddressSyntax.java | 20
opends/src/server/org/opends/server/types/ErrorLogCategory.java | 2
opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java | 112
opends/src/server/org/opends/server/types/BackupInfo.java | 52
opends/src/server/org/opends/server/backends/task/package-info.java | 2
opends/src/server/org/opends/server/core/PasswordPolicyConfigManager.java | 25
opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java | 47
opends/src/server/org/opends/server/backends/jeb/EqualityIndexer.java | 16
opends/src/server/org/opends/server/api/AccessControlHandler.java | 2
opends/src/server/org/opends/server/schema/NameFormSyntax.java | 40
opends/src/server/org/opends/server/synchronization/changelog/ChangelogIteratorComparator.java | 2
opends/src/server/org/opends/server/backends/jeb/Indexer.java | 2
opends/src/server/org/opends/server/core/ServerShutdownMonitor.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationCompareOperation.java | 2
opends/src/server/org/opends/server/schema/DirectoryStringFirstComponentEqualityMatchingRule.java | 20
opends/src/server/org/opends/server/synchronization/protocol/ProtocolSession.java | 2
opends/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java | 2
opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java | 29
opends/src/server/org/opends/server/tasks/ImportTask.java | 41
opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java | 28
opends/src/server/org/opends/server/synchronization/protocol/ModifyContext.java | 2
opends/src/server/org/opends/server/types/CancelledOperationException.java | 18
opends/src/server/org/opends/server/backends/task/Task.java | 64
opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java | 179
opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java | 25
opends/src/server/org/opends/server/types/SynchronizationProviderResult.java | 19
opends/src/server/org/opends/server/backends/jeb/EntryID.java | 2
opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java | 153
opends/src/server/org/opends/server/tools/LDIFModify.java | 2
opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java | 114
opends/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java | 55
opends/src/server/org/opends/server/api/ApproximateMatchingRule.java | 11
opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java | 2
opends/src/server/org/opends/server/tools/EncodePassword.java | 2
opends/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java | 2
opends/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java | 2
opends/src/server/org/opends/server/backends/jeb/DN2URI.java | 41
opends/src/server/org/opends/server/types/Attribute.java | 111
opends/src/server/org/opends/server/types/CancelRequest.java | 24
opends/src/server/org/opends/server/loggers/Error.java | 2
opends/src/server/org/opends/server/types/BackupDirectory.java | 61
opends/src/server/org/opends/server/api/ErrorLogger.java | 2
opends/src/server/org/opends/server/types/SSLClientAuthPolicy.java | 2
opends/src/server/org/opends/server/protocols/jmx/OpendsRMIJRMPServerImpl.java | 2
opends/src/server/org/opends/server/schema/WordEqualityMatchingRule.java | 20
opends/src/server/org/opends/server/types/AcceptRejectWarn.java | 2
opends/src/server/org/opends/server/tasks/TaskUtils.java | 15
opends/src/server/org/opends/server/types/SearchResultEntry.java | 12
opends/src/server/org/opends/server/loggers/FileNamingPolicy.java | 50
opends/src/server/org/opends/server/tools/LDIFDiff.java | 2
opends/src/server/org/opends/server/types/IntermediateResponse.java | 21
opends/src/server/org/opends/server/tools/ToolConstants.java | 2
opends/ext/aspectj/bin/ajdoc | 10
opends/src/server/org/opends/server/schema/ProtocolInformationEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java | 27
opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java | 72
opends/src/server/org/opends/server/schema/PrintableString.java | 10
opends/src/server/org/opends/server/tools/makeldif/FileTag.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationOperation.java | 2
opends/src/server/org/opends/server/protocols/jmx/OpendsRmiServerSocketFactory.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationModifyOperation.java | 2
opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java | 76
opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java | 41
opends/src/server/org/opends/server/schema/TelexNumberSyntax.java | 20
opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java | 177
opends/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java | 36
opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java | 111
opends/src/server/org/opends/server/types/operation/PreOperationExtendedOperation.java | 2
opends/src/server/org/opends/server/api/AccessLogger.java | 2
opends/src/server/org/opends/server/core/GroupManager.java | 157
opends/src/server/org/opends/server/synchronization/protocol/AddContext.java | 2
opends/src/server/org/opends/server/util/StaticUtils.java | 84
opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java | 70
opends/src/server/org/opends/server/protocols/ldap/ProtocolOp.java | 10
opends/src/server/org/opends/server/types/ObjectClass.java | 35
opends/src/server/org/opends/server/schema/UUIDSyntax.java | 21
opends/src/server/org/opends/server/types/CacheEntry.java | 21
opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java | 52
opends/src/server/org/opends/server/synchronization/protocol/package-info.java | 2
opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java | 7
opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java | 41
opends/src/server/org/opends/server/types/operation/PluginOperation.java | 2
opends/src/server/org/opends/server/loggers/DirectoryLogLevel.java | 44
opends/src/server/org/opends/server/types/ByteStringFactory.java | 12
opends/src/server/org/opends/server/extensions/NullTrustManagerProvider.java | 15
opends/src/server/org/opends/server/backends/jeb/AttributeIndex.java | 36
opends/src/server/org/opends/server/api/MatchingRule.java | 15
opends/src/server/org/opends/server/api/ProtocolElement.java | 2
opends/src/server/org/opends/server/types/LockManager.java | 315
opends/src/server/org/opends/server/extensions/CertificateValidationPolicy.java | 2
opends/src/server/org/opends/server/synchronization/plugin/SynchronizationMonitor.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationUnbindOperation.java | 2
opends/src/server/org/opends/server/schema/OctetStringSyntax.java | 20
opends/src/server/org/opends/server/schema/ObjectIdentifierFirstComponentEqualityMatchingRule.java | 22
opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java | 72
opends/src/server/org/opends/server/tools/makeldif/EntryWriter.java | 2
opends/src/server/org/opends/server/types/operation/PostOperationDeleteOperation.java | 2
opends/src/server/org/opends/server/synchronization/changelog/ChangelogDbEnv.java | 2
opends/src/server/org/opends/server/tools/BackUpDB.java | 2
opends/src/server/org/opends/server/backends/jeb/Config.java | 16
opends/src/server/org/opends/server/schema/CertificateSyntax.java | 20
opends/src/server/org/opends/server/backends/jeb/OctetStringKeyComparator.java | 2
opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java | 20
opends/src/quicksetup/org/opends/quicksetup/event/ButtonActionListener.java | 2
opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java | 41
opends/src/server/org/opends/server/loggers/debug/Tracer.java | 1029 +
opends/src/server/org/opends/server/loggers/SignatureAction.java | 7
opends/src/server/org/opends/server/controls/MatchedValuesFilter.java | 171
opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java | 47
opends/src/server/org/opends/server/core/CoreConfigManager.java | 329
opends/src/server/org/opends/server/util/ChangeOperationType.java | 2
opends/src/server/org/opends/server/util/args/SubCommand.java | 2
opends/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java | 18
opends/src/server/org/opends/server/types/ByteString.java | 2
opends/src/server/org/opends/server/tools/RestoreDB.java | 2
opends/src/server/org/opends/server/synchronization/changelog/ChangelogKey.java | 2
opends/src/quicksetup/org/opends/quicksetup/installer/FieldName.java | 2
opends/src/server/org/opends/server/core/DirectoryServer.java | 785
opends/src/server/org/opends/server/util/LDIFWriter.java | 38
/dev/null | 181
opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java | 106
opends/ext/aspectj/bin/ajbrowser | 10
opends/src/server/org/opends/server/synchronization/changelog/ServerHandler.java | 2
833 files changed, 17,375 insertions(+), 17,490 deletions(-)
diff --git a/opends/ext/aspectj/LICENSE-AspectJ.html b/opends/ext/aspectj/LICENSE-AspectJ.html
new file mode 100644
index 0000000..8f7d0a4
--- /dev/null
+++ b/opends/ext/aspectj/LICENSE-AspectJ.html
@@ -0,0 +1,91 @@
+<html>
+
+<head>
+<title>AspectJ License</title>
+
+
+</head>
+
+<BODY BGCOLOR="white">
+
+<h2 align="center"><b>AspectJ<sup><small>TM</small></sup>
+ Compiler and Core Tools License</b></h2>
+
+<p>This is a binary-only release. Source code
+is available from
+<a href="http://eclipse.org/aspectj">http://eclipse.org/aspectj</a></p>
+
+<p>The Eclipse Foundation makes available all content in this distribution ("Content").
+ Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the
+ Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+ at <a href="../../org/documents/epl-v10.php">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+ <p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+ being redistributed by another party ("Redistributor") and different terms and conditions may
+ apply to your use of any object code in the Content. Check the Redistributor's license
+ that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+ indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+ and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+
+ <h3>Third Party Content</h3>
+ <p>The Content includes items that have been sourced from third parties as set out below. If you
+ did not receive this Content directly from the Eclipse Foundation, the following is provided
+ for informational purposes only, and you should look to the Redistributor?s license for
+ terms and conditions of use.</p>
+ <em>
+
+ <h4>BCEL v5.1</h4>
+ <p>This product contains software developed by the
+ Apache Software Foundation (<a href="http://www.apache.org/">http://www.apache.org</a>).</p>
+
+ <p>AspectJ includes a modified version of the Apache Jakarta Byte Code Engineering Library (BCEL) v5.1.
+ BCEL is available at <a href="http://jakarta.apache.org/bcel/">http://jakarta.apache.org/bcel/</a>. Source
+ code for the modified version of BCEL is available at Eclipse.org in the AspectJ source tree. This code
+ is made available under the Apache Software License v1.1</p>
+
+ <h4>ASM v2.2.1</h4>
+ <p>AspectJ includes a binary version of ASM v2.2.1 (<a href="http://asm.objectweb.org/index.html">http://asm.objectweb.org/</a>)
+ The source code for ASM is available from the ObjectWeb download site at
+ <a href="http://asm.objectweb.org/download/">http://asm.objectweb.org/download/</a>.
+ <p>The ASM license is available at <a href="http://asm.objectweb.org/license.html">http://asm.objectweb.org/license.html</a>.
+ The license is also reproduced here:
+ </p>
+
+<pre>Copyright (c) 2000-2005 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
+
+</em>
+
+</body>
+
+</html>
diff --git a/opends/ext/aspectj/README-AspectJ.html b/opends/ext/aspectj/README-AspectJ.html
new file mode 100644
index 0000000..0a8305a
--- /dev/null
+++ b/opends/ext/aspectj/README-AspectJ.html
@@ -0,0 +1,346 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Language" content="en-us">
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
+<meta name="ProgId" content="FrontPage.Editor.Document">
+<title>AspectJ Readme</title>
+<STYLE TYPE="text/css">
+<!--
+
+ /* FOR THE SDA PAGE */
+
+ /*
+ BODY {margin-top: 15px; margin-left: 15px; margin-right: 15px;}
+ */
+
+ A:link {
+ color:#4756AC;
+ }
+ A:visited {
+ color:#60657B;
+ }
+ A:hover {
+ color:red
+ }
+
+ INPUT {font:12px "Courier New", sans-serif;}
+
+ H2 {
+ font:18px/18px Verdana, Arial, Helvetica, sans-serif;
+ color:black;
+ font-weight:bold;
+ margin-left: 10px;
+ line-height:110%;
+ }
+ H3 {
+ font:18px/18px Verdana, Arial, Helvetica, sans-serif;
+ color:black;
+ font-weight:bold;
+ margin-left: 10px;
+ line-height:110%;
+ }
+ H4 {
+ font:15px/16px Verdana, Arial, Helvetica, sans-serif;
+ color:black;
+ font-weight:bold;
+ margin-left: 10px;
+ line-height:140%;
+ }
+ P {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ margin-right: 10px;
+ margin-left: 10px;
+ line-height:130%;
+ }
+ .paragraph {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ margin-right: 10px;
+ margin-left: 10px;
+ line-height:130%;
+ }
+ .smallParagraph {
+ font:11px/11px Verdana, Arial, Helvetica, sans-serif;
+ margin-right: 10px;
+ margin-left: 10px;
+ line-height:130%;
+ }
+ /*
+ LI {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ text-align:justify;
+ margin-right: 10px;
+ margin-left: 15px;
+ line-height:120%;
+ }
+
+ UL {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ text-align:justify;
+ margin-right: 10px;
+ margin-left: 15px;
+ line-height:120%;
+ }*/
+
+ DL {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ text-align:justify;
+ margin-right: 10px;
+ margin-left: 15px;
+ line-height:120%;
+ }
+ B { font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ line-height:140%;
+ }
+ .footer {
+ font:10px/10px Verdana, Arial, Helvetica, sans-serif;
+ color:#888888;
+ text-align:left
+ }
+ .figureTitle {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ text-align:justify;
+ text-align:center
+ }
+ .copyrightNotice {
+ font:10px/10px Verdana, Arial, Helvetica, sans-serif;
+ color:#999999;
+ line-height:110%;
+ }
+ .smallHeading {
+ font:13px/13px Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ line-height:110%;
+ }
+ .tinyHeading {
+ font:11px/11px Verdana, Arial, Helvetica, sans-serif;
+ font-weight:bold;
+ line-height:120%;
+ }
+ .newsText {
+ font:11px/11px Verdana, Arial, Helvetica, sans-serif;
+ line-height:130%;
+ }
+ .smallParagraph {
+ font:11px/11px Verdana, Arial, Helvetica, sans-serif;
+ line-height:130%;
+ }
+ .fancyHeading {
+ font:20px/20px Chantilly, Arial, Helvetica, sans-serif;
+ margin-right: 10px;
+ color:#6f7a92;
+ margin-left: 10px;
+ line-height:130%;
+ }
+
+-->
+</STYLE>
+</head>
+
+<BODY BGCOLOR="white">
+
+<h2 align="center">AspectJ<sup><small>TM</small></sup></h2>
+
+<p align="center"><i>Version 1.5.3 released on Wednesday Nov 22, 2006.</i></p>
+
+<h3>1 Contents of this Package</h3>
+
+<UL>
+ <li>the <a href="bin"><CODE><aspectj install dir>/bin</CODE></a>
+ directory has scripts for
+ <ul>
+ <li><CODE>ajc</CODE>: the compiler for the AspectJ language</li>
+
+ <!-- XXX removed references to ajdoc and ajdb -->
+ <li><CODE>ajbrowser</CODE>: a graphical editor for
+ compiling programs with <CODE>ajc</CODE>
+ and navigating the crosscutting structure of those programs</li>
+ </ul>
+
+ <li>the directory <a href="lib"><CODE><aspectj install dir>/lib</CODE></a>
+ has the AspectJ binaries,
+ <ul>
+ <li><CODE><a href="lib/aspectjtools.jar">aspectjtools.jar</a></CODE>: libraries for
+ <code>ajc</code>, <code>ajbrowser</code>, and the Ant tasks</li>
+
+ <li><CODE>aspectjrt.jar</CODE>: runtime library for AspectJ programs</li>
+ </ul>
+ </li>
+ <li>the directory <a href="doc"><CODE><aspectj install dir>/doc</CODE></a>
+ has examples, programming and development environment guides,
+ instructions for the Ant tasks, a README for 1.1 changes,
+ and a quick reference, all linked
+ from the <a href="doc/index.html">index</a> page.
+ </li>
+ <li>this <a href="README-AspectJ.html">README-AspectJ.html</a>, and
+ </li>
+ <li>the <a href="LICENSE-AspectJ.html">LICENSE-AspectJ.html</a>
+ applying to this distribution.
+ </li>
+</UL>
+
+<hr>
+
+<h3>2 Install Procedure</h3>
+
+<p>The AspectJ tools <code>ajc</code> and <code>ajbrowser</code> are
+Java programs that can be run indirectly from the scripts or
+directly from <code>aspectjtools.jar</code>.
+The <code>aspectjrt.jar</code> needs to be on the classpath
+when compiling or running programs compiled
+by <code>ajc</code>. This procedure shows ways to do that.
+</p>
+
+<p>After finishing automatic installation, we recommend that the
+following steps to complete your installation:</p>
+
+ <p><b>2.1 Add <CODE><aspectj install dir>/lib/aspectjrt.jar</CODE>
+ to your class path</b></p>
+
+<blockquote>
+ <p>This small .jar file contains classes required to compile programs
+ with the ajc compiler, and to run programs compiled with the ajc
+ compiler. You must have these classes somewhere on your class path
+ when running programs compiled with ajc. For detailed instructions
+ please see the <a href="#configInstructions">Configuration
+ Instructions</a> at the bottom of this document.</p>
+</blockquote>
+
+ <p><b>2.2 Put the AspectJ <code>bin</code> directory on your PATH</b></p>
+
+<blockquote>
+ <p>Modify your PATH to include <code><b><aspectj install
+ dir>/bin</b></code>. This will make it easier to run ajc.
+ For detailed instructions please see the
+ <a href="#configInstructions">Configuration Instructions</a> at the
+ bottom of this document.</p>
+</blockquote>
+
+<p><b>2.3 Review the documentation and examples </b></p>
+
+<blockquote>
+ <p>Development and programming guides
+ are available in <a href="doc/index.html">docs</a>,
+ and example programs and an Ant script are available in
+ <a href="doc/examples/">examples</a>.
+</blockquote>
+
+<p>If you did not use the automatic installation process, you may wish
+to create short launch scripts to start ajc easily (section 3).</p>
+
+<hr>
+
+<h3>3. Running the Tools</h3>
+
+<p>If you did not use the automatic installation process or the
+default launch scripts do not work on your system, you may wish to
+create short launch scripts to start ajc easily. </p>
+
+<p>You can also run the <code>aspectjtools.jar</code> directly
+using java's -jar option:
+
+<blockquote>
+<CODE>C:\jdk1.3\bin\java.exe -jar D:\aspectj\lib\aspectjtools.jar %*</CODE>
+</blockquote>
+
+<p>With no arguments or only argument list (.lst) files, this will launch
+<code>ajbrowser</code>, the GUI structure browser; otherwise, it will
+run <code>ajc</code>, the AspectJ compiler. This means that
+if your browser is set up to run jar files, clicking a link
+to <a href="lib/aspectjtools.jar">lib/aspectjtools.jar</a> will
+launch <code>ajbrowser</code>.
+
+<p> You can also create scripts like those created by the installer.
+These scripts use full paths that are system dependent so you will
+likely have to change these. </p>
+
+<p>Here's a sample launch script for WinNT and Win2K (note that this
+is single line in the .bat file):</p>
+
+<blockquote>
+<CODE>C:\jdk1.3\bin\java.exe -classpath D:\aspectj\lib\aspectjtools.jar -Xmx64M
+org.aspectj.tools.ajc.Main %*</CODE>
+</blockquote>
+
+<p>Here's a sample launch script for a Unix shell (on Linux using Sun's JDK1.3):</p>
+
+<blockquote>
+<CODE>/usr/java/jdk1.3/jre/bin/java -classpath /home/aspectj/lib/aspectjtools.jar -Xmx64M org.aspectj.tools.ajc.Main "$@"</CODE>
+</blockquote>
+
+<hr>
+<h3><a name="configInstructions">4. Configuration Instructions</a></h3>
+
+<h4>4.1 Adding <code><aspectj install dir>/lib/aspectjrt.jar</code> to your classpath</h4>
+
+<p>There are several ways to add this jar file to your classpath:</p>
+
+<ul>
+ <li>
+ copy <code>aspectjrt.jar</code> to the <code>jdk/jre/lib/ext</code> directory</li>
+ <li>
+ add <code>aspectjrt.jar</code> to your CLASSPATH
+ environment variable (see the next section for details)</li>
+ <li>
+ always use the "<code>-classpath aspectjrt.jar</code>" option when running
+ programs compiled with ajc</li>
+</ul>
+<h4>4.2 <A NAME="6.1">Setting the Environment Variables on Windows</A></h4>
+
+<P>The following instructions use the PATH variable as an example, but
+this process is identical for the CLASSPATH variable. </P>
+
+<P>You can do the variables permanently for all the shells that you
+will run or temporarily only for the current shell. To change the
+PATH only in the current shell, and assuming you've installed AspectJ
+in <code>C:\apps\aspectj</code>, type:</P>
+
+<blockquote><code>> set PATH=%PATH%;C:\apps\aspectj\bin</code></blockquote>
+
+<P><b>Changing Environment Variables Permanently on WinNT and Win2000</b>
+<ul>
+ <li>
+ <p class="paragraph">open the Environment Variables dialog
+ <ul>
+ <li>
+ <p class="paragraph">WinNT: in "Control Panels" double-click
+ "System" and select the "Environment" tab</li>
+ <li>
+ <p class="paragraph">Win2K: in "Control Panels" double-click
+ "System", select the "Advanced" tab and click the
+ "Environment Variables..." button</li>
+ </ul>
+ </li>
+ <li>
+ <p class="paragraph">select the environment variable for editing, or add it
+ using the "New..." button if it does not exist</li>
+ <li>
+ <p class="paragraph">add the new entry separated from the others by a
+ semi-colon (;) and close the dialog</li>
+ <li>
+ <p class="paragraph">note that the change will not affect shells that were
+ already running </li>
+</ul>
+<P><b>Changing Environment Variables Permanently on Win9x</b>
+<ul>
+ <li>
+ <p class="paragraph">open the AUTOEXEC.BAT with an editor such as NotePad</li>
+
+<LI>
+ <p class="paragraph">edit the PATH statement to include the new entry and save
+ the file, e.g.<BR>
+
+<blockquote>
+ <CODE>PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\;C:\DOS;C:\apps\aspectj\bin</CODE>
+ </blockquote>
+</LI>
+<LI>
+ <p class="paragraph">note that the change will not affect shells that were
+ already running
+</ul>
+
+</body>
+
+</html>
diff --git a/opends/ext/aspectj/bin/aj b/opends/ext/aspectj/bin/aj
new file mode 100755
index 0000000..b26b6ac
--- /dev/null
+++ b/opends/ext/aspectj/bin/aj
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file generated by AspectJ installer
+# Created on Mon Jan 22 08:32:55 CST 2007 by bl155526
+
+if [ "$JAVA_HOME" = "" ] ; then JAVA_HOME=/usr/jdk/instances/jdk1.5.0
+fi
+if [ "$ASPECTJ_HOME" = "" ] ; then ASPECTJ_HOME=/home/bl155526/aspectj1.5
+fi
+
+"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjweaver.jar" "-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader" "-Daj.class.path=$ASPECTPATH:$CLASSPATH" "-Daj.aspect.path=$ASPECTPATH" "$@"
diff --git a/opends/ext/aspectj/bin/aj5 b/opends/ext/aspectj/bin/aj5
new file mode 100755
index 0000000..03ea136
--- /dev/null
+++ b/opends/ext/aspectj/bin/aj5
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file generated by AspectJ installer
+# Created on Mon Jan 22 08:32:55 CST 2007 by bl155526
+
+if [ "$JAVA_HOME" = "" ] ; then JAVA_HOME=/usr/jdk/instances/jdk1.5.0
+fi
+if [ "$ASPECTJ_HOME" = "" ] ; then ASPECTJ_HOME=/home/bl155526/aspectj1.5
+fi
+
+"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjweaver.jar:$CLASSPATH" "-javaagent:$ASPECTJ_HOME/lib/aspectjweaver.jar" "$@"
diff --git a/opends/ext/aspectj/bin/ajbrowser b/opends/ext/aspectj/bin/ajbrowser
new file mode 100755
index 0000000..e55d97b
--- /dev/null
+++ b/opends/ext/aspectj/bin/ajbrowser
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file generated by AspectJ installer
+# Created on Mon Jan 22 08:32:55 CST 2007 by bl155526
+
+if [ "$JAVA_HOME" = "" ] ; then JAVA_HOME=/usr/jdk/instances/jdk1.5.0
+fi
+if [ "$ASPECTJ_HOME" = "" ] ; then ASPECTJ_HOME=/home/bl155526/aspectj1.5
+fi
+
+"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH" -Xmx64M org.aspectj.tools.ajbrowser.Main "$@"
diff --git a/opends/ext/aspectj/bin/ajc b/opends/ext/aspectj/bin/ajc
new file mode 100755
index 0000000..949a541
--- /dev/null
+++ b/opends/ext/aspectj/bin/ajc
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file generated by AspectJ installer
+# Created on Mon Jan 22 08:32:55 CST 2007 by bl155526
+
+if [ "$JAVA_HOME" = "" ] ; then JAVA_HOME=/usr/jdk/instances/jdk1.5.0
+fi
+if [ "$ASPECTJ_HOME" = "" ] ; then ASPECTJ_HOME=/home/bl155526/aspectj1.5
+fi
+
+"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH" -Xmx64M org.aspectj.tools.ajc.Main "$@"
diff --git a/opends/ext/aspectj/bin/ajdoc b/opends/ext/aspectj/bin/ajdoc
new file mode 100755
index 0000000..c383887
--- /dev/null
+++ b/opends/ext/aspectj/bin/ajdoc
@@ -0,0 +1,10 @@
+#!/bin/sh
+# This file generated by AspectJ installer
+# Created on Mon Jan 22 08:32:55 CST 2007 by bl155526
+
+if [ "$JAVA_HOME" = "" ] ; then JAVA_HOME=/usr/jdk/instances/jdk1.5.0
+fi
+if [ "$ASPECTJ_HOME" = "" ] ; then ASPECTJ_HOME=/home/bl155526/aspectj1.5
+fi
+
+"$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH" -Xmx64M org.aspectj.tools.ajdoc.Main "$@"
diff --git a/opends/ext/aspectj/lib/aspectjlib.jar b/opends/ext/aspectj/lib/aspectjlib.jar
new file mode 100644
index 0000000..eb12847
--- /dev/null
+++ b/opends/ext/aspectj/lib/aspectjlib.jar
Binary files differ
diff --git a/opends/ext/aspectj/lib/aspectjrt.jar b/opends/ext/aspectj/lib/aspectjrt.jar
new file mode 100644
index 0000000..72662db
--- /dev/null
+++ b/opends/ext/aspectj/lib/aspectjrt.jar
Binary files differ
diff --git a/opends/ext/aspectj/lib/aspectjtools.jar b/opends/ext/aspectj/lib/aspectjtools.jar
new file mode 100644
index 0000000..d7f205d
--- /dev/null
+++ b/opends/ext/aspectj/lib/aspectjtools.jar
Binary files differ
diff --git a/opends/ext/aspectj/lib/aspectjweaver.jar b/opends/ext/aspectj/lib/aspectjweaver.jar
new file mode 100644
index 0000000..7574b27
--- /dev/null
+++ b/opends/ext/aspectj/lib/aspectjweaver.jar
Binary files differ
diff --git a/opends/lib/aspectjrt.jar b/opends/lib/aspectjrt.jar
new file mode 100644
index 0000000..72662db
--- /dev/null
+++ b/opends/lib/aspectjrt.jar
Binary files differ
diff --git a/opends/resource/config/config.ldif b/opends/resource/config/config.ldif
index 58f472b..f59281d 100644
--- a/opends/resource/config/config.ldif
+++ b/opends/resource/config/config.ldif
@@ -1,69 +1,44 @@
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE
-# or https://OpenDS.dev.java.net/OpenDS.LICENSE.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at
-# trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
-# add the following below this CDDL HEADER, with the fields enclosed
-# by brackets "[]" replaced with your own identifying * information:
-# Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Portions Copyright 2006-2007 Sun Microsystems, Inc.
-#
-#
# This file contains the primary Directory Server configuration. It must not
# be directly edited while the server is online. The server configuration
# should only be managed using the administration utilities provided with the
# Directory Server.
-
dn: cn=config
objectClass: top
objectClass: ds-cfg-root-config
-cn: config
-ds-cfg-check-schema: true
-ds-cfg-add-missing-rdn-attributes: true
-ds-cfg-allow-attribute-name-exceptions: false
ds-cfg-invalid-attribute-syntax-behavior: reject
-ds-cfg-single-structural-objectclass-behavior: reject
-ds-cfg-notify-abandoned-operations: false
-ds-cfg-proxied-authorization-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
-ds-cfg-size-limit: 1000
-ds-cfg-time-limit: 60 seconds
-ds-cfg-lookthrough-limit: 5000
-ds-cfg-writability-mode: enabled
ds-cfg-bind-with-dn-requires-password: true
-ds-cfg-reject-unauthenticated-requests: false
+ds-cfg-single-structural-objectclass-behavior: reject
+ds-cfg-check-schema: true
+ds-cfg-allow-attribute-name-exceptions: false
ds-cfg-default-password-policy: cn=Default Password Policy,cn=Password Policies,cn=config
+ds-cfg-proxied-authorization-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
+ds-cfg-lookthrough-limit: 5000
+ds-cfg-time-limit: 60 seconds
+ds-cfg-writability-mode: enabled
+ds-cfg-add-missing-rdn-attributes: true
+ds-cfg-notify-abandoned-operations: true
+ds-cfg-reject-unauthenticated-requests: false
+cn: config
+ds-cfg-size-limit: 1000
+modifiersName: cn=Privileged User,o=test
+modifyTimestamp: 20070301011016Z
dn: cn=Access Control Handler,cn=config
-objectClass: top
objectClass: ds-cfg-access-control-handler
-cn: Access Control Handler
-ds-cfg-acl-handler-class: org.opends.server.authorization.dseecompat.AciProvider
+objectClass: top
ds-cfg-acl-handler-enabled: false
+ds-cfg-acl-handler-class: org.opends.server.authorization.dseecompat.AciProvider
+cn: Access Control Handler
dn: cn=Account Status Notification Handlers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Account Status Notification Handlers
dn: cn=Error Log Handler,cn=Account Status Notification Handlers,cn=config
-objectClass: top
objectClass: ds-cfg-account-status-notification-handler
+objectClass: top
objectClass: ds-cfg-error-log-account-status-notification-handler
-cn: Error Log Handler
ds-cfg-account-status-notification-handler-class: org.opends.server.extensions.ErrorLogAccountStatusNotificationHandler
ds-cfg-account-status-notification-handler-enabled: true
ds-cfg-account-status-notification-type: account-temporarily-locked
@@ -78,1036 +53,1371 @@
ds-cfg-account-status-notification-type: password-expiring
ds-cfg-account-status-notification-type: password-reset
ds-cfg-account-status-notification-type: password-changed
+cn: Error Log Handler
dn: cn=Alert Handlers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Alert Handlers
dn: cn=JMX Alert Handler,cn=Alert Handlers,cn=config
objectClass: top
objectClass: ds-cfg-alert-handler
+ds-cfg-alert-handler-enabled: true
cn: JMX Alert Handler
ds-cfg-alert-handler-class: org.opends.server.extensions.JMXAlertHandler
-ds-cfg-alert-handler-enabled: true
dn: cn=Backends,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Backends
-dn: ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-backend
-objectClass: ds-cfg-je-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.backends.jeb.BackendImpl
-ds-cfg-backend-id: userRoot
-ds-cfg-backend-writability-mode: enabled
-ds-cfg-backend-base-dn: dc=example,dc=com
-ds-cfg-backend-directory: db
-ds-cfg-backend-mode: 700
-ds-cfg-backend-index-entry-limit: 4000
-ds-cfg-backend-subtree-delete-size-limit: 100000
-ds-cfg-backend-preload-time-limit: 0 seconds
-ds-cfg-backend-import-temp-directory: importTmp
-ds-cfg-backend-import-buffer-size: 256 megabytes
-ds-cfg-backend-import-queue-size: 100
-ds-cfg-backend-import-pass-size: 0
-ds-cfg-backend-import-thread-count: 8
-ds-cfg-backend-entries-compressed: false
-ds-cfg-backend-deadlock-retry-limit: 10
-
-dn: cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-branch
-cn: Index
-
-dn: ds-cfg-index-attribute=aci,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: aci
-ds-cfg-index-type: presence
-
-dn: ds-cfg-index-attribute=cn,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: cn
-ds-cfg-index-type: presence
-ds-cfg-index-type: equality
-ds-cfg-index-type: substring
-
-dn: ds-cfg-index-attribute=givenName,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: givenName
-ds-cfg-index-type: presence
-ds-cfg-index-type: equality
-ds-cfg-index-type: substring
-
-dn: ds-cfg-index-attribute=mail,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: mail
-ds-cfg-index-type: presence
-ds-cfg-index-type: equality
-ds-cfg-index-type: substring
-
-dn: ds-cfg-index-attribute=member,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: member
-ds-cfg-index-type: equality
-
-dn: ds-cfg-index-attribute=objectClass,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: objectClass
-ds-cfg-index-type: equality
-
-dn: ds-cfg-index-attribute=sn,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: sn
-ds-cfg-index-type: presence
-ds-cfg-index-type: equality
-ds-cfg-index-type: substring
-
-dn: ds-cfg-index-attribute=telephoneNumber,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: telephoneNumber
-ds-cfg-index-type: presence
-ds-cfg-index-type: equality
-ds-cfg-index-type: substring
-
-dn: ds-cfg-index-attribute=uid,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: uid
-ds-cfg-index-type: equality
-
-dn: ds-cfg-index-attribute=ds-sync-hist,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: ds-sync-hist
-ds-cfg-index-type: ordering
-
-dn: ds-cfg-index-attribute=entryuuid,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-index
-ds-cfg-index-attribute: entryuuid
-ds-cfg-index-type: equality
-
-dn: cn=JE Database,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
-objectClass: top
-objectClass: ds-cfg-je-database
-cn: JE Database
-ds-cfg-database-cache-percent: 10
-ds-cfg-database-cache-size: 0 megabytes
-ds-cfg-database-txn-no-sync: false
-ds-cfg-database-txn-write-no-sync: true
-ds-cfg-database-run-cleaner: true
-ds-cfg-database-cleaner-num-threads: 1
-ds-cfg-database-cleaner-min-utilization: 75
-ds-cfg-database-evictor-lru-only: true
-ds-cfg-database-evictor-nodes-per-scan: 10
-ds-cfg-database-log-file-max: 50 megabytes
-ds-cfg-database-logging-file-handler-on: true
-ds-cfg-database-logging-level: CONFIG
-ds-cfg-database-checkpointer-bytes-interval: 20 megabytes
-ds-cfg-database-checkpointer-wakeup-interval: 30 seconds
-ds-cfg-database-lock-num-lock-tables: 19
-
dn: ds-cfg-backend-id=backup,cn=Backends,cn=config
objectClass: top
-objectClass: ds-cfg-backend
objectClass: ds-cfg-backup-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.backends.BackupBackend
-ds-cfg-backend-id: backup
-ds-cfg-backend-writability-mode: disabled
+objectClass: ds-cfg-backend
ds-cfg-backend-base-dn: cn=backups
+ds-cfg-backend-id: backup
ds-cfg-backup-directory: bak
+ds-cfg-backend-writability-mode: disabled
+ds-cfg-backend-class: org.opends.server.backends.BackupBackend
+ds-cfg-backend-enabled: true
dn: ds-cfg-backend-id=config,cn=Backends,cn=config
objectClass: top
objectClass: ds-cfg-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.extensions.ConfigFileHandler
+ds-cfg-backend-base-dn: cn=config
ds-cfg-backend-id: config
ds-cfg-backend-writability-mode: enabled
-ds-cfg-backend-base-dn: cn=config
+ds-cfg-backend-class: org.opends.server.extensions.ConfigFileHandler
+ds-cfg-backend-enabled: true
dn: ds-cfg-backend-id=monitor,cn=Backends,cn=config
objectClass: top
objectClass: ds-cfg-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.backends.MonitorBackend
+ds-cfg-backend-base-dn: cn=monitor
ds-cfg-backend-id: monitor
ds-cfg-backend-writability-mode: disabled
-ds-cfg-backend-base-dn: cn=monitor
+ds-cfg-backend-class: org.opends.server.backends.MonitorBackend
+ds-cfg-backend-enabled: true
dn: ds-cfg-backend-id=schema,cn=Backends,cn=config
objectClass: top
-objectClass: ds-cfg-backend
objectClass: ds-cfg-schema-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.backends.SchemaBackend
-ds-cfg-backend-id: schema
-ds-cfg-backend-writability-mode: enabled
+objectClass: ds-cfg-backend
ds-cfg-backend-base-dn: cn=schema
+ds-cfg-backend-id: schema
ds-cfg-show-all-attributes: false
+ds-cfg-backend-writability-mode: enabled
+ds-cfg-backend-class: org.opends.server.backends.SchemaBackend
+ds-cfg-backend-enabled: true
dn: ds-cfg-backend-id=tasks,cn=Backends,cn=config
objectClass: top
objectClass: ds-cfg-backend
objectClass: ds-cfg-task-backend
-ds-cfg-backend-enabled: true
-ds-cfg-backend-class: org.opends.server.backends.task.TaskBackend
-ds-cfg-backend-id: tasks
-ds-cfg-backend-writability-mode: enabled
ds-cfg-backend-base-dn: cn=tasks
-ds-cfg-task-backing-file: config/tasks.ldif
+ds-cfg-backend-id: tasks
ds-cfg-task-retention-time: 24 hours
+ds-cfg-task-backing-file: config/tasks.ldif
+ds-cfg-backend-writability-mode: enabled
+ds-cfg-backend-class: org.opends.server.backends.task.TaskBackend
+ds-cfg-backend-enabled: true
+
+dn: ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: ds-cfg-je-backend
+objectClass: top
+objectClass: ds-cfg-backend
+ds-cfg-backend-import-buffer-size: 256 megabytes
+ds-cfg-backend-deadlock-retry-limit: 10
+ds-cfg-backend-base-dn: dc=example,dc=com
+ds-cfg-backend-id: userRoot
+ds-cfg-backend-import-queue-size: 100
+ds-cfg-backend-index-entry-limit: 4000
+ds-cfg-backend-writability-mode: enabled
+ds-cfg-backend-class: org.opends.server.backends.jeb.BackendImpl
+ds-cfg-backend-subtree-delete-size-limit: 100000
+ds-cfg-backend-directory: db
+ds-cfg-backend-import-thread-count: 8
+ds-cfg-backend-preload-time-limit: 0 seconds
+ds-cfg-backend-import-pass-size: 0
+ds-cfg-backend-entries-compressed: false
+ds-cfg-backend-mode: 700
+ds-cfg-backend-enabled: TRUE
+ds-cfg-backend-import-temp-directory: importTmp
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301011024Z
+
+dn: cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: ds-cfg-branch
+objectClass: top
+cn: Index
+
+dn: ds-cfg-index-attribute=aci,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-attribute: aci
+
+dn: ds-cfg-index-attribute=cn,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: cn
+
+dn: ds-cfg-index-attribute=ds-sync-hist,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: ordering
+ds-cfg-index-attribute: ds-sync-hist
+
+dn: ds-cfg-index-attribute=entryuuid,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: entryuuid
+
+dn: ds-cfg-index-attribute=givenName,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: givenName
+
+dn: ds-cfg-index-attribute=mail,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: mail
+
+dn: ds-cfg-index-attribute=member,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: member
+
+dn: ds-cfg-index-attribute=objectClass,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: objectClass
+
+dn: ds-cfg-index-attribute=sn,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: sn
+
+dn: ds-cfg-index-attribute=telephoneNumber,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: telephoneNumber
+
+dn: ds-cfg-index-attribute=uid,cn=Index,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: uid
+
+dn: cn=JE Database,ds-cfg-backend-id=userRoot,cn=Backends,cn=config
+objectClass: ds-cfg-je-database
+objectClass: top
+ds-cfg-database-lock-num-lock-tables: 19
+ds-cfg-database-evictor-nodes-per-scan: 10
+ds-cfg-database-logging-file-handler-on: true
+ds-cfg-database-evictor-lru-only: true
+ds-cfg-database-cache-percent: 10
+ds-cfg-database-run-cleaner: true
+ds-cfg-database-cleaner-min-utilization: 75
+ds-cfg-database-checkpointer-wakeup-interval: 30 seconds
+ds-cfg-database-cache-size: 0 megabytes
+ds-cfg-database-checkpointer-bytes-interval: 20 megabytes
+ds-cfg-database-log-file-max: 50 megabytes
+ds-cfg-database-cleaner-num-threads: 1
+ds-cfg-database-logging-level: CONFIG
+cn: JE Database
+ds-cfg-database-txn-no-sync: false
+ds-cfg-database-txn-write-no-sync: true
+
+dn: ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: ds-cfg-je-backend
+objectClass: top
+objectClass: ds-cfg-backend
+ds-cfg-backend-import-buffer-size: 256 megabytes
+ds-cfg-backend-deadlock-retry-limit: 10
+ds-cfg-backend-base-dn: dc=verify, dc=jeb
+ds-cfg-backend-id: verifyRoot
+ds-cfg-backend-import-queue-size: 100
+ds-cfg-backend-index-entry-limit: 10
+ds-cfg-backend-writability-mode: enabled
+ds-cfg-backend-class: org.opends.server.backends.jeb.BackendImpl
+ds-cfg-backend-subtree-delete-size-limit: 100000
+ds-cfg-backend-directory: db_verify
+ds-cfg-backend-import-thread-count: 8
+ds-cfg-backend-preload-time-limit: 0 seconds
+ds-cfg-backend-import-pass-size: 0
+ds-cfg-backend-entries-compressed: false
+ds-cfg-backend-mode: 700
+ds-cfg-backend-enabled: TRUE
+ds-cfg-backend-import-temp-directory: importTmp
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010722Z
+
+dn: cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: ds-cfg-branch
+objectClass: top
+cn: Index
+
+dn: ds-cfg-index-attribute=cn,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: cn
+
+dn: ds-cfg-index-attribute=ds-sync-hist,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: ordering
+ds-cfg-index-attribute: ds-sync-hist
+
+dn: ds-cfg-index-attribute=entryuuid,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: entryuuid
+
+dn: ds-cfg-index-attribute=givenName,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: givenName
+
+dn: ds-cfg-index-attribute=mail,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-type: ordering
+ds-cfg-index-attribute: mail
+
+dn: ds-cfg-index-attribute=member,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: member
+
+dn: ds-cfg-index-attribute=sn,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: sn
+
+dn: ds-cfg-index-attribute=telephoneNumber,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: presence
+ds-cfg-index-type: equality
+ds-cfg-index-type: substring
+ds-cfg-index-attribute: telephoneNumber
+
+dn: ds-cfg-index-attribute=uid,cn=Index,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: top
+objectClass: ds-cfg-je-index
+ds-cfg-index-type: equality
+ds-cfg-index-attribute: uid
+
+dn: cn=JE Database,ds-cfg-backend-id=verifyRoot,cn=Backends,cn=config
+objectClass: ds-cfg-je-database
+objectClass: top
+ds-cfg-database-lock-num-lock-tables: 19
+ds-cfg-database-evictor-nodes-per-scan: 10
+ds-cfg-database-logging-file-handler-on: true
+ds-cfg-database-evictor-lru-only: true
+ds-cfg-database-cache-percent: 10
+ds-cfg-database-run-cleaner: true
+ds-cfg-database-cleaner-min-utilization: 75
+ds-cfg-database-checkpointer-wakeup-interval: 30 seconds
+ds-cfg-database-cache-size: 0 megabytes
+ds-cfg-database-checkpointer-bytes-interval: 20 megabytes
+ds-cfg-database-log-file-max: 50 megabytes
+ds-cfg-database-cleaner-num-threads: 1
+ds-cfg-database-logging-level: CONFIG
+cn: JE Database
+ds-cfg-database-txn-no-sync: false
+ds-cfg-database-txn-write-no-sync: true
dn: cn=Certificate Mappers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Certificate Mappers
+dn: cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config
+objectClass: ds-cfg-fingerprint-certificate-mapper
+objectClass: top
+objectClass: ds-cfg-certificate-mapper
+ds-cfg-certificate-mapper-class: org.opends.server.extensions.FingerprintCertificateMapper
+ds-cfg-certificate-mapper-enabled: true
+ds-cfg-certificate-fingerprint-attribute-type: ds-certificate-fingerprint
+cn: Fingerprint Mapper
+ds-cfg-certificate-fingerprint-algorithm: MD5
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010843Z
+
+dn: cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config
+objectClass: top
+objectClass: ds-cfg-subject-attribute-to-user-attribute-certificate-mapper
+objectClass: ds-cfg-certificate-mapper
+ds-cfg-certificate-mapper-enabled: true
+ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectAttributeToUserAttributeCertificateMapper
+ds-cfg-certificate-subject-attribute-mapping: cn:cn
+ds-cfg-certificate-subject-attribute-mapping: e:mail
+cn: Subject Attribute to User Attribute
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010846Z
+
+dn: cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config
+objectClass: ds-cfg-subject-dn-to-user-attribute-certificate-mapper
+objectClass: top
+objectClass: ds-cfg-certificate-mapper
+ds-cfg-certificate-mapper-enabled: true
+ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectDNToUserAttributeCertificateMapper
+cn: Subject DN to User Attribute
+ds-cfg-certificate-subject-attribute-type: ds-certificate-subject-dn
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010846Z
+
dn: cn=Subject Equals DN,cn=Certificate Mappers,cn=config
objectClass: top
objectClass: ds-cfg-certificate-mapper
-cn: Subject Equals DN
ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectEqualsDNCertificateMapper
ds-cfg-certificate-mapper-enabled: true
-
-dn: cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config
-objectClass: top
-objectClass: ds-cfg-certificate-mapper
-objectClass: ds-cfg-subject-dn-to-user-attribute-certificate-mapper
-cn: Subject DN to User Attribute
-ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectDNToUserAttributeCertificateMapper
-ds-cfg-certificate-mapper-enabled: true
-ds-cfg-certificate-subject-attribute-type: ds-certificate-subject-dn
-
-dn: cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config
-objectClass: top
-objectClass: ds-cfg-certificate-mapper
-objectClass: ds-cfg-subject-attribute-to-user-attribute-certificate-mapper
-cn: Subject Attribute to User Attribute
-ds-cfg-certificate-mapper-class: org.opends.server.extensions.SubjectAttributeToUserAttributeCertificateMapper
-ds-cfg-certificate-mapper-enabled: true
-ds-cfg-certificate-subject-attribute-mapping: cn:cn
-ds-cfg-certificate-subject-attribute-mapping: e:mail
-
-dn: cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config
-objectClass: top
-objectClass: ds-cfg-certificate-mapper
-objectClass: ds-cfg-fingerprint-certificate-mapper
-cn: Fingerprint Mapper
-ds-cfg-certificate-mapper-class: org.opends.server.extensions.FingerprintCertificateMapper
-ds-cfg-certificate-mapper-enabled: true
-ds-cfg-certificate-fingerprint-attribute-type: ds-certificate-fingerprint
-ds-cfg-certificate-fingerprint-algorithm: MD5
+cn: Subject Equals DN
dn: cn=Connection Handlers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Connection Handlers
-dn: cn=LDAP Connection Handler,cn=Connection Handlers,cn=config
-objectClass: top
-objectClass: ds-cfg-connection-handler
-objectClass: ds-cfg-ldap-connection-handler
-cn: LDAP Connection Handler
-ds-cfg-connection-handler-class: org.opends.server.protocols.ldap.LDAPConnectionHandler
-ds-cfg-connection-handler-enabled: true
-ds-cfg-listen-address: 0.0.0.0
-ds-cfg-listen-port: 389
-ds-cfg-accept-backlog: 128
-ds-cfg-allow-ldapv2: true
-ds-cfg-keep-stats: true
-ds-cfg-use-tcp-keepalive: true
-ds-cfg-use-tcp-nodelay: true
-ds-cfg-allow-tcp-reuse-address: true
-ds-cfg-send-rejection-notice: true
-ds-cfg-max-request-size: 5 megabytes
-ds-cfg-num-request-handlers: 2
-ds-cfg-allow-start-tls: false
-ds-cfg-use-ssl: false
-ds-cfg-ssl-client-auth-policy: optional
-ds-cfg-ssl-cert-nickname: server-cert
-
-dn: cn=LDAPS Connection Handler,cn=Connection Handlers,cn=config
-objectClass: top
-objectClass: ds-cfg-connection-handler
-objectClass: ds-cfg-ldap-connection-handler
-cn: LDAPS Connection Handler
-ds-cfg-connection-handler-class: org.opends.server.protocols.ldap.LDAPConnectionHandler
-ds-cfg-connection-handler-enabled: false
-ds-cfg-listen-address: 0.0.0.0
-ds-cfg-listen-port: 636
-ds-cfg-accept-backlog: 128
-ds-cfg-allow-ldapv2: true
-ds-cfg-keep-stats: true
-ds-cfg-use-tcp-keepalive: true
-ds-cfg-use-tcp-nodelay: true
-ds-cfg-allow-tcp-reuse-address: true
-ds-cfg-send-rejection-notice: true
-ds-cfg-max-request-size: 5 megabytes
-ds-cfg-num-request-handlers: 2
-ds-cfg-allow-start-tls: false
-ds-cfg-use-ssl: true
-ds-cfg-ssl-client-auth-policy: optional
-ds-cfg-ssl-cert-nickname: server-cert
-ds-cfg-key-manager-provider-dn: cn=JKS,cn=Key Manager Providers,cn=config
-ds-cfg-trust-manager-provider-dn: cn=JKS,cn=Trust Manager Providers,cn=config
-
dn: cn=JMX Connection Handler,cn=Connection Handlers,cn=config
objectClass: top
objectClass: ds-cfg-connection-handler
objectClass: ds-cfg-jmx-connection-handler
-cn: JMX Connection Handler
-ds-cfg-connection-handler-class: org.opends.server.protocols.jmx.JmxConnectionHandler
-ds-cfg-connection-handler-enabled: true
-ds-cfg-use-ssl: false
-ds-cfg-listen-port: 1689
+ds-cfg-listen-port: 47147
ds-cfg-ssl-cert-nickname: server-cert
+ds-cfg-connection-handler-class: org.opends.server.protocols.jmx.JmxConnectionHandler
+cn: JMX Connection Handler
+ds-cfg-use-ssl: false
+ds-cfg-connection-handler-enabled: true
+
+dn: cn=LDAP Connection Handler,cn=Connection Handlers,cn=config
+objectClass: top
+objectClass: ds-cfg-connection-handler
+objectClass: ds-cfg-ldap-connection-handler
+ds-cfg-trust-manager-provider-dn: cn=JKS,cn=Trust Manager Providers,cn=config
+ds-cfg-use-tcp-nodelay: true
+ds-cfg-use-tcp-keepalive: true
+ds-cfg-ssl-client-auth-policy: optional
+ds-cfg-allow-tcp-reuse-address: true
+ds-cfg-use-ssl: false
+ds-cfg-keep-stats: true
+ds-cfg-listen-port: 47146
+ds-cfg-send-rejection-notice: true
+ds-cfg-allow-start-tls: true
+ds-cfg-ssl-cert-nickname: server-cert
+ds-cfg-connection-handler-class: org.opends.server.protocols.ldap.LDAPConnectionHandler
+ds-cfg-allow-ldapv2: true
+ds-cfg-accept-backlog: 128
+cn: LDAP Connection Handler
+ds-cfg-key-manager-provider-dn: cn=JKS,cn=Key Manager Providers,cn=config
+ds-cfg-num-request-handlers: 2
+ds-cfg-listen-address: 0.0.0.0
+ds-cfg-connection-handler-enabled: true
+ds-cfg-max-request-size: 5 megabytes
+
+dn: cn=LDAPS Connection Handler,cn=Connection Handlers,cn=config
+objectClass: top
+objectClass: ds-cfg-connection-handler
+objectClass: ds-cfg-ldap-connection-handler
+ds-cfg-trust-manager-provider-dn: cn=JKS,cn=Trust Manager Providers,cn=config
+ds-cfg-use-tcp-nodelay: true
+ds-cfg-use-tcp-keepalive: true
+ds-cfg-ssl-client-auth-policy: optional
+ds-cfg-allow-tcp-reuse-address: true
+ds-cfg-use-ssl: true
+ds-cfg-keep-stats: true
+ds-cfg-listen-port: 47148
+ds-cfg-send-rejection-notice: true
+ds-cfg-allow-start-tls: false
+ds-cfg-ssl-cert-nickname: server-cert
+ds-cfg-connection-handler-class: org.opends.server.protocols.ldap.LDAPConnectionHandler
+ds-cfg-allow-ldapv2: true
+ds-cfg-accept-backlog: 128
+cn: LDAPS Connection Handler
+ds-cfg-key-manager-provider-dn: cn=JKS,cn=Key Manager Providers,cn=config
+ds-cfg-num-request-handlers: 2
+ds-cfg-listen-address: 0.0.0.0
+ds-cfg-connection-handler-enabled: true
+ds-cfg-max-request-size: 5 megabytes
dn: cn=Entry Cache,cn=config
-objectClass: top
-objectClass: ds-cfg-entry-cache
objectClass: ds-cfg-soft-reference-entry-cache
-cn: Entry Cache
+objectClass: ds-cfg-entry-cache
+objectClass: top
ds-cfg-entry-cache-class: org.opends.server.extensions.SoftReferenceEntryCache
ds-cfg-entry-cache-enabled: false
+cn: Entry Cache
dn: cn=Extended Operations,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Extended Operations
dn: cn=Cancel,cn=Extended Operations,cn=config
objectClass: top
objectClass: ds-cfg-extended-operation-handler
-cn: Cancel
ds-cfg-extended-operation-handler-class: org.opends.server.extensions.CancelExtendedOperation
ds-cfg-extended-operation-handler-enabled: true
+cn: Cancel
dn: cn=Password Modify,cn=Extended Operations,cn=config
objectClass: top
objectClass: ds-cfg-extended-operation-handler
objectClass: ds-cfg-password-modify-extended-operation-handler
-cn: Password Modify
ds-cfg-extended-operation-handler-class: org.opends.server.extensions.PasswordModifyExtendedOperation
ds-cfg-extended-operation-handler-enabled: true
+cn: Password Modify
ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
dn: cn=StartTLS,cn=Extended Operations,cn=config
objectClass: top
objectClass: ds-cfg-extended-operation-handler
-cn: StartTLS
ds-cfg-extended-operation-handler-class: org.opends.server.extensions.StartTLSExtendedOperation
ds-cfg-extended-operation-handler-enabled: true
+cn: StartTLS
dn: cn=Who Am I,cn=Extended Operations,cn=config
objectClass: top
objectClass: ds-cfg-extended-operation-handler
-cn: Who Am I
ds-cfg-extended-operation-handler-class: org.opends.server.extensions.WhoAmIExtendedOperation
ds-cfg-extended-operation-handler-enabled: true
+cn: Who Am I
dn: cn=Group Implementations,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Group Implementations
dn: cn=Static,cn=Group Implementations,cn=config
objectClass: top
objectClass: ds-cfg-group-implementation
-cn: Static
-ds-cfg-group-implementation-class: org.opends.server.extensions.StaticGroup
ds-cfg-group-implementation-enabled: true
+ds-cfg-group-implementation-class: org.opends.server.extensions.StaticGroup
+cn: Static
dn: cn=Identity Mappers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Identity Mappers
dn: cn=Exact Match,cn=Identity Mappers,cn=config
+objectClass: ds-cfg-exact-match-identity-mapper
objectClass: top
objectClass: ds-cfg-identity-mapper
-objectClass: ds-cfg-exact-match-identity-mapper
-cn: Exact Match
ds-cfg-identity-mapper-class: org.opends.server.extensions.ExactMatchIdentityMapper
ds-cfg-identity-mapper-enabled: true
+cn: Exact Match
ds-cfg-match-attribute: uid
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010843Z
dn: cn=Key Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Key Manager Providers
dn: cn=JKS,cn=Key Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-key-manager-provider
+objectClass: top
objectClass: ds-cfg-file-based-key-manager-provider
-cn: JKS
-ds-cfg-key-manager-provider-class: org.opends.server.extensions.FileBasedKeyManagerProvider
-ds-cfg-key-manager-provider-enabled: false
ds-cfg-key-store-type: JKS
-ds-cfg-key-store-file: config/keystore
-ds-cfg-key-store-pin-file: config/keystore.pin
-
-dn: cn=PKCS12,cn=Key Manager Providers,cn=config
-objectClass: top
-objectClass: ds-cfg-key-manager-provider
-objectClass: ds-cfg-file-based-key-manager-provider
-cn: PKCS12
ds-cfg-key-manager-provider-class: org.opends.server.extensions.FileBasedKeyManagerProvider
-ds-cfg-key-manager-provider-enabled: false
-ds-cfg-key-store-type: PKCS12
-ds-cfg-key-store-file: config/keystore.p12
-ds-cfg-key-store-pin-file: config/keystore.pin
+ds-cfg-key-store-pin: password
+cn: JKS
+ds-cfg-key-store-file: config/server.keystore
+ds-cfg-key-manager-provider-enabled: true
dn: cn=PKCS11,cn=Key Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-key-manager-provider
+objectClass: top
objectClass: ds-cfg-pkcs11-key-manager-provider
-cn: PKCS11
ds-cfg-key-manager-provider-class: org.opends.server.extensions.PKCS11KeyManagerProvider
-ds-cfg-key-manager-provider-enabled: false
ds-cfg-key-store-pin-file: config/keystore.pin
+cn: PKCS11
+ds-cfg-key-manager-provider-enabled: false
+
+dn: cn=PKCS12,cn=Key Manager Providers,cn=config
+objectClass: ds-cfg-key-manager-provider
+objectClass: top
+objectClass: ds-cfg-file-based-key-manager-provider
+ds-cfg-key-store-type: PKCS12
+ds-cfg-key-manager-provider-class: org.opends.server.extensions.FileBasedKeyManagerProvider
+ds-cfg-key-store-pin: password
+cn: PKCS12
+ds-cfg-key-store-file: config/server-cert.p12
+ds-cfg-key-manager-provider-enabled: true
dn: cn=Loggers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Loggers
dn: cn=File-Based Access Logger,cn=Loggers,cn=config
-objectClass: top
-objectClass: ds-cfg-logger
-objectClass: ds-cfg-access-logger
objectClass: ds-cfg-file-based-access-logger
-cn: File-Based Access Logger
-ds-cfg-logger-class: org.opends.server.loggers.DirectoryAccessLogger
-ds-cfg-logger-enabled: true
-ds-cfg-log-file: logs/access
-ds-cfg-suppress-internal-operations: true
+objectClass: ds-cfg-logger
+objectClass: top
+objectClass: ds-cfg-access-logger
ds-cfg-rotation-policy: Size
ds-cfg-rotation-policy: FixedTime
-ds-cfg-size-limit: 104857600
+ds-cfg-log-file: logs/access
+ds-cfg-logger-class: org.opends.server.loggers.DirectoryAccessLogger
ds-cfg-fixed-time-limit: 86400000
+ds-cfg-suppress-internal-operations: false
+cn: File-Based Access Logger
+ds-cfg-logger-enabled: true
+ds-cfg-size-limit: 104857600
dn: cn=File-Based Audit Logger,cn=Loggers,cn=config
-objectClass: top
-objectClass: ds-cfg-logger
-objectClass: ds-cfg-access-logger
objectClass: ds-cfg-file-based-access-logger
-cn: File-Based Audit Logger
-ds-cfg-logger-class: org.opends.server.loggers.DirectoryAuditLogger
-ds-cfg-logger-enabled: false
-ds-cfg-log-file: logs/audit
-ds-cfg-suppress-internal-operations: true
+objectClass: ds-cfg-logger
+objectClass: top
+objectClass: ds-cfg-access-logger
ds-cfg-rotation-policy: Size
ds-cfg-rotation-policy: FixedTime
-ds-cfg-size-limit: 104857600
+ds-cfg-log-file: logs/audit
+ds-cfg-logger-class: org.opends.server.loggers.DirectoryAuditLogger
ds-cfg-fixed-time-limit: 86400000
+ds-cfg-suppress-internal-operations: true
+cn: File-Based Audit Logger
+ds-cfg-logger-enabled: false
+ds-cfg-size-limit: 104857600
dn: cn=File-Based Debug Logger,cn=Loggers,cn=config
-objectClass: top
objectClass: ds-cfg-logger
-objectClass: ds-cfg-debug-logger
+objectClass: top
objectClass: ds-cfg-file-based-debug-logger
-cn: File-Based Debug Logger
-ds-cfg-logger-class: org.opends.server.loggers.DirectoryDebugLogger
-ds-cfg-logger-enabled: true
+objectClass: ds-cfg-debug-logger
ds-cfg-log-file: logs/debug
+ds-cfg-override-severity: EXCEPTION=INFO
+ds-cfg-logger-class: org.opends.server.loggers.DirectoryDebugLogger
ds-cfg-default-severity: ERROR
ds-cfg-default-severity: WARNING
+cn: File-Based Debug Logger
+ds-cfg-logger-enabled: true
dn: cn=File-Based Error Logger,cn=Loggers,cn=config
-objectClass: top
objectClass: ds-cfg-logger
objectClass: ds-cfg-error-logger
+objectClass: top
objectClass: ds-cfg-file-based-error-logger
-cn: File-Based Error Logger
-ds-cfg-logger-class: org.opends.server.loggers.DirectoryErrorLogger
-ds-cfg-logger-enabled: true
+ds-cfg-rotation-policy: Size
+ds-cfg-rotation-policy: FixedTime
ds-cfg-log-file: logs/errors
+ds-cfg-logger-class: org.opends.server.loggers.DirectoryErrorLogger
+ds-cfg-fixed-time-limit: 86400000
ds-cfg-default-severity: FATAL_ERROR
ds-cfg-default-severity: NOTICE
ds-cfg-default-severity: SEVERE_ERROR
ds-cfg-default-severity: SEVERE_WARNING
-ds-cfg-rotation-policy: Size
-ds-cfg-rotation-policy: FixedTime
+cn: File-Based Error Logger
+ds-cfg-logger-enabled: true
ds-cfg-size-limit: 104857600
-ds-cfg-fixed-time-limit: 86400000
dn: cn=Matching Rules,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Matching Rules
dn: cn=Auth Password Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Auth Password Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.AuthPasswordEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Auth Password Exact Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Auth Password Exact Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.AuthPasswordExactEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Bit String Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Bit String Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.BitStringEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Boolean Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Boolean Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.BooleanEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Exact Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Exact Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
-
-dn: cn=Case Exact Ordering Matching Rule,cn=Matching Rules,cn=config
-objectClass: top
-objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
-cn: Case Exact Ordering Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
-
-dn: cn=Case Exact Substring Matching Rule,cn=Matching Rules,cn=config
-objectClass: top
-objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-substring-matching-rule
-cn: Case Exact Substring Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactSubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Exact IA5 Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Exact IA5 Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactIA5EqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Exact IA5 Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Exact IA5 Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactIA5SubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
-dn: cn=Case Ignore Equality Matching Rule,cn=Matching Rules,cn=config
-objectClass: top
-objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
-cn: Case Ignore Equality Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
-
-dn: cn=Case Ignore Ordering Matching Rule,cn=Matching Rules,cn=config
-objectClass: top
-objectClass: ds-cfg-matching-rule
+dn: cn=Case Exact Ordering Matching Rule,cn=Matching Rules,cn=config
objectClass: ds-cfg-ordering-matching-rule
-cn: Case Ignore Ordering Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreOrderingMatchingRule
+objectClass: top
+objectClass: ds-cfg-matching-rule
ds-cfg-matching-rule-enabled: true
+cn: Case Exact Ordering Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactOrderingMatchingRule
-dn: cn=Case Ignore Substring Matching Rule,cn=Matching Rules,cn=config
+dn: cn=Case Exact Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
-cn: Case Ignore Substring Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreSubstringMatchingRule
ds-cfg-matching-rule-enabled: true
+cn: Case Exact Substring Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.CaseExactSubstringMatchingRule
-dn: cn=Case Ignore IA5 Equality Matching Rule,cn=Matching Rules,cn=config
+dn: cn=Case Ignore Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
+ds-cfg-matching-rule-enabled: true
+cn: Case Ignore Equality Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreEqualityMatchingRule
+
+dn: cn=Case Ignore IA5 Equality Matching Rule,cn=Matching Rules,cn=config
objectClass: ds-cfg-equality-matching-rule
+objectClass: top
+objectClass: ds-cfg-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Ignore IA5 Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreIA5EqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Ignore IA5 Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Ignore IA5 Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreIA5SubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Ignore List Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Ignore List Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreListEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Case Ignore List Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Case Ignore List Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreListSubstringMatchingRule
+
+dn: cn=Case Ignore Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
+objectClass: top
+objectClass: ds-cfg-matching-rule
ds-cfg-matching-rule-enabled: true
+cn: Case Ignore Ordering Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreOrderingMatchingRule
+
+dn: cn=Case Ignore Substring Matching Rule,cn=Matching Rules,cn=config
+objectClass: top
+objectClass: ds-cfg-matching-rule
+objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
+cn: Case Ignore Substring Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.CaseIgnoreSubstringMatchingRule
dn: cn=Directory String First Component Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Directory String First Component Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.DirectoryStringFirstComponentEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Distinguished Name Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Distinguished Name Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.DistinguishedNameEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Double Metaphone Approximate Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-approximate-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Double Metaphone Approximate Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.DoubleMetaphoneApproximateMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Generalized Time Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Generalized Time Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.GeneralizedTimeEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Generalized Time Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Generalized Time Ordering Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.GeneralizedTimeOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Historical CSN Ordering Matching Rule,cn=Matching Rules,cn=config
objectClass: ds-cfg-ordering-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-ds-cfg-matching-rule-class: org.opends.server.synchronization.plugin.HistoricalCsnOrderingMatchingRule
ds-cfg-matching-rule-enabled: true
cn: Historical CSN Ordering Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.synchronization.plugin.HistoricalCsnOrderingMatchingRule
dn: cn=Integer Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Integer Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.IntegerEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
-
-dn: cn=Integer Ordering Matching Rule,cn=Matching Rules,cn=config
-objectClass: top
-objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
-cn: Integer Ordering Matching Rule
-ds-cfg-matching-rule-class: org.opends.server.schema.IntegerOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Integer First Component Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Integer First Component Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.IntegerFirstComponentEqualityMatchingRule
+
+dn: cn=Integer Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
+objectClass: top
+objectClass: ds-cfg-matching-rule
ds-cfg-matching-rule-enabled: true
+cn: Integer Ordering Matching Rule
+ds-cfg-matching-rule-class: org.opends.server.schema.IntegerOrderingMatchingRule
dn: cn=Keyword Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Keyword Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.KeywordEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Numeric String Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Numeric String Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Numeric String Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Numeric String Ordering Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Numeric String Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Numeric String Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.NumericStringSubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Object Identifier Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Object Identifier Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.ObjectIdentifierEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Object Identifier First Component Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Object Identifier First Component Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.ObjectIdentifierFirstComponentEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Octet String Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Octet String Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Octet String Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Octet String Ordering Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Octet String Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Octet String Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.OctetStringSubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Presentation Address Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Presentation Address Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.PresentationAddressEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Protocol Information Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Protocol Information Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.ProtocolInformationEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Telephone Number Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Telephone Number Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.TelephoneNumberEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Telephone Number Substring Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Telephone Number Substring Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.TelephoneNumberSubstringMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Unique Member Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Unique Member Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.UniqueMemberEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=User Password Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: User Password Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.UserPasswordEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=User Password Exact Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: User Password Exact Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.UserPasswordExactEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=UUID Equality Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-equality-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-equality-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: UUID Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.UUIDEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=UUID Ordering Matching Rule,cn=Matching Rules,cn=config
+objectClass: ds-cfg-ordering-matching-rule
objectClass: top
objectClass: ds-cfg-matching-rule
-objectClass: ds-cfg-ordering-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: UUID Ordering Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.UUIDOrderingMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Word Equality Matching Rule,cn=Matching Rules,cn=config
objectClass: top
objectClass: ds-cfg-matching-rule
objectClass: ds-cfg-substring-matching-rule
+ds-cfg-matching-rule-enabled: true
cn: Word Equality Matching Rule
ds-cfg-matching-rule-class: org.opends.server.schema.WordEqualityMatchingRule
-ds-cfg-matching-rule-enabled: true
dn: cn=Monitor Providers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Monitor Providers
dn: cn=JVM Stack Trace,cn=Monitor Providers,cn=config
-objectClass: top
objectClass: ds-cfg-monitor-provider
-cn: JVM Stack Trace
+objectClass: top
ds-cfg-monitor-provider-class: org.opends.server.monitors.StackTraceMonitorProvider
ds-cfg-monitor-provider-enabled: true
+cn: JVM Stack Trace
dn: cn=System Info,cn=Monitor Providers,cn=config
-objectClass: top
objectClass: ds-cfg-monitor-provider
-cn: System Info
+objectClass: top
ds-cfg-monitor-provider-class: org.opends.server.monitors.SystemInfoMonitorProvider
ds-cfg-monitor-provider-enabled: true
+cn: System Info
dn: cn=Version,cn=Monitor Providers,cn=config
-objectClass: top
objectClass: ds-cfg-monitor-provider
-cn: Version
+objectClass: top
ds-cfg-monitor-provider-class: org.opends.server.monitors.VersionMonitorProvider
ds-cfg-monitor-provider-enabled: true
+cn: Version
dn: cn=Password Generators,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Password Generators
dn: cn=Random Password Generator,cn=Password Generators,cn=config
-objectClass: top
objectClass: ds-cfg-password-generator
+objectClass: top
objectClass: ds-cfg-random-password-generator
-cn: Random Password Generator
ds-cfg-password-generator-class: org.opends.server.extensions.RandomPasswordGenerator
-ds-cfg-password-generator-enabled: true
+ds-cfg-password-format: alpha:3,numeric:2,alpha:3
ds-cfg-password-character-set: alpha:abcdefghijklmnopqrstuvwxyz
ds-cfg-password-character-set: numeric:0123456789
-ds-cfg-password-format: alpha:3,numeric:2,alpha:3
+ds-cfg-password-generator-enabled: true
+cn: Random Password Generator
dn: cn=Password Policies,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Password Policies
-dn: cn=Default Password Policy,cn=Password Policies,cn=config
-objectClass: top
+dn: cn=Clear UserPassword Policy,cn=Password Policies,cn=config
objectClass: ds-cfg-password-policy
-cn: Default Password Policy
-ds-cfg-password-attribute: userPassword
-ds-cfg-default-password-storage-scheme: SSHA
-ds-cfg-allow-expired-password-changes: false
-ds-cfg-allow-multiple-password-values: false
-ds-cfg-allow-pre-encoded-passwords: false
-ds-cfg-allow-user-password-changes: true
-ds-cfg-expire-passwords-without-warning: false
-ds-cfg-force-change-on-add: false
-ds-cfg-force-change-on-reset: false
-ds-cfg-grace-login-count: 0
-ds-cfg-idle-lockout-interval: 0 seconds
-ds-cfg-lockout-failure-count: 0
+objectClass: top
+ds-cfg-skip-validation-for-administrators: false
ds-cfg-lockout-duration: 0 seconds
+ds-cfg-maximum-password-age: 0 seconds
ds-cfg-lockout-failure-expiration-interval: 0 seconds
+ds-cfg-allow-user-password-changes: true
+ds-cfg-allow-multiple-password-values: false
ds-cfg-minimum-password-age: 0 seconds
+ds-cfg-force-change-on-add: false
+ds-cfg-allow-expired-password-changes: false
+ds-cfg-password-attribute: userPassword
+ds-cfg-lockout-failure-count: 0
+ds-cfg-allow-pre-encoded-passwords: false
+ds-cfg-require-secure-password-changes: false
+ds-cfg-password-change-requires-current-password: false
+ds-cfg-force-change-on-reset: false
+ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-default-password-storage-scheme: CLEAR
+ds-cfg-grace-login-count: 0
+ds-cfg-maximum-password-reset-age: 0 seconds
+ds-cfg-password-validator-dn: cn=Test Password Validator,cn=Password Validators,cn=config
+ds-cfg-expire-passwords-without-warning: false
+ds-cfg-idle-lockout-interval: 0 seconds
+ds-cfg-password-generator-dn: cn=Random Password Generator,cn=Password Generators,cn=config
+ds-cfg-require-secure-authentication: false
+cn: Test AuthPassword Policy
+
+dn: cn=Default Password Policy,cn=Password Policies,cn=config
+objectClass: ds-cfg-password-policy
+objectClass: top
+ds-cfg-skip-validation-for-administrators: false
+ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-default-password-storage-scheme: SSHA
+ds-cfg-grace-login-count: 0
+ds-cfg-lockout-duration: 0 seconds
ds-cfg-maximum-password-age: 0 seconds
ds-cfg-maximum-password-reset-age: 0 seconds
-ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-lockout-failure-expiration-interval: 0 seconds
+ds-cfg-allow-user-password-changes: true
+ds-cfg-allow-multiple-password-values: false
+ds-cfg-minimum-password-age: 0 seconds
+ds-cfg-expire-passwords-without-warning: false
+ds-cfg-idle-lockout-interval: 0 seconds
ds-cfg-password-generator-dn: cn=Random Password Generator,cn=Password Generators,cn=config
-ds-cfg-password-change-requires-current-password: false
ds-cfg-require-secure-authentication: false
+ds-cfg-force-change-on-add: false
+ds-cfg-allow-expired-password-changes: false
+ds-cfg-password-attribute: userPassword
+ds-cfg-lockout-failure-count: 0
+ds-cfg-allow-pre-encoded-passwords: false
+cn: Default Password Policy
ds-cfg-require-secure-password-changes: false
-ds-cfg-skip-validation-for-administrators: false
+ds-cfg-password-change-requires-current-password: false
+ds-cfg-force-change-on-reset: false
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010844Z
dn: cn=Root Password Policy,cn=Password Policies,cn=config
-objectClass: top
objectClass: ds-cfg-password-policy
-cn: Root Password Policy
-ds-cfg-password-attribute: userPassword
+objectClass: top
+ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-skip-validation-for-administrators: false
ds-cfg-default-password-storage-scheme: SSHA
-ds-cfg-allow-expired-password-changes: false
-ds-cfg-allow-multiple-password-values: false
-ds-cfg-allow-pre-encoded-passwords: false
-ds-cfg-allow-user-password-changes: true
-ds-cfg-expire-passwords-without-warning: false
-ds-cfg-force-change-on-add: false
-ds-cfg-force-change-on-reset: false
ds-cfg-grace-login-count: 0
-ds-cfg-idle-lockout-interval: 0 seconds
-ds-cfg-lockout-failure-count: 0
ds-cfg-lockout-duration: 0 seconds
+ds-cfg-maximum-password-reset-age: 0 seconds
+ds-cfg-maximum-password-age: 0 seconds
ds-cfg-lockout-failure-expiration-interval: 0 seconds
+ds-cfg-allow-multiple-password-values: false
+ds-cfg-allow-user-password-changes: true
ds-cfg-minimum-password-age: 0 seconds
+ds-cfg-expire-passwords-without-warning: false
+ds-cfg-idle-lockout-interval: 0 seconds
+ds-cfg-require-secure-authentication: false
+ds-cfg-force-change-on-add: false
+ds-cfg-allow-pre-encoded-passwords: false
+ds-cfg-allow-expired-password-changes: false
+ds-cfg-password-attribute: userPassword
+ds-cfg-lockout-failure-count: 0
+cn: Root Password Policy
+ds-cfg-require-secure-password-changes: false
+ds-cfg-password-change-requires-current-password: true
+ds-cfg-force-change-on-reset: false
+
+dn: cn=SHA1 AuthPassword Policy,cn=Password Policies,cn=config
+objectClass: ds-cfg-password-policy
+objectClass: top
+ds-cfg-skip-validation-for-administrators: false
+ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-default-password-storage-scheme: SHA1
+ds-cfg-grace-login-count: 0
+ds-cfg-lockout-duration: 0 seconds
ds-cfg-maximum-password-age: 0 seconds
ds-cfg-maximum-password-reset-age: 0 seconds
-ds-cfg-password-expiration-warning-interval: 5 days
-ds-cfg-password-change-requires-current-password: true
+ds-cfg-lockout-failure-expiration-interval: 0 seconds
+ds-cfg-allow-user-password-changes: true
+ds-cfg-allow-multiple-password-values: false
+ds-cfg-minimum-password-age: 0 seconds
+ds-cfg-expire-passwords-without-warning: false
+ds-cfg-idle-lockout-interval: 0 seconds
+ds-cfg-password-generator-dn: cn=Random Password Generator,cn=Password Generators,cn=config
ds-cfg-require-secure-authentication: false
+ds-cfg-force-change-on-add: false
+ds-cfg-allow-expired-password-changes: false
+ds-cfg-password-attribute: authPassword
+ds-cfg-lockout-failure-count: 0
+ds-cfg-allow-pre-encoded-passwords: false
+cn: SHA1 AuthPassword Policy
ds-cfg-require-secure-password-changes: false
+ds-cfg-password-change-requires-current-password: false
+ds-cfg-force-change-on-reset: false
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010844Z
+
+dn: cn=SSHA512 UserPassword Policy,cn=Password Policies,cn=config
+objectClass: ds-cfg-password-policy
+objectClass: top
ds-cfg-skip-validation-for-administrators: false
+ds-cfg-lockout-duration: 0 seconds
+ds-cfg-maximum-password-age: 0 seconds
+ds-cfg-lockout-failure-expiration-interval: 0 seconds
+ds-cfg-allow-user-password-changes: true
+ds-cfg-allow-multiple-password-values: false
+ds-cfg-minimum-password-age: 0 seconds
+ds-cfg-force-change-on-add: false
+ds-cfg-allow-expired-password-changes: false
+ds-cfg-password-attribute: userPassword
+ds-cfg-lockout-failure-count: 0
+ds-cfg-allow-pre-encoded-passwords: false
+ds-cfg-require-secure-password-changes: false
+ds-cfg-password-change-requires-current-password: false
+ds-cfg-force-change-on-reset: false
+ds-cfg-password-expiration-warning-interval: 5 days
+ds-cfg-default-password-storage-scheme: SSHA512
+ds-cfg-grace-login-count: 0
+ds-cfg-maximum-password-reset-age: 0 seconds
+ds-cfg-password-validator-dn: cn=Test Password Validator,cn=Password Validators,cn=config
+ds-cfg-expire-passwords-without-warning: false
+ds-cfg-idle-lockout-interval: 0 seconds
+ds-cfg-password-generator-dn: cn=Random Password Generator,cn=Password Generators,cn=config
+ds-cfg-require-secure-authentication: false
+cn: SSHA512 UserPassword Policy
dn: cn=Password Storage Schemes,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Password Storage Schemes
dn: cn=Base64,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Base64
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.Base64PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.Base64PasswordStorageScheme
+cn: Base64
dn: cn=Clear,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Clear
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.ClearPasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.ClearPasswordStorageScheme
+cn: Clear
dn: cn=MD5,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: MD5
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.MD5PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.MD5PasswordStorageScheme
+cn: MD5
dn: cn=Salted MD5,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Salted MD5
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedMD5PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedMD5PasswordStorageScheme
+cn: Salted MD5
dn: cn=Salted SHA-1,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Salted SHA-1
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA1PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA1PasswordStorageScheme
+cn: Salted SHA-1
dn: cn=Salted SHA-256,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Salted SHA-256
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA256PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA256PasswordStorageScheme
+cn: Salted SHA-256
dn: cn=Salted SHA-384,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Salted SHA-384
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA384PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA384PasswordStorageScheme
+cn: Salted SHA-384
dn: cn=Salted SHA-512,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: Salted SHA-512
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA512PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SaltedSHA512PasswordStorageScheme
+cn: Salted SHA-512
dn: cn=SHA-1,cn=Password Storage Schemes,cn=config
objectClass: top
objectClass: ds-cfg-password-storage-scheme
-cn: SHA-1
-ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SHA1PasswordStorageScheme
ds-cfg-password-storage-scheme-enabled: true
+ds-cfg-password-storage-scheme-class: org.opends.server.extensions.SHA1PasswordStorageScheme
+cn: SHA-1
dn: cn=Password Validators,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Password Validators
dn: cn=Length-Based Password Validator,cn=Password Validators,cn=config
-objectClass: top
objectClass: ds-cfg-password-validator
+objectClass: top
objectClass: ds-cfg-length-based-password-validator
-cn: Length-Based Password Validator
-ds-cfg-password-validator-class: org.opends.server.extensions.LengthBasedPasswordValidator
-ds-cfg-password-validator-enabled: true
-ds-cfg-minimum-password-length: 6
ds-cfg-maximum-password-length: 0
+ds-cfg-password-validator-class: org.opends.server.extensions.LengthBasedPasswordValidator
+ds-cfg-minimum-password-length: 6
+cn: Length-Based Password Validator
+ds-cfg-password-validator-enabled: true
+
+dn: cn=Test Password Validator,cn=Password Validators,cn=config
+objectClass: ds-cfg-password-validator
+objectClass: top
+ds-cfg-password-validator-class: org.opends.server.extensions.TestPasswordValidator
+cn: Test Password Validator
+ds-cfg-password-validator-enabled: true
dn: cn=Plugins,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Plugins
+dn: cn=Delay PreOperation Plugin,cn=Plugins,cn=config
+objectClass: top
+objectClass: ds-cfg-plugin
+ds-cfg-plugin-class: org.opends.server.plugins.DelayPreOpPlugin
+ds-cfg-plugin-enabled: true
+cn: Delay PreOperation Plugin
+ds-cfg-plugin-type: preOperationAdd
+ds-cfg-plugin-type: preOperationBind
+ds-cfg-plugin-type: preOperationCompare
+ds-cfg-plugin-type: preOperationDelete
+ds-cfg-plugin-type: preOperationExtended
+ds-cfg-plugin-type: preOperationModify
+ds-cfg-plugin-type: preOperationModifyDN
+ds-cfg-plugin-type: preOperationSearch
+
+dn: cn=Disconnect Client Plugin,cn=Plugins,cn=config
+objectClass: top
+objectClass: ds-cfg-plugin
+ds-cfg-plugin-class: org.opends.server.plugins.DisconnectClientPlugin
+ds-cfg-plugin-enabled: true
+cn: Disconnect Client Plugin
+ds-cfg-plugin-type: preParseAbandon
+ds-cfg-plugin-type: preParseAdd
+ds-cfg-plugin-type: preParseBind
+ds-cfg-plugin-type: preParseCompare
+ds-cfg-plugin-type: preParseDelete
+ds-cfg-plugin-type: preParseExtended
+ds-cfg-plugin-type: preParseModify
+ds-cfg-plugin-type: preParseModifyDN
+ds-cfg-plugin-type: preParseSearch
+ds-cfg-plugin-type: preParseUnbind
+ds-cfg-plugin-type: preOperationAdd
+ds-cfg-plugin-type: preOperationBind
+ds-cfg-plugin-type: preOperationCompare
+ds-cfg-plugin-type: preOperationDelete
+ds-cfg-plugin-type: preOperationExtended
+ds-cfg-plugin-type: preOperationModify
+ds-cfg-plugin-type: preOperationModifyDN
+ds-cfg-plugin-type: preOperationSearch
+ds-cfg-plugin-type: postOperationAbandon
+ds-cfg-plugin-type: postOperationAdd
+ds-cfg-plugin-type: postOperationBind
+ds-cfg-plugin-type: postOperationCompare
+ds-cfg-plugin-type: postOperationDelete
+ds-cfg-plugin-type: postOperationExtended
+ds-cfg-plugin-type: postOperationModify
+ds-cfg-plugin-type: postOperationModifyDN
+ds-cfg-plugin-type: postOperationSearch
+ds-cfg-plugin-type: postOperationUnbind
+ds-cfg-plugin-type: postResponseAdd
+ds-cfg-plugin-type: postResponseBind
+ds-cfg-plugin-type: postResponseCompare
+ds-cfg-plugin-type: postResponseDelete
+ds-cfg-plugin-type: postResponseExtended
+ds-cfg-plugin-type: postResponseModify
+ds-cfg-plugin-type: postResponseModifyDN
+ds-cfg-plugin-type: postResponseSearch
+
dn: cn=Entry UUID,cn=Plugins,cn=config
objectClass: top
objectClass: ds-cfg-plugin
-cn: Entry UUID
ds-cfg-plugin-class: org.opends.server.plugins.EntryUUIDPlugin
ds-cfg-plugin-enabled: true
+cn: Entry UUID
ds-cfg-plugin-type: ldifImport
ds-cfg-plugin-type: preOperationAdd
+dn: cn=Invocation Counter Plugin,cn=Plugins,cn=config
+objectClass: top
+objectClass: ds-cfg-plugin
+ds-cfg-plugin-class: org.opends.server.plugins.InvocationCounterPlugin
+ds-cfg-plugin-enabled: true
+cn: Invocation Counter Plugin
+ds-cfg-plugin-type: preParseAbandon
+ds-cfg-plugin-type: preParseAdd
+ds-cfg-plugin-type: preParseBind
+ds-cfg-plugin-type: preParseCompare
+ds-cfg-plugin-type: preParseDelete
+ds-cfg-plugin-type: preParseExtended
+ds-cfg-plugin-type: preParseModify
+ds-cfg-plugin-type: preParseModifyDN
+ds-cfg-plugin-type: preParseSearch
+ds-cfg-plugin-type: preParseUnbind
+ds-cfg-plugin-type: preOperationAdd
+ds-cfg-plugin-type: preOperationBind
+ds-cfg-plugin-type: preOperationCompare
+ds-cfg-plugin-type: preOperationDelete
+ds-cfg-plugin-type: preOperationExtended
+ds-cfg-plugin-type: preOperationModify
+ds-cfg-plugin-type: preOperationModifyDN
+ds-cfg-plugin-type: preOperationSearch
+ds-cfg-plugin-type: postOperationAbandon
+ds-cfg-plugin-type: postOperationAdd
+ds-cfg-plugin-type: postOperationBind
+ds-cfg-plugin-type: postOperationCompare
+ds-cfg-plugin-type: postOperationDelete
+ds-cfg-plugin-type: postOperationExtended
+ds-cfg-plugin-type: postOperationModify
+ds-cfg-plugin-type: postOperationModifyDN
+ds-cfg-plugin-type: postOperationSearch
+ds-cfg-plugin-type: postOperationUnbind
+ds-cfg-plugin-type: postResponseAdd
+ds-cfg-plugin-type: postResponseBind
+ds-cfg-plugin-type: postResponseCompare
+ds-cfg-plugin-type: postResponseDelete
+ds-cfg-plugin-type: postResponseExtended
+ds-cfg-plugin-type: postResponseModify
+ds-cfg-plugin-type: postResponseModifyDN
+ds-cfg-plugin-type: postResponseSearch
+ds-cfg-plugin-type: searchResultEntry
+ds-cfg-plugin-type: searchResultReference
+ds-cfg-plugin-type: intermediateResponse
+ds-cfg-plugin-type: postConnect
+ds-cfg-plugin-type: postDisconnect
+ds-cfg-plugin-type: ldifImport
+ds-cfg-plugin-type: ldifExport
+ds-cfg-plugin-type: startup
+ds-cfg-plugin-type: shutdown
+
dn: cn=LastMod,cn=Plugins,cn=config
objectClass: top
objectClass: ds-cfg-plugin
-cn: LastMod
ds-cfg-plugin-class: org.opends.server.plugins.LastModPlugin
ds-cfg-plugin-enabled: true
+cn: LastMod
ds-cfg-plugin-type: preOperationAdd
ds-cfg-plugin-type: preOperationModify
ds-cfg-plugin-type: preOperationModifyDN
@@ -1115,35 +1425,68 @@
dn: cn=LDAP Attribute Description List,cn=Plugins,cn=config
objectClass: top
objectClass: ds-cfg-plugin
-cn: LDAP Attribute Description List
ds-cfg-plugin-class: org.opends.server.plugins.LDAPADListPlugin
ds-cfg-plugin-enabled: true
+cn: LDAP Attribute Description List
ds-cfg-plugin-type: preParseSearch
dn: cn=Password Policy Import,cn=Plugins,cn=config
objectClass: top
objectClass: ds-cfg-plugin
-cn: Password Policy Import
ds-cfg-plugin-class: org.opends.server.plugins.PasswordPolicyImportPlugin
ds-cfg-plugin-enabled: true
+cn: Password Policy Import
ds-cfg-plugin-type: ldifImport
dn: cn=Profiler,cn=Plugins,cn=config
objectClass: top
-objectClass: ds-cfg-plugin
objectClass: ds-cfg-profiler-plugin
-cn: Profiler
-ds-cfg-plugin-enabled: true
+objectClass: ds-cfg-plugin
ds-cfg-plugin-class: org.opends.server.plugins.profiler.ProfilerPlugin
+ds-cfg-profile-sample-interval: 10 milliseconds
+ds-cfg-plugin-enabled: true
+ds-cfg-profile-directory: logs
+cn: Profiler
ds-cfg-plugin-type: startup
ds-cfg-enable-profiling-on-startup: false
-ds-cfg-profile-directory: logs
-ds-cfg-profile-sample-interval: 10 milliseconds
+
+dn: cn=Short Circuit Plugin,cn=Plugins,cn=config
+objectClass: top
+objectClass: ds-cfg-plugin
+ds-cfg-plugin-class: org.opends.server.plugins.ShortCircuitPlugin
+ds-cfg-plugin-enabled: true
+cn: Short Circuit Plugin
+ds-cfg-plugin-type: preParseAbandon
+ds-cfg-plugin-type: preParseAdd
+ds-cfg-plugin-type: preParseBind
+ds-cfg-plugin-type: preParseCompare
+ds-cfg-plugin-type: preParseDelete
+ds-cfg-plugin-type: preParseExtended
+ds-cfg-plugin-type: preParseModify
+ds-cfg-plugin-type: preParseModifyDN
+ds-cfg-plugin-type: preParseSearch
+ds-cfg-plugin-type: preParseUnbind
+ds-cfg-plugin-type: preOperationAdd
+ds-cfg-plugin-type: preOperationBind
+ds-cfg-plugin-type: preOperationCompare
+ds-cfg-plugin-type: preOperationDelete
+ds-cfg-plugin-type: preOperationExtended
+ds-cfg-plugin-type: preOperationModify
+ds-cfg-plugin-type: preOperationModifyDN
+ds-cfg-plugin-type: preOperationSearch
+
+dn: cn=Update PreOperation Plugin,cn=Plugins,cn=config
+objectClass: top
+objectClass: ds-cfg-plugin
+ds-cfg-plugin-class: org.opends.server.plugins.UpdatePreOpPlugin
+ds-cfg-plugin-enabled: true
+cn: Delay PreOperation Plugin
+ds-cfg-plugin-type: preOperationAdd
+ds-cfg-plugin-type: preOperationModify
dn: cn=Root DNs,cn=config
-objectClass: top
objectClass: ds-cfg-root-dn-base
-cn: Root DNs
+objectClass: top
ds-cfg-default-root-privilege-name: bypass-acl
ds-cfg-default-root-privilege-name: modify-acl
ds-cfg-default-root-privilege-name: config-read
@@ -1160,475 +1503,503 @@
ds-cfg-default-root-privilege-name: password-reset
ds-cfg-default-root-privilege-name: update-schema
ds-cfg-default-root-privilege-name: privilege-change
+cn: Root DNs
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301011032Z
dn: cn=Directory Manager,cn=Root DNs,cn=config
-objectClass: top
-objectClass: person
-objectClass: organizationalPerson
objectClass: inetOrgPerson
+objectClass: person
+objectClass: top
+objectClass: organizationalPerson
objectClass: ds-cfg-root-dn
+userPassword: {SSHA}bT3wAPjyrpVlzX5548I8vvhZ91xIMPWiHRSR3Q==
cn: Directory Manager
-givenName: Directory
sn: Manager
-userPassword: {SSHA512}l1t43vVl7Uh03PpQ2vCsT0B7Q0HTi+tKJmH7tZTmSGaKrMHWHO1czfwEsjMgfbeQoiYQDGDuxolipR0H6ajMu1YHlTjPNG9Z
+givenName: Directory
ds-cfg-alternate-bind-dn: cn=Directory Manager
-ds-rlim-size-limit: 0
+modifiersName: cn=Directory Manager,cn=Root DNs,cn=config
ds-rlim-time-limit: 0
+modifyTimestamp: 20070301010844Z
+pwdChangedTime: 20070301010844.840Z
ds-rlim-lookthrough-limit: 0
+ds-rlim-size-limit: 0
ds-pwp-password-policy-dn: cn=Root Password Policy,cn=Password Policies,cn=config
-dn: cn=Root DSE,cn=config
+dn: cn=Proxy Root,cn=Root DNs,cn=config
+objectClass: inetOrgPerson
+objectClass: person
objectClass: top
+objectClass: organizationalPerson
+objectClass: ds-cfg-root-dn
+sn: Root
+userPassword: {SSHA}BrU+IXUb4GWXKe6Zeb6DQAzTVcaw3LUj7JcpVQ==
+cn: Proxy Root
+uid: proxy.root
+givenName: Proxy
+pwdChangedTime: 20070301011015.945Z
+entryUUID: f3f5c38a-2c20-4f31-a6ce-e5c0af21da82
+createTimestamp: 20070301011015Z
+creatorsName: cn=Internal Client,cn=Root DNs,cn=config
+ds-privilege-name: proxied-auth
+
+dn: cn=Root DSE,cn=config
objectClass: ds-cfg-root-dse
-cn: Root DSE
+objectClass: top
ds-cfg-show-all-attributes: false
+cn: Root DSE
dn: cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: SASL Mechanisms
dn: cn=ANONYMOUS,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
-cn: ANONYMOUS
+objectClass: top
ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.AnonymousSASLMechanismHandler
ds-cfg-sasl-mechanism-handler-enabled: false
+cn: ANONYMOUS
dn: cn=CRAM-MD5,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
+objectClass: top
objectClass: ds-cfg-cram-md5-sasl-mechanism-handler
-cn: CRAM-MD5
ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.CRAMMD5SASLMechanismHandler
ds-cfg-sasl-mechanism-handler-enabled: true
+cn: CRAM-MD5
ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
dn: cn=DIGEST-MD5,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
+objectClass: top
objectClass: ds-cfg-digest-md5-sasl-mechanism-handler
-cn: DIGEST-MD5
ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.DigestMD5SASLMechanismHandler
ds-cfg-sasl-mechanism-handler-enabled: true
+cn: DIGEST-MD5
ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
dn: cn=EXTERNAL,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
+objectClass: top
objectClass: ds-cfg-external-sasl-mechanism-handler
-cn: EXTERNAL
-ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.ExternalSASLMechanismHandler
ds-cfg-sasl-mechanism-handler-enabled: true
-ds-cfg-client-certificate-validation-policy: ifpresent
-ds-cfg-certificate-attribute: userCertificate
+cn: EXTERNAL
ds-cfg-certificate-mapper-dn: cn=Subject Equals DN,cn=Certificate Mappers,cn=config
+ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.ExternalSASLMechanismHandler
+ds-cfg-certificate-attribute: userCertificate
+ds-cfg-client-certificate-validation-policy: ifpresent
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010846Z
dn: cn=GSSAPI,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
objectClass: ds-cfg-gssapi-sasl-mechanism-handler
-cn: GSSAPI
+objectClass: top
ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.GSSAPISASLMechanismHandler
-ds-cfg-sasl-mechanism-handler-enabled: false
-ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
ds-cfg-keytab: /etc/krb5/krb5.keytab
+ds-cfg-sasl-mechanism-handler-enabled: false
+cn: GSSAPI
+ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
dn: cn=PLAIN,cn=SASL Mechanisms,cn=config
-objectClass: top
objectClass: ds-cfg-sasl-mechanism-handler
objectClass: ds-cfg-plain-sasl-mechanism-handler
-cn: PLAIN
+objectClass: top
ds-cfg-sasl-mechanism-handler-class: org.opends.server.extensions.PlainSASLMechanismHandler
ds-cfg-sasl-mechanism-handler-enabled: true
+cn: PLAIN
ds-cfg-identity-mapper-dn: cn=Exact Match,cn=Identity Mappers,cn=config
dn: cn=Synchronization Providers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Synchronization Providers
dn: cn=Syntaxes,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Syntaxes
dn: cn=Absolute Subtree Specification,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Absolute Subtree Specification
ds-cfg-syntax-class: org.opends.server.schema.AbsoluteSubtreeSpecificationSyntax
ds-cfg-syntax-enabled: true
+cn: Absolute Subtree Specification
dn: cn=Attribute Type Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Attribute Type Description
ds-cfg-syntax-class: org.opends.server.schema.AttributeTypeSyntax
ds-cfg-syntax-enabled: true
+cn: Attribute Type Description
dn: cn=Authentication Password,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Authentiation Password
ds-cfg-syntax-class: org.opends.server.schema.AuthPasswordSyntax
ds-cfg-syntax-enabled: true
+cn: Authentiation Password
dn: cn=Binary,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Binary
ds-cfg-syntax-class: org.opends.server.schema.BinarySyntax
ds-cfg-syntax-enabled: true
+cn: Binary
dn: cn=Bit String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Bit String
ds-cfg-syntax-class: org.opends.server.schema.BitStringSyntax
ds-cfg-syntax-enabled: true
+cn: Bit String
dn: cn=Boolean,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Boolean
ds-cfg-syntax-class: org.opends.server.schema.BooleanSyntax
ds-cfg-syntax-enabled: true
+cn: Boolean
dn: cn=Certificate,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Certificate
ds-cfg-syntax-class: org.opends.server.schema.CertificateSyntax
ds-cfg-syntax-enabled: true
+cn: Certificate
dn: cn=Certificate List,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Certificate List
ds-cfg-syntax-class: org.opends.server.schema.CertificateListSyntax
ds-cfg-syntax-enabled: true
+cn: Certificate List
dn: cn=Certificate Pair,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Certificate Pair
ds-cfg-syntax-class: org.opends.server.schema.CertificatePairSyntax
ds-cfg-syntax-enabled: true
+cn: Certificate Pair
dn: cn=Country String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Country String
ds-cfg-syntax-class: org.opends.server.schema.CountryStringSyntax
ds-cfg-syntax-enabled: true
+cn: Country String
dn: cn=Delivery Method,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Delivery Method
ds-cfg-syntax-class: org.opends.server.schema.DeliveryMethodSyntax
ds-cfg-syntax-enabled: true
+cn: Delivery Method
dn: cn=Directory String,cn=Syntaxes,cn=config
objectClass: top
-objectClass: ds-cfg-attribute-syntax
objectClass: ds-cfg-directory-string-attribute-syntax
-cn: Directory String
+objectClass: ds-cfg-attribute-syntax
+ds-cfg-allow-zero-length-values: false
ds-cfg-syntax-class: org.opends.server.schema.DirectoryStringSyntax
ds-cfg-syntax-enabled: true
-ds-cfg-allow-zero-length-values: false
+cn: Directory String
dn: cn=Distinguished Name,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Distinguished Name
ds-cfg-syntax-class: org.opends.server.schema.DistinguishedNameSyntax
ds-cfg-syntax-enabled: true
+cn: Distinguished Name
dn: cn=DIT Content Rule Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: DIT Content Rule Description
ds-cfg-syntax-class: org.opends.server.schema.DITContentRuleSyntax
ds-cfg-syntax-enabled: true
+cn: DIT Content Rule Description
dn: cn=DIT Structure Rule Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: DIT Structure Rule Description
ds-cfg-syntax-class: org.opends.server.schema.DITStructureRuleSyntax
ds-cfg-syntax-enabled: true
+cn: DIT Structure Rule Description
dn: cn=Enhanced Guide,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Enhanced Guide
ds-cfg-syntax-class: org.opends.server.schema.EnhancedGuideSyntax
ds-cfg-syntax-enabled: true
+cn: Enhanced Guide
dn: cn=Facsimile Telephone Number,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Facsimile Telephone Number
ds-cfg-syntax-class: org.opends.server.schema.FaxNumberSyntax
ds-cfg-syntax-enabled: true
+cn: Facsimile Telephone Number
dn: cn=Fax,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Fax
ds-cfg-syntax-class: org.opends.server.schema.FaxSyntax
ds-cfg-syntax-enabled: true
+cn: Fax
dn: cn=Generalized Time,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Generalized Time
ds-cfg-syntax-class: org.opends.server.schema.GeneralizedTimeSyntax
ds-cfg-syntax-enabled: true
+cn: Generalized Time
dn: cn=Guide,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Guide
ds-cfg-syntax-class: org.opends.server.schema.GuideSyntax
ds-cfg-syntax-enabled: true
+cn: Guide
dn: cn=IA5 String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: IA5 String
ds-cfg-syntax-class: org.opends.server.schema.IA5StringSyntax
ds-cfg-syntax-enabled: true
+cn: IA5 String
dn: cn=Integer,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Integer
ds-cfg-syntax-class: org.opends.server.schema.IntegerSyntax
ds-cfg-syntax-enabled: true
+cn: Integer
dn: cn=JPEG,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: JPEG
ds-cfg-syntax-class: org.opends.server.schema.JPEGSyntax
ds-cfg-syntax-enabled: true
+cn: JPEG
dn: cn=LDAP Syntax Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: LDAP Syntax Description
ds-cfg-syntax-class: org.opends.server.schema.LDAPSyntaxDescriptionSyntax
ds-cfg-syntax-enabled: true
+cn: LDAP Syntax Description
dn: cn=Matching Rule Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Matching Rule Description
ds-cfg-syntax-class: org.opends.server.schema.MatchingRuleSyntax
ds-cfg-syntax-enabled: true
+cn: Matching Rule Description
dn: cn=Matching Rule Use Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Matching Rule Use Description
ds-cfg-syntax-class: org.opends.server.schema.MatchingRuleUseSyntax
ds-cfg-syntax-enabled: true
+cn: Matching Rule Use Description
dn: cn=Name and Optional UID,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Name and Optional UID
ds-cfg-syntax-class: org.opends.server.schema.NameAndOptionalUIDSyntax
ds-cfg-syntax-enabled: true
+cn: Name and Optional UID
dn: cn=Name Form Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Name Form Description
ds-cfg-syntax-class: org.opends.server.schema.NameFormSyntax
ds-cfg-syntax-enabled: true
+cn: Name Form Description
dn: cn=Numeric String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Numeric String
ds-cfg-syntax-class: org.opends.server.schema.NumericStringSyntax
ds-cfg-syntax-enabled: true
+cn: Numeric String
dn: cn=Object Class Description,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Object Class Description
ds-cfg-syntax-class: org.opends.server.schema.ObjectClassSyntax
ds-cfg-syntax-enabled: true
+cn: Object Class Description
dn: cn=Object Identifier,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Object Identifier
ds-cfg-syntax-class: org.opends.server.schema.OIDSyntax
ds-cfg-syntax-enabled: true
+cn: Object Identifier
dn: cn=Octet String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Octet String
ds-cfg-syntax-class: org.opends.server.schema.OctetStringSyntax
ds-cfg-syntax-enabled: true
+cn: Octet String
dn: cn=Other Mailbox,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Other Mailbox
ds-cfg-syntax-class: org.opends.server.schema.OtherMailboxSyntax
ds-cfg-syntax-enabled: true
+cn: Other Mailbox
dn: cn=Postal Address,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Postal Address
ds-cfg-syntax-class: org.opends.server.schema.PostalAddressSyntax
ds-cfg-syntax-enabled: true
+cn: Postal Address
dn: cn=Presentation Address,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Presentation Address
ds-cfg-syntax-class: org.opends.server.schema.PresentationAddressSyntax
ds-cfg-syntax-enabled: true
+cn: Presentation Address
dn: cn=Printable String,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Printable String
ds-cfg-syntax-class: org.opends.server.schema.PrintableStringSyntax
ds-cfg-syntax-enabled: true
+cn: Printable String
dn: cn=Protocol Information,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Protocol Information
ds-cfg-syntax-class: org.opends.server.schema.ProtocolInformationSyntax
ds-cfg-syntax-enabled: true
+cn: Protocol Information
dn: cn=Relative Subtree Specification,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Relative Subtree Specification
ds-cfg-syntax-class: org.opends.server.schema.RelativeSubtreeSpecificationSyntax
ds-cfg-syntax-enabled: true
+cn: Relative Subtree Specification
dn: cn=Substring Assertion,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Substring Assertion
ds-cfg-syntax-class: org.opends.server.schema.SubstringAssertionSyntax
ds-cfg-syntax-enabled: true
+cn: Substring Assertion
dn: cn=Subtree Specification,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Subtree Specification
ds-cfg-syntax-class: org.opends.server.schema.RFC3672SubtreeSpecificationSyntax
ds-cfg-syntax-enabled: true
+cn: Subtree Specification
dn: cn=Supported Algorithm,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Supported Algorithm
ds-cfg-syntax-class: org.opends.server.schema.SupportedAlgorithmSyntax
ds-cfg-syntax-enabled: true
+cn: Supported Algorithm
dn: cn=Telephone Number,cn=Syntaxes,cn=config
+objectClass: ds-cfg-telephone-number-attribute-syntax
objectClass: top
objectClass: ds-cfg-attribute-syntax
-objectClass: ds-cfg-telephone-number-attribute-syntax
-cn: Telephone Number
ds-cfg-syntax-class: org.opends.server.schema.TelephoneNumberSyntax
ds-cfg-syntax-enabled: true
ds-cfg-strict-telephone-number-format: false
+cn: Telephone Number
dn: cn=Teletex Terminal Identifier,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Teletex Terminal Identifier
ds-cfg-syntax-class: org.opends.server.schema.TeletexTerminalIdentifierSyntax
ds-cfg-syntax-enabled: true
+cn: Teletex Terminal Identifier
dn: cn=Telex Number,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: Telex Number
ds-cfg-syntax-class: org.opends.server.schema.TelexNumberSyntax
ds-cfg-syntax-enabled: true
-
-dn: cn=UTC Time,cn=Syntaxes,cn=config
-objectClass: top
-objectClass: ds-cfg-attribute-syntax
-cn: UTC Time
-ds-cfg-syntax-class: org.opends.server.schema.UTCTimeSyntax
-ds-cfg-syntax-enabled: true
+cn: Telex Number
dn: cn=User Password,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: User Password
ds-cfg-syntax-class: org.opends.server.schema.UserPasswordSyntax
ds-cfg-syntax-enabled: true
+cn: User Password
+
+dn: cn=UTC Time,cn=Syntaxes,cn=config
+objectClass: top
+objectClass: ds-cfg-attribute-syntax
+ds-cfg-syntax-class: org.opends.server.schema.UTCTimeSyntax
+ds-cfg-syntax-enabled: true
+cn: UTC Time
dn: cn=UUID,cn=Syntaxes,cn=config
objectClass: top
objectClass: ds-cfg-attribute-syntax
-cn: UUID
ds-cfg-syntax-class: org.opends.server.schema.UUIDSyntax
ds-cfg-syntax-enabled: true
+cn: UUID
dn: cn=Trust Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Trust Manager Providers
dn: cn=Blind Trust,cn=Trust Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-trust-manager-provider
-cn: Blind Trust
-ds-cfg-trust-manager-provider-class: org.opends.server.extensions.BlindTrustManagerProvider
+objectClass: top
ds-cfg-trust-manager-provider-enabled: false
+ds-cfg-trust-manager-provider-class: org.opends.server.extensions.BlindTrustManagerProvider
+cn: Blind Trust
dn: cn=JKS,cn=Trust Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-trust-manager-provider
+objectClass: top
objectClass: ds-cfg-file-based-trust-manager-provider
-cn: JKS
+ds-cfg-trust-manager-provider-enabled: true
ds-cfg-trust-manager-provider-class: org.opends.server.extensions.FileBasedTrustManagerProvider
-ds-cfg-trust-manager-provider-enabled: false
+ds-cfg-trust-store-pin: password
ds-cfg-trust-store-type: JKS
-ds-cfg-trust-store-file: config/truststore
+cn: JKS
+ds-cfg-trust-store-file: config/server.truststore
dn: cn=PKCS12,cn=Trust Manager Providers,cn=config
-objectClass: top
objectClass: ds-cfg-trust-manager-provider
+objectClass: top
objectClass: ds-cfg-file-based-trust-manager-provider
-cn: PKCS12
-ds-cfg-trust-manager-provider-class: org.opends.server.extensions.FileBasedTrustManagerProvider
ds-cfg-trust-manager-provider-enabled: false
+ds-cfg-trust-manager-provider-class: org.opends.server.extensions.FileBasedTrustManagerProvider
ds-cfg-trust-store-type: PKCS12
+cn: PKCS12
ds-cfg-trust-store-file: config/truststore.p12
dn: cn=Virtual Attributes,cn=config
-objectClass: top
objectClass: ds-cfg-branch
+objectClass: top
cn: Virtual Attributes
dn: cn=Work Queue,cn=config
+objectClass: ds-cfg-traditional-work-queue
objectClass: top
objectClass: ds-cfg-work-queue
-objectClass: ds-cfg-traditional-work-queue
+ds-cfg-max-work-queue-capacity: 0
+ds-cfg-num-worker-threads: 24
cn: Work Queue
ds-cfg-work-queue-class: org.opends.server.extensions.TraditionalWorkQueue
-ds-cfg-num-worker-threads: 24
-ds-cfg-max-work-queue-capacity: 0
+modifiersName: cn=Internal Client,cn=Root DNs,cn=config
+modifyTimestamp: 20070301010846Z
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
index cda78d1..b626451 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLAbandonOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java
index 32f7774..ceed4d7 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLAddOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java
index 7563314..c47aa81 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLCompareOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java
index 08812ca..baf3dba 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLDeleteOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
index 75d02ff..99afe88 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java
index f793327..1068be7 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLModifyDNOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java b/opends/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java
index 69626be..b3e56bb 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/DSMLSearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/dsml/org/opends/dsml/protocol/NamespacePrefixMapperImpl.java b/opends/src/dsml/org/opends/dsml/protocol/NamespacePrefixMapperImpl.java
index 66ea2c6..185678e 100644
--- a/opends/src/dsml/org/opends/dsml/protocol/NamespacePrefixMapperImpl.java
+++ b/opends/src/dsml/org/opends/dsml/protocol/NamespacePrefixMapperImpl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.dsml.protocol;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/Step.java b/opends/src/quicksetup/org/opends/quicksetup/Step.java
index bf590bb..9432889 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Step.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Step.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/BrowseActionListener.java b/opends/src/quicksetup/org/opends/quicksetup/event/BrowseActionListener.java
index 159e9f7..0d38480 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/BrowseActionListener.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/BrowseActionListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/ButtonActionListener.java b/opends/src/quicksetup/org/opends/quicksetup/event/ButtonActionListener.java
index 9ae9cb0..19264e7 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/ButtonActionListener.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/ButtonActionListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/ButtonEvent.java b/opends/src/quicksetup/org/opends/quicksetup/event/ButtonEvent.java
index e0fc9d8..03bebc6 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/ButtonEvent.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/ButtonEvent.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateEvent.java b/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateEvent.java
index 8d594ff..f6fee3a 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateEvent.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateEvent.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateListener.java b/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateListener.java
index 8467540..3edf80a 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateListener.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/InstallProgressUpdateListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/MinimumSizeComponentListener.java b/opends/src/quicksetup/org/opends/quicksetup/event/MinimumSizeComponentListener.java
index 76dec7c..d690a39 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/MinimumSizeComponentListener.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/MinimumSizeComponentListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateEvent.java b/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateEvent.java
index 34bdc8b..e29bad3 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateEvent.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateEvent.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateListener.java b/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateListener.java
index 4202e2e..85c9703 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateListener.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/event/UninstallProgressUpdateListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.event;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/DataOptions.java b/opends/src/quicksetup/org/opends/quicksetup/installer/DataOptions.java
index 5b37cd6..25be74c 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/DataOptions.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/DataOptions.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/FieldName.java b/opends/src/quicksetup/org/opends/quicksetup/installer/FieldName.java
index bdb0904..0a6b346 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/FieldName.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/FieldName.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallException.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallException.java
index 67e61df..705e013 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressDescriptor.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressDescriptor.java
index e87340f..221c6df 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressDescriptor.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressDescriptor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressStep.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressStep.java
index 0855f0d..9c3db54 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressStep.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallProgressStep.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
index 7b9464f..f602065 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/InstallerHelper.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/LabelFieldDescriptor.java b/opends/src/quicksetup/org/opends/quicksetup/installer/LabelFieldDescriptor.java
index f4b7bcd..404cf15 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/LabelFieldDescriptor.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/LabelFieldDescriptor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallData.java b/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallData.java
index f427bae..dc6fa13 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallData.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallData.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallDataException.java b/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallDataException.java
index df16abe..7c759b2 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallDataException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/UserInstallDataException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/JnlpProperties.java b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/JnlpProperties.java
index c5987cc..86a3df7 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/JnlpProperties.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/JnlpProperties.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer.webstart;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
index 1e13c89..3549b4b 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.installer.webstart;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/ButtonsPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/ButtonsPanel.java
index dd69390..fdd3156 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/ButtonsPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/ButtonsPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/ConfirmUninstallPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/ConfirmUninstallPanel.java
index 80a868d..006eaff 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/ConfirmUninstallPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/ConfirmUninstallPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/DataOptionsPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/DataOptionsPanel.java
index 5c6dce7..f664bbc 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/DataOptionsPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/DataOptionsPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/InstallWelcomePanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/InstallWelcomePanel.java
index f01a81a..029c343 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/InstallWelcomePanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/InstallWelcomePanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupPanel.java
index 9371bdd..06fb072 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/QuickSetupPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
index efa0922..abccf8d 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/ReviewPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/ServerSettingsPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/ServerSettingsPanel.java
index 684a49d..bf00a43 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/ServerSettingsPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/ServerSettingsPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/ui/StepsPanel.java b/opends/src/quicksetup/org/opends/quicksetup/ui/StepsPanel.java
index 2a1475b..e9bf9c9 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/ui/StepsPanel.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/ui/StepsPanel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.ui;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallException.java b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallException.java
index 88ca9e1..37082c3 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.uninstaller;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressDescriptor.java b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressDescriptor.java
index 885912c..ae6eef5 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressDescriptor.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressDescriptor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.uninstaller;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressStep.java b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressStep.java
index 83624fd..b63b28e 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressStep.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UninstallProgressStep.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.uninstaller;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallDataException.java b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallDataException.java
index 3cfbbae..36b884c 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallDataException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/uninstaller/UserUninstallDataException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.uninstaller;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
index dab6554..5572b88 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundTask.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
index c76d1e8..2b5f682 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/BackgroundThreadTask.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/ExtensionFileFilter.java b/opends/src/quicksetup/org/opends/quicksetup/util/ExtensionFileFilter.java
index 5ff6e0e..8c39a40 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/ExtensionFileFilter.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/ExtensionFileFilter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/PlainTextProgressMessageFormatter.java b/opends/src/quicksetup/org/opends/quicksetup/util/PlainTextProgressMessageFormatter.java
index fdeb097..0f9ea35 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/PlainTextProgressMessageFormatter.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/PlainTextProgressMessageFormatter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/ProgressMessageFormatter.java b/opends/src/quicksetup/org/opends/quicksetup/util/ProgressMessageFormatter.java
index 1c90519..b1faf70 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/ProgressMessageFormatter.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/ProgressMessageFormatter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/URLWorker.java b/opends/src/quicksetup/org/opends/quicksetup/util/URLWorker.java
index ee35db4..21c59ee 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/URLWorker.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/URLWorker.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserException.java b/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserException.java
index 061008e..ba5ab1b 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserException.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserLauncher.java b/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserLauncher.java
index 5330752..98f85aa 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserLauncher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/util/WebBrowserLauncher.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.quicksetup.util;
diff --git a/opends/src/server/org/opends/server/api/AccessControlHandler.java b/opends/src/server/org/opends/server/api/AccessControlHandler.java
index 4449cd2..19a9d0b 100644
--- a/opends/src/server/org/opends/server/api/AccessControlHandler.java
+++ b/opends/src/server/org/opends/server/api/AccessControlHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/AccessControlProvider.java b/opends/src/server/org/opends/server/api/AccessControlProvider.java
index fbb4c4a..0088657 100644
--- a/opends/src/server/org/opends/server/api/AccessControlProvider.java
+++ b/opends/src/server/org/opends/server/api/AccessControlProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/AccessLogger.java b/opends/src/server/org/opends/server/api/AccessLogger.java
index 06a05d7..b8c97b2 100644
--- a/opends/src/server/org/opends/server/api/AccessLogger.java
+++ b/opends/src/server/org/opends/server/api/AccessLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java b/opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java
index 3149ab2..c2012e8 100644
--- a/opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java
+++ b/opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -35,7 +35,6 @@
import org.opends.server.types.DN;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -49,11 +48,6 @@
*/
public abstract class AccountStatusNotificationHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.AccountStatusNotificationHandler";
@@ -86,8 +80,6 @@
*/
public void finalizeStatusNotificationHandler()
{
- assert debugEnter(CLASS_NAME,
- "finalizeStatusNotificationHandler");
// No action is required by default.
}
@@ -123,8 +115,6 @@
public void handleStatusNotification(
AccountStatusNotification notification)
{
- assert debugEnter(CLASS_NAME, "handleStatusNotification",
- String.valueOf(notification));
handleStatusNotification(notification.getNotificationType(),
notification.getUserDN(),
diff --git a/opends/src/server/org/opends/server/api/AlertGenerator.java b/opends/src/server/org/opends/server/api/AlertGenerator.java
index 7f24e49..8c74bec 100644
--- a/opends/src/server/org/opends/server/api/AlertGenerator.java
+++ b/opends/src/server/org/opends/server/api/AlertGenerator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -32,7 +32,6 @@
import org.opends.server.types.DN;
-import static org.opends.server.loggers.Debug.*;
diff --git a/opends/src/server/org/opends/server/api/AlertHandler.java b/opends/src/server/org/opends/server/api/AlertHandler.java
index 6908182..9f59474 100644
--- a/opends/src/server/org/opends/server/api/AlertHandler.java
+++ b/opends/src/server/org/opends/server/api/AlertHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ApproximateMatchingRule.java b/opends/src/server/org/opends/server/api/ApproximateMatchingRule.java
index 41c4c2a..efb2e14 100644
--- a/opends/src/server/org/opends/server/api/ApproximateMatchingRule.java
+++ b/opends/src/server/org/opends/server/api/ApproximateMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -31,7 +31,6 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.ConditionResult;
-import static org.opends.server.loggers.Debug.*;
@@ -43,11 +42,6 @@
public abstract class ApproximateMatchingRule
extends MatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.ApproximateMatchingRule";
@@ -90,9 +84,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
if (approximatelyMatch(attributeValue, assertionValue))
{
diff --git a/opends/src/server/org/opends/server/api/AttributeSyntax.java b/opends/src/server/org/opends/server/api/AttributeSyntax.java
index c98668f..1906fff 100644
--- a/opends/src/server/org/opends/server/api/AttributeSyntax.java
+++ b/opends/src/server/org/opends/server/api/AttributeSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -33,7 +33,6 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -44,11 +43,6 @@
*/
public abstract class AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.AttributeSyntax";
@@ -80,7 +74,6 @@
*/
public void finalizeSyntax()
{
- assert debugEnter(CLASS_NAME, "finalizeSyntax");
// No implementation required.
}
@@ -193,7 +186,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int hashCode = 0;
@@ -223,7 +215,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
@@ -254,7 +245,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -272,8 +262,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("( ");
buffer.append(getOID());
diff --git a/opends/src/server/org/opends/server/api/AttributeValueDecoder.java b/opends/src/server/org/opends/server/api/AttributeValueDecoder.java
index 1a5bc9b..c3aa6bd 100644
--- a/opends/src/server/org/opends/server/api/AttributeValueDecoder.java
+++ b/opends/src/server/org/opends/server/api/AttributeValueDecoder.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/Backend.java b/opends/src/server/org/opends/server/api/Backend.java
index 033fd81..f658492 100644
--- a/opends/src/server/org/opends/server/api/Backend.java
+++ b/opends/src/server/org/opends/server/api/Backend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -56,7 +56,6 @@
import org.opends.server.types.RestoreConfig;
import org.opends.server.types.WritabilityMode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -68,11 +67,6 @@
*/
public abstract class Backend
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.Backend";
@@ -106,7 +100,6 @@
*/
protected Backend()
{
- assert debugConstructor(CLASS_NAME);
backendID = null;
parentBackend = null;
@@ -221,8 +214,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists",
- String.valueOf(entryDN));
Lock lock = null;
for (int i=0; i < 3; i++)
@@ -411,8 +402,6 @@
*/
public final boolean supportsControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "supportsControl",
- String.valueOf(controlOID));
Set<String> supportedControls = getSupportedControls();
return ((supportedControls != null) &&
@@ -443,8 +432,6 @@
*/
public final boolean supportsFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "supportsFeature",
- String.valueOf(featureOID));
Set<String> supportedFeatures = getSupportedFeatures();
return ((supportedFeatures != null) &&
@@ -634,7 +621,6 @@
*/
public String getBackendID()
{
- assert debugEnter(CLASS_NAME, "getBackendID");
return backendID;
}
@@ -648,8 +634,6 @@
*/
public void setBackendID(String backendID)
{
- assert debugEnter(CLASS_NAME, "setBackendID",
- String.valueOf(backendID));
this.backendID = backendID;
}
@@ -664,7 +648,6 @@
*/
public boolean isPrivateBackend()
{
- assert debugEnter(CLASS_NAME, "isPrivateBackend");
return isPrivateBackend;
}
@@ -691,7 +674,6 @@
*/
public WritabilityMode getWritabilityMode()
{
- assert debugEnter(CLASS_NAME, "getWritabilityMode");
return writabilityMode;
}
@@ -705,8 +687,6 @@
*/
public void setWritabilityMode(WritabilityMode writabilityMode)
{
- assert debugEnter(CLASS_NAME, "setWritabilityMode",
- String.valueOf(writabilityMode));
if (writabilityMode == null)
{
@@ -729,7 +709,6 @@
*/
public BackendMonitor getBackendMonitor()
{
- assert debugEnter(CLASS_NAME, "getBackendMonitor");
return backendMonitor;
}
@@ -743,8 +722,6 @@
*/
public void setBackendMonitor(BackendMonitor backendMonitor)
{
- assert debugEnter(CLASS_NAME, "setBackendMonitor",
- String.valueOf(backendMonitor));
this.backendMonitor = backendMonitor;
}
@@ -770,7 +747,6 @@
*/
public Backend getParentBackend()
{
- assert debugEnter(CLASS_NAME, "getParentBackend");
return parentBackend;
}
@@ -784,8 +760,6 @@
*/
public void setParentBackend(Backend parentBackend)
{
- assert debugEnter(CLASS_NAME, "setParentBackend",
- String.valueOf(parentBackend));
synchronized (this)
{
@@ -803,7 +777,6 @@
*/
public Backend[] getSubordinateBackends()
{
- assert debugEnter(CLASS_NAME, "getSubordinateBackends");
return subordinateBackends;
}
@@ -818,8 +791,6 @@
*/
public void setSubordinateBackends(Backend[] subordinateBackends)
{
- assert debugEnter(CLASS_NAME, "setSubordinateBackends",
- String.valueOf(subordinateBackends));
synchronized (this)
{
@@ -843,8 +814,6 @@
*/
public boolean hasSubSuffix(DN subSuffixDN)
{
- assert debugEnter(CLASS_NAME, "hasSubSuffix",
- String.valueOf(subSuffixDN));
Backend[] subBackends = subordinateBackends;
for (Backend b : subBackends)
@@ -885,8 +854,6 @@
public void removeSubSuffix(DN subSuffixDN, DN parentDN)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "removeSubSuffix",
- String.valueOf(subSuffixDN));
synchronized (this)
{
@@ -951,8 +918,6 @@
*/
public void addSubordinateBackend(Backend subordinateBackend)
{
- assert debugEnter(CLASS_NAME, "addSubordinateBackend",
- String.valueOf(subordinateBackend));
synchronized (this)
{
@@ -986,8 +951,6 @@
*/
public void removeSubordinateBackend(Backend subordinateBackend)
{
- assert debugEnter(CLASS_NAME, "removeSubordinateBackend",
- String.valueOf(subordinateBackend));
synchronized (this)
{
@@ -1032,8 +995,6 @@
*/
public boolean handlesEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "handlesEntry",
- String.valueOf(entryDN));
DN[] baseDNs = getBaseDNs();
for (int i=0; i < baseDNs.length; i++)
@@ -1076,8 +1037,6 @@
List<DN> baseDNs,
List<DN> excludeDNs)
{
- assert debugEnter(CLASS_NAME, "handlesEntry",
- String.valueOf(entryDN));
for (DN baseDN : baseDNs)
{
diff --git a/opends/src/server/org/opends/server/api/CertificateMapper.java b/opends/src/server/org/opends/server/api/CertificateMapper.java
index c77cdeb..dedfb6b 100644
--- a/opends/src/server/org/opends/server/api/CertificateMapper.java
+++ b/opends/src/server/org/opends/server/api/CertificateMapper.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -36,7 +36,6 @@
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -48,11 +47,6 @@
*/
public abstract class CertificateMapper
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.CertificateMapper";
@@ -85,7 +79,6 @@
*/
public void finalizeCertificateMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeCertificateMapper");
// No implementation is required by default.
}
diff --git a/opends/src/server/org/opends/server/api/ClientConnection.java b/opends/src/server/org/opends/server/api/ClientConnection.java
index a3a4697..3aa32a7 100644
--- a/opends/src/server/org/opends/server/api/ClientConnection.java
+++ b/opends/src/server/org/opends/server/api/ClientConnection.java
@@ -61,7 +61,11 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -75,11 +79,6 @@
*/
public abstract class ClientConnection
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.ClientConnection";
@@ -129,7 +128,6 @@
*/
protected ClientConnection()
{
- assert debugConstructor(CLASS_NAME);
connectTime = TimeThread.getTime();
connectTimeString = TimeThread.getUTCTime();
@@ -195,8 +193,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeConnectionInternal",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -227,7 +227,6 @@
*/
public long getConnectTime()
{
- assert debugEnter(CLASS_NAME, "getConnectTime");
return connectTime;
}
@@ -243,7 +242,6 @@
*/
public String getConnectTimeString()
{
- assert debugEnter(CLASS_NAME, "getConnectTimeString");
return connectTimeString;
}
@@ -462,8 +460,6 @@
public final boolean sendIntermediateResponse(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "sendIntermediateResponse",
- String.valueOf(intermediateResponse));
// Invoke the intermediate response plugins for the response
@@ -526,11 +522,6 @@
boolean sendNotification,
int messageID, Object... arguments)
{
- assert debugEnter(CLASS_NAME, "disconnect",
- String.valueOf(disconnectReason),
- String.valueOf(sendNotification),
- String.valueOf(messageID),
- String.valueOf(arguments));
String message = getMessage(messageID, arguments);
disconnect(disconnectReason, sendNotification, message,
@@ -581,7 +572,6 @@
*/
public boolean bindInProgress()
{
- assert debugEnter(CLASS_NAME, "bindInProgress");
return bindInProgress;
}
@@ -598,8 +588,6 @@
*/
public void setBindInProgress(boolean bindInProgress)
{
- assert debugEnter(CLASS_NAME, "setBindInProgress",
- String.valueOf(bindInProgress));
this.bindInProgress = bindInProgress;
}
@@ -618,7 +606,6 @@
*/
public boolean mustChangePassword()
{
- assert debugEnter(CLASS_NAME, "mustChangePassword");
if (authenticationInfo == null)
{
@@ -644,8 +631,6 @@
*/
public void setMustChangePassword(boolean mustChangePassword)
{
- assert debugEnter(CLASS_NAME, "setMustChangePassword",
- String.valueOf(mustChangePassword));
if (authenticationInfo == null)
{
@@ -709,7 +694,6 @@
public CopyOnWriteArrayList<PersistentSearch>
getPersistentSearches()
{
- assert debugEnter(CLASS_NAME, "getPersistentSearches");
return persistentSearches;
}
@@ -728,8 +712,6 @@
public void registerPersistentSearch(PersistentSearch
persistentSearch)
{
- assert debugEnter(CLASS_NAME, "registerPersistentSearch",
- String.valueOf(persistentSearch));
persistentSearches.add(persistentSearch);
}
@@ -748,8 +730,6 @@
public void deregisterPersistentSearch(PersistentSearch
persistentSearch)
{
- assert debugEnter(CLASS_NAME, "deregisterPersistentSearch",
- String.valueOf(persistentSearch));
persistentSearches.remove(persistentSearch);
}
@@ -806,7 +786,6 @@
*/
public AuthenticationInfo getAuthenticationInfo()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationInfo");
return authenticationInfo;
}
@@ -825,8 +804,6 @@
public void setAuthenticationInfo(AuthenticationInfo
authenticationInfo)
{
- assert debugEnter(CLASS_NAME, "setAuthenticationInfo",
- String.valueOf(authenticationInfo));
if (this.authenticationInfo != null)
{
@@ -916,9 +893,6 @@
*/
public void updateAuthenticationInfo(Entry oldEntry, Entry newEntry)
{
- assert debugEnter(CLASS_NAME, "updateAuthenticationInfo",
- String.valueOf(oldEntry),
- String.valueOf(newEntry));
Entry authNEntry = authenticationInfo.getAuthenticationEntry();
Entry authZEntry = authenticationInfo.getAuthorizationEntry();
@@ -958,7 +932,6 @@
*/
public void setUnauthenticated()
{
- assert debugEnter(CLASS_NAME, "setUnauthenticated");
this.authenticationInfo = new AuthenticationInfo();
this.sizeLimit = DirectoryServer.getSizeLimit();
@@ -984,9 +957,6 @@
public boolean hasPrivilege(Privilege privilege,
Operation operation)
{
- assert debugEnter(CLASS_NAME, "hasPrivilege",
- String.valueOf(privilege),
- String.valueOf(operation));
boolean result = privileges.contains(privilege);
if (operation == null)
@@ -1035,9 +1005,6 @@
public boolean hasAllPrivileges(Privilege[] privileges,
Operation operation)
{
- assert debugEnter(CLASS_NAME, "hasAllPrivileges",
- String.valueOf(privileges),
- String.valueOf(operation));
HashSet<Privilege> privSet = this.privileges;
boolean result = true;
@@ -1103,8 +1070,6 @@
*/
private void updatePrivileges(Entry entry, boolean isRoot)
{
- assert debugEnter(CLASS_NAME, "updatePrivileges",
- String.valueOf(entry));
HashSet<Privilege> newPrivileges = new HashSet<Privilege>();
HashSet<Privilege> removePrivileges = new HashSet<Privilege>();
@@ -1183,7 +1148,6 @@
*/
public final Object getSASLAuthStateInfo()
{
- assert debugEnter(CLASS_NAME, "getSASLAuthStateInfo");
return saslAuthState;
}
@@ -1200,8 +1164,6 @@
*/
public final void setSASLAuthStateInfo(Object saslAuthState)
{
- assert debugEnter(CLASS_NAME, "setSASLAuthStateInfo",
- String.valueOf(saslAuthState));
this.saslAuthState = saslAuthState;
}
@@ -1217,7 +1179,6 @@
*/
public final int getSizeLimit()
{
- assert debugEnter(CLASS_NAME, "getSizeLimit");
return sizeLimit;
}
@@ -1234,8 +1195,6 @@
*/
public final void setSizeLimit(int sizeLimit)
{
- assert debugEnter(CLASS_NAME, "setSizeLimit",
- String.valueOf(sizeLimit));
this.sizeLimit = sizeLimit;
}
@@ -1251,7 +1210,6 @@
*/
public final int getLookthroughLimit()
{
- assert debugEnter(CLASS_NAME, "getLookthroughLimit");
return lookthroughLimit;
}
@@ -1268,8 +1226,6 @@
*/
public final void setLookthroughLimit(int lookthroughLimit)
{
- assert debugEnter(CLASS_NAME, "setLookthroughLimit",
- String.valueOf(lookthroughLimit));
this.lookthroughLimit = lookthroughLimit;
}
@@ -1285,7 +1241,6 @@
*/
public final int getTimeLimit()
{
- assert debugEnter(CLASS_NAME, "getTimeLimit");
return timeLimit;
}
@@ -1302,8 +1257,6 @@
*/
public final void setTimeLimit(int timeLimit)
{
- assert debugEnter(CLASS_NAME, "setTimeLimit",
- String.valueOf(timeLimit));
this.timeLimit = timeLimit;
}
@@ -1352,8 +1305,6 @@
public boolean isMemberOf(Group group, Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "isMemberOf", String.valueOf(group),
- String.valueOf(operation));
if (operation == null)
{
@@ -1392,8 +1343,6 @@
public Set<Group> getGroups(Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getGroups",
- String.valueOf(operation));
// FIXME -- This probably isn't the most efficient implementation.
@@ -1456,7 +1405,6 @@
*/
public DN getKeyManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getKeyManagerProviderDN");
// In the default implementation, we'll return null.
return null;
@@ -1479,7 +1427,6 @@
*/
public DN getTrustManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getTrustManagerProviderDN");
// In the default implementation, we'll return null.
return null;
@@ -1512,7 +1459,6 @@
*/
public final String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
diff --git a/opends/src/server/org/opends/server/api/ConfigAddListener.java b/opends/src/server/org/opends/server/api/ConfigAddListener.java
index 69d2175..31cdf29 100644
--- a/opends/src/server/org/opends/server/api/ConfigAddListener.java
+++ b/opends/src/server/org/opends/server/api/ConfigAddListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ConfigChangeListener.java b/opends/src/server/org/opends/server/api/ConfigChangeListener.java
index 3f1f46b..e127d19 100644
--- a/opends/src/server/org/opends/server/api/ConfigChangeListener.java
+++ b/opends/src/server/org/opends/server/api/ConfigChangeListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ConfigDeleteListener.java b/opends/src/server/org/opends/server/api/ConfigDeleteListener.java
index 85c7d02..c2b05b5 100644
--- a/opends/src/server/org/opends/server/api/ConfigDeleteListener.java
+++ b/opends/src/server/org/opends/server/api/ConfigDeleteListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ConfigHandler.java b/opends/src/server/org/opends/server/api/ConfigHandler.java
index c456c03..c9afe1b 100644
--- a/opends/src/server/org/opends/server/api/ConfigHandler.java
+++ b/opends/src/server/org/opends/server/api/ConfigHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ConfigurableComponent.java b/opends/src/server/org/opends/server/api/ConfigurableComponent.java
index 32f2ea6..62a6751 100644
--- a/opends/src/server/org/opends/server/api/ConfigurableComponent.java
+++ b/opends/src/server/org/opends/server/api/ConfigurableComponent.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -35,7 +35,6 @@
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DN;
-import static org.opends.server.loggers.Debug.*;
diff --git a/opends/src/server/org/opends/server/api/ConnectionHandler.java b/opends/src/server/org/opends/server/api/ConnectionHandler.java
index fde92b8..00c6f7c 100644
--- a/opends/src/server/org/opends/server/api/ConnectionHandler.java
+++ b/opends/src/server/org/opends/server/api/ConnectionHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -35,7 +35,6 @@
import org.opends.server.types.HostPort;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -46,11 +45,6 @@
public abstract class ConnectionHandler
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.ConnectionHandler";
@@ -71,7 +65,6 @@
{
super(threadName);
- assert debugConstructor(CLASS_NAME, String.valueOf(threadName));
monitor = null;
}
@@ -186,7 +179,6 @@
*/
public ConnectionHandlerMonitor getConnectionHandlerMonitor()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandlerMonitor");
return monitor;
}
@@ -202,8 +194,6 @@
public void setConnectionHandlerMonitor(
ConnectionHandlerMonitor monitor)
{
- assert debugEnter(CLASS_NAME, "setConnectionHandlerMonitor",
- String.valueOf(monitor));
this.monitor = monitor;
}
@@ -217,7 +207,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
diff --git a/opends/src/server/org/opends/server/api/ConnectionSecurityProvider.java b/opends/src/server/org/opends/server/api/ConnectionSecurityProvider.java
index 7b053b8..ac37e9e 100644
--- a/opends/src/server/org/opends/server/api/ConnectionSecurityProvider.java
+++ b/opends/src/server/org/opends/server/api/ConnectionSecurityProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/DebugLogger.java b/opends/src/server/org/opends/server/api/DebugLogger.java
deleted file mode 100644
index fcf1dd0..0000000
--- a/opends/src/server/org/opends/server/api/DebugLogger.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.api;
-
-
-
-import java.nio.ByteBuffer;
-import org.opends.server.config.ConfigEntry;
-import org.opends.server.config.ConfigException;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-import org.opends.server.types.InitializationException;
-
-
-
-/**
- * This class defines the set of methods and structures that must be
- * implemented for a Directory Server debug logger.
- */
-public abstract class DebugLogger
-{
- /**
- * Initializes this debug logger based on the information in the
- * provided configuration entry.
- *
- * @param configEntry The configuration entry that contains the
- * information to use to initialize this debug
- * logger.
- *
- * @throws ConfigException If an unrecoverable problem arises in
- * the process of performing the
- * initialization.
- *
- * @throws InitializationException If a problem occurs during
- * initialization that is not
- * related to the server
- * configuration.
- */
- public abstract void initializeDebugLogger(ConfigEntry configEntry)
- throws ConfigException, InitializationException;
-
-
-
- /**
- * Closes this debug logger and releases any resources it might have
- * held.
- */
- public abstract void closeDebugLogger();
-
-
-
- /**
- * Writes a message to the debug logger indicating that the
- * specified raw data was read.
- *
- * @param className The fully-qualified name of the Java class in
- * which the data was read.
- * @param methodName The name of the method in which the data was
- * read.
- * @param buffer The byte buffer containing the data that has
- * been read. The byte buffer must be in the
- * same state when this method returns as when
- * it was entered.
- */
- public abstract void debugBytesRead(String className,
- String methodName,
- ByteBuffer buffer);
-
-
-
- /**
- * Writes a message to the debug logger indicating that the
- * specified raw data was written.
- *
- * @param className The fully-qualified name of the Java class in
- * which the data was written.
- * @param methodName The name of the method in which the data was
- * written.
- * @param buffer The byte buffer containing the data that has
- * been written. The byte buffer must be in the
- * same state when this method returns as when
- * it was entered.
- */
- public abstract void debugBytesWritten(String className,
- String methodName,
- ByteBuffer buffer);
-
-
-
- /**
- * Writes a message to the debug logger indicating that the
- * constructor for the specified class has been invoked.
- *
- * @param className The fully-qualified name of the Java class
- * whose constructor has been invoked.
- * @param args The set of arguments provided for the
- * constructor.
- */
- public abstract void debugConstructor(String className,
- String... args);
-
-
-
- /**
- * Writes a message to the debug logger indicating that the
- * specified method has been entered.
- *
- * @param className The fully-qualified name of the Java class in
- * which the specified method resides.
- * @param methodName The name of the method that has been entered.
- * @param args The set of arguments provided to the method.
- */
- public abstract void debugEnter(String className, String methodName,
- String... args);
-
-
-
- /**
- * Writes a generic message to the debug logger using the provided
- * information.
- *
- * @param category The category associated with this debug
- * message.
- * @param severity The severity associated with this debug
- * message.
- * @param className The fully-qualified name of the Java class in
- * which the debug message was generated.
- * @param methodName The name of the method in which the debug
- * message was generated.
- * @param message The actual contents of the debug message.
- */
- public abstract void debugMessage(DebugLogCategory category,
- DebugLogSeverity severity,
- String className,
- String methodName,
- String message);
-
-
-
- /**
- * Writes a message to the debug logger containing information from
- * the provided exception that was thrown.
- *
- * @param className The fully-qualified name of the Java class in
- * which the exception was thrown.
- * @param methodName The name of the method in which the exception
- * was thrown.
- * @param exception The exception that was thrown.
- */
- public abstract void debugException(String className,
- String methodName,
- Throwable exception);
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided
- * protocol element has been read.
- *
- * @param className The fully-qualified name of the Java
- * class in which the protocol element was
- * read.
- * @param methodName The name of the method in which the
- * protocol element was read.
- * @param protocolElement The protocol element that was read.
- */
- public abstract void debugProtocolElementRead(String className,
- String methodName,
- ProtocolElement protocolElement);
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided
- * protocol element has been written.
- *
- * @param className The fully-qualified name of the Java
- * class in which the protocol element was
- * written.
- * @param methodName The name of the method in which the
- * protocol element was written.
- * @param protocolElement The protocol element that was written.
- */
- public abstract void debugProtocolElementWritten(String className,
- String methodName,
- ProtocolElement protocolElement);
-
-
-
- /**
- * Indicates whether the provided object is equal to this debug
- * logger.
- *
- * @param o The object for which to make the determination.
- *
- * @return <CODE>true</CODE> if the provided object is determined
- * to be equal to this debug logger, or <CODE>false</CODE>
- * if not.
- */
- public abstract boolean equals(Object o);
-
-
-
- /**
- * Retrieves the hash code for this debug logger.
- *
- * @return The hash code for this debug logger.
- */
- public abstract int hashCode();
-}
-
diff --git a/opends/src/server/org/opends/server/api/DirectoryServerMBean.java b/opends/src/server/org/opends/server/api/DirectoryServerMBean.java
index 6e7e7e2..1cc96d1 100644
--- a/opends/src/server/org/opends/server/api/DirectoryServerMBean.java
+++ b/opends/src/server/org/opends/server/api/DirectoryServerMBean.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/DirectoryThread.java b/opends/src/server/org/opends/server/api/DirectoryThread.java
index ed59d1a..e4f93cc 100644
--- a/opends/src/server/org/opends/server/api/DirectoryThread.java
+++ b/opends/src/server/org/opends/server/api/DirectoryThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -31,7 +31,6 @@
import org.opends.server.backends.task.Task;
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -58,11 +57,6 @@
public class DirectoryThread
extends Thread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.DirectoryThread";
@@ -90,7 +84,6 @@
super (DirectoryServer.getDirectoryThreadGroup(), target,
threadName);
- assert debugConstructor(CLASS_NAME, String.valueOf(threadName));
init();
}
@@ -106,7 +99,6 @@
{
super(DirectoryServer.getDirectoryThreadGroup(), threadName);
- assert debugConstructor(CLASS_NAME, String.valueOf(threadName));
init();
}
@@ -126,8 +118,6 @@
{
super(threadGroup, threadName);
- assert debugConstructor(CLASS_NAME, String.valueOf(threadGroup),
- String.valueOf(threadName));
init();
}
@@ -175,7 +165,6 @@
*/
public StackTraceElement[] getCreationStackTrace()
{
- assert debugEnter(CLASS_NAME, "getCreationStackTrace");
return creationStackTrace;
}
@@ -192,7 +181,6 @@
*/
public Thread getParentThread()
{
- assert debugEnter(CLASS_NAME, "getParentThread");
return parentThread;
}
@@ -209,7 +197,6 @@
*/
public Task getAssociatedTask()
{
- assert debugEnter(CLASS_NAME, "getAssociatedTask");
return task;
}
@@ -225,7 +212,6 @@
*/
public void setAssociatedTask(Task task)
{
- assert debugEnter(CLASS_NAME, "setAssociatedTask");
this.task = task;
}
diff --git a/opends/src/server/org/opends/server/api/EntryCache.java b/opends/src/server/org/opends/server/api/EntryCache.java
index 8cea1da..5fc3c61 100644
--- a/opends/src/server/org/opends/server/api/EntryCache.java
+++ b/opends/src/server/org/opends/server/api/EntryCache.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/EqualityMatchingRule.java b/opends/src/server/org/opends/server/api/EqualityMatchingRule.java
index 3214209..1489f99 100644
--- a/opends/src/server/org/opends/server/api/EqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/api/EqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -32,7 +32,11 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.ConditionResult;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
@@ -44,11 +48,6 @@
public abstract class EqualityMatchingRule
extends MatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.EqualityMatchingRule";
@@ -90,9 +89,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
if (areEqual(attributeValue, assertionValue))
{
@@ -125,8 +121,6 @@
*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
try
{
@@ -134,7 +128,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "generateHashCode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -142,7 +139,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "generateHashCode", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
return 0;
}
diff --git a/opends/src/server/org/opends/server/api/ErrorLogger.java b/opends/src/server/org/opends/server/api/ErrorLogger.java
index 1d236a0..4bca1e3 100644
--- a/opends/src/server/org/opends/server/api/ErrorLogger.java
+++ b/opends/src/server/org/opends/server/api/ErrorLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/ExtendedOperationHandler.java b/opends/src/server/org/opends/server/api/ExtendedOperationHandler.java
index d3d4bcd..eefc573 100644
--- a/opends/src/server/org/opends/server/api/ExtendedOperationHandler.java
+++ b/opends/src/server/org/opends/server/api/ExtendedOperationHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -36,7 +36,6 @@
import org.opends.server.core.ExtendedOperation;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -48,11 +47,6 @@
*/
public abstract class ExtendedOperationHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.ExtendedOperationHandler";
@@ -97,7 +91,6 @@
*/
public void finalizeExtendedOperationHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeExtendedOperationHandler");
// No implementation is required by default.
}
@@ -125,7 +118,6 @@
*/
public Set<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControlOIDs;
}
@@ -144,8 +136,6 @@
*/
public final boolean supportsControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "supportsControl",
- String.valueOf(controlOID));
return getSupportedControls().contains(controlOID);
}
@@ -161,7 +151,6 @@
*/
public Set<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatureOIDs;
}
@@ -180,8 +169,6 @@
*/
public final boolean supportsFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "supportsFeature",
- String.valueOf(featureOID));
return getSupportedFeatures().contains(featureOID);
}
diff --git a/opends/src/server/org/opends/server/api/Group.java b/opends/src/server/org/opends/server/api/Group.java
index aba43dd..5caaa16 100644
--- a/opends/src/server/org/opends/server/api/Group.java
+++ b/opends/src/server/org/opends/server/api/Group.java
@@ -40,7 +40,6 @@
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
@@ -64,11 +63,6 @@
*/
public abstract class Group
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.Group";
@@ -104,7 +98,6 @@
*/
public void finalizeGroupImplementation()
{
- assert debugEnter(CLASS_NAME, "finalizeGroupImplementation");
// No implementation is required by default.
}
@@ -294,7 +287,6 @@
public MemberList getMembers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getMembers");
return getMembers(null, null, null);
}
@@ -395,7 +387,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
diff --git a/opends/src/server/org/opends/server/api/IdentityMapper.java b/opends/src/server/org/opends/server/api/IdentityMapper.java
index b20e0cb..141d8eb 100644
--- a/opends/src/server/org/opends/server/api/IdentityMapper.java
+++ b/opends/src/server/org/opends/server/api/IdentityMapper.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -34,7 +34,6 @@
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -49,11 +48,6 @@
*/
public abstract class IdentityMapper
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.IdentityMapper";
@@ -86,7 +80,6 @@
*/
public void finalizeIdentityMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeIdentityMapper");
// No implementation is required by default.
}
diff --git a/opends/src/server/org/opends/server/api/InvokableComponent.java b/opends/src/server/org/opends/server/api/InvokableComponent.java
index 2476652..8346785 100644
--- a/opends/src/server/org/opends/server/api/InvokableComponent.java
+++ b/opends/src/server/org/opends/server/api/InvokableComponent.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -33,7 +33,6 @@
import org.opends.server.types.DN;
import org.opends.server.types.InvokableMethod;
-import static org.opends.server.loggers.Debug.*;
diff --git a/opends/src/server/org/opends/server/api/KeyManagerProvider.java b/opends/src/server/org/opends/server/api/KeyManagerProvider.java
index cc9881f..cbeadbf 100644
--- a/opends/src/server/org/opends/server/api/KeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/api/KeyManagerProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/LogPublisher.java b/opends/src/server/org/opends/server/api/LogPublisher.java
new file mode 100644
index 0000000..35bfc27
--- /dev/null
+++ b/opends/src/server/org/opends/server/api/LogPublisher.java
@@ -0,0 +1,54 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.api;
+
+import org.opends.server.loggers.LogRecord;
+import org.opends.server.loggers.LogErrorHandler;
+
+/**
+ * LogPublishers are reponsible for distributing logged messages from
+ * the Logger object to a destination.
+ */
+public interface LogPublisher
+{
+ /**
+ * Sends the log message to the logging destination. Every
+ * LogPublisher must implement the publish method for
+ * the generic LogRecord. Specialized LogPublishers should
+ * also include an implementation to publish specialized
+ * LogRecords (ie. DebugLogRecord).
+ *
+ * @param record the log record to publish.
+ * @param handler the error handler to use when an error occurs.
+ */
+ public void publish(LogRecord record, LogErrorHandler handler);
+
+ /**
+ * Releases any resources and prepare for close.
+ */
+ public void shutdown();
+}
diff --git a/opends/src/server/org/opends/server/api/MatchingRule.java b/opends/src/server/org/opends/server/api/MatchingRule.java
index 8fbdea3..8ce6710 100644
--- a/opends/src/server/org/opends/server/api/MatchingRule.java
+++ b/opends/src/server/org/opends/server/api/MatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -35,7 +35,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -46,11 +45,6 @@
*/
public abstract class MatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.MatchingRule";
@@ -103,7 +97,6 @@
*/
public String getNameOrOID()
{
- assert debugEnter(CLASS_NAME, "getNameOrOID");
String name = getName();
if ((name == null) || (name.length() == 0))
@@ -151,7 +144,6 @@
*/
public boolean isObsolete()
{
- assert debugEnter(CLASS_NAME, "isObsolete");
return false;
}
@@ -209,7 +201,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int hashCode = 0;
@@ -237,7 +228,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
@@ -268,7 +258,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -286,8 +275,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("( ");
buffer.append(getOID());
diff --git a/opends/src/server/org/opends/server/api/MonitorProvider.java b/opends/src/server/org/opends/server/api/MonitorProvider.java
index bc8dbe7..2b54ef9 100644
--- a/opends/src/server/org/opends/server/api/MonitorProvider.java
+++ b/opends/src/server/org/opends/server/api/MonitorProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -37,7 +37,11 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ObjectClass;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.util.ServerConstants.*;
@@ -51,11 +55,6 @@
public abstract class MonitorProvider
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.MonitorProvider";
@@ -79,7 +78,6 @@
{
super(threadName);
- assert debugConstructor(CLASS_NAME);
stopRequested = false;
monitorThread = null;
@@ -120,7 +118,6 @@
*/
public void finalizeMonitorProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeMonitorProvider");
// Signal the monitor thread that it should stop.
stopRequested = true;
@@ -134,7 +131,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeMonitorProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -164,7 +164,6 @@
*/
public ObjectClass getMonitorObjectClass()
{
- assert debugEnter(CLASS_NAME, "getMonitorObjectClass");
return DirectoryConfig.getObjectClass(OC_EXTENSIBLE_OBJECT_LC,
true);
@@ -218,7 +217,6 @@
*/
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
monitorThread = Thread.currentThread();
diff --git a/opends/src/server/org/opends/server/api/OrderingMatchingRule.java b/opends/src/server/org/opends/server/api/OrderingMatchingRule.java
index 5376bd4..3fa73a9 100644
--- a/opends/src/server/org/opends/server/api/OrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/api/OrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -34,7 +34,6 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.ConditionResult;
-import static org.opends.server.loggers.Debug.*;
@@ -48,11 +47,6 @@
extends MatchingRule
implements Comparator<byte[]>, Serializable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.OrderingMatchingRule";
@@ -113,9 +107,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
return ConditionResult.UNDEFINED;
}
diff --git a/opends/src/server/org/opends/server/api/PasswordGenerator.java b/opends/src/server/org/opends/server/api/PasswordGenerator.java
index 0eda61b..a019b2d 100644
--- a/opends/src/server/org/opends/server/api/PasswordGenerator.java
+++ b/opends/src/server/org/opends/server/api/PasswordGenerator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -35,7 +35,6 @@
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -49,11 +48,6 @@
*/
public abstract class PasswordGenerator
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.PasswordGenerator";
@@ -86,7 +80,6 @@
*/
public void finalizePasswordGenerator()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordGenerator");
// No action is performed by default.
}
diff --git a/opends/src/server/org/opends/server/api/PasswordStorageScheme.java b/opends/src/server/org/opends/server/api/PasswordStorageScheme.java
index d1aab74..7409fb8 100644
--- a/opends/src/server/org/opends/server/api/PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/api/PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -34,7 +34,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -46,11 +45,6 @@
*/
public abstract class PasswordStorageScheme
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.PasswordStorageScheme";
@@ -86,7 +80,6 @@
*/
public void finalizePasswordStorageScheme()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordStorageScheme");
// No implementation required by default.
}
@@ -189,7 +182,6 @@
*/
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return getStorageSchemeName();
}
diff --git a/opends/src/server/org/opends/server/api/PasswordValidator.java b/opends/src/server/org/opends/server/api/PasswordValidator.java
index 195a2df..efb10f7 100644
--- a/opends/src/server/org/opends/server/api/PasswordValidator.java
+++ b/opends/src/server/org/opends/server/api/PasswordValidator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -37,7 +37,6 @@
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -48,11 +47,6 @@
*/
public abstract class PasswordValidator
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.PasswordValidator";
@@ -86,7 +80,6 @@
*/
public void finalizePasswordValidator()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordValidator");
// No action is required by default.
diff --git a/opends/src/server/org/opends/server/api/ProtocolElement.java b/opends/src/server/org/opends/server/api/ProtocolElement.java
index b758398..ddcd1ca 100644
--- a/opends/src/server/org/opends/server/api/ProtocolElement.java
+++ b/opends/src/server/org/opends/server/api/ProtocolElement.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/SASLMechanismHandler.java b/opends/src/server/org/opends/server/api/SASLMechanismHandler.java
index cf47814..c50206f 100644
--- a/opends/src/server/org/opends/server/api/SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/api/SASLMechanismHandler.java
@@ -33,7 +33,6 @@
import org.opends.server.core.BindOperation;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -44,11 +43,6 @@
*/
public abstract class SASLMechanismHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.SASLMechanismHandler";
@@ -83,7 +77,6 @@
*/
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
// No implementation is required by default.
}
diff --git a/opends/src/server/org/opends/server/api/ServerShutdownListener.java b/opends/src/server/org/opends/server/api/ServerShutdownListener.java
index e60fa5a..da6d584 100644
--- a/opends/src/server/org/opends/server/api/ServerShutdownListener.java
+++ b/opends/src/server/org/opends/server/api/ServerShutdownListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/SubstringMatchingRule.java b/opends/src/server/org/opends/server/api/SubstringMatchingRule.java
index 024515e..86f797d 100644
--- a/opends/src/server/org/opends/server/api/SubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/api/SubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -34,7 +34,6 @@
import org.opends.server.types.ConditionResult;
import org.opends.server.types.DirectoryException;
-import static org.opends.server.loggers.Debug.*;
@@ -46,11 +45,6 @@
public abstract class SubstringMatchingRule
extends MatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.SubstringMatchingRule";
@@ -126,9 +120,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
return ConditionResult.UNDEFINED;
}
diff --git a/opends/src/server/org/opends/server/api/SubtreeSpecification.java b/opends/src/server/org/opends/server/api/SubtreeSpecification.java
index 4de63b8..a1228ed 100644
--- a/opends/src/server/org/opends/server/api/SubtreeSpecification.java
+++ b/opends/src/server/org/opends/server/api/SubtreeSpecification.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/SubtreeSpecificationSet.java b/opends/src/server/org/opends/server/api/SubtreeSpecificationSet.java
index bed99a3..dc49ed0 100644
--- a/opends/src/server/org/opends/server/api/SubtreeSpecificationSet.java
+++ b/opends/src/server/org/opends/server/api/SubtreeSpecificationSet.java
@@ -22,13 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import java.util.AbstractSet;
import java.util.Collection;
import java.util.HashSet;
@@ -47,9 +44,6 @@
*/
public final class SubtreeSpecificationSet extends
AbstractSet<SubtreeSpecification> {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- SubtreeSpecificationSet.class.getName();
// Underlying implementation is simply a set.
private HashSet<SubtreeSpecification> pimpl;
@@ -58,7 +52,6 @@
* Constructs a new empty subtree specification set.
*/
public SubtreeSpecificationSet() {
- assert debugConstructor(CLASS_NAME);
this.pimpl = new HashSet<SubtreeSpecification>();
}
@@ -73,7 +66,6 @@
*/
public SubtreeSpecificationSet(
Collection<? extends SubtreeSpecification> c) {
- assert debugConstructor(CLASS_NAME);
this.pimpl = new HashSet<SubtreeSpecification>(c);
}
@@ -88,7 +80,6 @@
* specified entry.
*/
public boolean isWithinScope(Entry entry) {
- assert debugEnter(CLASS_NAME, "contains");
for (SubtreeSpecification subtreeSpecification : pimpl) {
if (subtreeSpecification.isWithinScope(entry)) {
@@ -104,7 +95,6 @@
*/
@Override
public boolean add(SubtreeSpecification e) {
- assert debugEnter(CLASS_NAME, "add");
return pimpl.add(e);
}
@@ -114,7 +104,6 @@
*/
@Override
public Iterator<SubtreeSpecification> iterator() {
- assert debugEnter(CLASS_NAME, "iterator");
return pimpl.iterator();
}
@@ -124,7 +113,6 @@
*/
@Override
public boolean contains(Object o) {
- assert debugEnter(CLASS_NAME, "contains");
return pimpl.contains(o);
}
@@ -134,7 +122,6 @@
*/
@Override
public int size() {
- assert debugEnter(CLASS_NAME, "size");
return pimpl.size();
}
diff --git a/opends/src/server/org/opends/server/api/SynchronizationProvider.java b/opends/src/server/org/opends/server/api/SynchronizationProvider.java
index b2570f7..07c2af5 100644
--- a/opends/src/server/org/opends/server/api/SynchronizationProvider.java
+++ b/opends/src/server/org/opends/server/api/SynchronizationProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -38,7 +38,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.SynchronizationProviderResult;
-import static org.opends.server.loggers.Debug.*;
@@ -52,11 +51,6 @@
*/
public abstract class SynchronizationProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.SynchronizationProvider";
@@ -91,7 +85,6 @@
*/
public void finalizeSynchronizationProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeSynchronizationProvider");
// No implementation is required by default.
}
@@ -120,8 +113,6 @@
handleConflictResolution(AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "handleConflictResolution",
- String.valueOf(addOperation));
// No processing is required by default.
return new SynchronizationProviderResult(true);
@@ -191,8 +182,6 @@
handleConflictResolution(DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "handleConflictResolution",
- String.valueOf(deleteOperation));
// No processing is required by default.
return new SynchronizationProviderResult(true);
@@ -264,8 +253,6 @@
modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "handleConflictResolution",
- String.valueOf(modifyOperation));
// No processing is required by default.
return new SynchronizationProviderResult(true);
@@ -338,8 +325,6 @@
modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "handleConflictResolution",
- String.valueOf(modifyDNOperation));
// No processing is required by default.
return new SynchronizationProviderResult(true);
diff --git a/opends/src/server/org/opends/server/api/TrustManagerProvider.java b/opends/src/server/org/opends/server/api/TrustManagerProvider.java
index c827417..35bac44 100644
--- a/opends/src/server/org/opends/server/api/TrustManagerProvider.java
+++ b/opends/src/server/org/opends/server/api/TrustManagerProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/VirtualAttribute.java b/opends/src/server/org/opends/server/api/VirtualAttribute.java
index 36412c7..a65619e 100644
--- a/opends/src/server/org/opends/server/api/VirtualAttribute.java
+++ b/opends/src/server/org/opends/server/api/VirtualAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
diff --git a/opends/src/server/org/opends/server/api/WorkQueue.java b/opends/src/server/org/opends/server/api/WorkQueue.java
index f882a2c..e78bca5 100644
--- a/opends/src/server/org/opends/server/api/WorkQueue.java
+++ b/opends/src/server/org/opends/server/api/WorkQueue.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api;
@@ -34,7 +34,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -50,11 +49,6 @@
*/
public abstract class WorkQueue
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.WorkQueue";
@@ -143,8 +137,6 @@
*/
public boolean waitUntilIdle(long timeLimit)
{
- assert debugEnter(CLASS_NAME, "waitUntilIdle",
- String.valueOf(timeLimit));
long stopWaitingTime;
if (timeLimit <= 0)
diff --git a/opends/src/server/org/opends/server/api/package-info.java b/opends/src/server/org/opends/server/api/package-info.java
index ff766b5..f62833e 100644
--- a/opends/src/server/org/opends/server/api/package-info.java
+++ b/opends/src/server/org/opends/server/api/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java b/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
index cbd1193..82495b6 100644
--- a/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
+++ b/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
@@ -44,7 +44,6 @@
import org.opends.server.types.SearchResultReference;
import org.opends.server.types.operation.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
@@ -59,11 +58,6 @@
*/
public abstract class DirectoryServerPlugin
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.DirectoryServerPlugin";
@@ -84,7 +78,7 @@
*/
protected DirectoryServerPlugin()
{
- assert debugConstructor(CLASS_NAME);
+
}
@@ -101,9 +95,6 @@
public final void initializeInternal(DN pluginDN,
Set<PluginType> pluginTypes)
{
- assert debugEnter(CLASS_NAME, "initializeInternal",
- String.valueOf(pluginDN),
- String.valueOf(pluginTypes));
this.pluginDN = pluginDN;
this.pluginTypes = pluginTypes;
@@ -142,7 +133,6 @@
*/
public void finalizePlugin()
{
- assert debugEnter(CLASS_NAME, "finalizePlugin");
// No implementation is required by default.
}
@@ -156,7 +146,6 @@
*/
public final DN getPluginEntryDN()
{
- assert debugEnter(CLASS_NAME, "getPluginEntryDN");
return pluginDN;
}
@@ -171,7 +160,6 @@
*/
public final Set<PluginType> getPluginTypes()
{
- assert debugEnter(CLASS_NAME, "getPluginTypes");
return pluginTypes;
}
@@ -188,7 +176,6 @@
*/
public StartupPluginResult doStartup()
{
- assert debugEnter(CLASS_NAME, "doStartup");
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -209,8 +196,6 @@
*/
public void doShutdown(String reason)
{
- assert debugEnter(CLASS_NAME, "doShutdown",
- String.valueOf(reason));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -234,8 +219,6 @@
public PostConnectPluginResult doPostConnect(ClientConnection
clientConnection)
{
- assert debugEnter(CLASS_NAME, "doPostConnect",
- String.valueOf(clientConnection));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -267,11 +250,6 @@
DisconnectReason disconnectReason,
int messageID, String message)
{
- assert debugEnter(CLASS_NAME, "doPostDisconnect",
- String.valueOf(clientConnection),
- String.valueOf(disconnectReason),
- String.valueOf(messageID),
- String.valueOf(message));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String msg = getMessage(msgID, String.valueOf(pluginDN),
@@ -296,9 +274,6 @@
public LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "doLDIFImport",
- String.valueOf(importConfig),
- String.valueOf(entry));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -321,9 +296,6 @@
public LDIFPluginResult doLDIFExport(LDIFExportConfig exportConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "doLDIFExport",
- String.valueOf(exportConfig),
- String.valueOf(entry));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -345,8 +317,6 @@
public PreParsePluginResult
doPreParse(PreParseAbandonOperation abandonOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(abandonOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -369,8 +339,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationAbandonOperation abandonOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(abandonOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -392,8 +360,6 @@
public PreParsePluginResult
doPreParse(PreParseAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(addOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -417,8 +383,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(addOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -442,8 +406,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(addOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -467,8 +429,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(addOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -490,8 +450,6 @@
public PreParsePluginResult
doPreParse(PreParseBindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(bindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -513,8 +471,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationBindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(bindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -538,8 +494,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationBindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(bindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -563,8 +517,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseBindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(bindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -586,8 +538,6 @@
public PreParsePluginResult
doPreParse(PreParseCompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(compareOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -609,8 +559,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationCompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(compareOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -634,8 +582,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationCompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(compareOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -660,8 +606,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseCompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(compareOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -683,8 +627,6 @@
public PreParsePluginResult
doPreParse(PreParseDeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(deleteOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -708,8 +650,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationDeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(deleteOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -733,8 +673,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationDeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(deleteOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -758,8 +696,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseDeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(deleteOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -781,8 +717,6 @@
public PreParsePluginResult
doPreParse(PreParseExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(extendedOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -805,8 +739,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(extendedOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -833,8 +765,6 @@
doPostOperation(PostOperationExtendedOperation
extendedOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(extendedOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -859,8 +789,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(extendedOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -883,8 +811,6 @@
public PreParsePluginResult
doPreParse(PreParseModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(modifyOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -908,8 +834,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -933,8 +857,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(modifyOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -958,8 +880,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(modifyOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -981,8 +901,6 @@
public PreParsePluginResult
doPreParse(PreParseModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(modifyDNOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1007,8 +925,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyDNOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -1034,8 +950,6 @@
doPostOperation(PostOperationModifyDNOperation
modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(modifyDNOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -1060,8 +974,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(modifyDNOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -1084,8 +996,6 @@
public PreParsePluginResult
doPreParse(PreParseSearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(searchOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1107,8 +1017,6 @@
public PreOperationPluginResult
doPreOperation(PreOperationSearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(searchOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1138,9 +1046,6 @@
processSearchEntry(SearchEntrySearchOperation searchOperation,
SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "processSearchEntry",
- String.valueOf(searchOperation),
- String.valueOf(searchEntry));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1167,9 +1072,6 @@
searchOperation,
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "processSearchReference",
- String.valueOf(searchOperation),
- String.valueOf(searchReference));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message =
@@ -1194,8 +1096,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationSearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(searchOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1219,8 +1119,6 @@
public PostResponsePluginResult
doPostResponse(PostResponseSearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "doPostResponse",
- String.valueOf(searchOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1242,8 +1140,6 @@
public PreParsePluginResult
doPreParse(PreParseUnbindOperation unbindOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParse",
- String.valueOf(unbindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1266,8 +1162,6 @@
public PostOperationPluginResult
doPostOperation(PostOperationUnbindOperation unbindOperation)
{
- assert debugEnter(CLASS_NAME, "doPostOperation",
- String.valueOf(unbindOperation));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
@@ -1290,8 +1184,6 @@
processIntermediateResponse(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "processIntermediateResponse",
- String.valueOf(intermediateResponse));
int msgID = MSGID_PLUGIN_TYPE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(pluginDN),
diff --git a/opends/src/server/org/opends/server/api/plugin/IntermediateResponsePluginResult.java b/opends/src/server/org/opends/server/api/plugin/IntermediateResponsePluginResult.java
index 816fd6e..a201f3e 100644
--- a/opends/src/server/org/opends/server/api/plugin/IntermediateResponsePluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/IntermediateResponsePluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,12 +37,6 @@
*/
public class IntermediateResponsePluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin." +
- "IntermediateResponsePluginResult";
@@ -114,11 +107,6 @@
boolean sendIntermediateResponse,
boolean continueOperation)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing),
- String.valueOf(sendIntermediateResponse),
- String.valueOf(continueOperation));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -138,7 +126,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -155,7 +142,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -172,7 +158,6 @@
*/
public boolean sendIntermediateResponse()
{
- assert debugEnter(CLASS_NAME, "sendIntermediateResponse");
return sendIntermediateResponse;
}
@@ -188,7 +173,6 @@
*/
public boolean continueOperation()
{
- assert debugEnter(CLASS_NAME, "continueOperation");
return continueOperation;
}
@@ -204,7 +188,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -222,8 +205,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("IntermediateResponsePluginResult(" +
"connectionTerminated=");
diff --git a/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java b/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
index 97555b7..0f47b2f 100644
--- a/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/LDIFPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class LDIFPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.LDIFPluginResult";
@@ -92,9 +86,6 @@
public LDIFPluginResult(boolean continuePluginProcessing,
boolean continueEntryProcessing)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(continuePluginProcessing),
- String.valueOf(continueEntryProcessing));
this.continuePluginProcessing = continuePluginProcessing;
this.continueEntryProcessing = continueEntryProcessing;
@@ -112,7 +103,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -128,7 +118,6 @@
*/
public boolean continueEntryProcessing()
{
- assert debugEnter(CLASS_NAME, "continueEntryProcessing");
return continueEntryProcessing;
}
@@ -144,7 +133,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -162,8 +150,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("LDIFPluginResult(continuePluginProcessing=");
buffer.append(continuePluginProcessing);
diff --git a/opends/src/server/org/opends/server/api/plugin/PluginType.java b/opends/src/server/org/opends/server/api/plugin/PluginType.java
index 1f4da67..1ab751b 100644
--- a/opends/src/server/org/opends/server/api/plugin/PluginType.java
+++ b/opends/src/server/org/opends/server/api/plugin/PluginType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
diff --git a/opends/src/server/org/opends/server/api/plugin/PostConnectPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostConnectPluginResult.java
index a178f62..6c3e0c7 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostConnectPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostConnectPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PostConnectPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PostConnectPluginResult";
@@ -92,9 +86,6 @@
public PostConnectPluginResult(boolean connectionTerminated,
boolean continuePluginProcessing)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -111,7 +102,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -128,7 +118,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -144,7 +133,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -162,8 +150,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostConnectPluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
index 9e16591..3ba3fe5 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostDisconnectPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PostDisconnectPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PostDisconnectPluginResult";
@@ -83,8 +77,6 @@
*/
public PostDisconnectPluginResult(boolean continuePluginProcessing)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(continuePluginProcessing));
this.continuePluginProcessing = continuePluginProcessing;
}
@@ -101,7 +93,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -117,7 +108,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -135,8 +125,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostDisconnectPluginResult(" +
"continuePluginProcessing=");
diff --git a/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
index 9899e09..412de1b 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostOperationPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PostOperationPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PostOperationPluginResult";
@@ -93,9 +87,6 @@
public PostOperationPluginResult(boolean connectionTerminated,
boolean continuePluginProcessing)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -113,7 +104,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -130,7 +120,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -146,7 +135,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -164,8 +152,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostOperationPluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/PostResponsePluginResult.java b/opends/src/server/org/opends/server/api/plugin/PostResponsePluginResult.java
index b8a5bec..8b75c6a 100644
--- a/opends/src/server/org/opends/server/api/plugin/PostResponsePluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PostResponsePluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PostResponsePluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PostResponsePluginResult";
@@ -92,9 +86,6 @@
public PostResponsePluginResult(boolean connectionTerminated,
boolean continuePluginProcessing)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -112,7 +103,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -128,7 +118,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -144,7 +133,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -162,8 +150,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostResponsePluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java b/opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java
index b0b1ac2..46fc862 100644
--- a/opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PreOperationPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PreOperationPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PreOperationPluginResult";
@@ -104,10 +98,6 @@
boolean continuePluginProcessing,
boolean sendResponseImmediately)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing),
- String.valueOf(sendResponseImmediately));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -125,7 +115,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -142,7 +131,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -161,7 +149,6 @@
*/
public boolean sendResponseImmediately()
{
- assert debugEnter(CLASS_NAME, "sendResponseImmediately");
return sendResponseImmediately;
}
@@ -177,7 +164,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -195,8 +181,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostResponsePluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java b/opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java
index fef1403..dfb8975 100644
--- a/opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/PreParsePluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class PreParsePluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.PreParsePluginResult";
@@ -104,10 +98,6 @@
boolean continuePluginProcessing,
boolean sendResponseImmediately)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing),
- String.valueOf(sendResponseImmediately));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -125,7 +115,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -142,7 +131,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -161,7 +149,6 @@
*/
public boolean sendResponseImmediately()
{
- assert debugEnter(CLASS_NAME, "sendResponseImmediately");
return sendResponseImmediately;
}
@@ -177,7 +164,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -195,8 +181,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("PostResponsePluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/SearchEntryPluginResult.java b/opends/src/server/org/opends/server/api/plugin/SearchEntryPluginResult.java
index 2244ca0..278cbed 100644
--- a/opends/src/server/org/opends/server/api/plugin/SearchEntryPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/SearchEntryPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class SearchEntryPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.SearchEntryPluginResult";
@@ -108,11 +102,6 @@
boolean sendEntry,
boolean continueSearch)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing),
- String.valueOf(sendEntry),
- String.valueOf(continueSearch));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -132,7 +121,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -149,7 +137,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -166,7 +153,6 @@
*/
public boolean sendEntry()
{
- assert debugEnter(CLASS_NAME, "sendEntry");
return sendEntry;
}
@@ -183,7 +169,6 @@
*/
public boolean continueSearch()
{
- assert debugEnter(CLASS_NAME, "continueSearch");
return continueSearch;
}
@@ -199,7 +184,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -217,8 +201,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("SearchEntryPluginResult(connectionTerminated=");
buffer.append(connectionTerminated);
diff --git a/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java b/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
index bf924b2..20e303a 100644
--- a/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/SearchReferencePluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -38,11 +37,6 @@
*/
public class SearchReferencePluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.SearchReferencePluginResult";
@@ -109,11 +103,6 @@
boolean sendReference,
boolean continueSearch)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(connectionTerminated),
- String.valueOf(continuePluginProcessing),
- String.valueOf(sendReference),
- String.valueOf(continueSearch));
this.connectionTerminated = connectionTerminated;
this.continuePluginProcessing = continuePluginProcessing;
@@ -133,7 +122,6 @@
*/
public boolean connectionTerminated()
{
- assert debugEnter(CLASS_NAME, "connectionTerminated");
return connectionTerminated;
}
@@ -150,7 +138,6 @@
*/
public boolean continuePluginProcessing()
{
- assert debugEnter(CLASS_NAME, "continuePluginProcessing");
return continuePluginProcessing;
}
@@ -167,7 +154,6 @@
*/
public boolean sendReference()
{
- assert debugEnter(CLASS_NAME, "sendReference");
return sendReference;
}
@@ -184,7 +170,6 @@
*/
public boolean continueSearch()
{
- assert debugEnter(CLASS_NAME, "continueSearch");
return continueSearch;
}
@@ -200,7 +185,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -218,8 +202,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("SearchReferencePluginResult(" +
"connectionTerminated=");
diff --git a/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java b/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
index c946362..27cb109 100644
--- a/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
+++ b/opends/src/server/org/opends/server/api/plugin/StartupPluginResult.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.api.plugin;
-import static org.opends.server.loggers.Debug.*;
@@ -39,11 +38,6 @@
*/
public class StartupPluginResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.api.plugin.StartupPluginResult";
@@ -107,11 +101,6 @@
boolean continueStartup, int errorID,
String errorMessage)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(completedSuccessfully),
- String.valueOf(continueStartup),
- String.valueOf(errorID),
- String.valueOf(errorMessage));
this.completedSuccessfully = completedSuccessfully;
this.continueStartup = continueStartup;
@@ -130,7 +119,6 @@
*/
public boolean completedSuccessfully()
{
- assert debugEnter(CLASS_NAME, "completedSuccessfully");
return completedSuccessfully;
}
@@ -147,7 +135,6 @@
*/
public boolean continueStartup()
{
- assert debugEnter(CLASS_NAME, "continueStartup");
return continueStartup;
}
@@ -163,7 +150,6 @@
*/
public int getErrorID()
{
- assert debugEnter(CLASS_NAME, "getErrorID");
return errorID;
}
@@ -180,7 +166,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -194,7 +179,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -212,8 +196,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("StartupPluginResult(completedSuccessfully=");
buffer.append(completedSuccessfully);
diff --git a/opends/src/server/org/opends/server/api/plugin/package-info.java b/opends/src/server/org/opends/server/api/plugin/package-info.java
index 46f0cea..1b0642b 100644
--- a/opends/src/server/org/opends/server/api/plugin/package-info.java
+++ b/opends/src/server/org/opends/server/api/plugin/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/authorization/BasicAccessControlHandler.java b/opends/src/server/org/opends/server/authorization/BasicAccessControlHandler.java
index 43856ff..0b637bd 100644
--- a/opends/src/server/org/opends/server/authorization/BasicAccessControlHandler.java
+++ b/opends/src/server/org/opends/server/authorization/BasicAccessControlHandler.java
@@ -22,11 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.authorization;
-import static org.opends.server.loggers.Debug.debugEnter;
import org.opends.server.api.AccessControlHandler;
import org.opends.server.core.AddOperation;
@@ -46,16 +45,12 @@
* requests made by the core directory server.
*/
final class BasicAccessControlHandler extends AccessControlHandler {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.authorization.BasicAccessControlHandler";
/**
* {@inheritDoc}
*/
@Override
public boolean isAllowed(AddOperation addOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -67,7 +62,6 @@
*/
@Override
public boolean isAllowed(BindOperation bindOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -79,7 +73,6 @@
*/
@Override
public boolean isAllowed(CompareOperation compareOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -91,7 +84,6 @@
*/
@Override
public boolean isAllowed(DeleteOperation deleteOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -103,7 +95,6 @@
*/
@Override
public boolean isAllowed(ExtendedOperation extendedOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -115,7 +106,6 @@
*/
@Override
public boolean isAllowed(ModifyOperation modifyOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -127,7 +117,6 @@
*/
@Override
public boolean isAllowed(ModifyDNOperation modifyDNOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -139,7 +128,6 @@
*/
@Override
public boolean isAllowed(SearchOperation searchOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: not yet implemented.
@@ -152,7 +140,6 @@
@Override
public boolean maySend(SearchOperation searchOperation,
SearchResultEntry searchEntry) {
- assert debugEnter(CLASS_NAME, "maySend");
// TODO: not yet implemented.
@@ -165,7 +152,6 @@
@Override
public SearchResultEntry filterEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry) {
- assert debugEnter(CLASS_NAME, "filterEntry");
// TODO: not yet implemented.
@@ -178,7 +164,6 @@
@Override
public boolean maySend(SearchOperation searchOperation,
SearchResultReference searchReference) {
- assert debugEnter(CLASS_NAME, "maySend");
// TODO: not yet implemented.
diff --git a/opends/src/server/org/opends/server/authorization/BasicAccessControlProvider.java b/opends/src/server/org/opends/server/authorization/BasicAccessControlProvider.java
index e811a4e..491dc45 100644
--- a/opends/src/server/org/opends/server/authorization/BasicAccessControlProvider.java
+++ b/opends/src/server/org/opends/server/authorization/BasicAccessControlProvider.java
@@ -22,13 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.authorization;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.AccessControlProvider;
import org.opends.server.config.ConfigEntry;
@@ -43,9 +40,6 @@
*/
public class BasicAccessControlProvider implements
AccessControlProvider {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.authorization.BasicAccessControlProvider";
/**
* The single handler instance.
@@ -58,7 +52,6 @@
public BasicAccessControlProvider() {
super();
- assert debugConstructor(CLASS_NAME);
// No implementation required.
}
@@ -68,7 +61,6 @@
*/
public void initializeAccessControlHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException {
- assert debugEnter(CLASS_NAME, "initializeAccessControlHandler");
// Avoid potential race conditions constructing the handler instance
// and create it here.
@@ -79,7 +71,6 @@
* {@inheritDoc}
*/
public void finalizeAccessControlHandler() {
- assert debugEnter(CLASS_NAME, "finalizeAccessControlHandler");
// No implementation required.
}
@@ -88,7 +79,6 @@
* {@inheritDoc}
*/
public AccessControlHandler getInstance() {
- assert debugEnter(CLASS_NAME, "getInstance");
if (instance == null) {
instance = new BasicAccessControlHandler();
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciException.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciException.java
index 4556ca7..753af2f 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciException.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciException.java
@@ -26,8 +26,6 @@
*/
package org.opends.server.authorization.dseecompat;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
/**
* The AciException class defines an exception that may be thrown
@@ -37,11 +35,6 @@
*/
public class AciException extends Exception {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.authorization.dseecompat.AciException";
/**
* The serial version identifier required to satisfy the compiler because this
@@ -72,8 +65,6 @@
*/
public AciException(int messageID, String message) {
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message));
this.messageID = messageID;
}
@@ -89,8 +80,6 @@
public AciException(int messageID, String message, Throwable cause) {
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
this.messageID = messageID;
}
@@ -101,7 +90,6 @@
* @return The message ID for this exception.
*/
public int getMessageID() {
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
}
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
index 73d7260..990c3dd 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -30,10 +30,20 @@
import org.opends.server.api.AccessControlHandler;
import static org.opends.server.authorization.dseecompat.AciMessages.*;
import org.opends.server.core.*;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.MessageHandler.getMessage;
-import org.opends.server.types.*;
+import org.opends.server.types.Attribute;
+import org.opends.server.types.AttributeType;
+import org.opends.server.types.AttributeValue;
+import org.opends.server.types.DN;
+import org.opends.server.types.Entry;
+import org.opends.server.types.ErrorLogCategory;
+import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.Modification;
+import org.opends.server.types.ModificationType;
+import org.opends.server.types.Privilege;
+import org.opends.server.types.SearchResultEntry;
+import org.opends.server.types.SearchResultReference;
import static org.opends.server.util.StaticUtils.toLowerCase;
import java.util.LinkedList;
import java.util.List;
@@ -46,8 +56,6 @@
public class AciHandler extends AccessControlHandler
{
- private static final String CLASS_NAME =
- "org.opends.server.authorization.dseecompat.AciHandler";
/**
* ACI_ADD is used to set the container rights for a LDAP add operation.
@@ -571,7 +579,6 @@
* @return True if access is allowed.
*/
public boolean isAllowed(AddOperation operation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
AciLDAPOperationContainer operationContainer =
new AciLDAPOperationContainer(operation, ACI_ADD);
boolean ret=isAllowed(operationContainer,operation);
@@ -593,7 +600,6 @@
* @return True if access is allowed.
*/
public boolean isAllowed(CompareOperation operation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
AciLDAPOperationContainer operationContainer =
new AciLDAPOperationContainer(operation, ACI_COMPARE);
@@ -623,7 +629,6 @@
* @return True if access is allowed.
*/
public boolean isAllowed(DeleteOperation operation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
AciLDAPOperationContainer operationContainer=
new AciLDAPOperationContainer(operation, ACI_DELETE);
return isAllowed(operationContainer, operation);
@@ -637,7 +642,6 @@
*/
public boolean isAllowed(ModifyOperation operation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
AciLDAPOperationContainer operationContainer=
new AciLDAPOperationContainer(operation, ACI_NULL);
return aciCheckMods(operationContainer, operation,
@@ -666,7 +670,6 @@
*/
public boolean
maySend(SearchOperation operation, SearchResultEntry entry) {
- assert debugEnter(CLASS_NAME, "maySend");
AciLDAPOperationContainer operationContainer =
new AciLDAPOperationContainer(operation,
(ACI_READ | ACI_SEARCH), entry);
@@ -693,7 +696,6 @@
public SearchResultEntry filterEntry(SearchOperation operation,
SearchResultEntry entry) {
- assert debugEnter(CLASS_NAME, "filterEntry");
AciLDAPOperationContainer operationContainer =
new AciLDAPOperationContainer(operation,
(ACI_READ | ACI_SEARCH), entry);
@@ -713,7 +715,6 @@
@Override
public boolean maySend(SearchOperation operation,
SearchResultReference reference) {
- assert debugEnter(CLASS_NAME, "maySend");
//TODO: Planned to be implemented.
return true;
}
@@ -723,7 +724,6 @@
*/
@Override
public boolean isAllowed(ModifyDNOperation modifyDNOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
// TODO: Planned to be implemented.
return true;
}
@@ -734,7 +734,6 @@
*/
@Override
public boolean isAllowed(BindOperation bindOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
//Not planned to be implemented.
return true;
}
@@ -744,7 +743,6 @@
*/
@Override
public boolean isAllowed(ExtendedOperation extendedOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
//Not planned to be implemented.
return true;
}
@@ -754,7 +752,6 @@
*/
@Override
public boolean isAllowed(SearchOperation searchOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
//Not planned to be implemented.
return true;
}
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java
index 0d82365..14338d8 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciListenerManager.java
@@ -30,15 +30,25 @@
import org.opends.server.api.ChangeNotificationListener;
import org.opends.server.api.BackendInitializationListener;
import org.opends.server.api.Backend;
-import org.opends.server.types.*;
import org.opends.server.types.operation.PostResponseAddOperation;
import org.opends.server.types.operation.PostResponseDeleteOperation;
import org.opends.server.types.operation.PostResponseModifyOperation;
import org.opends.server.types.operation.PostResponseModifyDNOperation;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.logError;
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.types.DN;
+import org.opends.server.types.DereferencePolicy;
+import org.opends.server.types.DirectoryException;
+import org.opends.server.types.Entry;
+import org.opends.server.types.ErrorLogCategory;
+import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.SearchFilter;
+import org.opends.server.types.SearchResultEntry;
+import org.opends.server.types.SearchScope;
import static org.opends.server.authorization.dseecompat.AciMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -52,11 +62,6 @@
public class AciListenerManager
implements ChangeNotificationListener, BackendInitializationListener {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.AciListenerManager";
private AciList aciList;
/*
@@ -158,8 +163,10 @@
continue;
}
} catch (Exception e) {
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
//TODO log message
continue;
}
@@ -174,8 +181,10 @@
{
backend.search(internalSearch);
} catch (Exception e) {
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
//TODO log message
continue;
}
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/AciProvider.java b/opends/src/server/org/opends/server/authorization/dseecompat/AciProvider.java
index 05a71e1..c44d607 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/AciProvider.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/AciProvider.java
@@ -32,15 +32,12 @@
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.debugConstructor;
/**
* This class is the provider class for the dseecompt ACI.
*/
public class AciProvider implements AccessControlProvider {
- private static final String CLASS_NAME =
- "org.opends.server.authorization.dseecompat.AciProvider";
private static AciHandler instance = null;
@@ -49,7 +46,6 @@
*/
public AciProvider() {
super();
- assert debugConstructor(CLASS_NAME);
}
diff --git a/opends/src/server/org/opends/server/authorization/package-info.java b/opends/src/server/org/opends/server/authorization/package-info.java
index 793f3aa..b65de78 100644
--- a/opends/src/server/org/opends/server/authorization/package-info.java
+++ b/opends/src/server/org/opends/server/authorization/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/backends/BackupBackend.java b/opends/src/server/org/opends/server/backends/BackupBackend.java
index 93440bd..58abefe 100644
--- a/opends/src/server/org/opends/server/backends/BackupBackend.java
+++ b/opends/src/server/org/opends/server/backends/BackupBackend.java
@@ -75,7 +75,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -95,11 +97,6 @@
extends Backend
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.BackupBackend";
@@ -135,7 +132,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -162,8 +158,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// Make sure that a configuration entry was provided. If not, then we will
@@ -186,7 +180,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BACKUP_CANNOT_DECODE_BACKUP_ROOT_DN;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -223,11 +220,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_BACKUP_CANNOT_DETERMINE_BACKUP_DIR_LIST;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- throw new InitializationException(msgID, message,e);
+ throw new InitializationException(msgID, message, e);
}
@@ -281,7 +281,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, backupBaseDN.toString(),
@@ -305,7 +308,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -315,7 +317,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -328,7 +333,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -340,7 +344,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
int numEntries = 1;
@@ -382,7 +385,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -404,7 +406,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// If the requested entry was null, then throw an exception.
@@ -470,8 +471,6 @@
private Entry getBackupDirectoryEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getBackupDirectoryEntry",
- String.valueOf(entryDN));
// Make sure that the DN specifies a backup directory.
@@ -497,9 +496,12 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "getBackupDirectoryEntry", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
- int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY;
+ int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY;
String message = getMessage(msgID, String.valueOf(entryDN),
ce.getMessage());
throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message,
@@ -507,9 +509,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getBackupDirectoryEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY;
+ int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
message, msgID);
@@ -568,7 +573,6 @@
private Entry getBackupEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getBackupEntry", String.valueOf(entryDN));
// First, get the backup ID from the entry DN.
@@ -615,18 +619,24 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "getBackupEntry", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
- int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY;
+ int msgID = MSGID_BACKUP_INVALID_BACKUP_DIRECTORY;
String message = getMessage(msgID, ce.getMessage());
throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message,
msgID);
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getBackupEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY;
+ int msgID = MSGID_BACKUP_ERROR_GETTING_BACKUP_DIRECTORY;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
message, msgID);
@@ -787,8 +797,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
int msgID = MSGID_BACKUP_ADD_NOT_SUPPORTED;
String message = getMessage(msgID);
@@ -815,8 +823,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
int msgID = MSGID_BACKUP_DELETE_NOT_SUPPORTED;
String message = getMessage(msgID);
@@ -843,8 +849,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
int msgID = MSGID_BACKUP_MODIFY_NOT_SUPPORTED;
String message = getMessage(msgID);
@@ -873,8 +877,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
int msgID = MSGID_BACKUP_MODIFY_DN_NOT_SUPPORTED;
String message = getMessage(msgID);
@@ -897,7 +899,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
// Get the base entry for the search, if possible. If it doesn't exist,
@@ -947,7 +948,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
continue;
}
@@ -986,7 +990,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
continue;
}
@@ -1040,7 +1047,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
continue;
}
@@ -1087,7 +1097,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -1101,7 +1110,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -1117,7 +1125,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
// We do not support LDIF exports.
return false;
@@ -1142,7 +1149,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
int msgID = MSGID_BACKUP_EXPORT_NOT_SUPPORTED;
String message = getMessage(msgID);
@@ -1161,7 +1167,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
// This backend does not support LDIF imports.
return false;
@@ -1186,7 +1191,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
// This backend does not support LDIF imports.
@@ -1211,7 +1215,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
return false;
@@ -1237,7 +1240,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
@@ -1262,7 +1264,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1290,9 +1291,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// This backend does not provide a backup/restore mechanism.
@@ -1312,7 +1310,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// This backend does not provide a backup/restore mechanism.
@@ -1338,8 +1335,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup",
- String.valueOf(restoreConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1360,7 +1355,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1376,7 +1370,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrs = new LinkedList<ConfigAttribute>();
@@ -1415,8 +1408,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// We'll accept anything here. The only configurable attribute is the
@@ -1446,9 +1437,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1481,7 +1469,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_BACKUP_CANNOT_DETERMINE_BACKUP_DIR_LIST;
messages.add(getMessage(msgID, stackTraceToSingleLineString(e)));
diff --git a/opends/src/server/org/opends/server/backends/MemoryBackend.java b/opends/src/server/org/opends/server/backends/MemoryBackend.java
index 67f6399..bf94ed2 100644
--- a/opends/src/server/org/opends/server/backends/MemoryBackend.java
+++ b/opends/src/server/org/opends/server/backends/MemoryBackend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends;
@@ -59,7 +59,9 @@
import org.opends.server.util.LDIFReader;
import org.opends.server.util.LDIFWriter;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -100,11 +102,6 @@
public class MemoryBackend
extends Backend
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.MemoryBackend";
@@ -137,7 +134,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -152,8 +148,6 @@
DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry), String.valueOf(baseDNs));
// We won't support anything other than exactly one base DN in this
@@ -192,7 +186,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, dn.toString(),
@@ -220,7 +217,6 @@
*/
public synchronized void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
clearMemoryBackend();
@@ -232,7 +228,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -244,7 +243,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -256,7 +254,6 @@
*/
public synchronized long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
if (entryMap != null)
{
@@ -273,7 +270,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -286,7 +282,6 @@
*/
public synchronized Entry getEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
return entryMap.get(entryDN);
}
@@ -298,7 +293,6 @@
*/
public synchronized boolean entryExists(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
return entryMap.containsKey(entryDN);
}
@@ -311,8 +305,6 @@
public synchronized void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
// See if the target entry already exists. If so, then fail.
@@ -370,8 +362,6 @@
DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
// Make sure the entry exists. If not, then throw an exception.
@@ -412,7 +402,10 @@
{
// This shouldn't happen, but we want the delete to continue anyway
// so just ignore it if it does for some reason.
- assert debugException(CLASS_NAME, "deleteEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -460,8 +453,6 @@
ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
// Make sure the entry exists. If not, then throw an exception.
@@ -487,8 +478,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
// Make sure that the target entry exists.
@@ -572,7 +561,6 @@
public synchronized void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
// Get the base DN, scope, and filter for the search.
@@ -618,7 +606,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -630,7 +617,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -642,7 +628,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
return true;
}
@@ -656,7 +641,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
// Create the LDIF writer.
@@ -667,9 +651,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_MEMORYBACKEND_CANNOT_CREATE_LDIF_WRITER;
+ int msgID = MSGID_MEMORYBACKEND_CANNOT_CREATE_LDIF_WRITER;
String message = getMessage(msgID, String.valueOf(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
message, msgID, e);
@@ -702,7 +689,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -714,7 +704,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
return true;
}
@@ -728,7 +717,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
clearMemoryBackend();
@@ -810,7 +798,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
return false;
@@ -824,7 +811,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
@@ -839,7 +825,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
int msgID = MSGID_MEMORYBACKEND_BACKUP_RESTORE_NOT_SUPPORTED;
@@ -857,9 +842,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
int msgID = MSGID_MEMORYBACKEND_BACKUP_RESTORE_NOT_SUPPORTED;
@@ -875,7 +857,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// This backend does not provide a backup/restore mechanism.
@@ -891,8 +872,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup",
- String.valueOf(restoreConfig));
int msgID = MSGID_MEMORYBACKEND_BACKUP_RESTORE_NOT_SUPPORTED;
diff --git a/opends/src/server/org/opends/server/backends/MonitorBackend.java b/opends/src/server/org/opends/server/backends/MonitorBackend.java
index f5a821f..a87684d 100644
--- a/opends/src/server/org/opends/server/backends/MonitorBackend.java
+++ b/opends/src/server/org/opends/server/backends/MonitorBackend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends;
@@ -72,7 +72,9 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -90,11 +92,6 @@
extends Backend
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.MonitorBackend";
@@ -131,7 +128,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -158,8 +154,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// Make sure that a configuration entry was provided. If not, then we will
@@ -210,7 +204,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MONITOR_CANNOT_DECODE_MONITOR_ROOT_DN;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -247,7 +244,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, baseMonitorDN.toString(),
@@ -271,7 +271,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -281,7 +280,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -298,8 +300,6 @@
*/
private boolean isMonitorConfigAttribute(Attribute attribute)
{
- assert debugEnter(CLASS_NAME, "isMonitorConfigAttribute",
- String.valueOf(attribute));
AttributeType attrType = attribute.getAttributeType();
if (attrType.hasName(ATTR_COMMON_NAME) ||
@@ -324,7 +324,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -336,7 +335,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
return DirectoryServer.getMonitorProviders().size() + 1;
}
@@ -354,7 +352,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -376,7 +373,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// If the requested entry was null, then throw an exception.
@@ -468,7 +464,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
if (entryDN.equals(baseMonitorDN))
{
@@ -502,7 +497,6 @@
*/
public Entry getBaseMonitorEntry()
{
- assert debugEnter(CLASS_NAME, "getBaseMonitorEntry");
HashMap<ObjectClass,String> monitorClasses =
@@ -677,8 +671,6 @@
*/
private Entry getMonitorEntry(DN entryDN, MonitorProvider monitorProvider)
{
- assert debugEnter(CLASS_NAME, "getMonitorEntry",
- String.valueOf(monitorProvider));
HashMap<ObjectClass,String> monitorClasses =
new LinkedHashMap<ObjectClass,String>(3);
@@ -746,8 +738,6 @@
private Attribute createAttribute(String name, String lowerName,
String value)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(lowerName), String.valueOf(value));
AttributeType type = DirectoryServer.getAttributeType(lowerName);
if (type == null)
@@ -780,8 +770,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
int msgID = MSGID_MONITOR_ADD_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entry.getDN()));
@@ -808,8 +796,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
int msgID = MSGID_MONITOR_DELETE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entryDN));
@@ -836,8 +822,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
int msgID = MSGID_MONITOR_MODIFY_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entry.getDN()),
@@ -867,8 +851,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
int msgID = MSGID_MONITOR_MODIFY_DN_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(currentDN));
@@ -891,7 +873,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
// Get the base entry for the search, if possible. If it doesn't exist,
@@ -962,7 +943,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -976,7 +956,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -992,7 +971,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
// We can export all the monitor entries as a point-in-time snapshot.
return true;
@@ -1017,7 +995,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
// Create the LDIF writer.
@@ -1028,7 +1005,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1044,7 +1024,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -1052,7 +1035,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "exportLDIF", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_MONITOR_UNABLE_TO_EXPORT_BASE;
@@ -1072,7 +1058,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -1080,7 +1069,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "exportLDIF", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_MONITOR_UNABLE_TO_EXPORT_PROVIDER_ENTRY;
@@ -1100,7 +1092,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1115,7 +1110,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
// This backend does not support LDIF imports.
return false;
@@ -1140,7 +1134,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
// This backend does not support LDIF imports.
@@ -1165,7 +1158,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
return false;
@@ -1191,7 +1183,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
@@ -1216,7 +1207,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1244,9 +1234,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// This backend does not provide a backup/restore mechanism.
@@ -1266,7 +1253,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// This backend does not provide a backup/restore mechanism.
@@ -1292,8 +1278,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup",
- String.valueOf(restoreConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1314,7 +1298,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1330,7 +1313,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
// There are no configurable attributes that will be explicitly advertised.
return new LinkedList<ConfigAttribute>();
@@ -1355,8 +1337,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// We'll pretty much accept anything here as long as it isn't one of our
@@ -1385,9 +1365,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
diff --git a/opends/src/server/org/opends/server/backends/RootDSEBackend.java b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
index 9965f01..356a738 100644
--- a/opends/src/server/org/opends/server/backends/RootDSEBackend.java
+++ b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends;
@@ -78,7 +78,9 @@
import org.opends.server.util.LDIFWriter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -103,11 +105,6 @@
extends Backend
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.RootDSEBackend";
@@ -156,7 +153,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -183,8 +179,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// Make sure that a configuration entry was provided. If not, then we will
@@ -271,11 +265,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
- throw new InitializationException(msgID, message,e);
+ throw new InitializationException(msgID, message, e);
}
@@ -298,7 +295,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ROOTDSE_CANNOT_DETERMINE_ALL_USER_ATTRIBUTES;
String message = getMessage(msgID, ATTR_ROOTDSE_SHOW_ALL_ATTRIBUTES,
@@ -370,7 +370,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -388,8 +387,6 @@
*/
private boolean isDSEConfigAttribute(Attribute attribute)
{
- assert debugEnter(CLASS_NAME, "isConfigAttribute",
- String.valueOf(attribute));
AttributeType attrType = attribute.getAttributeType();
if (attrType.hasName(ATTR_ROOT_DSE_SUBORDINATE_BASE_DN.toLowerCase()) ||
@@ -411,7 +408,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -423,7 +419,6 @@
*/
public synchronized long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
// There is always just a single entry in this backend.
return 1;
@@ -442,7 +437,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -464,7 +458,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// If the requested entry was the root DSE, then create and return it.
@@ -511,7 +504,6 @@
*/
public Entry getRootDSE()
{
- assert debugEnter(CLASS_NAME, "getRootDSE");
HashMap<AttributeType,List<Attribute>> dseUserAttrs =
new HashMap<AttributeType,List<Attribute>>();
@@ -778,8 +770,6 @@
private Attribute createAttribute(String name, String lowerName,
String value)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(lowerName), String.valueOf(value));
AttributeType type = DirectoryServer.getAttributeType(lowerName);
if (type == null)
@@ -809,8 +799,6 @@
private Attribute createDNAttribute(String name, String lowerName,
Collection<DN> values)
{
- assert debugEnter(CLASS_NAME, "createDNAttribute", String.valueOf(name),
- String.valueOf(lowerName), String.valueOf(values));
AttributeType type = DirectoryServer.getAttributeType(lowerName);
if (type == null)
@@ -844,8 +832,6 @@
private Attribute createAttribute(String name, String lowerName,
Collection<String> values)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(lowerName), String.valueOf(values));
AttributeType type = DirectoryServer.getAttributeType(lowerName);
if (type == null)
@@ -883,7 +869,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
// If the specified DN was the null DN, then it exists.
@@ -938,8 +923,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
int msgID = MSGID_ROOTDSE_ADD_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entry.getDN()));
@@ -966,8 +949,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
int msgID = MSGID_ROOTDSE_DELETE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entryDN));
@@ -994,8 +975,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
int msgID = MSGID_ROOTDSE_MODIFY_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entry.getDN()),
@@ -1025,8 +1004,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
int msgID = MSGID_ROOTDSE_MODIFY_DN_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(currentDN));
@@ -1053,7 +1030,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException, CancelledOperationException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
DN baseDN = searchOperation.getBaseDN();
if (! baseDN.isNullDN())
@@ -1150,13 +1126,19 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "search", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
throw de;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_UNEXPECTED_SEARCH_FAILURE;
String message = getMessage(msgID, searchOperation.getConnectionID(),
@@ -1190,7 +1172,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -1204,7 +1185,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -1220,7 +1200,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
// We will only export the DSE entry itself.
return true;
@@ -1245,7 +1224,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
// Create the LDIF writer.
@@ -1256,7 +1234,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_UNABLE_TO_CREATE_LDIF_WRITER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1273,7 +1254,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_UNABLE_TO_EXPORT_DSE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1288,7 +1272,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1304,7 +1291,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
// This backend does not support LDIF imports.
return false;
@@ -1329,7 +1315,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
// This backend does not support LDIF imports.
@@ -1354,7 +1339,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
return false;
@@ -1380,7 +1364,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does not provide a backup/restore mechanism.
@@ -1405,7 +1388,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1433,9 +1415,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// This backend does not provide a backup/restore mechanism.
@@ -1455,7 +1434,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// This backend does not provide a backup/restore mechanism.
@@ -1481,8 +1459,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup",
- String.valueOf(restoreConfig));
// This backend does not provide a backup/restore mechanism.
@@ -1503,7 +1479,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1519,7 +1494,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1563,8 +1537,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configIsAcceptable = true;
@@ -1599,7 +1571,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1619,7 +1594,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_CANNOT_DETERMINE_ALL_USER_ATTRIBUTES;
String message = getMessage(msgID, ATTR_ROOTDSE_SHOW_ALL_ATTRIBUTES,
@@ -1654,9 +1632,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1706,7 +1681,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_SUBORDINATE_BASE_EXCEPTION;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1737,7 +1715,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ROOTDSE_CANNOT_DETERMINE_ALL_USER_ATTRIBUTES;
String message = getMessage(msgID, ATTR_ROOTDSE_SHOW_ALL_ATTRIBUTES,
diff --git a/opends/src/server/org/opends/server/backends/SchemaBackend.java b/opends/src/server/org/opends/server/backends/SchemaBackend.java
index 0d2ed35..4b6a760 100644
--- a/opends/src/server/org/opends/server/backends/SchemaBackend.java
+++ b/opends/src/server/org/opends/server/backends/SchemaBackend.java
@@ -115,10 +115,12 @@
import org.opends.server.util.DynamicConstants;
import org.opends.server.util.LDIFException;
import org.opends.server.util.LDIFWriter;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -136,7 +138,7 @@
implements ConfigurableComponent, AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.backends.SchemaBackend";
@@ -237,7 +239,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -264,8 +265,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// Make sure that a configuration entry was provided. If not, then we will
@@ -368,7 +367,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_CANNOT_DETERMINE_SHOW_ALL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -389,7 +391,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, baseDNs[i].toString(),
@@ -436,7 +441,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -448,7 +452,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -466,8 +473,6 @@
*/
private boolean isSchemaConfigAttribute(Attribute attribute)
{
- assert debugEnter(CLASS_NAME, "isConfigAttribute",
- String.valueOf(attribute));
AttributeType attrType = attribute.getAttributeType();
if (attrType.hasName(ATTR_SCHEMA_ENTRY_DN.toLowerCase()) ||
@@ -498,7 +503,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -510,7 +514,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
// There is always only a single entry in this backend.
return 1;
@@ -529,7 +532,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -551,7 +553,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// If the requested entry was one of the schema entries, then create and
@@ -581,7 +582,6 @@
*/
public Entry getSchemaEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getSchemaEntry", String.valueOf(entryDN));
LinkedHashMap<AttributeType,List<Attribute>> userAttrs =
new LinkedHashMap<AttributeType,List<Attribute>>();
@@ -877,7 +877,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
// The specified DN must be one of the specified schema DNs.
@@ -911,8 +910,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
int msgID = MSGID_SCHEMA_ADD_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entry.getDN()));
@@ -939,8 +936,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
int msgID = MSGID_SCHEMA_DELETE_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(entryDN));
@@ -967,8 +962,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
// Make sure that the authenticated user has the necessary UPDATE_SCHEMA
@@ -1044,7 +1037,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE;
String message = getMessage(msgID, v.getStringValue(),
@@ -1069,7 +1065,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS;
String message = getMessage(msgID, v.getStringValue(),
@@ -1094,7 +1093,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM;
String message = getMessage(msgID, v.getStringValue(),
@@ -1119,7 +1121,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DCR;
String message = getMessage(msgID, v.getStringValue(),
@@ -1144,7 +1149,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR;
String message = getMessage(msgID, v.getStringValue(),
@@ -1169,7 +1177,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE;
String message = getMessage(msgID, v.getStringValue(),
@@ -1215,7 +1226,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE;
String message = getMessage(msgID, v.getStringValue(),
@@ -1241,7 +1255,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS;
String message = getMessage(msgID, v.getStringValue(),
@@ -1266,7 +1283,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM;
String message = getMessage(msgID, v.getStringValue(),
@@ -1291,7 +1311,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DCR;
String message = getMessage(msgID, v.getStringValue(),
@@ -1317,7 +1340,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR;
String message = getMessage(msgID, v.getStringValue(),
@@ -1343,7 +1369,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_MR_USE;
String message = getMessage(msgID, v.getStringValue(),
@@ -1404,13 +1433,19 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "replaceEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
throw de;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "replaceEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_WRITE_NEW_SCHEMA;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1456,9 +1491,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addAttributeType",
- String.valueOf(attributeType), String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified attribute type already exists. We'll check
@@ -1643,11 +1675,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeAttributeType",
- String.valueOf(attributeType), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified attribute type is actually defined in the server
@@ -1686,7 +1713,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "removeAttributeType", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_ATTRTYPE;
String message = getMessage(msgID, v.getStringValue(),
@@ -1818,9 +1848,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addObjectClass", String.valueOf(objectClass),
- String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified objectclass already exists. We'll check the
@@ -2003,11 +2030,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeObjectClass",
- String.valueOf(objectClass), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified objectclass is actually defined in the server
@@ -2045,7 +2067,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "removeObjectClass", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_OBJECTCLASS;
String message = getMessage(msgID, v.getStringValue(),
@@ -2142,9 +2167,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addNameForm", String.valueOf(nameForm),
- String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified name form already exists. We'll check the
@@ -2342,11 +2364,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeNameForm",
- String.valueOf(nameForm), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified name form is actually defined in the server schema.
@@ -2384,7 +2401,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "removeNameForm", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_NAME_FORM;
String message = getMessage(msgID, v.getStringValue(),
@@ -2450,9 +2470,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addDITContentRule",
- String.valueOf(ditContentRule), String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified DIT content rule already exists. We'll check
@@ -2705,11 +2722,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeDITContentRule",
- String.valueOf(ditContentRule), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified DIT content rule is actually defined in the server
@@ -2761,9 +2773,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addDITStructureRule",
- String.valueOf(ditStructureRule), String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified DIT structure rule already exists. We'll
@@ -2934,11 +2943,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeDITStructureRule",
- String.valueOf(ditStructureRule), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified DIT structure rule is actually defined in the server
@@ -2978,7 +2982,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "removeDITStructureRule", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SCHEMA_MODIFY_CANNOT_DECODE_DSR;
String message = getMessage(msgID, v.getStringValue(),
@@ -3047,9 +3054,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addMatchingRuleUse",
- String.valueOf(matchingRuleUse), String.valueOf(schema),
- String.valueOf(modifiedSchemaFiles));
// First, see if the specified matching rule use already exists. We'll
@@ -3217,11 +3221,6 @@
Set<String> modifiedSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeMatchingRuleUse",
- String.valueOf(matchingRuleUse), String.valueOf(schema),
- String.valueOf(modifications),
- String.valueOf(currentPosition),
- String.valueOf(modifiedSchemaFiles));
// See if the specified DIT content rule is actually defined in the server
@@ -3259,7 +3258,6 @@
*/
private Entry createEmptySchemaEntry()
{
- assert debugEnter(CLASS_NAME, "createEmptySchemaEntry");
LinkedHashMap<ObjectClass,String> objectClasses =
new LinkedHashMap<ObjectClass,String>();
@@ -3324,8 +3322,6 @@
private File writeTempSchemaFile(Schema schema, String schemaFile)
throws DirectoryException, IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "writeTempSchemaFile", String.valueOf(schema),
- String.valueOf(schemaFile));
// Start with an empty schema entry.
@@ -3516,10 +3512,6 @@
int depth)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addAttrTypeToSchemaFile",
- String.valueOf(schema), String.valueOf(schemaFile),
- String.valueOf(attributeType), String.valueOf(values),
- String.valueOf(addedTypes), String.valueOf(depth));
if (depth > 20)
{
@@ -3573,10 +3565,6 @@
int depth)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addObjectClassToSchemaFile",
- String.valueOf(schema), String.valueOf(schemaFile),
- String.valueOf(objectClass), String.valueOf(values),
- String.valueOf(addedClasses), String.valueOf(depth));
if (depth > 20)
{
@@ -3630,10 +3618,6 @@
HashSet<DITStructureRule> addedDSRs, int depth)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addDITStructureRuleToSchemaFile",
- String.valueOf(schema), String.valueOf(schemaFile),
- String.valueOf(ditStructureRule), String.valueOf(values),
- String.valueOf(addedDSRs), String.valueOf(depth));
if (depth > 20)
{
@@ -3677,8 +3661,6 @@
private void installSchemaFiles(HashMap<String,File> tempSchemaFiles)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "installSchemaFiles",
- String.valueOf(tempSchemaFiles));
// Create lists that will hold the three types of files we'll be dealing
@@ -3726,7 +3708,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
boolean allCleaned = true;
for (File f : origFileList)
@@ -3743,7 +3728,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
allCleaned = false;
}
@@ -3784,7 +3772,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
for (File f : installedFileList)
{
@@ -3797,7 +3788,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
@@ -3819,7 +3813,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
allRestored = false;
}
@@ -3861,7 +3858,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -3876,7 +3876,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "installSchemaFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -3894,8 +3897,6 @@
private void copyFile(File from, File to)
throws IOException
{
- assert debugEnter(CLASS_NAME, "copyFile", String.valueOf(from),
- String.valueOf(to));
byte[] buffer = new byte[4096];
FileInputStream inputStream = null;
@@ -3922,7 +3923,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "copyFile", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -3944,8 +3948,6 @@
*/
private void cleanUpTempSchemaFiles(HashMap<String,File> tempSchemaFiles)
{
- assert debugEnter(CLASS_NAME, "cleanUpTempSchemaFiles",
- String.valueOf(tempSchemaFiles));
if ((tempSchemaFiles == null) || tempSchemaFiles.isEmpty())
{
@@ -3963,7 +3965,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cleanUpTempSchemaFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -3989,8 +3994,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
int msgID = MSGID_SCHEMA_MODIFY_DN_NOT_SUPPORTED;
String message = getMessage(msgID, String.valueOf(currentDN));
@@ -4013,7 +4016,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
DN baseDN = searchOperation.getBaseDN();
@@ -4067,7 +4069,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -4081,7 +4082,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -4097,7 +4097,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
// We will only export the DSE entry itself.
return true;
@@ -4122,7 +4121,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
// Create the LDIF writer.
@@ -4133,7 +4131,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_UNABLE_TO_CREATE_LDIF_WRITER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -4150,7 +4151,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_UNABLE_TO_EXPORT_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -4165,7 +4169,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -4181,7 +4188,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
// This backend does not support LDIF imports.
// FIXME -- Should we support them?
@@ -4207,7 +4213,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
// This backend does not support LDIF imports.
@@ -4232,7 +4237,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// We do support an online backup mechanism for the schema.
return true;
@@ -4258,7 +4262,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// We should support online backup for the schema in any form. This
@@ -4286,9 +4289,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup",
- String.valueOf(configEntry),
- String.valueOf(backupConfig));
// Get the properties to use for the backup. We don't care whether or not
@@ -4327,7 +4327,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_MAC;
String message = getMessage(msgID, macAlgorithm,
@@ -4348,7 +4351,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_DIGEST;
String message = getMessage(msgID, digestAlgorithm,
@@ -4398,7 +4404,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_BACKUP_CANNOT_CREATE_ARCHIVE_FILE;
String message = getMessage(msgID, String.valueOf(filename),
@@ -4423,7 +4432,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_BACKUP_CANNOT_GET_CIPHER;
String message = getMessage(msgID, cipherAlgorithm,
@@ -4465,7 +4477,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_BACKUP_CANNOT_LIST_SCHEMA_FILES;
message = getMessage(msgID, schemaDirPath,
@@ -4538,7 +4553,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -4566,7 +4584,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_BACKUP_CANNOT_CLOSE_ZIP_STREAM;
message = getMessage(msgID, filename, backupDirectory.getPath(),
@@ -4607,7 +4628,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR;
message = getMessage(msgID, backupDirectory.getDescriptorPath(),
@@ -4635,9 +4659,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// This backend does not provide a backup/restore mechanism.
@@ -4657,7 +4678,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// We will provide a restore, but only for offline operations.
@@ -4683,8 +4703,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup", String.valueOf(configEntry),
- String.valueOf(restoreConfig));
// First, make sure that the requested backup exists.
@@ -5195,7 +5213,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -5211,7 +5228,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -5255,8 +5271,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configIsAcceptable = true;
@@ -5274,7 +5288,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_CANNOT_DETERMINE_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -5296,7 +5313,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SCHEMA_CANNOT_DETERMINE_SHOW_ALL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -5330,9 +5350,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -5371,7 +5388,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_CANNOT_DETERMINE_BASE_DN;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -5399,7 +5419,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_CANNOT_DETERMINE_SHOW_ALL;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -5468,7 +5491,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_CANNOT_DEREGISTER_BASE_DN;
messages.add(getMessage(msgID, String.valueOf(dn),
@@ -5491,7 +5517,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SCHEMA_CANNOT_REGISTER_BASE_DN;
messages.add(getMessage(msgID, String.valueOf(dn),
@@ -5528,7 +5557,6 @@
*/
boolean showAllAttributes()
{
- assert debugEnter(CLASS_NAME, "showAllAttributes");
return showAllAttributes;
}
@@ -5545,8 +5573,6 @@
*/
void setShowAllAttributes(boolean showAllAttributes)
{
- assert debugEnter(CLASS_NAME, "setShowAllAttributes",
- String.valueOf(showAllAttributes));
this.showAllAttributes = showAllAttributes;
}
@@ -5562,7 +5588,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return configEntryDN;
}
@@ -5578,7 +5603,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -5597,7 +5621,6 @@
*/
public LinkedHashMap<String,String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>();
diff --git a/opends/src/server/org/opends/server/backends/jeb/AttributeIndex.java b/opends/src/server/org/opends/server/backends/jeb/AttributeIndex.java
index 8fd8930..95faae1 100644
--- a/opends/src/server/org/opends/server/backends/jeb/AttributeIndex.java
+++ b/opends/src/server/org/opends/server/backends/jeb/AttributeIndex.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -49,7 +49,9 @@
import org.opends.server.types.Modification;
import org.opends.server.types.SearchFilter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* Class representing an attribute index.
@@ -65,11 +67,6 @@
*/
public class AttributeIndex
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.AttributeIndex";
/**
@@ -513,7 +510,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "evaluateEqualityFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -568,7 +568,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "evaluateGreaterOrEqualFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -605,7 +608,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "evaluateLessOrEqualFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -691,7 +697,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "evaluateSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -730,7 +739,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "evaluateBoundedRange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java b/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
index 2fb5d59..1e34280 100644
--- a/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
+++ b/opends/src/server/org/opends/server/backends/jeb/BackendImpl.java
@@ -69,7 +69,9 @@
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.config.ConfigConstants.ATTR_BACKEND_BASE_DN;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.util.ServerConstants.OID_SUBTREE_DELETE_CONTROL;
import static org.opends.server.util.ServerConstants.OID_PAGED_RESULTS_CONTROL;
import static org.opends.server.util.ServerConstants.OID_MANAGE_DSAIT_CONTROL;
@@ -80,11 +82,6 @@
*/
public class BackendImpl extends Backend implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.BackendImpl";
/**
* The DN of the configuration entry for this backend.
@@ -168,7 +165,6 @@
*/
private void readerBegin()
{
- assert debugEnter(CLASS_NAME, "readerBegin");
threadTotalCount.getAndIncrement();
}
@@ -180,7 +176,6 @@
*/
private void readerEnd()
{
- assert debugEnter(CLASS_NAME, "readerEnd");
threadTotalCount.getAndDecrement();
}
@@ -192,7 +187,6 @@
*/
private void writerBegin()
{
- assert debugEnter(CLASS_NAME, "writerBegin");
threadTotalCount.getAndIncrement();
threadWriteCount.getAndIncrement();
@@ -205,7 +199,6 @@
*/
private void writerEnd()
{
- assert debugEnter(CLASS_NAME, "writerEnd");
threadWriteCount.getAndDecrement();
threadTotalCount.getAndDecrement();
@@ -220,7 +213,6 @@
*/
private void waitUntilQuiescent()
{
- assert debugEnter(CLASS_NAME, "waitUntilQuiescent");
while (threadTotalCount.get() > 0)
{
@@ -231,7 +223,10 @@
}
catch (InterruptedException e)
{
- assert debugException(CLASS_NAME, "waitUntilQuiescent", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -246,7 +241,6 @@
*/
public static String getContainerName(DN dn)
{
- assert debugEnter(CLASS_NAME, "getContainerName");
String normStr = dn.toNormalizedString();
StringBuilder builder = new StringBuilder(normStr.length());
@@ -286,7 +280,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend");
configDN = configEntry.getDN();
@@ -302,9 +295,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
+ int msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, String.valueOf(dn),
String.valueOf(e));
throw new InitializationException(msgID, message, e);
@@ -327,7 +323,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_OPEN_ENV_FAIL,
e.getMessage());
throw new InitializationException(MSGID_JEB_OPEN_ENV_FAIL, message, e);
@@ -345,8 +344,10 @@
}
catch (DatabaseException databaseException)
{
- assert debugException(CLASS_NAME, "initializeBackend",
- databaseException);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, databaseException);
+ }
String message = getMessage(MSGID_JEB_OPEN_DATABASE_FAIL,
databaseException.getMessage());
throw new InitializationException(MSGID_JEB_OPEN_DATABASE_FAIL, message,
@@ -366,8 +367,10 @@
}
catch(DatabaseException databaseException)
{
- assert debugException(CLASS_NAME, "initializeBackend",
- databaseException);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, databaseException);
+ }
String message = getMessage(MSGID_JEB_GET_ENTRY_COUNT_FAILED,
databaseException.getMessage());
throw new InitializationException(MSGID_JEB_GET_ENTRY_COUNT_FAILED,
@@ -397,7 +400,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
// Deregister our configurable components.
// TODO: configurableEnv is always null and will not be deregistered.
@@ -418,7 +420,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -442,7 +447,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_DATABASE_EXCEPTION;
String message = getMessage(msgID, e.getMessage());
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
@@ -470,7 +478,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
return true;
}
@@ -486,7 +493,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
return true;
}
@@ -502,7 +508,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
return true;
}
@@ -522,7 +527,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
return true;
}
@@ -546,7 +550,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
return true;
}
@@ -561,7 +564,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
return true;
}
@@ -575,7 +577,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return new HashSet<String>(); //NYI
}
@@ -589,7 +590,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -603,7 +603,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return config.getBaseDNs();
}
@@ -615,7 +614,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
if (rootContainer != null)
{
@@ -625,7 +623,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntryCount", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -646,7 +647,6 @@
*/
public Entry getEntry(DN entryDN) throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry");
readerBegin();
try
@@ -659,7 +659,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -667,7 +670,10 @@
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -698,7 +704,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry");
writerBegin();
try
@@ -712,7 +717,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "addEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -720,7 +728,10 @@
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "addEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -750,7 +761,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry");
writerBegin();
try
@@ -762,7 +772,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "deleteEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -770,7 +783,10 @@
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "deleteEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -800,7 +816,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry");
writerBegin();
try
@@ -814,7 +829,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "replaceEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -822,7 +840,10 @@
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "replaceEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -858,7 +879,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException, CancelledOperationException
{
- assert debugEnter(CLASS_NAME, "renameEntry");
writerBegin();
try
@@ -881,14 +901,20 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "renameEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
message, MSGID_JEB_DATABASE_EXCEPTION);
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "renameEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -913,7 +939,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search");
readerBegin();
try
@@ -924,7 +949,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION, e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
message, MSGID_JEB_DATABASE_EXCEPTION);
@@ -953,7 +981,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF");
// Initialize a config object.
config = new Config();
@@ -964,7 +991,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -991,7 +1021,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "exportLDIF", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
int msgID = MSGID_JEB_IO_ERROR;
String message = getMessage(msgID, ioe.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -999,14 +1032,20 @@
}
catch (JebException je)
{
- assert debugException(CLASS_NAME, "exportLDIF", je);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, je);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
je.getMessage(),
je.getMessageID());
}
catch (DatabaseException de)
{
- assert debugException(CLASS_NAME, "exportLDIF", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
de.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -1014,7 +1053,10 @@
}
catch (LDIFException e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -1032,7 +1074,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1056,7 +1101,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF");
// Initialize a config object.
config = new Config();
@@ -1067,7 +1111,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "importLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -1080,7 +1127,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "importLDIF", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
int msgID = MSGID_JEB_IO_ERROR;
String message = getMessage(msgID, ioe.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -1088,14 +1138,20 @@
}
catch (JebException je)
{
- assert debugException(CLASS_NAME, "importLDIF", je);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, je);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
je.getMessage(),
je.getMessageID());
}
catch (DatabaseException de)
{
- assert debugException(CLASS_NAME, "importLDIF", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
de.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -1123,7 +1179,6 @@
DN[] baseDNs, Entry statEntry)
throws InitializationException, ConfigException, DirectoryException
{
- assert debugEnter(CLASS_NAME, "verifyBackend");
// Initialize a config object.
config = new Config();
@@ -1150,7 +1205,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_DATABASE_EXCEPTION,
e.getMessage());
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -1158,7 +1216,10 @@
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "verifyBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -1176,7 +1237,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1199,7 +1263,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup");
BackupManager backupManager =
new BackupManager(getBackendID());
@@ -1222,7 +1285,6 @@
public void removeBackup(BackupDirectory backupDirectory, String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup");
BackupManager backupManager =
new BackupManager(getBackendID());
@@ -1246,7 +1308,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup");
BackupManager backupManager =
new BackupManager(getBackendID());
@@ -1264,7 +1325,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configDN;
}
@@ -1280,7 +1340,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
return configAttrs;
}
@@ -1303,7 +1362,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration");
DN[] baseDNs = null;
boolean acceptable = true;
@@ -1364,7 +1422,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration");
ConfigChangeResult ccr;
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1418,7 +1475,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
resultCode = DirectoryServer.getServerErrorResultCode();
@@ -1457,7 +1517,6 @@
*/
public RootContainer getRootContainer()
{
- assert debugEnter(CLASS_NAME, "getRootContainer");
return rootContainer;
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/BackupManager.java b/opends/src/server/org/opends/server/backends/jeb/BackupManager.java
index 059b133..22613b1 100644
--- a/opends/src/server/org/opends/server/backends/jeb/BackupManager.java
+++ b/opends/src/server/org/opends/server/backends/jeb/BackupManager.java
@@ -69,8 +69,9 @@
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.JebMessages.*;
@@ -113,11 +114,6 @@
*/
public static final String ZIPENTRY_EMPTY_PLACEHOLDER = "empty.placeholder";
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.BackupManager";
/**
* The backend ID.
@@ -150,7 +146,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
// Parse our backend configuration.
@@ -161,7 +156,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -204,7 +202,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_MAC;
String message = getMessage(msgID, macAlgorithm,
@@ -224,7 +225,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_DIGEST;
String message = getMessage(msgID, digestAlgorithm,
@@ -347,7 +351,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_CREATE_ARCHIVE_FILE;
String message = getMessage(msgID, String.valueOf(archiveFilename),
@@ -372,7 +379,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER;
String message = getMessage(msgID, cipherAlgorithm,
@@ -436,7 +446,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_LIST_LOG_FILES;
message = getMessage(msgID, backendDir.getAbsolutePath(),
@@ -456,7 +469,10 @@
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE;
message = getMessage(msgID, ZIPENTRY_EMPTY_PLACEHOLDER,
stackTraceToSingleLineString(e));
@@ -535,7 +551,10 @@
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE;
message = getMessage(msgID, zipEntryName,
stackTraceToSingleLineString(e));
@@ -564,14 +583,20 @@
}
catch (FileNotFoundException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// A log file has been deleted by the cleaner since we started.
deletedFiles = true;
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_WRITE_ARCHIVE_FILE;
message = getMessage(msgID, logFile.getName(),
stackTraceToSingleLineString(e));
@@ -608,7 +633,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_LIST_LOG_FILES;
message = getMessage(msgID, backendDir.getAbsolutePath(),
@@ -640,7 +668,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -656,7 +687,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_CLOSE_ZIP_STREAM;
message = getMessage(msgID, archiveFilename, backupDir.getPath(),
@@ -698,13 +732,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR;
message = getMessage(msgID, backupDir.getDescriptorPath(),
stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
- message, msgID, e); }
+ message, msgID, e);
+ }
}
@@ -735,7 +773,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -766,8 +807,11 @@
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "restoreBackup", e);
- int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
String message = getMessage(msgID, backupInfo.getBackupID(),
stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -784,8 +828,11 @@
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "restoreBackup", e);
- int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
String message = getMessage(msgID, dependent.getBackupID(),
stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -800,8 +847,11 @@
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "restoreBackup", e);
- int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ int msgID = MSGID_JEB_BACKUP_CANNOT_RESTORE;
String message = getMessage(msgID, backupInfo.getBackupID(),
stackTraceToSingleLineString(e));
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
@@ -860,7 +910,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "removeBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(DirectoryServer.getServerErrorResultCode(),
e.getMessage(),
e.getMessageID());
@@ -872,7 +925,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR;
String message = getMessage(msgID, backupDir.getDescriptorPath(),
@@ -909,8 +965,6 @@
Set<String> includeFiles)
throws DirectoryException,IOException
{
- assert debugEnter(CLASS_NAME, "restoreArchive",
- String.valueOf(restoreConfig));
BackupDirectory backupDir = restoreConfig.getBackupDirectory();
@@ -947,7 +1001,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "restoreArchive", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_MAC;
String message = getMessage(msgID, macAlgorithm,
@@ -967,7 +1024,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "restoreArchive", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_DIGEST;
String message = getMessage(msgID, digestAlgorithm,
@@ -992,7 +1052,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "restoreArchive", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER;
String message = getMessage(msgID, cipherAlgorithm,
@@ -1333,7 +1396,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "restoreArchive", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_BACKUP_CANNOT_GET_CIPHER;
String message = getMessage(msgID, cipherAlgorithm,
diff --git a/opends/src/server/org/opends/server/backends/jeb/BufferedIndex.java b/opends/src/server/org/opends/server/backends/jeb/BufferedIndex.java
index 56d3274..24943a3 100644
--- a/opends/src/server/org/opends/server/backends/jeb/BufferedIndex.java
+++ b/opends/src/server/org/opends/server/backends/jeb/BufferedIndex.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/Config.java b/opends/src/server/org/opends/server/backends/jeb/Config.java
index 5a31abe..c6e3f32 100644
--- a/opends/src/server/org/opends/server/backends/jeb/Config.java
+++ b/opends/src/server/org/opends/server/backends/jeb/Config.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -69,18 +69,15 @@
import java.util.concurrent.ConcurrentHashMap;
import java.io.File;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This class represents the configuration of a JE backend.
*/
public class Config
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.Config";
/**
* The name of the object class which configures
@@ -545,7 +542,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "initializeConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
ConcurrentHashMap<DN, ConfigEntry> children = configEntry.getChildren();
diff --git a/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java b/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
index 1636ae2..ad6b8be 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ConfigurableEnvironment.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/DN2ID.java b/opends/src/server/org/opends/server/backends/jeb/DN2ID.java
index 929277d..ff11eff 100644
--- a/opends/src/server/org/opends/server/backends/jeb/DN2ID.java
+++ b/opends/src/server/org/opends/server/backends/jeb/DN2ID.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/DN2URI.java b/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
index d349e1e..b7caaa2 100644
--- a/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
+++ b/opends/src/server/org/opends/server/backends/jeb/DN2URI.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -61,7 +61,9 @@
import java.util.Set;
import static org.opends.server.util.ServerConstants.ATTR_REFERRAL_URL;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.JebMessages.
MSGID_JEB_REFERRAL_RESULT_MESSAGE;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -76,11 +78,6 @@
*/
public class DN2URI
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EntryContainer";
/**
* The standard attribute type that is used to specify the set of referral
@@ -475,7 +472,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "throwReferralException", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Return the non-LDAP URI as is.
}
@@ -545,11 +545,17 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "targetEntryReferrals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
catch (UnsupportedEncodingException e)
{
- assert debugException(CLASS_NAME, "targetEntryReferrals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -667,7 +673,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "returnSearchReferences", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Return the non-LDAP URI as is.
}
@@ -689,11 +698,17 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "returnSearchReferences", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
catch (UnsupportedEncodingException e)
{
- assert debugException(CLASS_NAME, "returnSearchReferences", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return true;
diff --git a/opends/src/server/org/opends/server/backends/jeb/DataConfig.java b/opends/src/server/org/opends/server/backends/jeb/DataConfig.java
index d3b6583..71ac926 100644
--- a/opends/src/server/org/opends/server/backends/jeb/DataConfig.java
+++ b/opends/src/server/org/opends/server/backends/jeb/DataConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/DbPreloadComparator.java b/opends/src/server/org/opends/server/backends/jeb/DbPreloadComparator.java
index 148a391..7cb6aa1 100644
--- a/opends/src/server/org/opends/server/backends/jeb/DbPreloadComparator.java
+++ b/opends/src/server/org/opends/server/backends/jeb/DbPreloadComparator.java
@@ -22,13 +22,15 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
import com.sleepycat.je.Database;
import com.sleepycat.je.DatabaseException;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import java.util.Comparator;
@@ -38,11 +40,6 @@
*/
public class DbPreloadComparator implements Comparator<Database>
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EntryContainer";
/**
* Calculate the relative priority of a database for preloading.
@@ -70,7 +67,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "TODO", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return 3;
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
index 33a5ef7..6d72cd9 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -38,7 +38,6 @@
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.Operation;
import org.opends.server.core.SearchOperation;
-import org.opends.server.loggers.Debug;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.ldap.LDAPException;
import org.opends.server.controls.PagedResultsControl;
@@ -47,7 +46,7 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.CancelledOperationException;
import org.opends.server.types.Control;
-import org.opends.server.types.DebugLogCategory;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
@@ -69,11 +68,10 @@
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.JebMessages.*;
-import static org.opends.server.loggers.Debug.debugException;
-import static org.opends.server.types.DebugLogSeverity.VERBOSE;
-import static org.opends.server.types.DebugLogCategory.DATABASE_ACCESS;
-import static org.opends.server.types.DebugLogCategory.DATABASE_WRITE;
-import static org.opends.server.types.DebugLogCategory.DATABASE_READ;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugJEAccess;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
import static org.opends.server.util.ServerConstants.OID_SUBTREE_DELETE_CONTROL;
import static org.opends.server.util.ServerConstants.OID_PAGED_RESULTS_CONTROL;
@@ -84,11 +82,6 @@
*/
public class EntryContainer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EntryContainer";
/**
* The name of the entry database.
@@ -286,7 +279,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "open", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
close();
throw e;
}
@@ -344,7 +340,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "open", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
close();
throw e;
}
@@ -399,7 +398,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "openReadOnly", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
close();
throw e;
}
@@ -562,7 +564,10 @@
}
catch (LDAPException e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new DirectoryException(ResultCode.PROTOCOL_ERROR,
e.getMessage(), e.getMessageID(), e);
}
@@ -595,7 +600,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
// The base entry must exist for a successful result.
@@ -769,7 +777,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "search", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
// The base entry must exist for a successful result.
@@ -849,7 +860,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "searchNotIndexed", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_INVALID_PAGED_RESULTS_COOKIE;
String str = StaticUtils.bytesToHex(pageRequest.getCookie().value());
String msg = getMessage(msgID, str);
@@ -987,11 +1001,17 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "searchNotIndexed", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
catch (JebException e)
{
- assert debugException(CLASS_NAME, "searchNotIndexed", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
if (pageRequest != null)
@@ -1050,7 +1070,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "searchIndexed", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_INVALID_PAGED_RESULTS_COOKIE;
String str = StaticUtils.bytesToHex(pageRequest.getCookie().value());
String msg = getMessage(msgID, str);
@@ -1115,7 +1138,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "searchIndexed", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
continue;
}
}
@@ -1308,8 +1334,10 @@
{
throw deadlockException;
}
- assert debugException(CLASS_NAME, "invokeTransactedOperation",
- deadlockException);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, deadlockException);
+ }
}
catch (DatabaseException databaseException)
{
@@ -2072,7 +2100,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "entryExists", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return id != null;
@@ -3266,7 +3297,10 @@
}
catch (DatabaseNotFoundException e)
{
- assert debugException(CLASS_NAME, "removeContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
{
@@ -3274,7 +3308,10 @@
}
catch (DatabaseNotFoundException e)
{
- assert debugException(CLASS_NAME, "removeContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
{
@@ -3282,7 +3319,10 @@
}
catch (DatabaseNotFoundException e)
{
- assert debugException(CLASS_NAME, "removeContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
{
@@ -3290,7 +3330,10 @@
}
catch (DatabaseNotFoundException e)
{
- assert debugException(CLASS_NAME, "removeContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
for (AttributeIndex index : attrIndexMap.values())
{
@@ -3300,7 +3343,10 @@
}
catch (DatabaseNotFoundException e)
{
- assert debugException(CLASS_NAME, "removeContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -3346,7 +3392,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "listDatabases", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -3426,10 +3475,11 @@
try
{
database = env.openDatabase(txn, fullName, dbConfig);
- assert Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "openDatabase",
- "open db=" + database.getDatabaseName() +
- " txnid=" + txn.getId());
+ if (debugEnabled())
+ {
+ debugVerbose("open db=%s txnid=%d", database.getDatabaseName(),
+ txn.getId());
+ }
transactionCommit(txn);
}
catch (DatabaseException e)
@@ -3441,10 +3491,10 @@
else
{
database = env.openDatabase(null, fullName, dbConfig);
- assert Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "openDatabase",
- "open db=" + database.getDatabaseName() +
- " txnid=none");
+ if (debugEnabled())
+ {
+ debugVerbose("open db=%s txnid=none", database.getDatabaseName());
+ }
}
// Insert into the list of database handles.
@@ -3466,8 +3516,10 @@
Transaction parentTxn = null;
TransactionConfig txnConfig = null;
Transaction txn = env.beginTransaction(parentTxn, txnConfig);
- assert Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "beginTransaction", "begin txnid=" + txn.getId());
+ if (debugEnabled())
+ {
+ debugVerbose("beginTransaction", "begin txnid=" + txn.getId());
+ }
return txn;
}
@@ -3484,9 +3536,10 @@
if (txn != null)
{
txn.commit();
- assert Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "transactionCommit", "commit txnid=" +
- txn.getId());
+ if (debugEnabled())
+ {
+ debugVerbose("commit txnid=%d", txn.getId());
+ }
}
}
@@ -3503,89 +3556,11 @@
if (txn != null)
{
txn.abort();
- assert Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "transactionAbort", "abort txnid=" +
- txn.getId());
- }
- }
-
- /**
- * Debug log a read or write access to the database.
- * @param operation The operation label: "read", "put", "insert".
- * @param category The log category for raw data value logging
- * @param status The JE return status code of the operation.
- * @param database The JE database handle operated on.
- * @param txn The JE transaction handle used in the operation.
- * @param key The database key operated on.
- * @param data The database value read or written.
- * @return true so that the method can be used in an assertion
- * @throws DatabaseException If an error occurs while retrieving information
- * about the JE objects provided to the method.
- */
- private static boolean debugAccess(String operation,
- DebugLogCategory category,
- OperationStatus status,
- Database database,
- Transaction txn,
- DatabaseEntry key, DatabaseEntry data)
- throws DatabaseException
- {
- // Build the string that is common to category DATABASE_ACCESS and
- // DATABASE_READ/DATABASE_WRITE
- StringBuilder builder = new StringBuilder();
- builder.append(operation);
- if(status != null)
- {
- if (status == OperationStatus.SUCCESS)
+ if (debugEnabled())
{
- builder.append(" (ok)");
- }
- else
- {
- builder.append(" (");
- builder.append(status.toString());
- builder.append(")");
+ debugVerbose("abort txnid=%d", txn.getId());
}
}
- builder.append(" db=");
- builder.append(database.getDatabaseName());
- if (txn != null)
- {
- builder.append(" txnid=");
- builder.append(txn.getId());
- }
- else
- {
- builder.append(" txnid=none");
- }
- Debug.debugMessage(DATABASE_ACCESS, VERBOSE, CLASS_NAME,
- "debugAccess", builder.toString());
-
- // If the operation was successful we log the same common information
- // plus the key and data under category DATABASE_READ or DATABASE_WRITE
- if (status == OperationStatus.SUCCESS)
- {
- builder.append(" key:");
- builder.append(ServerConstants.EOL);
- StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 0);
- if (data != null)
- {
- builder.append("data(len=");
- builder.append(data.getSize());
- builder.append("):");
- builder.append(ServerConstants.EOL);
- StaticUtils.byteArrayToHexPlusAscii(builder, data.getData(), 0);
- }
- Debug.debugMessage(category, VERBOSE, CLASS_NAME,
- "debugAccess", builder.toString());
-/*
- if (category == DATABASE_WRITE)
- {
- System.out.println(builder.toString());
- }
-*/
- }
- return true;
}
/**
@@ -3603,8 +3578,10 @@
throws DatabaseException
{
OperationStatus status = database.putNoOverwrite(txn, key, data);
- assert debugAccess("insert", DATABASE_WRITE,
- status, database, txn, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data);
+ }
return status;
}
@@ -3624,8 +3601,11 @@
throws DatabaseException
{
OperationStatus status = cursor.putNoOverwrite(key, data);
- assert debugAccess("cursorInsert", DATABASE_WRITE,
- status, cursor.getDatabase(), null, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status,
+ cursor.getDatabase(), null, key, data);
+ }
return status;
}
@@ -3644,8 +3624,10 @@
throws DatabaseException
{
OperationStatus status = database.put(txn, key, data);
- assert debugAccess("put", DATABASE_WRITE,
- status, database, txn, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data);
+ }
return status;
}
@@ -3665,8 +3647,11 @@
throws DatabaseException
{
OperationStatus status = cursor.put(key, data);
- assert debugAccess("cursorPut", DATABASE_WRITE,
- status, cursor.getDatabase(), null, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status,
+ cursor.getDatabase(), null, key, data);
+ }
return status;
}
@@ -3688,8 +3673,10 @@
throws DatabaseException
{
OperationStatus status = database.get(txn, key, data, lockMode);
- assert debugAccess("read", DATABASE_READ,
- status, database, txn, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, data);
+ }
return status;
}
@@ -3711,8 +3698,11 @@
throws DatabaseException
{
OperationStatus status = cursor.getSearchKey(key, data, lockMode);
- assert debugAccess("cursorRead", DATABASE_READ,
- status, cursor.getDatabase(), null, key, data);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status,
+ cursor.getDatabase(), null, key, data);
+ }
return status;
}
@@ -3730,8 +3720,10 @@
throws DatabaseException
{
OperationStatus status = database.delete(txn, key);
- assert debugAccess("delete", DATABASE_WRITE,
- status, database, txn, key, null);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, status, database, txn, key, null);
+ }
return status;
}
@@ -3745,8 +3737,11 @@
public static long count(Database database) throws DatabaseException
{
long count = database.count();
- assert debugAccess("count", DATABASE_READ, null, database,
- null, null, null);
+ if (debugEnabled())
+ {
+ debugJEAccess(DebugLogLevel.VERBOSE, OperationStatus.SUCCESS,
+ database, null, null, null);
+ }
return count;
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryID.java b/opends/src/server/org/opends/server/backends/jeb/EntryID.java
index 95ab922..1e9f8cc 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryID.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryID.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java b/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
index 267f7e3..e654b37 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryIDSet.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -36,11 +36,6 @@
*/
public class EntryIDSet implements Iterable<EntryID>
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EntryIDSet";
/**
diff --git a/opends/src/server/org/opends/server/backends/jeb/EnvManager.java b/opends/src/server/org/opends/server/backends/jeb/EnvManager.java
index 0e00de3..559828a 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EnvManager.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EnvManager.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.JebMessages.MSGID_JEB_CREATE_FAIL;
import static org.opends.server.messages.JebMessages.
@@ -41,11 +43,6 @@
*/
public class EnvManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EnvManager";
/**
* A filename filter to match all kinds of JE files.
@@ -98,7 +95,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackendDirectory", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_CREATE_FAIL, e.getMessage());
throw new JebException(MSGID_JEB_CREATE_FAIL, message, e);
}
@@ -132,7 +132,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "removeFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String message = getMessage(MSGID_JEB_REMOVE_FAIL, e.getMessage());
throw new JebException(MSGID_JEB_REMOVE_FAIL, message, e);
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/EqualityIndexer.java b/opends/src/server/org/opends/server/backends/jeb/EqualityIndexer.java
index 6388ced..4620912 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EqualityIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EqualityIndexer.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import com.sleepycat.je.Transaction;
import com.sleepycat.je.DatabaseException;
@@ -50,11 +52,6 @@
*/
public class EqualityIndexer extends Indexer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.EqualityIndexer";
/**
@@ -346,7 +343,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "indexAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/ExportJob.java b/opends/src/server/org/opends/server/backends/jeb/ExportJob.java
index c0d13b1..567f3b9 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ExportJob.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ExportJob.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -44,7 +44,9 @@
import java.io.IOException;
import java.util.*;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.JebMessages.*;
@@ -54,11 +56,6 @@
*/
public class ExportJob
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.ExportJob";
/**
* The requested LDIF export configuration.
@@ -202,7 +199,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
skippedCount++;
System.err.printf("Malformed id2entry ID %s.%n",
StaticUtils.bytesToHex(key.getData()));
@@ -222,7 +222,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportContainer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
skippedCount++;
System.err.printf("Malformed id2entry record for ID %d:%n%s%n",
entryID.longValue(),
diff --git a/opends/src/server/org/opends/server/backends/jeb/ID2CIndexer.java b/opends/src/server/org/opends/server/backends/jeb/ID2CIndexer.java
index 792e942..a290e0f 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ID2CIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ID2CIndexer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
index 036bcd1..9ffb6f7 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ID2Entry.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 - 2007 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java b/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java
index 7c72fa7..1aeef69 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ID2SIndexer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java b/opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java
index 704e73d..0025ebb 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IDSetIterator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/ImportContext.java b/opends/src/server/org/opends/server/backends/jeb/ImportContext.java
index 5a181cf..fcafc38 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ImportContext.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ImportContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/ImportJob.java b/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
index 07c0989..cd3cd5a 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ImportJob.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 - 2007 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -32,11 +32,10 @@
import com.sleepycat.je.Transaction;
import org.opends.server.api.Backend;
-import org.opends.server.loggers.Debug;
+import org.opends.server.loggers.debug.DebugLogger;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.messages.JebMessages;
import org.opends.server.types.AttributeType;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
@@ -56,7 +55,8 @@
import java.util.TimerTask;
import java.util.concurrent.LinkedBlockingQueue;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.JebMessages.
MSGID_JEB_IMPORT_ENTRY_EXISTS;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -70,11 +70,6 @@
*/
public class ImportJob implements Thread.UncaughtExceptionHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.ImportJob";
/**
* The backend instance we are importing into.
@@ -207,9 +202,8 @@
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.NOTICE,
message, msgID);
- Debug.debugMessage(DebugLogCategory.BACKEND, DebugLogSeverity.INFO,
- CLASS_NAME, "importLDIF",
- rootContainer.getEnvironmentConfig().toString());
+ DebugLogger.debugInfo(
+ rootContainer.getEnvironmentConfig().toString());
rootContainer.openEntryContainers(config.getBaseDNs());
@@ -429,7 +423,10 @@
}
catch (InterruptedException e)
{
- assert debugException(CLASS_NAME, "merge", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -528,13 +525,19 @@
}
catch (LDIFException e)
{
- assert debugException(CLASS_NAME, "processLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Update stats.
rejectedCount++;
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "processLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Update stats.
rejectedCount++;
}
@@ -636,7 +639,10 @@
}
catch (InterruptedException e)
{
- assert debugException(CLASS_NAME, "processEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
else
@@ -716,7 +722,10 @@
}
catch (InterruptedException e)
{
- assert debugException(CLASS_NAME, "processEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/ImportThread.java b/opends/src/server/org/opends/server/backends/jeb/ImportThread.java
index a17fbf0..de966ba 100644
--- a/opends/src/server/org/opends/server/backends/jeb/ImportThread.java
+++ b/opends/src/server/org/opends/server/backends/jeb/ImportThread.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.api.DirectoryThread;
import org.opends.server.types.AttributeType;
import org.opends.server.types.Entry;
@@ -46,11 +48,6 @@
*/
public class ImportThread extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.ImportThread";
/**
* The import context of this thread.
@@ -248,7 +245,10 @@
}
catch (InterruptedException e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
continue;
}
@@ -301,11 +301,17 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
catch (IOException e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/Index.java b/opends/src/server/org/opends/server/backends/jeb/Index.java
index 2dda8e8..3b4454b 100644
--- a/opends/src/server/org/opends/server/backends/jeb/Index.java
+++ b/opends/src/server/org/opends/server/backends/jeb/Index.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.JebMessages.
MSGID_JEB_DATABASE_EXCEPTION;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -57,11 +59,6 @@
*/
public class Index
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.Index";
/**
@@ -329,7 +326,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "readKey", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -473,7 +473,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "readRange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return new EntryIDSet();
}
}
@@ -515,7 +518,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "openCursor", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JEB_DATABASE_EXCEPTION;
String message = getMessage(msgID, e.getMessage());
throw new JebException(msgID, message, e);
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexBuilder.java b/opends/src/server/org/opends/server/backends/jeb/IndexBuilder.java
index 9796d68..8c2af6e 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexBuilder.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexBuilder.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexConfig.java b/opends/src/server/org/opends/server/backends/jeb/IndexConfig.java
index 034f7af..8489e35 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexConfig.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -34,11 +34,6 @@
*/
public class IndexConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.IndexConfig";
/**
* The attribute type of the indexed attribute.
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexFilter.java b/opends/src/server/org/opends/server/backends/jeb/IndexFilter.java
index 6104931..380e02f 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexFilter.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexFilter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexIteratorAllIds.java b/opends/src/server/org/opends/server/backends/jeb/IndexIteratorAllIds.java
index 29cb318..e9c2449 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexIteratorAllIds.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexIteratorAllIds.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexIteratorRange.java b/opends/src/server/org/opends/server/backends/jeb/IndexIteratorRange.java
index 3e4ceda..8db3a45 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexIteratorRange.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexIteratorRange.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexMergeThread.java b/opends/src/server/org/opends/server/backends/jeb/IndexMergeThread.java
index 90f2176..f1a016f 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexMergeThread.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexMergeThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -47,7 +47,9 @@
import java.util.TreeMap;
import java.util.WeakHashMap;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.JebMessages.*;
@@ -58,11 +60,6 @@
*/
public class IndexMergeThread extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.IndexMergeThread";
/**
* The buffer size to use when reading data from disk.
@@ -162,7 +159,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -304,7 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
e.printStackTrace();
throw e;
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexMod.java b/opends/src/server/org/opends/server/backends/jeb/IndexMod.java
index 8ab4a39..7a715fa 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexMod.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexMod.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/IndexModComparator.java b/opends/src/server/org/opends/server/backends/jeb/IndexModComparator.java
index ba46b36..c1ce029 100644
--- a/opends/src/server/org/opends/server/backends/jeb/IndexModComparator.java
+++ b/opends/src/server/org/opends/server/backends/jeb/IndexModComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/Indexer.java b/opends/src/server/org/opends/server/backends/jeb/Indexer.java
index c44acfd..d51248a 100644
--- a/opends/src/server/org/opends/server/backends/jeb/Indexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/Indexer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/JebException.java b/opends/src/server/org/opends/server/backends/jeb/JebException.java
index 124f82f..4c26544 100644
--- a/opends/src/server/org/opends/server/backends/jeb/JebException.java
+++ b/opends/src/server/org/opends/server/backends/jeb/JebException.java
@@ -22,13 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
/**
* This class defines an exception that may be thrown if a problem occurs in the
* JE backend database.
@@ -36,11 +33,6 @@
public class JebException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backend.je.JebException";
/**
@@ -70,7 +62,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
this.messageID = messageID;
}
@@ -89,8 +80,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
this.messageID = messageID;
}
@@ -103,7 +92,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/JebFormat.java b/opends/src/server/org/opends/server/backends/jeb/JebFormat.java
index c8b4180..6497f45 100644
--- a/opends/src/server/org/opends/server/backends/jeb/JebFormat.java
+++ b/opends/src/server/org/opends/server/backends/jeb/JebFormat.java
@@ -22,13 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1Exception;
@@ -57,11 +55,6 @@
*/
public class JebFormat
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.je.JebFormat";
/**
* The format version used by this class to encode and decode a DatabaseEntry.
@@ -92,7 +85,6 @@
static public byte[] decodeDatabaseEntry(byte[] bytes)
throws ASN1Exception,DataFormatException
{
- assert debugEnter(CLASS_NAME, "decodeDatabaseEntry", String.valueOf(bytes));
// FIXME: This array copy could be very costly on performance. We need to
// FIXME: find a faster way to implement this versioning feature.
@@ -165,7 +157,6 @@
static public Entry entryFromDatabase(byte[] bytes)
throws DirectoryException,ASN1Exception,LDAPException,DataFormatException
{
- assert debugEnter(CLASS_NAME, "entryFromDatabase", String.valueOf(bytes));
byte[] uncompressedBytes = decodeDatabaseEntry(bytes);
return decodeDirectoryServerEntry(uncompressedBytes);
@@ -185,8 +176,6 @@
static private Entry decodeDirectoryServerEntry(byte[] bytes)
throws DirectoryException,ASN1Exception,LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeDirectoryServerEntry",
- String.valueOf(bytes));
HashMap<ObjectClass, String> objectClasses;
HashMap<AttributeType, List<Attribute>> userAttributes =
@@ -272,8 +261,6 @@
*/
static public byte[] encodeDatabaseEntry(byte[] bytes, DataConfig dataConfig)
{
- assert debugEnter(CLASS_NAME, "encodeDatabaseEntry",
- String.valueOf(dataConfig));
int uncompressedSize = 0;
@@ -325,8 +312,6 @@
*/
static public byte[] entryToDatabase(Entry entry, DataConfig dataConfig)
{
- assert debugEnter(CLASS_NAME, "entryToDatabase",
- String.valueOf(dataConfig));
byte[] uncompressedBytes = encodeDirectoryServerEntry(entry);
return encodeDatabaseEntry(uncompressedBytes, dataConfig);
@@ -340,7 +325,6 @@
*/
static public byte[] entryToDatabase(Entry entry)
{
- assert debugEnter(CLASS_NAME, "entryToDatabase");
return entryToDatabase(entry, new DataConfig());
}
@@ -353,7 +337,6 @@
*/
static private byte[] encodeDirectoryServerEntry(Entry entry)
{
- assert debugEnter(CLASS_NAME, "encodeDirectoryServerEntry");
// Encode the DN (LDAPDN).
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
diff --git a/opends/src/server/org/opends/server/backends/jeb/Longs.java b/opends/src/server/org/opends/server/backends/jeb/Longs.java
index d944b52..2942bf0 100644
--- a/opends/src/server/org/opends/server/backends/jeb/Longs.java
+++ b/opends/src/server/org/opends/server/backends/jeb/Longs.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/MergeReader.java b/opends/src/server/org/opends/server/backends/jeb/MergeReader.java
index dc83026..4e86565 100644
--- a/opends/src/server/org/opends/server/backends/jeb/MergeReader.java
+++ b/opends/src/server/org/opends/server/backends/jeb/MergeReader.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/MergeValue.java b/opends/src/server/org/opends/server/backends/jeb/MergeValue.java
index 17fa2ba..c083a21 100644
--- a/opends/src/server/org/opends/server/backends/jeb/MergeValue.java
+++ b/opends/src/server/org/opends/server/backends/jeb/MergeValue.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/OctetStringKeyComparator.java b/opends/src/server/org/opends/server/backends/jeb/OctetStringKeyComparator.java
index 41770bb..bdc6bfc 100644
--- a/opends/src/server/org/opends/server/backends/jeb/OctetStringKeyComparator.java
+++ b/opends/src/server/org/opends/server/backends/jeb/OctetStringKeyComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java b/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
index 9209534..723367c 100644
--- a/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/OrderingIndexer.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.api.OrderingMatchingRule;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -47,11 +49,6 @@
*/
public class OrderingIndexer extends Indexer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.OrderingIndexer";
/**
@@ -270,7 +267,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "indexAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/PresenceIndexer.java b/opends/src/server/org/opends/server/backends/jeb/PresenceIndexer.java
index 72106c5..c345f8e 100644
--- a/opends/src/server/org/opends/server/backends/jeb/PresenceIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/PresenceIndexer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -43,11 +43,6 @@
*/
public class PresenceIndexer extends Indexer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.PresenceIndexer";
/**
diff --git a/opends/src/server/org/opends/server/backends/jeb/RootContainer.java b/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
index 61e450c..91f8cf2 100644
--- a/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/RootContainer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -46,11 +46,15 @@
import java.io.FilenameFilter;
import org.opends.server.monitors.DatabaseEnvironmentMonitor;
-import org.opends.server.types.*;
-import org.opends.server.loggers.Debug;
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.types.DN;
+import org.opends.server.types.ErrorLogCategory;
+import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.FilePermission;
import static org.opends.server.loggers.Error.logError;
-import static org.opends.server.loggers.Debug.debugException;
-import static org.opends.server.loggers.Debug.debugEnter;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.JebMessages.
MSGID_JEB_CACHE_SIZE_AFTER_PRELOAD;
@@ -71,11 +75,6 @@
*/
public class RootContainer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.RootContainer";
/**
* The JE database environment.
@@ -169,9 +168,10 @@
env = new Environment(backendDirectory,
envConfig);
- Debug.debugMessage(DebugLogCategory.BACKEND, DebugLogSeverity.INFO,
- CLASS_NAME, "initializeBackend",
- env.getConfig().toString());
+ if (debugEnabled())
+ {
+ debugInfo(env.getConfig().toString());
+ }
}
/**
@@ -365,7 +365,6 @@
*/
public void preload()
{
- assert debugEnter(CLASS_NAME, "preload");
long timeLimit = config.getPreloadTimeLimit();
@@ -425,7 +424,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "preload", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -440,7 +442,6 @@
private void cleanDatabase()
throws DatabaseException
{
- assert debugEnter(CLASS_NAME, "cleanDatabase");
int msgID;
String message;
@@ -611,9 +612,10 @@
config = newConfig;
- Debug.debugMessage(DebugLogCategory.BACKEND, DebugLogSeverity.INFO,
- CLASS_NAME, "applyNewConfiguration",
- env.getConfig().toString());
+ if (debugEnabled())
+ {
+ debugInfo(env.getConfig().toString());
+ }
}
/**
diff --git a/opends/src/server/org/opends/server/backends/jeb/SubstringIndexer.java b/opends/src/server/org/opends/server/backends/jeb/SubstringIndexer.java
index ed494c1..26c2bc6 100644
--- a/opends/src/server/org/opends/server/backends/jeb/SubstringIndexer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/SubstringIndexer.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import com.sleepycat.je.Transaction;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.types.Attribute;
@@ -46,11 +48,6 @@
*/
public class SubstringIndexer extends Indexer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.SubstringIndexer";
/**
@@ -203,7 +200,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "indexAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/VerifyConfig.java b/opends/src/server/org/opends/server/backends/jeb/VerifyConfig.java
index edab630..d1e7748 100644
--- a/opends/src/server/org/opends/server/backends/jeb/VerifyConfig.java
+++ b/opends/src/server/org/opends/server/backends/jeb/VerifyConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
diff --git a/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java b/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
index 68c53ac..c019715 100644
--- a/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
+++ b/opends/src/server/org/opends/server/backends/jeb/VerifyJob.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 - 2007 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.jeb;
@@ -55,7 +55,9 @@
import org.opends.server.util.StaticUtils;
import org.opends.server.util.ServerConstants;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.JebMessages.*;
@@ -75,11 +77,6 @@
*/
public class VerifyJob
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.VerifyJob";
/**
* The verify configuration.
@@ -448,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Entry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("Malformed id2entry ID %s.%n",
StaticUtils.bytesToHex(key.getData()));
@@ -464,7 +464,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Entry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("Malformed id2entry record for ID %d:%n%s%n",
entryID.longValue(),
@@ -553,7 +556,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "iterateDN2ID", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File dn2id has malformed key %s.%n",
StaticUtils.bytesToHex(key.getData()));
@@ -567,7 +573,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateDN2ID", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File dn2id has malformed ID for DN <%s>:%n%s%n",
dn.toNormalizedString(),
@@ -582,7 +591,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateDN2ID", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -643,7 +655,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File id2children has malformed ID %s%n",
StaticUtils.bytesToHex(key.getData()));
@@ -659,7 +674,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File id2children has malformed ID list " +
"for ID %s:%n%s%n",
@@ -679,7 +697,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -702,7 +723,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -766,7 +790,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Subtree", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File id2subtree has malformed ID %s%n",
StaticUtils.bytesToHex(key.getData()));
@@ -781,7 +808,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Subtree", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("File id2subtree has malformed ID list " +
"for ID %s:%n%s%n",
@@ -801,7 +831,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Subtree", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -824,7 +857,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateID2Subtree", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -949,7 +985,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateAttrIndex", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.printf("Malformed ID list: %s%n%s",
StaticUtils.bytesToHex(data.getData()),
@@ -1014,7 +1053,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "iterateAttrIndex", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
errorCount++;
System.err.println(e.getMessage());
continue;
@@ -1040,7 +1082,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "iterateAttrIndex", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1106,7 +1151,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "verifyDN2ID", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File dn2id has error reading key %s: %s.%n",
dn.toNormalizedString(),
e.getMessage());
@@ -1129,7 +1177,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "verifyDN2ID", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File dn2id has error reading key %s: %s.%n",
parentDN.toNormalizedString(),
e.getMessage());
@@ -1164,7 +1215,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "verifyID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File dn2id has error reading key %s: %s.",
parentDN.toNormalizedString(),
e.getMessage());
@@ -1190,7 +1244,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File id2children has error reading key %d: %s.",
parentID.longValue(), e.getMessage());
errorCount++;
@@ -1222,7 +1279,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "verifyID2Children", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File dn2id has error reading key %s: %s.%n",
dn.toNormalizedString(),
e.getMessage());
@@ -1248,7 +1308,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyID2Subtree", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("File id2subtree has error reading key %d: %s.%n",
id.longValue(), e.getMessage());
errorCount++;
@@ -1309,7 +1372,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "verifyAttrIndex", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("Error normalizing values of attribute %s in " +
"entry <%s>: %s.%n",
attrIndex.getAttributeType().toString(),
@@ -1360,7 +1426,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
keyDump(presenceIndex, presenceKey.getData()));
@@ -1399,7 +1468,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
keyDump(equalityIndex, normalizedBytes));
@@ -1434,7 +1506,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
keyDump(substringIndex, key.getData()));
@@ -1472,7 +1547,10 @@
}
catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "verifyAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
System.err.printf("Error reading database: %s%n%s",
e.getMessage(),
keyDump(orderingIndex, normalizedBytes));
@@ -1504,11 +1582,6 @@
*/
class ProgressTask extends TimerTask
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.jeb.VerifyJob.ProgressTask";
/**
* The number of records that had been processed at the time of the
@@ -1591,7 +1664,10 @@
}
catch (DatabaseException e)
{
- debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
diff --git a/opends/src/server/org/opends/server/backends/jeb/package-info.java b/opends/src/server/org/opends/server/backends/jeb/package-info.java
index 6c552ec..d6e0cdc 100644
--- a/opends/src/server/org/opends/server/backends/jeb/package-info.java
+++ b/opends/src/server/org/opends/server/backends/jeb/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/backends/package-info.java b/opends/src/server/org/opends/server/backends/package-info.java
index ee419f7..8bc15a4 100644
--- a/opends/src/server/org/opends/server/backends/package-info.java
+++ b/opends/src/server/org/opends/server/backends/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java b/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
index 1714d7d..13ff1d2 100644
--- a/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
+++ b/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.task;
diff --git a/opends/src/server/org/opends/server/backends/task/RecurringTask.java b/opends/src/server/org/opends/server/backends/task/RecurringTask.java
index 4494d6b..816af4b 100644
--- a/opends/src/server/org/opends/server/backends/task/RecurringTask.java
+++ b/opends/src/server/org/opends/server/backends/task/RecurringTask.java
@@ -43,7 +43,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +58,6 @@
*/
public class RecurringTask
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.task.RecurringTask";
@@ -98,8 +95,6 @@
public RecurringTask(TaskScheduler taskScheduler, Entry recurringTaskEntry)
throws DirectoryException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(taskScheduler),
- String.valueOf(recurringTaskEntry));
this.taskScheduler = taskScheduler;
this.recurringTaskEntry = recurringTaskEntry;
@@ -217,7 +212,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_RECURRINGTASK_CANNOT_LOAD_CLASS;
String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -236,7 +234,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_RECURRINGTASK_CANNOT_INSTANTIATE_CLASS_AS_TASK;
String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -254,7 +255,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "<init>", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
int msgID = MSGID_RECURRINGTASK_CANNOT_INITIALIZE_INTERNAL;
String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -275,7 +279,6 @@
*/
public String getRecurringTaskID()
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskID");
return recurringTaskID;
}
@@ -289,7 +292,6 @@
*/
public DN getRecurringTaskEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskEntryDN");
return recurringTaskEntryDN;
}
@@ -303,7 +305,6 @@
*/
public Entry getRecurringTaskEntry()
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskEntry");
return recurringTaskEntry;
}
@@ -319,7 +320,6 @@
*/
public String getTaskClassName()
{
- assert debugEnter(CLASS_NAME, "getTaskClassName");
return taskClassName;
}
@@ -333,7 +333,6 @@
*/
public Task scheduleNextIteration()
{
- assert debugEnter(CLASS_NAME, "scheduleNextIteration");
// NYI
return null;
diff --git a/opends/src/server/org/opends/server/backends/task/Task.java b/opends/src/server/org/opends/server/backends/task/Task.java
index e465ee4..4c16d94 100644
--- a/opends/src/server/org/opends/server/backends/task/Task.java
+++ b/opends/src/server/org/opends/server/backends/task/Task.java
@@ -54,8 +54,9 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import org.opends.server.messages.MessageHandler;
@@ -71,11 +72,6 @@
public abstract class Task
implements Comparable<Task>
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.task.Task";
@@ -146,8 +142,6 @@
Entry taskEntry)
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTaskInternal",
- String.valueOf(taskEntry));
this.taskScheduler = taskScheduler;
this.taskEntry = taskEntry;
@@ -223,7 +217,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTaskInternal", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASK_CANNOT_PARSE_SCHEDULED_START_TIME;
String message = getMessage(msgID, timeString, taskDN);
@@ -254,7 +251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTaskInternal", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASK_CANNOT_PARSE_ACTUAL_START_TIME;
String message = getMessage(msgID, timeString, taskDN);
@@ -285,7 +285,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTaskInternal", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASK_CANNOT_PARSE_COMPLETION_TIME;
String message = getMessage(msgID, timeString, taskDN);
@@ -343,9 +346,6 @@
private String getAttributeValue(String attributeName, boolean isRequired)
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "getAttributeValue",
- String.valueOf(attributeName),
- String.valueOf(isRequired));
List<Attribute> attrList =
taskEntry.getAttribute(attributeName.toLowerCase());
@@ -418,8 +418,6 @@
private LinkedList<String> getAttributeValues(String attributeName)
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "getAttributeValues",
- String.valueOf(attributeName));
LinkedList<String> valueStrings = new LinkedList<String>();
@@ -455,7 +453,6 @@
*/
public final DN getTaskEntryDN()
{
- assert debugEnter(CLASS_NAME, "getTaskEntryDN");
return taskEntryDN;
}
@@ -469,7 +466,6 @@
*/
public final Entry getTaskEntry()
{
- assert debugEnter(CLASS_NAME, "getTaskEntry");
return taskEntry;
}
@@ -489,7 +485,6 @@
*/
public final Operation getOperation()
{
- assert debugEnter(CLASS_NAME, "getOperation");
return operation;
}
@@ -503,7 +498,6 @@
*/
public final void setOperation(Operation operation)
{
- assert debugEnter(CLASS_NAME, "setOperation", String.valueOf(operation));
this.operation = operation;
}
@@ -517,7 +511,6 @@
*/
public final String getTaskID()
{
- assert debugEnter(CLASS_NAME, "getTaskID");
return taskID;
}
@@ -534,7 +527,6 @@
*/
public final String getRecurringTaskID()
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskID");
return recurringTaskID;
}
@@ -548,7 +540,6 @@
*/
public final TaskState getTaskState()
{
- assert debugEnter(CLASS_NAME, "getTaskState");
return taskState;
}
@@ -564,7 +555,6 @@
*/
void setTaskState(TaskState taskState)
{
- assert debugEnter(CLASS_NAME, "setTaskState", String.valueOf(taskState));
Lock lock = taskScheduler.writeLockEntry(taskEntryDN);
@@ -607,7 +597,6 @@
*/
public final long getScheduledStartTime()
{
- assert debugEnter(CLASS_NAME, "getStartTime");
return scheduledStartTime;
}
@@ -624,7 +613,6 @@
*/
public final long getActualStartTime()
{
- assert debugEnter(CLASS_NAME, "getActualStartTime");
return actualStartTime;
}
@@ -640,8 +628,6 @@
*/
private void setActualStartTime(long actualStartTime)
{
- assert debugEnter(CLASS_NAME, "setActualStartTime",
- String.valueOf(actualStartTime));
Lock lock = taskScheduler.writeLockEntry(taskEntryDN);
@@ -689,7 +675,6 @@
*/
public final long getCompletionTime()
{
- assert debugEnter(CLASS_NAME, "getCompletionTime");
return completionTime;
}
@@ -705,8 +690,6 @@
*/
private void setCompletionTime(long completionTime)
{
- assert debugEnter(CLASS_NAME, "setCompletionTime",
- String.valueOf(completionTime));
Lock lock = taskScheduler.writeLockEntry(taskEntryDN);
@@ -751,7 +734,6 @@
*/
public final LinkedList<String> getDependencyIDs()
{
- assert debugEnter(CLASS_NAME, "getDependencyIDs");
return dependencyIDs;
}
@@ -767,7 +749,6 @@
*/
public final FailedDependencyAction getFailedDependencyAction()
{
- assert debugEnter(CLASS_NAME, "getFailedDependencyAction");
return failedDependencyAction;
}
@@ -787,7 +768,6 @@
*/
public final LinkedList<String> getNotifyOnCompletionAddresses()
{
- assert debugEnter(CLASS_NAME, "getNotifyOnCompletionAddresses");
return notifyOnCompletion;
}
@@ -805,7 +785,6 @@
*/
public final LinkedList<String> getNotifyOnErrorAddresses()
{
- assert debugEnter(CLASS_NAME, "getNotifyOnErrorAddresses");
return notifyOnError;
}
@@ -820,7 +799,6 @@
*/
public final LinkedList<String> getLogMessages()
{
- assert debugEnter(CLASS_NAME, "getLogMessages");
return logMessages;
}
@@ -912,9 +890,6 @@
void addLogMessage(ErrorLogSeverity severity, int messageID,
String messageString)
{
- assert debugEnter(CLASS_NAME, "addLogMessage",
- String.valueOf(severity), String.valueOf(messageID),
- String.valueOf(messageString));
Lock lock = taskScheduler.writeLockEntry(taskEntryDN);
@@ -997,7 +972,6 @@
*/
public final int compareTo(Task task)
{
- assert debugEnter(CLASS_NAME, "compareTo", String.valueOf(task));
if (completionTime > 0)
{
@@ -1090,7 +1064,6 @@
*/
public final TaskState execute()
{
- assert debugEnter(CLASS_NAME, "execute");
setActualStartTime(TimeThread.getTime());
setTaskState(TaskState.RUNNING);
@@ -1103,7 +1076,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "execute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setTaskState(TaskState.STOPPED_BY_ERROR);
@@ -1138,7 +1114,6 @@
public void initializeTask()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// No action is performed by default.
}
@@ -1167,7 +1142,6 @@
*/
public void interruptTask(TaskState interruptState, String interruptReason)
{
- assert debugEnter(CLASS_NAME, "interruptTask");
// No action is performed by default.
}
diff --git a/opends/src/server/org/opends/server/backends/task/TaskBackend.java b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
index df42928..d45975b 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskBackend.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -65,8 +65,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -83,11 +84,6 @@
extends Backend
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.task.TaskBackend";
@@ -161,7 +157,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Perform all initialization in initializeBackend.
@@ -188,8 +183,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// Make sure that a configuration entry was provided. If not, then we will
@@ -232,7 +225,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
int msgID = MSGID_TASKBE_CANNOT_DECODE_RECURRING_TASK_BASE_DN;
@@ -250,7 +246,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
int msgID = MSGID_TASKBE_CANNOT_DECODE_SCHEDULED_TASK_BASE_DN;
@@ -285,7 +284,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_TASKBE_CANNOT_INITIALIZE_RETENTION_TIME;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -314,7 +316,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_TASKBE_CANNOT_INITIALIZE_BACKING_FILE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -343,7 +348,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_BACKEND_CANNOT_REGISTER_BASEDN;
String message = getMessage(msgID, taskRootDN.toString(),
@@ -367,7 +375,6 @@
*/
public void finalizeBackend()
{
- assert debugEnter(CLASS_NAME, "finalizeBackend");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -379,7 +386,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -392,7 +402,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -401,7 +414,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -414,7 +430,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -426,7 +441,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
if (taskScheduler != null)
{
@@ -449,7 +463,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// For the purposes of this method, this is a local backend.
return true;
@@ -471,7 +484,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
if (entryDN == null)
@@ -534,7 +546,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
if (entryDN == null)
@@ -586,8 +597,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
// Get the DN for the entry and then get its parent.
@@ -603,7 +612,6 @@
msgID);
}
-
// If the parent DN is equal to the parent for scheduled tasks, then try to
// treat the provided entry like a scheduled task.
if (parentDN.equals(scheduledTaskParentDN))
@@ -613,7 +621,6 @@
return;
}
-
// If the parent DN is equal to the parent for recurring tasks, then try to
// treat the provided entry like a recurring task.
if (parentDN.equals(recurringTaskParentDN))
@@ -623,7 +630,6 @@
return;
}
-
// We won't allow the entry to be added.
int msgID = MSGID_TASKBE_ADD_DISALLOWED_DN;
String message = getMessage(msgID, String.valueOf(scheduledTaskParentDN),
@@ -651,8 +657,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
// Get the parent for the provided entry DN. It must be either the
@@ -740,8 +744,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
// FIXME -- We need to support this.
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
@@ -770,8 +772,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
int msgID = MSGID_TASKBE_MODIFY_DN_NOT_SUPPORTED;
@@ -799,7 +799,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException, CancelledOperationException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
// Look at the base DN and scope for the search operation to decide which
@@ -1020,7 +1019,6 @@
*/
public HashSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControls;
}
@@ -1034,7 +1032,6 @@
*/
public HashSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return supportedFeatures;
}
@@ -1050,7 +1047,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
// LDIF exports are supported.
return true;
@@ -1075,7 +1071,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
// FIXME -- Implement support for exporting to LDIF.
@@ -1092,7 +1087,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
// This backend does not support LDIF imports.
return false;
@@ -1117,7 +1111,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
// This backend does not support LDIF imports.
@@ -1142,7 +1135,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does provide a backup/restore mechanism.
return true;
@@ -1168,7 +1160,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// This backend does provide a backup/restore mechanism.
@@ -1193,7 +1184,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup", String.valueOf(backupConfig));
// NYI -- Create the backup.
@@ -1217,9 +1207,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// NYI -- Remove the backup.
@@ -1235,7 +1222,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// This backend does provide a backup/restore mechanism.
@@ -1261,8 +1247,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup",
- String.valueOf(restoreConfig));
// NYI -- Restore the backup.
@@ -1279,7 +1263,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1295,7 +1278,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1333,8 +1315,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configIsAcceptable = true;
@@ -1395,7 +1375,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKBE_ERROR_GETTING_BACKING_FILE;
unacceptableReasons.add(getMessage(msgID, ATTR_TASK_BACKING_FILE,
@@ -1424,7 +1407,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKBE_ERROR_GETTING_RETENTION_TIME;
unacceptableReasons.add(getMessage(msgID, ATTR_TASK_RETENTION_TIME,
@@ -1458,9 +1444,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1522,7 +1505,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKBE_ERROR_GETTING_BACKING_FILE;
messages.add(getMessage(msgID, ATTR_TASK_BACKING_FILE,
@@ -1560,7 +1546,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKBE_ERROR_GETTING_RETENTION_TIME;
messages.add(getMessage(msgID, ATTR_TASK_RETENTION_TIME,
@@ -1608,7 +1597,6 @@
*/
public DN getConfigEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigEntryDN");
return configEntryDN;
}
@@ -1624,7 +1612,6 @@
*/
public String getTaskBackingFile()
{
- assert debugEnter(CLASS_NAME, "getTaskBackingFile");
File f = getFileForPath(taskBackingFile);
return f.getPath();
@@ -1641,7 +1628,6 @@
*/
public long getRetentionTime()
{
- assert debugEnter(CLASS_NAME, "getRetentionTime");
return retentionTime;
}
@@ -1657,7 +1643,6 @@
*/
public DN getTaskRootDN()
{
- assert debugEnter(CLASS_NAME, "getTaskRootDN");
return taskRootDN;
}
@@ -1673,7 +1658,6 @@
*/
public DN getRecurringTasksParentDN()
{
- assert debugEnter(CLASS_NAME, "getRecurringTasksParentDN");
return recurringTaskParentDN;
}
@@ -1689,7 +1673,6 @@
*/
public DN getScheduledTasksParentDN()
{
- assert debugEnter(CLASS_NAME, "getScheduledTasksParentDN");
return scheduledTaskParentDN;
}
@@ -1706,8 +1689,6 @@
*/
public Task getScheduledTask(DN taskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getScheduledTask",
- String.valueOf(taskEntryDN));
return taskScheduler.getScheduledTask(taskEntryDN);
}
@@ -1725,8 +1706,6 @@
*/
public RecurringTask getRecurringTask(DN taskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getScheduledTask",
- String.valueOf(taskEntryDN));
return taskScheduler.getRecurringTask(taskEntryDN);
}
diff --git a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
index db0c213..d422ee1 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskScheduler.java
@@ -66,8 +66,10 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -85,7 +87,7 @@
implements AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.backends.task.TaskScheduler";
@@ -165,7 +167,6 @@
{
super("Task Scheduler Thread");
- assert debugConstructor(CLASS_NAME, String.valueOf(taskBackend));
this.taskBackend = taskBackend;
@@ -208,9 +209,6 @@
boolean scheduleIteration)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addRecurringTask",
- String.valueOf(recurringTask),
- String.valueOf(scheduleIteration));
schedulerLock.lock();
@@ -262,8 +260,6 @@
public RecurringTask removeRecurringTask(String recurringTaskID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeRecurringTask",
- String.valueOf(recurringTaskID));
schedulerLock.lock();
@@ -315,7 +311,6 @@
public void scheduleTask(Task task, boolean writeState)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "scheduleTask", String.valueOf(task));
schedulerLock.lock();
@@ -386,7 +381,6 @@
*/
public Task cancelTask(String taskID)
{
- assert debugEnter(CLASS_NAME, "cancelTask", String.valueOf(taskID));
schedulerLock.lock();
@@ -430,7 +424,6 @@
public Task removePendingTask(String taskID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removePendingTask", String.valueOf(taskID));
schedulerLock.lock();
@@ -479,8 +472,6 @@
public Task removeCompletedTask(String taskID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeCompletedTask",
- String.valueOf(taskID));
schedulerLock.lock();
@@ -526,7 +517,6 @@
*/
public boolean threadDone(TaskThread taskThread, Task completedTask)
{
- assert debugEnter(CLASS_NAME, "threadDone", String.valueOf(taskThread));
schedulerLock.lock();
@@ -573,7 +563,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "threadDone", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_TASKSCHED_ERROR_SCHEDULING_RECURRING_ITERATION;
String message = getMessage(msgID, recurringTaskID,
@@ -620,8 +613,6 @@
*/
public void addCompletedTask(Task completedTask)
{
- assert debugEnter(CLASS_NAME, "addCompletedTask",
- String.valueOf(completedTask));
// The scheduler lock is reentrant, so even if we already hold it, we can
// acquire it again.
@@ -648,7 +639,6 @@
*/
public void stopScheduler()
{
- assert debugEnter(CLASS_NAME, "stopScheduler");
stopRequested = true;
@@ -658,7 +648,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stopScheduler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -667,7 +660,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stopScheduler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
pendingTasks.clear();
@@ -699,8 +695,6 @@
public void interruptRunningTasks(TaskState interruptState,
String interruptReason, boolean waitForStop)
{
- assert debugEnter(CLASS_NAME, "interruptRunningTasks",
- String.valueOf(waitForStop));
// Grab a copy of the running threads so that we can operate on them without
@@ -729,7 +723,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "interruptRunningTasks", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -745,7 +742,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "interruptRunningTasks", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -759,7 +759,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
isRunning = true;
schedulerThread = currentThread();
@@ -887,7 +886,6 @@
*/
private TaskState shouldStart(Task task)
{
- assert debugEnter(CLASS_NAME, "shouldStart", String.valueOf(task));
if (! isRunning)
{
@@ -929,7 +927,6 @@
private void initializeTasksFromBackingFile()
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTasksFromBackingFile");
String backingFilePath = taskBackend.getTaskBackingFile();
@@ -960,8 +957,10 @@
}
catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "initializeTasksFromBackingFile",
- le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
if (le.canContinueReading())
{
@@ -981,8 +980,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "initializeTasksFromBackingFile", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_TASKSCHED_CANNOT_PARSE_ENTRY_FATAL;
@@ -1030,8 +1031,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME,
- "initializeTasksFromBackingFile", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID =
MSGID_TASKSCHED_CANNOT_SCHEDULE_RECURRING_TASK_FROM_ENTRY;
@@ -1057,8 +1060,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME,
- "initializeTasksFromBackingFile", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_SCHEDULE_TASK_FROM_ENTRY;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1082,7 +1087,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "initializeTasksFromBackingFile", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
int msgID = MSGID_TASKSCHED_ERROR_READING_TASK_BACKING_FILE;
String message = getMessage(msgID, String.valueOf(backingFilePath),
@@ -1104,7 +1112,6 @@
private void createNewTaskBackingFile()
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "createNewTaskBackingFile");
String backingFile = taskBackend.getTaskBackingFile();
LDIFExportConfig exportConfig =
@@ -1138,7 +1145,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "createNewTaskBackingFile", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_CREATE_BACKING_FILE;
String message = getMessage(msgID, backingFile,
@@ -1147,7 +1157,10 @@
}
catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "createNewTaskBackingFile", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_CREATE_BACKING_FILE;
@@ -1163,7 +1176,6 @@
*/
public void writeState()
{
- assert debugEnter(CLASS_NAME, "writeState");
String backingFilePath = taskBackend.getTaskBackingFile();
@@ -1218,7 +1230,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeState", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -1233,7 +1248,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeState", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_RENAME_CURRENT_BACKING_FILE;
String message = getMessage(msgID, String.valueOf(backingFilePath),
@@ -1256,7 +1274,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeState", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_RENAME_NEW_BACKING_FILE;
String message = getMessage(msgID, String.valueOf(tmpFilePath),
@@ -1272,7 +1293,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "createNewTaskBackingFile", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_WRITE_BACKING_FILE;
String message = getMessage(msgID, tmpFilePath,
@@ -1285,7 +1309,10 @@
}
catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "createNewTaskBackingFile", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_WRITE_BACKING_FILE;
@@ -1298,7 +1325,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createNewTaskBackingFile", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_WRITE_BACKING_FILE;
String message = getMessage(msgID, tmpFilePath,
@@ -1324,7 +1354,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
schedulerLock.lock();
@@ -1349,7 +1378,6 @@
*/
public Entry getTaskRootEntry()
{
- assert debugEnter(CLASS_NAME, "getTaskRootEntry");
return taskRootEntry;
}
@@ -1365,7 +1393,6 @@
*/
public Entry getScheduledTaskParentEntry()
{
- assert debugEnter(CLASS_NAME, "getScheduledTaskParentEntry");
return scheduledTaskParentEntry;
}
@@ -1381,7 +1408,6 @@
*/
public Entry getRecurringTaskParentEntry()
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskParentEntry");
return recurringTaskParentEntry;
}
@@ -1398,7 +1424,6 @@
*/
public Task getScheduledTask(String taskID)
{
- assert debugEnter(CLASS_NAME, "getScheduledTask", String.valueOf(taskID));
schedulerLock.lock();
@@ -1425,8 +1450,6 @@
*/
public Task getScheduledTask(DN taskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getScheduledTask",
- String.valueOf(taskEntryDN));
schedulerLock.lock();
@@ -1460,7 +1483,6 @@
*/
Lock writeLockEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "lockEntry", String.valueOf(entryDN));
Lock lock = LockManager.lockWrite(entryDN);
while (lock == null)
@@ -1486,7 +1508,6 @@
Lock readLockEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "lockEntry", String.valueOf(entryDN));
Lock lock = LockManager.lockRead(entryDN);
for (int i=0; ((lock == null) && (i < 4)); i++)
@@ -1517,8 +1538,6 @@
*/
void unlockEntry(DN entryDN, Lock lock)
{
- assert debugEnter(CLASS_NAME, "unlockEntry", String.valueOf(entryDN),
- String.valueOf(lock));
LockManager.unlock(entryDN, lock);
}
@@ -1537,8 +1556,6 @@
*/
public Entry getScheduledTaskEntry(DN scheduledTaskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getScheduledTaskEntry",
- String.valueOf(scheduledTaskEntryDN));
schedulerLock.lock();
@@ -1584,8 +1601,6 @@
public boolean searchScheduledTasks(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "searchScheduledTasks",
- String.valueOf(searchOperation));
SearchFilter filter = searchOperation.getFilter();
@@ -1636,8 +1651,6 @@
*/
public RecurringTask getRecurringTask(String recurringTaskID)
{
- assert debugEnter(CLASS_NAME, "getRecurringTask",
- String.valueOf(recurringTaskID));
schedulerLock.lock();
@@ -1664,8 +1677,6 @@
*/
public RecurringTask getRecurringTask(DN recurringTaskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getRecurringTask",
- String.valueOf(recurringTaskEntryDN));
schedulerLock.lock();
@@ -1701,8 +1712,6 @@
*/
public Entry getRecurringTaskEntry(DN recurringTaskEntryDN)
{
- assert debugEnter(CLASS_NAME, "getRecurringTaskEntry",
- String.valueOf(recurringTaskEntryDN));
schedulerLock.lock();
@@ -1748,8 +1757,6 @@
public boolean searchRecurringTasks(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "searchRecurringTasks",
- String.valueOf(searchOperation));
SearchFilter filter = searchOperation.getFilter();
@@ -1805,8 +1812,6 @@
public Task entryToScheduledTask(Entry entry, Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryToScheduledTask",
- String.valueOf(entry));
// Get the name of the class that implements the task logic.
@@ -1866,7 +1871,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "entryToScheduledTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_LOAD_CLASS;
String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -1885,7 +1893,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "entryToScheduledTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_INSTANTIATE_CLASS_AS_TASK;
String message = getMessage(msgID, String.valueOf(taskClassName));
@@ -1901,7 +1912,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "entryToScheduledTask", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
int msgID = MSGID_TASKSCHED_CANNOT_INITIALIZE_INTERNAL;
String message = getMessage(msgID, String.valueOf(taskClassName),
@@ -1941,8 +1955,6 @@
public RecurringTask entryToRecurringTask(Entry entry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryToRecurringTask",
- String.valueOf(entry));
return new RecurringTask(this, entry);
}
@@ -1958,7 +1970,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return taskBackend.getConfigEntryDN();
}
@@ -1974,7 +1985,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -1993,7 +2003,6 @@
*/
public LinkedHashMap<String,String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>();
diff --git a/opends/src/server/org/opends/server/backends/task/TaskState.java b/opends/src/server/org/opends/server/backends/task/TaskState.java
index 6a31391..9d2f57b 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskState.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskState.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.task;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This enumeration defines the various states that a task can have during its
* lifetime.
@@ -126,11 +121,6 @@
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.task.TaskState";
@@ -145,7 +135,7 @@
*/
public static boolean isPending(TaskState taskState)
{
- assert debugEnter(CLASS_NAME, "isPending", String.valueOf(taskState));
+
switch (taskState)
{
@@ -170,7 +160,7 @@
*/
public static boolean isRunning(TaskState taskState)
{
- assert debugEnter(CLASS_NAME, "isRunning", String.valueOf(taskState));
+
switch (taskState)
{
@@ -196,7 +186,7 @@
*/
public static boolean isDone(TaskState taskState)
{
- assert debugEnter(CLASS_NAME, "isDone", String.valueOf(taskState));
+
switch (taskState)
{
@@ -224,7 +214,7 @@
*/
public static boolean isSuccessful(TaskState taskState)
{
- assert debugEnter(CLASS_NAME, "isDone", String.valueOf(taskState));
+
switch (taskState)
{
diff --git a/opends/src/server/org/opends/server/backends/task/TaskThread.java b/opends/src/server/org/opends/server/backends/task/TaskThread.java
index f8c758a..c2e39a4 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskThread.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.backends.task;
@@ -31,7 +31,9 @@
import org.opends.server.api.DirectoryThread;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -46,11 +48,6 @@
public class TaskThread
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.backends.task.TaskThread";
@@ -83,8 +80,6 @@
{
super("Task Thread " + threadID);
- assert debugConstructor(CLASS_NAME, String.valueOf(taskScheduler),
- String.valueOf(threadID));
this.taskScheduler = taskScheduler;
this.threadID = threadID;
@@ -105,7 +100,6 @@
*/
public Task getTask()
{
- assert debugEnter(CLASS_NAME, "getTask");
return task;
}
@@ -120,7 +114,6 @@
*/
public void setTask(Task task)
{
- assert debugEnter(CLASS_NAME, "setTask", String.valueOf(task));
this.task = task;
@@ -145,7 +138,6 @@
public void interruptTask(TaskState interruptState, String interruptReason,
boolean exitThread)
{
- assert debugEnter(CLASS_NAME, "interruptTask", String.valueOf(exitThread));
if (task != null)
{
@@ -155,7 +147,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "interruptTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -173,7 +168,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
while (! exitRequested)
{
@@ -188,7 +182,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "run", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
}
continue;
@@ -201,7 +198,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TASK_EXECUTE_FAILED;
String message = getMessage(msgID,
diff --git a/opends/src/server/org/opends/server/backends/task/package-info.java b/opends/src/server/org/opends/server/backends/task/package-info.java
index 2731f91..a80fb4b 100644
--- a/opends/src/server/org/opends/server/backends/task/package-info.java
+++ b/opends/src/server/org/opends/server/backends/task/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/config/BooleanConfigAttribute.java b/opends/src/server/org/opends/server/config/BooleanConfigAttribute.java
index d30a33d..5d13800 100644
--- a/opends/src/server/org/opends/server/config/BooleanConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/BooleanConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -43,7 +43,6 @@
import org.opends.server.types.AttributeValue;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -59,11 +58,6 @@
public class BooleanConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.BooleanConfigAttribute";
@@ -92,9 +86,6 @@
{
super(name, description, true, false, requiresAdminAction);
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction));
}
@@ -119,11 +110,6 @@
super(name, description, true, false, requiresAdminAction,
getValueSet(value));
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(value));
-
activeValue = value;
pendingValue = value;
}
@@ -152,11 +138,6 @@
super(name, description, true, false, requiresAdminAction,
getValueSet(activeValue), true, getValueSet(pendingValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(activeValue),
- String.valueOf(pendingValue));
this.activeValue = activeValue;
this.pendingValue = pendingValue;
@@ -174,7 +155,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "Boolean";
}
@@ -188,7 +168,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME,"getSyntax");
return DirectoryServer.getDefaultBooleanSyntax();
}
@@ -202,7 +181,6 @@
*/
public boolean activeValue()
{
- assert debugEnter(CLASS_NAME, "booleanValue");
return activeValue;
}
@@ -217,7 +195,6 @@
*/
public boolean pendingValue()
{
- assert debugEnter(CLASS_NAME, "booleanValue");
if (hasPendingValues())
{
@@ -238,8 +215,6 @@
*/
public void setValue(boolean booleanValue)
{
- assert debugEnter(CLASS_NAME, "setValue",
- String.valueOf(booleanValue));
if (requiresAdminAction())
{
@@ -264,7 +239,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(boolean booleanValue)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(booleanValue));
LinkedHashSet<AttributeValue> valueSet =
new LinkedHashSet<AttributeValue>(1);
@@ -291,7 +265,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -319,8 +292,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String stringValue = value.getStringValue();
if (stringValue.equalsIgnoreCase(CONFIG_VALUE_TRUE) ||
@@ -360,9 +331,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -413,7 +381,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
ArrayList<String> valueStrings = new ArrayList<String>(1);
valueStrings.add(String.valueOf(activeValue));
@@ -436,7 +403,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -477,8 +443,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
boolean activeValue = false;
@@ -644,7 +608,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
return new javax.management.Attribute(getName(), activeValue);
}
@@ -677,8 +640,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
attributeList.add(new javax.management.Attribute(getName(), activeValue));
@@ -705,8 +666,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
attributeInfoList.add(new MBeanAttributeInfo(getName(),
Boolean.class.getName(),
@@ -734,7 +693,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
return new MBeanParameterInfo(getName(), Boolean.TYPE.getName(),
getDescription());
@@ -756,7 +714,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value instanceof Boolean)
@@ -801,7 +758,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new BooleanConfigAttribute(getName(), getDescription(),
requiresAdminAction(), activeValue,
diff --git a/opends/src/server/org/opends/server/config/ConfigAttribute.java b/opends/src/server/org/opends/server/config/ConfigAttribute.java
index 1645959..c8c1d2f 100644
--- a/opends/src/server/org/opends/server/config/ConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/ConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -39,7 +39,6 @@
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeValue;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -52,11 +51,6 @@
*/
public abstract class ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.ConfigAttribute";
@@ -109,11 +103,6 @@
protected ConfigAttribute(String name, String description, boolean isRequired,
boolean isMultiValued, boolean requiresAdminAction)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(requiresAdminAction));
this.name = name;
@@ -149,16 +138,6 @@
boolean isMultiValued, boolean requiresAdminAction,
LinkedHashSet<AttributeValue> activeValues)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(requiresAdminAction),
- String.valueOf(activeValues)
- });
this.name = name;
@@ -212,18 +191,6 @@
boolean hasPendingValues,
LinkedHashSet<AttributeValue> pendingValues)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(requiresAdminAction),
- String.valueOf(activeValues),
- String.valueOf(hasPendingValues),
- String.valueOf(pendingValues)
- });
this.name = name;
@@ -268,7 +235,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return name;
}
@@ -283,7 +249,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -320,7 +285,6 @@
*/
public boolean isRequired()
{
- assert debugEnter(CLASS_NAME, "isRequired");
return isRequired;
}
@@ -335,7 +299,6 @@
*/
public boolean isMultiValued()
{
- assert debugEnter(CLASS_NAME, "isMultiValued");
return isMultiValued;
}
@@ -352,7 +315,6 @@
*/
public boolean requiresAdminAction()
{
- assert debugEnter(CLASS_NAME, "requiresAdminAction");
return requiresAdminAction;
}
@@ -367,7 +329,6 @@
*/
public LinkedHashSet<AttributeValue> getActiveValues()
{
- assert debugEnter(CLASS_NAME, "getActiveValues");
return activeValues;
}
@@ -384,7 +345,6 @@
*/
public boolean hasPendingValues()
{
- assert debugEnter(CLASS_NAME, "hasPendingValues");
return hasPendingValues;
}
@@ -402,7 +362,6 @@
*/
public LinkedHashSet<AttributeValue> getPendingValues()
{
- assert debugEnter(CLASS_NAME, "getPendingValues");
if (requiresAdminAction)
{
@@ -450,7 +409,6 @@
protected void setValues(LinkedHashSet<AttributeValue> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
// If no values are provided, then check to see if this is a required
@@ -563,8 +521,6 @@
*/
protected void setActiveValues(LinkedHashSet<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "setActiveValues",
- String.valueOf(values));
activeValues = values;
}
@@ -580,8 +536,6 @@
*/
protected void setPendingValues(LinkedHashSet<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "setPendingValues",
- String.valueOf(values));
pendingValues = values;
hasPendingValues = true;
@@ -604,7 +558,6 @@
protected void addValues(List<AttributeValue> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "addValues", String.valueOf(values));
// If there are no values provided, then do nothing.
@@ -703,7 +656,6 @@
protected void removeValues(List<AttributeValue> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "removeValues", String.valueOf(values));
// Create a temporary set of values that we will use for this change. It
@@ -773,7 +725,6 @@
protected void removeAllValues()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "removeAllValues");
if (isRequired)
{
@@ -818,7 +769,6 @@
*/
public void setInitialValues(LinkedHashSet<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "setInitialValues");
if (values == null)
{
@@ -839,7 +789,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (hasPendingValues)
{
diff --git a/opends/src/server/org/opends/server/config/ConfigConstants.java b/opends/src/server/org/opends/server/config/ConfigConstants.java
index 3a30ab5..c81b283 100644
--- a/opends/src/server/org/opends/server/config/ConfigConstants.java
+++ b/opends/src/server/org/opends/server/config/ConfigConstants.java
@@ -3885,5 +3885,27 @@
*/
public static final String ATTR_TASK_ADDSCHEMAFILE_FILENAME =
NAME_PREFIX_TASK + "schema-file-name";
+
+
+ /**
+ * The name of the attribute in a debug target configuration for a debug
+ * logger that specifies the scope of the debug target.
+ */
+ public static final String ATTR_LOGGER_DEBUG_SCOPE =
+ NAME_PREFIX_TASK + "debug-scope";
+
+ /**
+ * The name of the attribute in a logger configuration that spcifies the
+ * log level.
+ */
+ public static final String ATTR_LOGGER_LEVEL =
+ NAME_PREFIX_TASK + "log-level";
+
+ /**
+ * The name of the attribute in a logger configuration that specifies
+ * whether to asyncornously writes log records to disk.
+ */
+ public static final String ATTR_LOGGER_ASYNC_WRITE =
+ NAME_PREFIX_TASK + "async-write";
}
diff --git a/opends/src/server/org/opends/server/config/ConfigEntry.java b/opends/src/server/org/opends/server/config/ConfigEntry.java
index 6260b40..67c908a 100644
--- a/opends/src/server/org/opends/server/config/ConfigEntry.java
+++ b/opends/src/server/org/opends/server/config/ConfigEntry.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -44,9 +44,11 @@
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.ObjectClass;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -60,11 +62,6 @@
*/
public class ConfigEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.ConfigEntry";
@@ -101,8 +98,6 @@
*/
public ConfigEntry(Entry entry, ConfigEntry parent)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(entry),
- String.valueOf(parent));
this.entry = entry;
this.parent = parent;
@@ -123,7 +118,6 @@
*/
public Entry getEntry()
{
- assert debugEnter(CLASS_NAME, "getEntry");
return entry;
}
@@ -142,7 +136,6 @@
*/
public void setEntry(Entry entry)
{
- assert debugEnter(CLASS_NAME, "setEntry", String.valueOf(entry));
entryLock.lock();
@@ -165,7 +158,6 @@
*/
public DN getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return entry.getDN();
}
@@ -184,7 +176,6 @@
*/
public boolean hasObjectClass(String name)
{
- assert debugEnter(CLASS_NAME, "hasObjectClass", String.valueOf(name));
ObjectClass oc = DirectoryServer.getObjectClass(name.toLowerCase());
if (oc == null)
@@ -215,7 +206,6 @@
public ConfigAttribute getConfigAttribute(ConfigAttribute stub)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute", String.valueOf(stub));
String attrName = stub.getName();
AttributeType attrType =
@@ -246,8 +236,6 @@
*/
public void putConfigAttribute(ConfigAttribute attribute)
{
- assert debugEnter(CLASS_NAME, "putConfigAttribute",
- String.valueOf(attribute));
String name = attribute.getName();
AttributeType attrType =
@@ -285,8 +273,6 @@
*/
public boolean removeConfigAttribute(String lowerName)
{
- assert debugEnter(CLASS_NAME, "removeConfigAttribute",
- String.valueOf(lowerName));
for (AttributeType t : entry.getUserAttributes().keySet())
{
@@ -321,7 +307,6 @@
*/
public ConfigEntry getParent()
{
- assert debugEnter(CLASS_NAME, "getParent");
return parent;
}
@@ -336,7 +321,6 @@
*/
public ConcurrentHashMap<DN,ConfigEntry> getChildren()
{
- assert debugEnter(CLASS_NAME, "getChildren");
return children;
}
@@ -351,7 +335,6 @@
*/
public boolean hasChildren()
{
- assert debugEnter(CLASS_NAME, "hasChildren");
return (! children.isEmpty());
}
@@ -374,7 +357,6 @@
public void addChild(ConfigEntry childEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "addChild", String.valueOf(childEntry));
ConfigEntry conflictingChild;
@@ -387,7 +369,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "addChild", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
conflictingChild = null;
}
@@ -424,7 +409,6 @@
public ConfigEntry removeChild(DN childDN)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "removeChild", String.valueOf(childDN));
entryLock.lock();
@@ -456,9 +440,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "removeChild", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_CONFIG_ENTRY_CANNOT_REMOVE_CHILD;
+ int msgID = MSGID_CONFIG_ENTRY_CANNOT_REMOVE_CHILD;
String message = getMessage(msgID, String.valueOf(childDN),
String.valueOf(entry.getDN()),
stackTraceToSingleLineString(e));
@@ -486,7 +473,6 @@
*/
public ConfigEntry duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new ConfigEntry(entry.duplicate(), parent);
}
@@ -502,7 +488,6 @@
*/
public CopyOnWriteArrayList<ConfigChangeListener> getChangeListeners()
{
- assert debugEnter(CLASS_NAME, "getChangeListeners");
return changeListeners;
}
@@ -518,8 +503,6 @@
*/
public void registerChangeListener(ConfigChangeListener listener)
{
- assert debugEnter(CLASS_NAME, "registerChangeListener",
- String.valueOf(listener));
changeListeners.add(listener);
}
@@ -537,8 +520,6 @@
*/
public boolean deregisterChangeListener(ConfigChangeListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterChangeListener",
- String.valueOf(listener));
return changeListeners.remove(listener);
}
@@ -554,7 +535,6 @@
*/
public CopyOnWriteArrayList<ConfigAddListener> getAddListeners()
{
- assert debugEnter(CLASS_NAME, "getAddListeners");
return addListeners;
}
@@ -569,8 +549,6 @@
*/
public void registerAddListener(ConfigAddListener listener)
{
- assert debugEnter(CLASS_NAME, "registerAddListener",
- String.valueOf(listener));
addListeners.addIfAbsent(listener);
}
@@ -586,8 +564,6 @@
*/
public void deregisterAddListener(ConfigAddListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterAddListener",
- String.valueOf(listener));
addListeners.remove(listener);
}
@@ -603,7 +579,6 @@
*/
public CopyOnWriteArrayList<ConfigDeleteListener> getDeleteListeners()
{
- assert debugEnter(CLASS_NAME, "getDeleteListeners");
return deleteListeners;
}
@@ -618,8 +593,6 @@
*/
public void registerDeleteListener(ConfigDeleteListener listener)
{
- assert debugEnter(CLASS_NAME, "registerDeleteListener",
- String.valueOf(listener));
deleteListeners.addIfAbsent(listener);
}
@@ -634,8 +607,6 @@
*/
public void deregisterDeleteListener(ConfigDeleteListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterDeleteListener",
- String.valueOf(listener));
deleteListeners.remove(listener);
}
diff --git a/opends/src/server/org/opends/server/config/ConfigException.java b/opends/src/server/org/opends/server/config/ConfigException.java
index 65e4de9..4c6dae1 100644
--- a/opends/src/server/org/opends/server/config/ConfigException.java
+++ b/opends/src/server/org/opends/server/config/ConfigException.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
-import static org.opends.server.loggers.Debug.*;
@@ -39,11 +38,6 @@
public class ConfigException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.ConfigException";
@@ -73,8 +67,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message));
this.messageID = messageID;
}
@@ -94,8 +86,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message), String.valueOf(cause));
this.messageID = messageID;
}
@@ -109,7 +99,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/config/DNConfigAttribute.java b/opends/src/server/org/opends/server/config/DNConfigAttribute.java
index ece20d6..aeb12af 100644
--- a/opends/src/server/org/opends/server/config/DNConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/DNConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -44,10 +44,12 @@
import org.opends.server.types.DN;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -61,11 +63,6 @@
public class DNConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.DNConfigAttribute";
@@ -98,11 +95,6 @@
{
super(name, description, isRequired, isMultiValued, requiresAdminAction);
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction));
activeValues = new ArrayList<DN>();
pendingValues = activeValues;
@@ -133,16 +125,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(value));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(value)
- });
if (value == null)
{
@@ -183,16 +165,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(values));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(values)
- });
if (values == null)
{
@@ -235,17 +207,6 @@
getValueSet(activeValues), (pendingValues != null),
getValueSet(pendingValues));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(activeValues),
- String.valueOf(pendingValues)
- });
if (activeValues == null)
{
@@ -278,7 +239,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "DN";
}
@@ -292,7 +252,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME,"getSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -311,7 +270,6 @@
public DN activeValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeValue");
if ((activeValues == null) || activeValues.isEmpty())
{
@@ -339,7 +297,6 @@
*/
public List<DN> activeValues()
{
- assert debugEnter(CLASS_NAME, "activeValues");
return activeValues;
}
@@ -360,7 +317,6 @@
public DN pendingValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingValue");
if (! hasPendingValues())
{
@@ -395,7 +351,6 @@
*/
public List<DN> pendingValues()
{
- assert debugEnter(CLASS_NAME, "pendingValues");
if (! hasPendingValues())
{
@@ -417,7 +372,6 @@
public void setValue(DN value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
if (value == null)
{
@@ -454,7 +408,6 @@
public void setValues(List<DN> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
// First check if the set is empty and if that is allowed.
@@ -545,7 +498,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(DN value)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value));
LinkedHashSet<AttributeValue> valueSet;
if (value == null)
@@ -573,7 +525,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(List<DN> values)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(values));
if (values == null)
{
@@ -601,7 +552,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -629,8 +579,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Make sure that the value is not null.
@@ -648,7 +596,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
rejectReason.append(getMessage(MSGID_CONFIG_ATTR_DN_CANNOT_PARSE,
value.getStringValue(), getName(),
@@ -686,9 +637,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -743,7 +691,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stringsToValues", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
String message = getMessage(msgID, valueString, getName(),
@@ -795,7 +746,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
ArrayList<String> valueStrings = new ArrayList<String>(activeValues.size());
for (DN dn : activeValues)
@@ -821,7 +771,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -866,8 +815,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
ArrayList<DN> activeValues = null;
@@ -926,7 +873,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
String message = getMessage(msgID, v.getStringValue(),
@@ -996,7 +946,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
String message = getMessage(msgID, v.getStringValue(), getName(),
@@ -1043,7 +996,6 @@
*/
private javax.management.Attribute _toJMXAttribute(boolean pending)
{
- assert debugEnter(CLASS_NAME, "_toJMXAttribute");
List<DN> requestedValues ;
String name ;
@@ -1120,8 +1072,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
if (activeValues.size() > 0)
{
@@ -1194,8 +1144,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
if (isMultiValued())
@@ -1246,7 +1194,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
if (isMultiValued())
{
@@ -1276,7 +1223,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value == null)
@@ -1298,7 +1244,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
String message = getMessage(msgID, (String) value, getName(),
@@ -1340,7 +1289,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_DN_CANNOT_PARSE;
String message = getMessage(msgID, valueStr, getName(),
@@ -1355,13 +1307,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "setValue", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INVALID_DN_VALUE;
String message = getMessage(msgID, getName(), String.valueOf(value),
@@ -1394,7 +1352,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new DNConfigAttribute(getName(), getDescription(), isRequired(),
isMultiValued(), requiresAdminAction(),
diff --git a/opends/src/server/org/opends/server/config/IntegerConfigAttribute.java b/opends/src/server/org/opends/server/config/IntegerConfigAttribute.java
index 3bd49e3..553678d 100644
--- a/opends/src/server/org/opends/server/config/IntegerConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/IntegerConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -43,10 +43,12 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -62,11 +64,6 @@
public class IntegerConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.IntegerConfigAttribute";
@@ -122,19 +119,6 @@
{
super(name, description, isRequired, isMultiValued, requiresAdminAction);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound)
- });
this.hasLowerBound = hasLowerBound;
this.lowerBound = lowerBound;
@@ -182,20 +166,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(value));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound),
- String.valueOf(value)
- });
this.hasLowerBound = hasLowerBound;
this.lowerBound = lowerBound;
@@ -245,20 +215,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(values));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound),
- String.valueOf(values)
- });
this.hasLowerBound = hasLowerBound;
this.lowerBound = lowerBound;
@@ -318,21 +274,6 @@
getValueSet(activeValues), (pendingValues != null),
getValueSet(pendingValues));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound),
- String.valueOf(activeValues),
- String.valueOf(pendingValues)
- });
this.hasLowerBound = hasLowerBound;
this.lowerBound = lowerBound;
@@ -370,7 +311,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "Integer";
}
@@ -384,7 +324,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME, "getSyntax");
return DirectoryServer.getDefaultIntegerSyntax();
}
@@ -403,7 +342,6 @@
public long activeValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeValue");
if ((activeValues == null) || activeValues.isEmpty())
{
@@ -439,7 +377,6 @@
public int activeIntValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeIntValue");
if ((activeValues == null) || activeValues.isEmpty())
{
@@ -478,7 +415,6 @@
*/
public List<Long> activeValues()
{
- assert debugEnter(CLASS_NAME, "activeValues");
return activeValues;
}
@@ -499,7 +435,6 @@
public long pendingValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingValue");
if (! hasPendingValues())
{
@@ -541,7 +476,6 @@
public int pendingIntValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingIntValue");
if (! hasPendingValues())
{
@@ -587,7 +521,6 @@
*/
public List<Long> pendingValues()
{
- assert debugEnter(CLASS_NAME, "pendingValues");
if (! hasPendingValues())
{
@@ -609,7 +542,6 @@
*/
public boolean hasLowerBound()
{
- assert debugEnter(CLASS_NAME, "hasLowerBound");
return hasLowerBound;
}
@@ -623,7 +555,6 @@
*/
public long getLowerBound()
{
- assert debugEnter(CLASS_NAME, "getLowerBound");
return lowerBound;
}
@@ -640,7 +571,6 @@
*/
public boolean hasUpperBound()
{
- assert debugEnter(CLASS_NAME, "hasUpperBound");
return hasUpperBound;
}
@@ -656,7 +586,6 @@
*/
public long getUpperBound()
{
- assert debugEnter(CLASS_NAME, "getUpperBound");
return upperBound;
}
@@ -673,7 +602,6 @@
public void setValue(long value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
if (hasLowerBound && (value < lowerBound))
{
@@ -717,7 +645,6 @@
public void setValues(List<Long> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
// First check if the set is empty and if that is allowed.
@@ -816,7 +743,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(long value)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value));
LinkedHashSet<AttributeValue> valueSet =
new LinkedHashSet<AttributeValue>(1);
@@ -839,7 +765,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(List<Long> values)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(values));
if (values == null)
{
@@ -868,7 +793,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -896,8 +820,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// First, make sure we can represent it as a long.
@@ -909,7 +831,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
rejectReason.append(getMessage(MSGID_CONFIG_ATTR_INVALID_INT_VALUE,
stringValue, String.valueOf(e)));
@@ -963,9 +888,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -1002,7 +924,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stringsToValues", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE;
String message = getMessage(msgID, valueString, getName(),
@@ -1090,7 +1015,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
ArrayList<String> valueStrings =
new ArrayList<String>(activeValues.size());
@@ -1117,7 +1041,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -1162,8 +1085,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
ArrayList<Long> activeValues = null;
@@ -1373,7 +1294,6 @@
*/
private javax.management.Attribute _toJMXAttribute(boolean pending)
{
- assert debugEnter(CLASS_NAME, "_toJMXAttribute");
List<Long> requestedValues ;
String name ;
if (pending)
@@ -1421,7 +1341,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
return _toJMXAttribute(false);
}
@@ -1435,7 +1354,6 @@
*/
public javax.management.Attribute toJMXAttributePending()
{
- assert debugEnter(CLASS_NAME, "toJMXAttributePending");
return _toJMXAttribute(true);
}
@@ -1455,8 +1373,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
if (activeValues.size() > 0)
{
@@ -1529,8 +1445,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
if (isMultiValued())
@@ -1579,7 +1493,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
if (isMultiValued())
{
@@ -1609,7 +1522,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value instanceof Long)
@@ -1628,7 +1540,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE;
String message = getMessage(msgID, String.valueOf(value), getName(),
@@ -1686,13 +1601,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "setValue", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE;
String message = getMessage(msgID, componentType + "[" + length + "]",
@@ -1718,7 +1639,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new IntegerConfigAttribute(getName(), getDescription(), isRequired(),
isMultiValued(), requiresAdminAction(),
diff --git a/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java b/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
index 6a89e63..f80708b 100644
--- a/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/IntegerWithUnitConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -44,9 +44,11 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,11 +72,6 @@
public class IntegerWithUnitConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.IntegerWithUnitConfigAttribute";
@@ -144,18 +141,6 @@
{
super(name, description, true, false, requiresAdminAction);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(units),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound)
- });
this.units = units;
this.hasLowerBound = hasLowerBound;
@@ -200,20 +185,6 @@
super(name, description, true, false, requiresAdminAction,
getValueSet(intValue, selectedUnit));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(units),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound),
- String.valueOf(intValue),
- String.valueOf(selectedUnit),
- });
this.units = units;
@@ -280,22 +251,6 @@
(pendingSelectedUnit != null),
getValueSet(pendingIntValue,pendingSelectedUnit));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(units),
- String.valueOf(hasLowerBound),
- String.valueOf(lowerBound),
- String.valueOf(hasUpperBound),
- String.valueOf(upperBound),
- String.valueOf(activeIntValue),
- String.valueOf(activeSelectedUnit),
- String.valueOf(pendingIntValue),
- String.valueOf(pendingSelectedUnit)
- });
this.units = units;
@@ -341,7 +296,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "IntegerWithUnit";
}
@@ -355,7 +309,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME, "getSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -371,7 +324,6 @@
*/
public long activeIntValue()
{
- assert debugEnter(CLASS_NAME, "activeIntValue");
return activeIntValue;
}
@@ -385,7 +337,6 @@
*/
public String activeUnit()
{
- assert debugEnter(CLASS_NAME, "activeUnit");
return activeUnit;
}
@@ -401,7 +352,6 @@
*/
public long activeCalculatedValue()
{
- assert debugEnter(CLASS_NAME, "activeCalculatedValue");
return activeCalculatedValue;
}
@@ -418,7 +368,6 @@
*/
public long pendingIntValue()
{
- assert debugEnter(CLASS_NAME, "pendingIntValue");
if (hasPendingValues())
{
@@ -441,7 +390,6 @@
*/
public String pendingUnit()
{
- assert debugEnter(CLASS_NAME, "pendingUnit");
if (hasPendingValues())
{
@@ -465,7 +413,6 @@
*/
public long pendingCalculatedValue()
{
- assert debugEnter(CLASS_NAME, "pendingCalculatedValue");
if (hasPendingValues())
{
@@ -488,7 +435,6 @@
*/
public HashMap<String,Double> getUnits()
{
- assert debugEnter(CLASS_NAME, "getUnits");
return units;
}
@@ -505,7 +451,6 @@
*/
public boolean hasLowerBound()
{
- assert debugEnter(CLASS_NAME, "hasLowerBound");
return hasLowerBound;
}
@@ -521,7 +466,6 @@
*/
public long getLowerBound()
{
- assert debugEnter(CLASS_NAME, "getLowerBound");
return lowerBound;
}
@@ -538,7 +482,6 @@
*/
public boolean hasUpperBound()
{
- assert debugEnter(CLASS_NAME, "hasUpperBound");
return hasUpperBound;
}
@@ -554,7 +497,6 @@
*/
public long getUpperBound()
{
- assert debugEnter(CLASS_NAME, "getUpperBound");
return upperBound;
}
@@ -575,8 +517,6 @@
public void setValue(long intValue, String unit)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(intValue),
- String.valueOf(unit));
if ((unit == null) || (! units.containsKey(unit)))
{
@@ -633,7 +573,6 @@
public void setValue(String value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
int spacePos = value.indexOf(' ');
if (spacePos <= 0)
@@ -651,7 +590,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_COULD_NOT_PARSE_INT_COMPONENT;
String message = getMessage(msgID, String.valueOf(value), getName(),
@@ -675,8 +617,6 @@
private static LinkedHashSet<AttributeValue> getValueSet(long intValue,
String unit)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(intValue),
- String.valueOf(unit));
if (unit == null)
{
@@ -702,7 +642,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -732,8 +671,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a string representation of the value and convert it to lowercase.
@@ -760,8 +697,6 @@
public boolean valueIsAcceptable(String lowerValue,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable",
- String.valueOf(lowerValue), "java.lang.StringBuilder");
// Find the first space in the value, since it should separate the integer
@@ -783,7 +718,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
rejectReason.append(getMessage(MSGID_CONFIG_ATTR_INT_COULD_NOT_PARSE,
lowerValue, getName(), String.valueOf(e)));
@@ -854,9 +792,6 @@
stringsToValues(List<String> valueStrings, boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -957,7 +892,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
ArrayList<String> valueStrings = new ArrayList<String>(1);
valueStrings.add(activeIntValue + " " + activeUnit);
@@ -980,7 +914,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -1021,8 +954,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
long activeIntValue = 0;
@@ -1242,7 +1173,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
return new javax.management.Attribute(getName(),
activeIntValue + " " + activeUnit);
@@ -1258,7 +1188,6 @@
*/
public javax.management.Attribute toJMXAttributePending()
{
- assert debugEnter(CLASS_NAME, "toJMXAttributePending");
return new javax.management.Attribute(getName() + ";"
+ OPTION_PENDING_VALUES, pendingIntValue + " " + pendingUnit);
@@ -1279,8 +1208,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
String activeValue = activeIntValue + " " + activeUnit;
attributeList.add(new javax.management.Attribute(getName(), activeValue));
@@ -1310,8 +1237,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
attributeInfoList.add(new MBeanAttributeInfo(getName(),
String.class.getName(),
@@ -1339,7 +1264,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
return new MBeanParameterInfo(getName(), String.class.getName(),
getDescription());
@@ -1361,7 +1285,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value instanceof String)
@@ -1386,7 +1309,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new IntegerWithUnitConfigAttribute(getName(), getDescription(),
requiresAdminAction(), units,
diff --git a/opends/src/server/org/opends/server/config/JMXMBean.java b/opends/src/server/org/opends/server/config/JMXMBean.java
index 52d09d8..5b6b180 100644
--- a/opends/src/server/org/opends/server/config/JMXMBean.java
+++ b/opends/src/server/org/opends/server/config/JMXMBean.java
@@ -64,8 +64,10 @@
import org.opends.server.types.InvokableMethod;
import org.opends.server.types.ResultCode;
import org.opends.server.types.SearchScope;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -94,7 +96,7 @@
implements DynamicMBean, DirectoryServerMBean
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.config.JMXMBean";
@@ -169,7 +171,10 @@
nameStr = MBEAN_BASE_DOMAIN + ":" + "Name=rootDSE" + typeStr;
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_JMX_CANNOT_REGISTER_MBEAN;
String message = getMessage(msgID, configEntryDN.toString(),
@@ -188,7 +193,6 @@
*/
public JMXMBean(DN configEntryDN)
{
- assert debugConstructor(CLASS_NAME);
this.configEntryDN = configEntryDN;
@@ -213,14 +217,20 @@
}
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
mBeanServer.registerMBean(this, objectName);
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
e.printStackTrace();
int msgID = MSGID_CONFIG_JMX_CANNOT_REGISTER_MBEAN;
@@ -241,7 +251,6 @@
*/
public ObjectName getObjectName()
{
- assert debugEnter(CLASS_NAME, "getObjectName");
return objectName;
}
@@ -255,7 +264,6 @@
*/
public CopyOnWriteArrayList<AlertGenerator> getAlertGenerators()
{
- assert debugEnter(CLASS_NAME, "getAlertGenerators");
return alertGenerators;
}
@@ -271,8 +279,6 @@
*/
public void addAlertGenerator(AlertGenerator generator)
{
- assert debugEnter(CLASS_NAME, "addAlertGenerator",
- String.valueOf(generator));
synchronized (alertGenerators)
{
@@ -297,8 +303,6 @@
*/
public boolean removeAlertGenerator(AlertGenerator generator)
{
- assert debugEnter(CLASS_NAME, "removeAlertGenerator",
- String.valueOf(generator));
synchronized (alertGenerators)
{
@@ -316,7 +320,6 @@
*/
public CopyOnWriteArrayList<ConfigurableComponent> getConfigurableComponents()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponents");
return configurableComponents;
}
@@ -332,8 +335,6 @@
*/
public void addConfigurableComponent(ConfigurableComponent component)
{
- assert debugEnter(CLASS_NAME, "addConfigurableComponent",
- String.valueOf(component));
synchronized (configurableComponents)
{
@@ -358,8 +359,6 @@
*/
public boolean removeConfigurableComponent(ConfigurableComponent component)
{
- assert debugEnter(CLASS_NAME, "removeConfigurableComponent",
- String.valueOf(component));
synchronized (configurableComponents)
{
@@ -376,7 +375,6 @@
*/
public CopyOnWriteArrayList<InvokableComponent> getInvokableComponents()
{
- assert debugEnter(CLASS_NAME, "getInvokableComponents");
return invokableComponents;
}
@@ -392,8 +390,6 @@
*/
public void addInvokableComponent(InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "addInvokableComponent",
- String.valueOf(component));
synchronized (invokableComponents)
{
@@ -418,8 +414,6 @@
*/
public boolean removeInvokableComponent(InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "removeInvokableComponent",
- String.valueOf(component));
synchronized (invokableComponents)
{
@@ -436,7 +430,6 @@
*/
public CopyOnWriteArrayList<MonitorProvider> getMonitorProviders()
{
- assert debugEnter(CLASS_NAME, "getMonitorProviders");
return monitorProviders;
}
@@ -452,8 +445,6 @@
*/
public void addMonitorProvider(MonitorProvider component)
{
- assert debugEnter(CLASS_NAME, "addMonitorProvider",
- String.valueOf(component));
synchronized (monitorProviders)
{
@@ -478,8 +469,6 @@
*/
public boolean removeMonitorProvider(MonitorProvider component)
{
- assert debugEnter(CLASS_NAME, "removeMonitorProvider",
- String.valueOf(component));
synchronized (monitorProviders)
{
@@ -499,8 +488,6 @@
*/
private ConfigAttribute getConfigAttribute(String name)
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(name));
for (ConfigurableComponent component : configurableComponents)
{
@@ -528,7 +515,6 @@
*/
private Attribute getJmxAttribute(String name)
{
- assert debugEnter(CLASS_NAME, "getJmxAttribute", String.valueOf(name));
String attributeName ;
String pendingString = ";" + OPTION_PENDING_VALUES ;
@@ -627,7 +613,6 @@
public Attribute getAttribute(String attributeName)
throws AttributeNotFoundException
{
- assert debugEnter(CLASS_NAME, "getAttribute");
//
// Get the jmx Client connection
@@ -647,7 +632,10 @@
}
catch (LDAPException e)
{
- assert debugException(CLASS_NAME, "getAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_JMX_CANNOT_GET_ATTRIBUTE;
String message = getMessage(msgID, String.valueOf(attributeName),
@@ -682,7 +670,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -712,8 +703,6 @@
javax.management.Attribute attribute, ConfigEntry configEntry)
throws AttributeNotFoundException, InvalidAttributeValueException
{
- assert debugEnter(CLASS_NAME, "getLdapAttributeFromJmx", String
- .valueOf(attribute));
String name = attribute.getName() ;
//
@@ -725,7 +714,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -745,7 +737,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(
ErrorLogCategory.CONFIGURATION,
ErrorLogSeverity.MILD_ERROR,
@@ -788,7 +783,6 @@
public void setAttribute(javax.management.Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException
{
- assert debugEnter(CLASS_NAME, "setAttribute", String.valueOf(attribute));
ConfigEntry configEntry;
ConfigEntry newConfigEntry ;
@@ -802,7 +796,10 @@
newConfigEntry = configEntry.duplicate();
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_JMX_CANNOT_GET_CONFIG_ENTRY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -861,7 +858,6 @@
*/
public AttributeList getAttributes(String[] attributes)
{
- assert debugEnter(CLASS_NAME, "getAttributes", String.valueOf(attributes));
//
// Get the jmx Client connection
@@ -913,7 +909,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
// It's possible that this is a monitor attribute rather than a
@@ -981,7 +980,6 @@
*/
public AttributeList setAttributes(AttributeList attributes)
{
- assert debugEnter(CLASS_NAME, "setAttributes", String.valueOf(attributes));
AttributeList setAttrs = new AttributeList();
@@ -998,7 +996,10 @@
newConfigEntry = configEntry.duplicate();
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(
ErrorLogCategory.CONFIGURATION,
@@ -1057,8 +1058,10 @@
}
catch (Exception e)
{
- assert debugException(
- CLASS_NAME, "setAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
MSGID_CONFIG_JMX_ATTR_NO_ATTR, configEntryDN.toString(),
@@ -1092,8 +1095,6 @@
public Object invoke(String actionName, Object[] params, String[] signature)
throws MBeanException
{
- assert debugEnter(CLASS_NAME, "invoke", String.valueOf(actionName),
- String.valueOf(params), String.valueOf(signature));
for (InvokableComponent component : invokableComponents)
{
@@ -1107,13 +1108,19 @@
}
catch (MBeanException me)
{
- assert debugException(CLASS_NAME, "invoke", me);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, me);
+ }
throw me;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invoke", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new MBeanException(e);
}
@@ -1160,7 +1167,6 @@
*/
public MBeanInfo getMBeanInfo()
{
- assert debugEnter(CLASS_NAME, "getMBeanInfo");
JmxClientConnection jmxClientConnection = getClientConnection();
if (jmxClientConnection == null)
{
diff --git a/opends/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java b/opends/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java
index c8a7c59..3532ca5 100644
--- a/opends/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/MultiChoiceConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -44,9 +44,11 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -62,11 +64,6 @@
public class MultiChoiceConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.MultiChoiceConfigAttribute";
@@ -108,16 +105,6 @@
{
super(name, description, isRequired, isMultiValued, requiresAdminAction);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(allowedValues)
- });
this.allowedValues = allowedValues;
@@ -156,17 +143,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(value));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(allowedValues),
- String.valueOf(value)
- });
this.allowedValues = allowedValues;
@@ -215,17 +191,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(values));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(allowedValues),
- String.valueOf(values)
- });
this.allowedValues = allowedValues;
@@ -277,18 +242,6 @@
getValueSet(activeValues), (pendingValues != null),
getValueSet(pendingValues));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(allowedValues),
- String.valueOf(activeValues),
- String.valueOf(pendingValues)
- });
this.allowedValues = allowedValues;
@@ -323,7 +276,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "MultiChoice";
}
@@ -337,7 +289,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME, "getSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -356,7 +307,6 @@
public String activeValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeValue");
if ((activeValues == null) || activeValues.isEmpty())
{
@@ -384,7 +334,6 @@
*/
public List<String> activeValues()
{
- assert debugEnter(CLASS_NAME, "activeValues");
return activeValues;
}
@@ -405,7 +354,6 @@
public String pendingValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingValue");
if (! hasPendingValues())
{
@@ -440,7 +388,6 @@
*/
public List<String> pendingValues()
{
- assert debugEnter(CLASS_NAME, "pendingValues");
if (! hasPendingValues())
{
@@ -461,7 +408,6 @@
*/
public Set<String> allowedValues()
{
- assert debugEnter(CLASS_NAME, "getAllowedValues");
return allowedValues;
}
@@ -478,7 +424,6 @@
public void setValue(String value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
if ((value == null) || (value.length() == 0))
{
@@ -522,7 +467,6 @@
public void setValues(List<String> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
// First check if the set is empty and if that is allowed.
@@ -621,7 +565,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(String value)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value));
LinkedHashSet<AttributeValue> valueSet =
new LinkedHashSet<AttributeValue>(1);
@@ -643,7 +586,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(List<String> values)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(values));
if (values == null)
{
@@ -671,7 +613,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -699,8 +640,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Make sure that the value is non-empty.
@@ -752,9 +691,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -851,7 +787,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
return activeValues;
}
@@ -871,7 +806,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -909,8 +843,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
ArrayList<String> activeValues = null;
@@ -1077,7 +1009,6 @@
*/
private javax.management.Attribute _toJMXAttribute(boolean pending)
{
- assert debugEnter(CLASS_NAME, "_toJMXAttribute");
List<String> requestedValues ;
String name ;
@@ -1122,7 +1053,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
return _toJMXAttribute(false) ;
}
@@ -1136,7 +1066,6 @@
*/
public javax.management.Attribute toJMXAttributePending()
{
- assert debugEnter(CLASS_NAME, "toJMXAttributePending");
return _toJMXAttribute(true) ;
}
@@ -1155,8 +1084,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
if (activeValues.size() > 0)
{
@@ -1223,8 +1150,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
if (isMultiValued())
@@ -1275,7 +1200,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
if (isMultiValued())
{
@@ -1305,7 +1229,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value instanceof String)
@@ -1332,13 +1255,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "setValue", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INVALID_STRING_VALUE;
String message = getMessage(msgID, getName(), String.valueOf(value),
@@ -1371,7 +1300,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new MultiChoiceConfigAttribute(getName(), getDescription(),
isRequired(), isMultiValued(),
diff --git a/opends/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java b/opends/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java
index c3bf308..75ad356 100644
--- a/opends/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/ReadOnlyConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -42,7 +42,6 @@
import org.opends.server.types.AttributeValue;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -57,11 +56,6 @@
public class ReadOnlyConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.ReadOnlyConfigAttribute";
@@ -85,9 +79,6 @@
{
super(name, description, false, isMultiValued, false);
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(isMultiValued));
values = new ArrayList<String>();
}
@@ -106,8 +97,6 @@
{
super(name, description, false, false, false, getValueSet(value));
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description), String.valueOf(value));
if (value == null)
{
@@ -135,9 +124,6 @@
{
super(name, description, false, true, false, getValueSet(values));
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(description),
- String.valueOf(values));
if (values == null)
{
@@ -161,7 +147,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "ReadOnly";
}
@@ -175,7 +160,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME,"getSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -194,7 +178,6 @@
public String activeValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeValue");
if ((values == null) || values.isEmpty())
{
@@ -222,7 +205,6 @@
*/
public List<String> activeValues()
{
- assert debugEnter(CLASS_NAME, "activeValues");
return values;
}
@@ -243,7 +225,6 @@
public String pendingValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingValue");
return activeValue();
}
@@ -259,7 +240,6 @@
*/
public List<String> pendingValues()
{
- assert debugEnter(CLASS_NAME, "pendingValues");
return activeValues();
}
@@ -276,7 +256,6 @@
public void setValue(String value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
int msgID = MSGID_CONFIG_ATTR_READ_ONLY;
String message = getMessage(msgID, getName());
@@ -296,7 +275,6 @@
public void setValues(List<String> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
int msgID = MSGID_CONFIG_ATTR_READ_ONLY;
String message = getMessage(msgID, getName());
@@ -314,7 +292,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(String value)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value));
LinkedHashSet<AttributeValue> valueSet =
new LinkedHashSet<AttributeValue>(1);
@@ -336,7 +313,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(List<String> values)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(values));
if (values == null)
{
@@ -364,7 +340,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
}
@@ -384,8 +359,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
rejectReason.append(getMessage(MSGID_CONFIG_ATTR_READ_ONLY, getName()));
return false;
@@ -417,9 +390,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -454,7 +424,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
return values;
}
@@ -474,7 +443,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
return activeValuesToStrings();
}
@@ -505,8 +473,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
// The attribute won't be present in the entry, so we'll just return a
// reference to this attribute.
@@ -525,7 +491,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
if (isMultiValued())
{
@@ -559,7 +524,6 @@
public javax.management.Attribute toJMXAttributePending()
{
// Should never occurs !!!
- assert debugEnter(CLASS_NAME, "toJMXAttributePending");
return toJMXAttribute();
}
@@ -578,8 +542,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
javax.management.Attribute jmxAttr = toJMXAttribute();
attributeList.add(jmxAttr);
@@ -601,8 +563,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
if (isMultiValued())
@@ -632,7 +592,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
if (isMultiValued())
{
@@ -662,7 +621,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
int msgID = MSGID_CONFIG_ATTR_READ_ONLY;
String message = getMessage(msgID, getName());
@@ -678,7 +636,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new ReadOnlyConfigAttribute(getName(), getDescription(),
activeValues());
diff --git a/opends/src/server/org/opends/server/config/StringConfigAttribute.java b/opends/src/server/org/opends/server/config/StringConfigAttribute.java
index 4d5c11c..a240f9d 100644
--- a/opends/src/server/org/opends/server/config/StringConfigAttribute.java
+++ b/opends/src/server/org/opends/server/config/StringConfigAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.config;
@@ -43,13 +43,14 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.util.ServerConstants.*;
@@ -60,11 +61,6 @@
public class StringConfigAttribute
extends ConfigAttribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.config.StringConfigAttribute";
@@ -98,11 +94,6 @@
{
super(name, description, isRequired, isMultiValued, requiresAdminAction);
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction));
activeValues = new ArrayList<String>();
pendingValues = activeValues;
@@ -134,16 +125,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(value));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(value)
- });
if (value == null)
{
@@ -184,16 +165,6 @@
super(name, description, isRequired, isMultiValued, requiresAdminAction,
getValueSet(values));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(values)
- });
if (values == null)
{
@@ -238,17 +209,6 @@
getValueSet(activeValues), (pendingValues != null),
getValueSet(pendingValues));
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(isRequired),
- String.valueOf(isMultiValued),
- String.valueOf(description),
- String.valueOf(requiresAdminAction),
- String.valueOf(activeValues),
- String.valueOf(pendingValues)
- });
if (activeValues == null)
{
@@ -281,7 +241,6 @@
*/
public String getDataType()
{
- assert debugEnter(CLASS_NAME, "getDataType");
return "String";
}
@@ -295,7 +254,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME,"getSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -314,7 +272,6 @@
public String activeValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "activeValue");
if ((activeValues == null) || activeValues.isEmpty())
{
@@ -342,7 +299,6 @@
*/
public List<String> activeValues()
{
- assert debugEnter(CLASS_NAME, "activeValues");
return activeValues;
}
@@ -363,7 +319,6 @@
public String pendingValue()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "pendingValue");
if (! hasPendingValues())
{
@@ -398,7 +353,6 @@
*/
public List<String> pendingValues()
{
- assert debugEnter(CLASS_NAME, "pendingValues");
if (! hasPendingValues())
{
@@ -420,7 +374,6 @@
public void setValue(String value)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
if ((value == null) || (value.length() == 0))
{
@@ -457,7 +410,6 @@
public void setValues(List<String> values)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValues", String.valueOf(values));
// First check if the set is empty and if that is allowed.
@@ -548,7 +500,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(String value)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value));
LinkedHashSet<AttributeValue> valueSet =
new LinkedHashSet<AttributeValue>(1);
@@ -570,7 +521,6 @@
*/
private static LinkedHashSet<AttributeValue> getValueSet(List<String> values)
{
- assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(values));
if (values == null)
{
@@ -598,7 +548,6 @@
*/
public void applyPendingValues()
{
- assert debugEnter(CLASS_NAME, "applyPendingValues");
if (! hasPendingValues())
{
@@ -626,8 +575,6 @@
public boolean valueIsAcceptable(AttributeValue value,
StringBuilder rejectReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// The only requirement is that the value is not null or empty.
@@ -668,9 +615,6 @@
boolean allowFailures)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "stringsToValues",
- String.valueOf(valueStrings),
- String.valueOf(allowFailures));
if ((valueStrings == null) || valueStrings.isEmpty())
{
@@ -750,7 +694,6 @@
*/
public List<String> activeValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "activeValuesToStrings");
return activeValues;
}
@@ -770,7 +713,6 @@
*/
public List<String> pendingValuesToStrings()
{
- assert debugEnter(CLASS_NAME, "pendingValuesToStrings");
if (hasPendingValues())
{
@@ -808,8 +750,6 @@
public ConfigAttribute getConfigAttribute(List<Attribute> attributeList)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigAttribute",
- String.valueOf(attributeList));
ArrayList<String> activeValues = null;
@@ -955,7 +895,6 @@
*/
private javax.management.Attribute _toJMXAttribute(boolean pending)
{
- assert debugEnter(CLASS_NAME, "_toJMXAttribute");
List<String> requestedValues ;
String name ;
if (pending)
@@ -998,7 +937,6 @@
*/
public javax.management.Attribute toJMXAttribute()
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute");
return _toJMXAttribute(false) ;
}
@@ -1012,7 +950,6 @@
*/
public javax.management.Attribute toJMXAttributePending()
{
- assert debugEnter(CLASS_NAME, "toJMXAttributePending");
return _toJMXAttribute(true) ;
}
@@ -1031,8 +968,6 @@
*/
public void toJMXAttribute(AttributeList attributeList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttribute",
- String.valueOf(attributeList));
if (activeValues.size() > 0)
{
@@ -1099,8 +1034,6 @@
*/
public void toJMXAttributeInfo(List<MBeanAttributeInfo> attributeInfoList)
{
- assert debugEnter(CLASS_NAME, "toJMXAttributeInfo",
- String.valueOf(attributeInfoList));
if (isMultiValued())
@@ -1151,7 +1084,6 @@
*/
public MBeanParameterInfo toJMXParameterInfo()
{
- assert debugEnter(CLASS_NAME, "toJMXParameterInfo");
if (isMultiValued())
{
@@ -1181,7 +1113,6 @@
public void setValue(javax.management.Attribute jmxAttribute)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(jmxAttribute));
Object value = jmxAttribute.getValue();
if (value instanceof String)
@@ -1208,13 +1139,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "setValue", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ATTR_INVALID_STRING_VALUE;
String message = getMessage(msgID, getName(), String.valueOf(value),
@@ -1247,7 +1184,6 @@
*/
public ConfigAttribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return new StringConfigAttribute(getName(), getDescription(), isRequired(),
isMultiValued(), requiresAdminAction(),
diff --git a/opends/src/server/org/opends/server/config/package-info.java b/opends/src/server/org/opends/server/config/package-info.java
index 79d239e..7779328 100644
--- a/opends/src/server/org/opends/server/config/package-info.java
+++ b/opends/src/server/org/opends/server/config/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/controls/AccountUsableRequestControl.java b/opends/src/server/org/opends/server/controls/AccountUsableRequestControl.java
index 94fa138..d85608e 100644
--- a/opends/src/server/org/opends/server/controls/AccountUsableRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/AccountUsableRequestControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -32,7 +32,6 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -47,11 +46,6 @@
public class AccountUsableRequestControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.AccountUsableRequestControl";
@@ -63,7 +57,6 @@
{
super(OID_ACCOUNT_USABLE_CONTROL, false);
- assert debugConstructor(CLASS_NAME);
}
@@ -80,8 +73,6 @@
{
super(oid, isCritical);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
}
@@ -102,7 +93,6 @@
public static AccountUsableRequestControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (control.hasValue())
{
@@ -125,7 +115,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -142,7 +131,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AccountUsableRequestControl()");
}
diff --git a/opends/src/server/org/opends/server/controls/AccountUsableResponseControl.java b/opends/src/server/org/opends/server/controls/AccountUsableResponseControl.java
index 12e68d9..08587b2 100644
--- a/opends/src/server/org/opends/server/controls/AccountUsableResponseControl.java
+++ b/opends/src/server/org/opends/server/controls/AccountUsableResponseControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -39,8 +39,10 @@
import org.opends.server.protocols.ldap.LDAPException;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -69,11 +71,6 @@
public class AccountUsableResponseControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.AccountUsableResponseControl";
@@ -176,8 +173,6 @@
super(OID_ACCOUNT_USABLE_CONTROL, false,
encodeValue(secondsBeforeExpiration));
- assert debugConstructor(CLASS_NAME,
- String.valueOf(secondsBeforeExpiration));
this.secondsBeforeExpiration = secondsBeforeExpiration;
@@ -211,9 +206,6 @@
{
super(oid, isCritical, encodeValue(secondsBeforeExpiration));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(secondsBeforeExpiration));
this.secondsBeforeExpiration = secondsBeforeExpiration;
@@ -260,11 +252,6 @@
encodeValue(isInactive, isReset, isExpired, remainingGraceLogins,
isLocked, secondsBeforeUnlock));
- assert debugConstructor(CLASS_NAME, String.valueOf(isInactive),
- String.valueOf(isReset), String.valueOf(isExpired),
- String.valueOf(remainingGraceLogins),
- String.valueOf(isLocked),
- String.valueOf(secondsBeforeUnlock));
this.isInactive = isInactive;
this.isReset = isReset;
@@ -316,13 +303,6 @@
encodeValue(isInactive, isReset, isExpired, remainingGraceLogins,
isLocked, secondsBeforeUnlock));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(isInactive), String.valueOf(isReset),
- String.valueOf(isExpired),
- String.valueOf(remainingGraceLogins),
- String.valueOf(isLocked),
- String.valueOf(secondsBeforeUnlock));
this.isInactive = isInactive;
this.isReset = isReset;
@@ -385,16 +365,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(isAvailable),
- String.valueOf(secondsBeforeExpiration),
- String.valueOf(isInactive),
- String.valueOf(isReset),
- String.valueOf(isExpired),
- String.valueOf(remainingGraceLogins),
- String.valueOf(isLocked),
- String.valueOf(secondsBeforeUnlock));
this.isUsable = isAvailable;
this.secondsBeforeExpiration = secondsBeforeExpiration;
@@ -422,8 +392,6 @@
*/
private static ASN1OctetString encodeValue(int secondsBeforeExpiration)
{
- assert debugEnter(CLASS_NAME, "encodeValue",
- String.valueOf(secondsBeforeExpiration));
ASN1Integer sbeInteger = new ASN1Integer(TYPE_SECONDS_BEFORE_EXPIRATION,
@@ -466,11 +434,6 @@
boolean isLocked,
int secondsBeforeUnlock)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(isInactive),
- String.valueOf(isReset), String.valueOf(isExpired),
- String.valueOf(remainingGraceLogins),
- String.valueOf(isLocked),
- String.valueOf(secondsBeforeUnlock));
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(5);
@@ -525,7 +488,6 @@
public static AccountUsableResponseControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
ASN1OctetString controlValue = control.getValue();
@@ -608,17 +570,23 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
- int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR;
+ int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR;
String message = getMessage(msgID, ae.getMessage());
throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, msgID, message);
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR;
+ int msgID = MSGID_ACCTUSABLERES_DECODE_ERROR;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
throw new LDAPException(LDAPResultCode.PROTOCOL_ERROR, msgID, message);
}
@@ -634,7 +602,6 @@
*/
public boolean isUsable()
{
- assert debugEnter(CLASS_NAME, "isAvailable");
return isUsable;
}
@@ -651,7 +618,6 @@
*/
public int getSecondsBeforeExpiration()
{
- assert debugEnter(CLASS_NAME, "getSecondsBeforeExpiration");
return secondsBeforeExpiration;
}
@@ -667,7 +633,6 @@
*/
public boolean isInactive()
{
- assert debugEnter(CLASS_NAME, "isInactive");
return isInactive;
}
@@ -684,7 +649,6 @@
*/
public boolean isReset()
{
- assert debugEnter(CLASS_NAME, "isReset");
return isReset;
}
@@ -699,7 +663,6 @@
*/
public boolean isExpired()
{
- assert debugEnter(CLASS_NAME, "isExpired");
return isExpired;
}
@@ -715,7 +678,6 @@
*/
public int getRemainingGraceLogins()
{
- assert debugEnter(CLASS_NAME, "getRemainingGraceLogins");
return remainingGraceLogins;
}
@@ -730,7 +692,6 @@
*/
public boolean isLocked()
{
- assert debugEnter(CLASS_NAME, "isLocked");
return isLocked;
}
@@ -748,7 +709,6 @@
*/
public int getSecondsBeforeUnlock()
{
- assert debugEnter(CLASS_NAME, "getSecondsBeforeUnlock");
return secondsBeforeUnlock;
}
@@ -762,7 +722,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -779,7 +738,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AccountUsableResponseControl(isUsable=");
buffer.append(isUsable);
diff --git a/opends/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java b/opends/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java
index 2021e97..99d9646 100644
--- a/opends/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java
+++ b/opends/src/server/org/opends/server/controls/AuthorizationIdentityResponseControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -34,11 +34,9 @@
import org.opends.server.types.Control;
import org.opends.server.types.DN;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +49,6 @@
public class AuthorizationIdentityResponseControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.AuthorizationIdentityResponseControl";
@@ -72,7 +65,6 @@
{
super(OID_AUTHZID_RESPONSE, false, new ASN1OctetString());
- assert debugConstructor(CLASS_NAME);
}
@@ -87,7 +79,6 @@
{
super(OID_AUTHZID_RESPONSE, false, encodeValue(authorizationID));
- assert debugConstructor(CLASS_NAME, String.valueOf(authorizationID));
this.authorizationID = authorizationID;
}
@@ -104,7 +95,6 @@
{
super(OID_AUTHZID_RESPONSE, false, encodeValue(authorizationDN));
- assert debugConstructor(CLASS_NAME, String.valueOf(authorizationDN));
if (authorizationDN == null)
{
@@ -133,9 +123,6 @@
{
super(oid, isCritical, encodeValue(authorizationID));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(authorizationID));
this.authorizationID = authorizationID;
}
@@ -157,9 +144,6 @@
{
super(oid, isCritical, encodeValue(authorizationDN));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(authorizationDN));
if (authorizationDN == null)
{
@@ -190,10 +174,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(authorizationID),
- String.valueOf(encodedValue));
this.authorizationID = authorizationID;
}
@@ -211,8 +191,6 @@
*/
private static ASN1OctetString encodeValue(String authorizationID)
{
- assert debugEnter(CLASS_NAME, "encodeValue",
- String.valueOf(authorizationID));
return new ASN1OctetString(authorizationID);
@@ -231,8 +209,6 @@
*/
private static ASN1OctetString encodeValue(DN authorizationDN)
{
- assert debugEnter(CLASS_NAME, "encodeValue",
- String.valueOf(authorizationDN));
if (authorizationDN == null)
@@ -264,7 +240,6 @@
Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
@@ -290,7 +265,6 @@
*/
public String getAuthorizationID()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationID");
return authorizationID;
}
@@ -306,8 +280,6 @@
*/
public void setAuthorizationID(String authorizationID)
{
- assert debugEnter(CLASS_NAME, "setAuthorizationID",
- String.valueOf(authorizationID));
this.authorizationID = authorizationID;
setValue(encodeValue(authorizationID));
@@ -324,7 +296,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -341,7 +312,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AuthorizationIdentityResponseControl(authzID=\"");
buffer.append(authorizationID);
diff --git a/opends/src/server/org/opends/server/controls/EntryChangeNotificationControl.java b/opends/src/server/org/opends/server/controls/EntryChangeNotificationControl.java
index 9d5417c..95e2d49 100644
--- a/opends/src/server/org/opends/server/controls/EntryChangeNotificationControl.java
+++ b/opends/src/server/org/opends/server/controls/EntryChangeNotificationControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -40,8 +40,10 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -57,11 +59,6 @@
public class EntryChangeNotificationControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.EntryChangeNotificationControl";
@@ -90,8 +87,6 @@
super(OID_ENTRY_CHANGE_NOTIFICATION, false,
encodeValue(changeType, null, changeNumber));
- assert debugConstructor(CLASS_NAME, String.valueOf(changeType),
- String.valueOf(changeNumber));
this.changeType = changeType;
this.changeNumber = changeNumber;
@@ -118,9 +113,6 @@
super(OID_ENTRY_CHANGE_NOTIFICATION, false,
encodeValue(changeType, previousDN, changeNumber));
- assert debugConstructor(CLASS_NAME, String.valueOf(changeType),
- String.valueOf(previousDN),
- String.valueOf(changeNumber));
this.changeType = changeType;
this.previousDN = previousDN;
@@ -149,11 +141,6 @@
{
super(oid, isCritical, encodeValue(changeType, previousDN, changeNumber));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(changeType),
- String.valueOf(previousDN),
- String.valueOf(changeNumber));
this.changeType = changeType;
this.previousDN = previousDN;
@@ -185,12 +172,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(changeType),
- String.valueOf(previousDN),
- String.valueOf(changeNumber),
- String.valueOf(encodedValue));
this.changeType = changeType;
this.previousDN = previousDN;
@@ -216,8 +197,6 @@
changeType,
DN previousDN, long changeNumber)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(changeType),
- String.valueOf(previousDN), String.valueOf(changeNumber));
ArrayList<ASN1Element> elements =
@@ -256,7 +235,6 @@
public static EntryChangeNotificationControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
@@ -334,7 +312,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ECN_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -357,7 +338,6 @@
*/
public PersistentSearchChangeType getChangeType()
{
- assert debugEnter(CLASS_NAME, "getChangeType");
return changeType;
}
@@ -372,7 +352,6 @@
*/
public void setChangeType(PersistentSearchChangeType changeType)
{
- assert debugEnter(CLASS_NAME, "setChangeType", String.valueOf(changeType));
this.changeType = changeType;
@@ -389,7 +368,6 @@
*/
public DN getPreviousDN()
{
- assert debugEnter(CLASS_NAME, "getPreviousDN");
return previousDN;
}
@@ -404,7 +382,6 @@
*/
public void setPreviousDN(DN previousDN)
{
- assert debugEnter(CLASS_NAME, "setPreviousDN", String.valueOf(previousDN));
this.previousDN = previousDN;
@@ -421,7 +398,6 @@
*/
public long getChangeNumber()
{
- assert debugEnter(CLASS_NAME, "getChangeNumber");
return changeNumber;
}
@@ -436,8 +412,6 @@
*/
public void setChangeNumber(long changeNumber)
{
- assert debugEnter(CLASS_NAME, "setChangeNumber",
- String.valueOf(changeNumber));
this.changeNumber = changeNumber;
@@ -454,7 +428,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -471,7 +444,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("EntryChangeNotificationControl(changeType=");
buffer.append(changeType.toString());
diff --git a/opends/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java b/opends/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java
index 445176b..a876ac7 100644
--- a/opends/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPAssertionRequestControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -37,8 +37,10 @@
import org.opends.server.types.Control;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.SearchFilter;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -55,11 +57,6 @@
public class LDAPAssertionRequestControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.LDAPAssertionRequestControl";
@@ -85,8 +82,6 @@
super(OID_LDAP_ASSERTION, isCritical,
new ASN1OctetString(rawFilter.encode().encode()));
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(rawFilter));
this.rawFilter = rawFilter;
@@ -110,9 +105,6 @@
{
super(oid, isCritical, new ASN1OctetString(rawFilter.encode().encode()));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawFilter));
this.rawFilter = rawFilter;
@@ -138,10 +130,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawFilter),
- String.valueOf(encodedValue));
this.rawFilter = rawFilter;
@@ -165,7 +153,6 @@
public static LDAPAssertionRequestControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -182,7 +169,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_LDAPASSERT_INVALID_CONTROL_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -206,7 +196,6 @@
*/
public LDAPFilter getRawFilter()
{
- assert debugEnter(CLASS_NAME, "getRawFilter");
return rawFilter;
}
@@ -221,7 +210,6 @@
*/
public void setRawFilter(LDAPFilter rawFilter)
{
- assert debugEnter(CLASS_NAME, "setRawFilter", String.valueOf(rawFilter));
this.rawFilter = rawFilter;
this.filter = null;
@@ -242,7 +230,6 @@
public SearchFilter getSearchFilter()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getSearchFilter");
if (filter == null)
{
@@ -261,7 +248,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -278,7 +264,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPAssertionRequestControl(criticality=");
buffer.append(isCritical());
diff --git a/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java b/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
index ddf057f..70b65a7 100644
--- a/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPPostReadRequestControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -43,7 +43,9 @@
import org.opends.server.types.Control;
import org.opends.server.types.ObjectClass;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -60,11 +62,6 @@
public class LDAPPostReadRequestControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.LDAPPostReadRequestControl";
@@ -100,8 +97,6 @@
super(OID_LDAP_READENTRY_POSTREAD, isCritical,
encodeAttributes(rawAttributes));
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -135,9 +130,6 @@
{
super(oid, isCritical, encodeAttributes(rawAttributes));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -173,10 +165,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawAttributes),
- String.valueOf(encodedValue));
if (rawAttributes == null)
{
@@ -210,7 +198,6 @@
public static LDAPPostReadRequestControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -232,7 +219,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_POSTREADREQ_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -260,8 +250,6 @@
private static ASN1OctetString encodeAttributes(LinkedHashSet<String>
rawAttributes)
{
- assert debugEnter(CLASS_NAME, "encodeAttributes",
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -289,7 +277,6 @@
*/
public LinkedHashSet<String> getRawAttributes()
{
- assert debugEnter(CLASS_NAME, "getRawAttributes");
return rawAttributes;
}
@@ -304,8 +291,6 @@
*/
public void setRawAttributes(LinkedHashSet<String> rawAttributes)
{
- assert debugEnter(CLASS_NAME, "setRawAttributes",
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -331,7 +316,6 @@
*/
public LinkedHashSet<AttributeType> getRequestedAttributes()
{
- assert debugEnter(CLASS_NAME, "getRequestedAttributes");
if (requestedAttributes == null)
{
@@ -391,7 +375,6 @@
*/
public boolean returnAllUserAttributes()
{
- assert debugEnter(CLASS_NAME, "returnAllUserAttributes");
if (requestedAttributes == null)
{
@@ -415,7 +398,6 @@
*/
public boolean returnAllOperationalAttributes()
{
- assert debugEnter(CLASS_NAME, "returnAllOperationalAttributes");
if (requestedAttributes == null)
{
@@ -439,8 +421,6 @@
*/
public boolean allowsAttribute(AttributeType attrType)
{
- assert debugEnter(CLASS_NAME, "allowsAttribute",
- String.valueOf(attrType));
if (requestedAttributes == null)
{
@@ -471,7 +451,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -488,7 +467,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPPostReadRequestControl(criticality=");
buffer.append(isCritical());
diff --git a/opends/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java b/opends/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java
index a41879f..60aa7db 100644
--- a/opends/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPPostReadResponseControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -36,8 +36,10 @@
import org.opends.server.protocols.ldap.SearchResultEntryProtocolOp;
import org.opends.server.types.Control;
import org.opends.server.types.SearchResultEntry;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -52,11 +54,6 @@
public class LDAPPostReadResponseControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.LDAPPostReadResponseControl";
@@ -77,7 +74,6 @@
super(OID_LDAP_READENTRY_POSTREAD, false,
encodeEntry(searchEntry));
- assert debugConstructor(CLASS_NAME, String.valueOf(searchEntry));
this.searchEntry = searchEntry;
}
@@ -99,9 +95,6 @@
{
super(oid, isCritical, encodeEntry(searchEntry));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(searchEntry));
this.searchEntry = searchEntry;
}
@@ -125,10 +118,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(searchEntry),
- String.valueOf(encodedValue));
this.searchEntry = searchEntry;
}
@@ -151,7 +140,6 @@
public static LDAPPostReadResponseControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -172,7 +160,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_POSTREADRESP_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -181,7 +172,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "decodeControl", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
int msgID = MSGID_POSTREADRESP_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, le.getMessage());
@@ -205,7 +199,6 @@
*/
private static ASN1OctetString encodeEntry(SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "encodeEntry", String.valueOf(searchEntry));
SearchResultEntryProtocolOp protocolOp =
@@ -224,7 +217,6 @@
*/
public SearchResultEntry getSearchEntry()
{
- assert debugEnter(CLASS_NAME, "getSearchEntry");
return searchEntry;
}
@@ -240,8 +232,6 @@
*/
public void setSearchEntry(SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "setSearchEntry",
- String.valueOf(searchEntry));
this.searchEntry = searchEntry;
setValue(encodeEntry(searchEntry));
@@ -256,7 +246,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -273,7 +262,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPPostReadResponseControl(criticality=");
buffer.append(isCritical());
diff --git a/opends/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java b/opends/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java
index 8125ed9..0a6c0e2 100644
--- a/opends/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPPreReadRequestControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -42,8 +42,10 @@
import org.opends.server.types.AttributeType;
import org.opends.server.types.Control;
import org.opends.server.types.ObjectClass;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -60,11 +62,6 @@
public class LDAPPreReadRequestControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.LDAPPreReadRequestControl";
@@ -100,8 +97,6 @@
super(OID_LDAP_READENTRY_PREREAD, isCritical,
encodeAttributes(rawAttributes));
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -135,9 +130,6 @@
{
super(oid, isCritical, encodeAttributes(rawAttributes));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -173,10 +165,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(rawAttributes),
- String.valueOf(encodedValue));
if (rawAttributes == null)
{
@@ -210,7 +198,6 @@
public static LDAPPreReadRequestControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -232,7 +219,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_PREREADREQ_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -259,8 +249,6 @@
private static ASN1OctetString encodeAttributes(LinkedHashSet<String>
rawAttributes)
{
- assert debugEnter(CLASS_NAME, "encodeAttributes",
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -288,7 +276,6 @@
*/
public LinkedHashSet<String> getRawAttributes()
{
- assert debugEnter(CLASS_NAME, "getRawAttributes");
return rawAttributes;
}
@@ -303,8 +290,6 @@
*/
public void setRawAttributes(LinkedHashSet<String> rawAttributes)
{
- assert debugEnter(CLASS_NAME, "setRawAttributes",
- String.valueOf(rawAttributes));
if (rawAttributes == null)
{
@@ -330,7 +315,6 @@
*/
public LinkedHashSet<AttributeType> getRequestedAttributes()
{
- assert debugEnter(CLASS_NAME, "getRequestedAttributes");
if (requestedAttributes == null)
{
@@ -390,7 +374,6 @@
*/
public boolean returnAllUserAttributes()
{
- assert debugEnter(CLASS_NAME, "returnAllUserAttributes");
if (requestedAttributes == null)
{
@@ -414,7 +397,6 @@
*/
public boolean returnAllOperationalAttributes()
{
- assert debugEnter(CLASS_NAME, "returnAllOperationalAttributes");
if (requestedAttributes == null)
{
@@ -438,8 +420,6 @@
*/
public boolean allowsAttribute(AttributeType attrType)
{
- assert debugEnter(CLASS_NAME, "allowsAttribute",
- String.valueOf(attrType));
if (requestedAttributes == null)
{
@@ -470,7 +450,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -487,7 +466,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPPreReadRequestControl(criticality=");
buffer.append(isCritical());
diff --git a/opends/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java b/opends/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java
index 3a67243..bd1cb35 100644
--- a/opends/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java
+++ b/opends/src/server/org/opends/server/controls/LDAPPreReadResponseControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -36,8 +36,10 @@
import org.opends.server.protocols.ldap.SearchResultEntryProtocolOp;
import org.opends.server.types.Control;
import org.opends.server.types.SearchResultEntry;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -52,11 +54,6 @@
public class LDAPPreReadResponseControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.LDAPPreReadResponseControl";
@@ -77,7 +74,6 @@
super(OID_LDAP_READENTRY_PREREAD, false,
encodeEntry(searchEntry));
- assert debugConstructor(CLASS_NAME, String.valueOf(searchEntry));
this.searchEntry = searchEntry;
}
@@ -99,9 +95,6 @@
{
super(oid, isCritical, encodeEntry(searchEntry));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(searchEntry));
this.searchEntry = searchEntry;
}
@@ -125,10 +118,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(searchEntry),
- String.valueOf(encodedValue));
this.searchEntry = searchEntry;
}
@@ -151,7 +140,6 @@
public static LDAPPreReadResponseControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -172,7 +160,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_PREREADRESP_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -181,7 +172,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "decodeControl", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
int msgID = MSGID_PREREADRESP_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, le.getMessage());
@@ -205,7 +199,6 @@
*/
private static ASN1OctetString encodeEntry(SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "encodeEntry", String.valueOf(searchEntry));
SearchResultEntryProtocolOp protocolOp =
@@ -224,7 +217,6 @@
*/
public SearchResultEntry getSearchEntry()
{
- assert debugEnter(CLASS_NAME, "getSearchEntry");
return searchEntry;
}
@@ -240,8 +232,6 @@
*/
public void setSearchEntry(SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "setSearchEntry",
- String.valueOf(searchEntry));
this.searchEntry = searchEntry;
setValue(encodeEntry(searchEntry));
@@ -256,7 +246,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -273,7 +262,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPPreReadResponseControl(criticality=");
buffer.append(isCritical());
diff --git a/opends/src/server/org/opends/server/controls/MatchedValuesControl.java b/opends/src/server/org/opends/server/controls/MatchedValuesControl.java
index 2a9d385..796bb55 100644
--- a/opends/src/server/org/opends/server/controls/MatchedValuesControl.java
+++ b/opends/src/server/org/opends/server/controls/MatchedValuesControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -38,8 +38,10 @@
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.Control;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -56,11 +58,6 @@
public class MatchedValuesControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.MatchedValuesControl";
@@ -83,8 +80,6 @@
{
super(OID_MATCHED_VALUES, isCritical, encodeValue(filters));
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(filters));
this.filters = filters;
}
@@ -106,8 +101,6 @@
{
super(oid, isCritical, encodeValue(filters));
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(filters));
this.filters = filters;
}
@@ -132,8 +125,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(isCritical),
- String.valueOf(filters));
this.filters = filters;
}
@@ -151,8 +142,6 @@
private static ASN1OctetString
encodeValue(ArrayList<MatchedValuesFilter> filters)
{
- assert debugEnter(CLASS_NAME, "encodeValue",
- String.valueOf(filters));
ArrayList<ASN1Element> elements =
@@ -183,7 +172,6 @@
public static MatchedValuesControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
@@ -202,7 +190,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MATCHEDVALUES_CANNOT_DECODE_VALUE_AS_SEQUENCE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -239,7 +230,6 @@
*/
public ArrayList<MatchedValuesFilter> getFilters()
{
- assert debugEnter(CLASS_NAME, "getFilters");
return filters;
}
@@ -259,8 +249,6 @@
*/
public boolean valueMatches(AttributeType type, AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "valueMatches", String.valueOf(type),
- String.valueOf(value));
for (MatchedValuesFilter f : filters)
{
@@ -273,7 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -291,7 +282,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -308,7 +298,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
if (filters.size() == 1)
{
diff --git a/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java b/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
index 3076b20..10a9bf3 100644
--- a/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
+++ b/opends/src/server/org/opends/server/controls/MatchedValuesFilter.java
@@ -49,7 +49,9 @@
import org.opends.server.types.ConditionResult;
import org.opends.server.util.Validator;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -67,11 +69,6 @@
*/
public class MatchedValuesFilter
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.MatchedValuesFilter";
@@ -198,12 +195,6 @@
List<ASN1OctetString> subAny,
ASN1OctetString subFinal, String matchingRuleID)
{
- assert debugConstructor(CLASS_NAME, byteToHex(matchType),
- String.valueOf(rawAttributeType),
- String.valueOf(rawAssertionValue),
- String.valueOf(subInitial), String.valueOf(subAny),
- String.valueOf(subFinal),
- String.valueOf(matchingRuleID));
this.matchType = matchType;
@@ -241,9 +232,6 @@
String rawAttributeType,
ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "createEqualityFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(rawAssertionValue));
Validator.ensureNotNull(rawAttributeType,rawAssertionValue);
@@ -265,9 +253,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createEqualityFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
Validator.ensureNotNull(attributeType, assertionValue);
@@ -302,10 +287,6 @@
List<ASN1OctetString> subAny,
ASN1OctetString subFinal)
{
- assert debugEnter(CLASS_NAME, "createSubstringsFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(subInitial), String.valueOf(subAny),
- String.valueOf(subFinal));
Validator.ensureNotNull(rawAttributeType);
@@ -331,9 +312,6 @@
List<ASN1OctetString> subAny,
ASN1OctetString subFinal)
{
- assert debugEnter(CLASS_NAME, "createSubstringsFilter",
- String.valueOf(attributeType), String.valueOf(subInitial),
- String.valueOf(subAny), String.valueOf(subFinal));
Validator.ensureNotNull(attributeType);
@@ -361,9 +339,6 @@
String rawAttributeType,
ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "createGreaterOrEqualFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(rawAssertionValue));
Validator.ensureNotNull(rawAttributeType, rawAssertionValue);
@@ -385,9 +360,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createGreaterOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
Validator.ensureNotNull(attributeType, assertionValue);
@@ -418,9 +390,6 @@
String rawAttributeType,
ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "createLessOrEqualFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(rawAssertionValue));
Validator.ensureNotNull(rawAttributeType, rawAssertionValue);
@@ -442,9 +411,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createLessOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
Validator.ensureNotNull(attributeType, assertionValue);
@@ -472,8 +438,6 @@
*/
public static MatchedValuesFilter createPresentFilter(String rawAttributeType)
{
- assert debugEnter(CLASS_NAME, "createPresentFilter",
- String.valueOf(rawAttributeType));
Validator.ensureNotNull(rawAttributeType) ;
return new MatchedValuesFilter(PRESENT_TYPE, rawAttributeType, null, null,
@@ -492,8 +456,6 @@
public static MatchedValuesFilter createPresentFilter(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "createPresentFilter",
- String.valueOf(attributeType));
Validator.ensureNotNull(attributeType);
String rawAttributeType = attributeType.getNameOrOID();
@@ -520,9 +482,6 @@
String rawAttributeType,
ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "createApproximateFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(rawAssertionValue));
Validator.ensureNotNull(rawAttributeType,rawAssertionValue);
@@ -544,9 +503,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createApproximateFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
Validator.ensureNotNull(attributeType,assertionValue);
@@ -579,10 +535,6 @@
String matchingRuleID,
ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "createExtensibleMatchFilter",
- String.valueOf(rawAttributeType),
- String.valueOf(matchingRuleID),
- String.valueOf(rawAssertionValue));
Validator
.ensureNotNull(rawAttributeType, matchingRuleID, rawAssertionValue);
@@ -607,10 +559,6 @@
MatchingRule matchingRule,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createExtensibleMatchFilter",
- String.valueOf(attributeType),
- String.valueOf(matchingRule),
- String.valueOf(assertionValue));
Validator.ensureNotNull(attributeType, matchingRule, assertionValue);
@@ -645,8 +593,6 @@
public static MatchedValuesFilter createFromLDAPFilter(LDAPFilter filter)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "createFromLDAPFilter",
- String.valueOf(filter));
switch (filter.getFilterType())
{
@@ -736,7 +682,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
switch (matchType)
@@ -824,7 +769,6 @@
public static MatchedValuesFilter decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
switch (element.getType())
@@ -860,7 +804,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MVFILTER_CANNOT_DECODE_AVA;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -959,7 +906,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MVFILTER_CANNOT_DECODE_SUBSTRINGS;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -979,7 +929,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MVFILTER_CANNOT_DECODE_PRESENT_TYPE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1073,7 +1026,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MVFILTER_CANNOT_DECODE_EXTENSIBLE_MATCH;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1098,7 +1054,6 @@
*/
public byte getMatchType()
{
- assert debugEnter(CLASS_NAME, "getMatchType");
return matchType;
}
@@ -1114,7 +1069,6 @@
*/
public String getRawAttributeType()
{
- assert debugEnter(CLASS_NAME, "getRawAttributeType");
return rawAttributeType;
}
@@ -1130,8 +1084,6 @@
*/
public void setRawAttributeType(String rawAttributeType)
{
- assert debugEnter(CLASS_NAME, "setRawAttributeType",
- String.valueOf(rawAttributeType));
this.rawAttributeType = rawAttributeType;
@@ -1153,7 +1105,6 @@
*/
public AttributeType getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
if (attributeType == null)
{
@@ -1181,8 +1132,6 @@
*/
public void setAttributeType(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "setAttributeType",
- String.valueOf(attributeType));
this.attributeType = attributeType;
@@ -1213,7 +1162,6 @@
*/
public ASN1OctetString getRawAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getRawAssertionValue");
return rawAssertionValue;
}
@@ -1229,8 +1177,6 @@
*/
public void setRawAssertionValue(ASN1OctetString rawAssertionValue)
{
- assert debugEnter(CLASS_NAME, "setRawAssertionValue",
- String.valueOf(rawAssertionValue));
this.rawAssertionValue = rawAssertionValue;
@@ -1248,7 +1194,6 @@
*/
public AttributeValue getAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getAssertionValue");
if (assertionValue == null)
{
@@ -1271,8 +1216,6 @@
*/
public void setAssertionValue(AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "setAssertionValue",
- String.valueOf(assertionValue));
this.assertionValue = assertionValue;
@@ -1298,7 +1241,6 @@
*/
public ASN1OctetString getSubInitialElement()
{
- assert debugEnter(CLASS_NAME, "getSubInitialElement");
return subInitial;
}
@@ -1312,8 +1254,6 @@
*/
public void setSubInitialElement(ASN1OctetString subInitial)
{
- assert debugEnter(CLASS_NAME, "setSubInitialElement",
- String.valueOf(subInitial));
this.subInitial = subInitial;
@@ -1331,7 +1271,6 @@
*/
public ASN1OctetString getNormalizedSubInitialElement()
{
- assert debugEnter(CLASS_NAME, "getNormalizedSubInitialElement");
if (normalizedSubInitial == null)
{
@@ -1345,8 +1284,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getNormalizedSubInitialElement",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1365,7 +1306,6 @@
*/
public List<ASN1OctetString> getSubAnyElements()
{
- assert debugEnter(CLASS_NAME, "getSubAnyElements");
return subAny;
}
@@ -1379,7 +1319,6 @@
*/
public void setSubAnyElements(List<ASN1OctetString> subAny)
{
- assert debugEnter(CLASS_NAME, "setSubAnyElements", String.valueOf(subAny));
this.subAny = subAny;
@@ -1400,7 +1339,6 @@
*/
public List<ASN1OctetString> getNormalizedSubAnyElements()
{
- assert debugEnter(CLASS_NAME, "getNormalizedSubAnyElements");
if (normalizedSubAny == null)
{
@@ -1427,7 +1365,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getNormalizedSubAnyElements", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
normalizedSubAny = null;
}
@@ -1447,7 +1388,6 @@
*/
public ASN1OctetString getSubFinalElement()
{
- assert debugEnter(CLASS_NAME, "getSubFinal");
return subFinal;
}
@@ -1461,8 +1401,6 @@
*/
public void setSubFinalElement(ASN1OctetString subFinal)
{
- assert debugEnter(CLASS_NAME, "setSubFinalElement",
- String.valueOf(subFinal));
this.subFinal = subFinal;
@@ -1480,7 +1418,6 @@
*/
public ASN1OctetString getNormalizedSubFinalElement()
{
- assert debugEnter(CLASS_NAME, "getNormalizedSubFinalElement");
if (normalizedSubFinal == null)
{
@@ -1494,7 +1431,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getNormalizedSubFinalElement", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1512,7 +1452,6 @@
*/
public String getMatchingRuleID()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleID");
return matchingRuleID;
}
@@ -1527,8 +1466,6 @@
*/
public void setMatchingRuleID(String matchingRuleID)
{
- assert debugEnter(CLASS_NAME, "setMatchingRuleID",
- String.valueOf(matchingRuleID));
this.matchingRuleID = matchingRuleID;
@@ -1546,7 +1483,6 @@
*/
public MatchingRule getMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getMatchingRule");
if (matchingRule == null)
{
@@ -1569,8 +1505,6 @@
*/
public void setMatchingRule(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "setMatchingRule",
- String.valueOf(matchingRule));
this.matchingRule = matchingRule;
@@ -1597,7 +1531,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
if (approximateMatchingRule == null)
{
@@ -1622,7 +1555,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
if (equalityMatchingRule == null)
{
@@ -1647,7 +1579,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
if (orderingMatchingRule == null)
{
@@ -1672,7 +1603,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
if (substringMatchingRule == null)
{
@@ -1726,8 +1656,6 @@
*/
public boolean valueMatches(AttributeType type, AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "valueMatches", String.valueOf(type),
- String.valueOf(value));
fullyDecode();
@@ -1747,7 +1675,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1773,7 +1704,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1797,7 +1731,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1821,7 +1758,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1853,7 +1793,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1890,7 +1833,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1910,7 +1856,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1932,7 +1881,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -1949,7 +1897,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
switch (matchType)
{
diff --git a/opends/src/server/org/opends/server/controls/PagedResultsControl.java b/opends/src/server/org/opends/server/controls/PagedResultsControl.java
index faba4af..84095fe 100644
--- a/opends/src/server/org/opends/server/controls/PagedResultsControl.java
+++ b/opends/src/server/org/opends/server/controls/PagedResultsControl.java
@@ -22,13 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.protocols.ldap.LDAPResultCode.PROTOCOL_ERROR;
@@ -60,11 +60,6 @@
*/
public class PagedResultsControl extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PagedResultsControl";
/**
@@ -93,8 +88,6 @@
{
super(OID_PAGED_RESULTS_CONTROL, isCritical);
- assert debugConstructor(CLASS_NAME, String.valueOf(size),
- cookie.toString());
this.size = size;
this.cookie = cookie;
@@ -133,7 +126,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -154,7 +150,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_SIZE;
String message = getMessage(msgID, String.valueOf(e));
@@ -167,7 +166,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_PAGED_RESULTS_DECODE_COOKIE;
String message = getMessage(msgID, String.valueOf(e));
@@ -183,7 +185,6 @@
*/
public ASN1OctetString encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(new ASN1Integer(size));
diff --git a/opends/src/server/org/opends/server/controls/PasswordExpiredControl.java b/opends/src/server/org/opends/server/controls/PasswordExpiredControl.java
index 6fbbed7..dc9d558 100644
--- a/opends/src/server/org/opends/server/controls/PasswordExpiredControl.java
+++ b/opends/src/server/org/opends/server/controls/PasswordExpiredControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -32,7 +32,6 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -46,11 +45,6 @@
public class PasswordExpiredControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PasswordExpiredControl";
@@ -62,7 +56,6 @@
{
super(OID_NS_PASSWORD_EXPIRED, false);
- assert debugConstructor(CLASS_NAME);
}
@@ -79,8 +72,6 @@
{
super(oid, isCritical);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
}
@@ -100,7 +91,6 @@
public static PasswordExpiredControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (control.hasValue())
{
@@ -122,7 +112,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -139,7 +128,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("PasswordExpiredControl()");
}
diff --git a/opends/src/server/org/opends/server/controls/PasswordExpiringControl.java b/opends/src/server/org/opends/server/controls/PasswordExpiringControl.java
index 441e9c2..6397bc9 100644
--- a/opends/src/server/org/opends/server/controls/PasswordExpiringControl.java
+++ b/opends/src/server/org/opends/server/controls/PasswordExpiringControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -32,8 +32,10 @@
import org.opends.server.protocols.ldap.LDAPException;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -50,11 +52,6 @@
public class PasswordExpiringControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PasswordExpiringControl";
@@ -75,7 +72,6 @@
super(OID_NS_PASSWORD_EXPIRING, false,
new ASN1OctetString(String.valueOf(secondsUntilExpiration)));
- assert debugConstructor(CLASS_NAME);
this.secondsUntilExpiration = secondsUntilExpiration;
}
@@ -99,8 +95,6 @@
super(oid, isCritical,
new ASN1OctetString(String.valueOf(secondsUntilExpiration)));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
this.secondsUntilExpiration = secondsUntilExpiration;
}
@@ -125,8 +119,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
this.secondsUntilExpiration = secondsUntilExpiration;
}
@@ -148,7 +140,6 @@
public static PasswordExpiringControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
{
@@ -166,7 +157,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWEXPIRING_CANNOT_DECODE_SECONDS_UNTIL_EXPIRATION;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -189,7 +183,6 @@
*/
public int getSecondsUntilExpiration()
{
- assert debugEnter(CLASS_NAME, "getSecondsUntilExpiration");
return secondsUntilExpiration;
}
@@ -203,7 +196,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -220,7 +212,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("PasswordExpiringControl(secondsUntilExpiration=");
buffer.append(secondsUntilExpiration);
diff --git a/opends/src/server/org/opends/server/controls/PasswordPolicyErrorType.java b/opends/src/server/org/opends/server/controls/PasswordPolicyErrorType.java
index 9e51310..fd4b606 100644
--- a/opends/src/server/org/opends/server/controls/PasswordPolicyErrorType.java
+++ b/opends/src/server/org/opends/server/controls/PasswordPolicyErrorType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
diff --git a/opends/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java b/opends/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java
index 51abc53..f542cc2 100644
--- a/opends/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java
+++ b/opends/src/server/org/opends/server/controls/PasswordPolicyRequestControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -32,7 +32,6 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -46,11 +45,6 @@
public class PasswordPolicyRequestControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PasswordPolicyRequestControl";
@@ -62,7 +56,6 @@
{
super(OID_PASSWORD_POLICY_CONTROL, false);
- assert debugConstructor(CLASS_NAME);
}
@@ -79,8 +72,6 @@
{
super(oid, isCritical);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
}
@@ -101,7 +92,6 @@
public static PasswordPolicyRequestControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (control.hasValue())
{
@@ -124,7 +114,7 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
+
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -141,7 +131,7 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
+
buffer.append("PasswordPolicyRequestControl()");
}
diff --git a/opends/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java b/opends/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java
index d5af508..9f0b316 100644
--- a/opends/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java
+++ b/opends/src/server/org/opends/server/controls/PasswordPolicyResponseControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -40,7 +40,9 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -56,11 +58,6 @@
public class PasswordPolicyResponseControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PasswordPolicyResponseControl";
@@ -97,7 +94,6 @@
{
super(OID_PASSWORD_POLICY_CONTROL, false, encodeValue(null, -1, null));
- assert debugConstructor(CLASS_NAME);
warningType = null;
errorType = null;
@@ -127,9 +123,6 @@
super(OID_PASSWORD_POLICY_CONTROL, false,
encodeValue(warningType, warningValue, errorType));
- assert debugConstructor(CLASS_NAME, String.valueOf(warningType),
- String.valueOf(warningValue),
- String.valueOf(errorType));
this.warningType = warningType;
this.warningValue = warningValue;
@@ -161,11 +154,6 @@
{
super(oid, isCritical, encodeValue(warningType, warningValue, errorType));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(warningType),
- String.valueOf(warningValue),
- String.valueOf(errorType));
this.warningType = warningType;
this.warningValue = warningValue;
@@ -199,11 +187,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(warningType),
- String.valueOf(warningValue),
- String.valueOf(errorType));
this.warningType = warningType;
this.warningValue = warningValue;
@@ -232,8 +215,6 @@
int warningValue,
PasswordPolicyErrorType errorType)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(warningType),
- String.valueOf(warningValue), String.valueOf(errorType));
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
@@ -273,7 +254,6 @@
public static PasswordPolicyResponseControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
ASN1OctetString controlValue = control.getValue();
@@ -344,7 +324,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_PWPOLICYRES_DECODE_ERROR;
String message = getMessage(msgID, ae.getMessage());
@@ -352,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWPOLICYRES_DECODE_ERROR;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -370,7 +356,6 @@
*/
public PasswordPolicyWarningType getWarningType()
{
- assert debugEnter(CLASS_NAME, "getWarningType");
return warningType;
}
@@ -385,7 +370,6 @@
*/
public int getWarningValue()
{
- assert debugEnter(CLASS_NAME, "getWarningValue");
return warningValue;
}
@@ -400,7 +384,6 @@
*/
public PasswordPolicyErrorType getErrorType()
{
- assert debugEnter(CLASS_NAME, "getErrorType");
return errorType;
}
@@ -414,7 +397,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -431,7 +413,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("PasswordPolicyResponseControl(");
diff --git a/opends/src/server/org/opends/server/controls/PasswordPolicyWarningType.java b/opends/src/server/org/opends/server/controls/PasswordPolicyWarningType.java
index 0b75587..eb161c4 100644
--- a/opends/src/server/org/opends/server/controls/PasswordPolicyWarningType.java
+++ b/opends/src/server/org/opends/server/controls/PasswordPolicyWarningType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
diff --git a/opends/src/server/org/opends/server/controls/PersistentSearchChangeType.java b/opends/src/server/org/opends/server/controls/PersistentSearchChangeType.java
index a96d3ee..87f64ca 100644
--- a/opends/src/server/org/opends/server/controls/PersistentSearchChangeType.java
+++ b/opends/src/server/org/opends/server/controls/PersistentSearchChangeType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
diff --git a/opends/src/server/org/opends/server/controls/PersistentSearchControl.java b/opends/src/server/org/opends/server/controls/PersistentSearchControl.java
index 48ccbca..1bd7ae0 100644
--- a/opends/src/server/org/opends/server/controls/PersistentSearchControl.java
+++ b/opends/src/server/org/opends/server/controls/PersistentSearchControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.controls;
@@ -40,7 +40,9 @@
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -56,11 +58,6 @@
public class PersistentSearchControl
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.PersistentSearchControl";
@@ -95,9 +92,6 @@
super(OID_PERSISTENT_SEARCH, true,
encodeValue(changeTypes, changesOnly, returnECs));
- assert debugConstructor(CLASS_NAME, String.valueOf(changeTypes),
- String.valueOf(changesOnly),
- String.valueOf(returnECs));
this.changeTypes = changeTypes;
this.changesOnly = changesOnly;
@@ -127,11 +121,6 @@
{
super(oid, isCritical, encodeValue(changeTypes, changesOnly, returnECs));
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(changeTypes),
- String.valueOf(changesOnly),
- String.valueOf(returnECs));
this.changeTypes = changeTypes;
this.changesOnly = changesOnly;
@@ -163,12 +152,6 @@
{
super(oid, isCritical, encodedValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(changeTypes),
- String.valueOf(changesOnly),
- String.valueOf(returnECs),
- String.valueOf(encodedValue));
this.changeTypes = changeTypes;
this.changesOnly = changesOnly;
@@ -197,8 +180,6 @@
boolean changesOnly,
boolean returnECs)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(changeTypes),
- String.valueOf(changesOnly), String.valueOf(returnECs));
ArrayList<ASN1Element> elements =
@@ -229,7 +210,6 @@
public static PersistentSearchControl decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
if (! control.hasValue())
@@ -265,7 +245,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PSEARCH_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -287,7 +270,6 @@
*/
public Set<PersistentSearchChangeType> getChangeTypes()
{
- assert debugEnter(CLASS_NAME, "getChangeTypes");
return changeTypes;
}
@@ -302,8 +284,6 @@
*/
public void setChangeTypes(Set<PersistentSearchChangeType> changeTypes)
{
- assert debugEnter(CLASS_NAME, "setChangeTypes",
- String.valueOf(changeTypes));
this.changeTypes = changeTypes;
@@ -322,7 +302,6 @@
*/
public boolean getChangesOnly()
{
- assert debugEnter(CLASS_NAME, "getChangesOnly");
return changesOnly;
}
@@ -339,8 +318,6 @@
*/
public void setChangesOnly(boolean changesOnly)
{
- assert debugEnter(CLASS_NAME, "setChangesOnly",
- String.valueOf(changesOnly));
this.changesOnly = changesOnly;
@@ -359,7 +336,6 @@
*/
public boolean getReturnECs()
{
- assert debugEnter(CLASS_NAME, "getReturnECs");
return returnECs;
}
@@ -377,7 +353,6 @@
*/
public void setReturnECs(boolean returnECs)
{
- assert debugEnter(CLASS_NAME, "setReturnECs", String.valueOf(returnECs));
this.returnECs = returnECs;
@@ -393,7 +368,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -410,7 +384,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("PersistentSearchControl(changeTypes=\"");
PersistentSearchChangeType.changeTypesToString(changeTypes, buffer);
diff --git a/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java b/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
index 4af026e..3e0b530 100644
--- a/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
+++ b/opends/src/server/org/opends/server/controls/ProxiedAuthV1Control.java
@@ -45,7 +45,9 @@
import org.opends.server.types.LockManager;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -66,11 +68,6 @@
public class ProxiedAuthV1Control
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.ProxiedAuthV1Control";
@@ -93,7 +90,6 @@
{
super(OID_PROXIED_AUTH_V1, true, encodeValue(rawAuthorizationDN));
- assert debugConstructor(CLASS_NAME, String.valueOf(rawAuthorizationDN));
this.rawAuthorizationDN = rawAuthorizationDN;
@@ -114,7 +110,6 @@
super(OID_PROXIED_AUTH_V1, true,
encodeValue(new ASN1OctetString(authorizationDN.toString())));
- assert debugConstructor(CLASS_NAME, String.valueOf(authorizationDN));
this.authorizationDN = authorizationDN;
@@ -141,10 +136,6 @@
{
super(oid, isCritical, controlValue);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(controlValue),
- String.valueOf(rawAuthorizationDN));
this.rawAuthorizationDN = rawAuthorizationDN;
@@ -165,8 +156,6 @@
*/
private static ASN1OctetString encodeValue(ASN1OctetString rawAuthorizationDN)
{
- assert debugEnter(CLASS_NAME, "encodeValue",
- String.valueOf(rawAuthorizationDN));
ensureNotNull(rawAuthorizationDN);
@@ -195,7 +184,6 @@
public static ProxiedAuthV1Control decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
ensureNotNull(control);
@@ -235,7 +223,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PROXYAUTH1_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -255,7 +246,6 @@
*/
public ASN1OctetString getRawAuthorizationDN()
{
- assert debugEnter(CLASS_NAME, "getRawAuthorizationDN");
return rawAuthorizationDN;
}
@@ -271,8 +261,6 @@
*/
public void setRawAuthorizationDN(ASN1OctetString rawAuthorizationDN)
{
- assert debugEnter(CLASS_NAME, "setRawAuthorizationDN",
- String.valueOf(rawAuthorizationDN));
this.rawAuthorizationDN = rawAuthorizationDN;
@@ -293,7 +281,6 @@
public DN getAuthorizationDN()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthorizationDN");
if (authorizationDN == null)
{
@@ -313,8 +300,6 @@
*/
public void setAuthorizationDN(DN authorizationDN)
{
- assert debugEnter(CLASS_NAME, "setAuthorizationDN",
- String.valueOf(authorizationDN));
ensureNotNull(authorizationDN);
@@ -343,7 +328,6 @@
public Entry getAuthorizationEntry()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthorizationEntry");
DN authzDN = getAuthorizationDN();
if (authzDN.isNullDN())
@@ -427,7 +411,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -444,7 +427,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ProxiedAuthorizationV1Control(authorizationDN=\"");
rawAuthorizationDN.toString(buffer);
diff --git a/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java b/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
index 068151e..c8410a1 100644
--- a/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
+++ b/opends/src/server/org/opends/server/controls/ProxiedAuthV2Control.java
@@ -44,7 +44,9 @@
import org.opends.server.types.LockManager;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -64,11 +66,6 @@
public class ProxiedAuthV2Control
extends Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.controls.ProxiedAuthV2Control";
@@ -87,7 +84,6 @@
{
super(OID_PROXIED_AUTH_V2, true, authorizationID);
- assert debugConstructor(CLASS_NAME, String.valueOf(authorizationID));
ensureNotNull(authorizationID);
this.authorizationID = authorizationID;
@@ -110,9 +106,6 @@
{
super(oid, isCritical, authorizationID);
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(authorizationID));
this.authorizationID = authorizationID;
}
@@ -136,7 +129,6 @@
public static ProxiedAuthV2Control decodeControl(Control control)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControl", String.valueOf(control));
ensureNotNull(control);
@@ -170,7 +162,10 @@
}
else
{
- assert debugException(CLASS_NAME, "decodeControl", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_PROXYAUTH2_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, stackTraceToSingleLineString(ae));
@@ -180,7 +175,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeControl", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PROXYAUTH2_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -200,7 +198,6 @@
*/
public ASN1OctetString getAuthorizationID()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationID");
return authorizationID;
}
@@ -215,8 +212,6 @@
*/
public void setAuthorizationID(ASN1OctetString authorizationID)
{
- assert debugEnter(CLASS_NAME, "setAuthorizationID",
- String.valueOf(authorizationID));
if (authorizationID == null)
{
@@ -249,7 +244,6 @@
public Entry getAuthorizationEntry()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getValidatedAuthorizationDN");
// Check for a zero-length value, which would be for an anonymous user.
@@ -405,7 +399,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -422,7 +415,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ProxiedAuthorizationV2Control(authzID=\"");
authorizationID.toString(buffer);
diff --git a/opends/src/server/org/opends/server/controls/package-info.java b/opends/src/server/org/opends/server/controls/package-info.java
index c2f289c..2ad7fcc 100644
--- a/opends/src/server/org/opends/server/controls/package-info.java
+++ b/opends/src/server/org/opends/server/controls/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/core/AbandonOperation.java b/opends/src/server/org/opends/server/core/AbandonOperation.java
index 8e6aff3..1610cb7 100644
--- a/opends/src/server/org/opends/server/core/AbandonOperation.java
+++ b/opends/src/server/org/opends/server/core/AbandonOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -43,7 +43,6 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -58,11 +57,6 @@
extends Operation
implements PreParseAbandonOperation, PostOperationAbandonOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.AbandonOperation";
@@ -95,11 +89,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(idToAbandon));
this.idToAbandon = idToAbandon;
}
@@ -113,7 +102,6 @@
*/
public final int getIDToAbandon()
{
- assert debugEnter(CLASS_NAME, "getIDToAbandon");
return idToAbandon;
}
@@ -126,7 +114,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -139,7 +126,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -152,7 +138,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -165,7 +150,6 @@
@Override()
public final OperationType getOperationType()
{
- assert debugEnter(CLASS_NAME, "getOperationType");
// Note that no debugging will be done in this method because it is a likely
// candidate for being called by the logging subsystem.
@@ -197,7 +181,6 @@
@Override()
public final String[][] getRequestLogElements()
{
- assert debugEnter(CLASS_NAME, "getRequestLogElements");
// Note that no debugging will be done in this method because it is a likely
// candidate for being called by the logging subsystem.
@@ -253,7 +236,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
// An abandon operation can never have a response, so just return an empty
// list.
@@ -290,7 +272,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -392,7 +373,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
cancelRequest.addResponseMessage(getMessage(MSGID_CANNOT_CANCEL_ABANDON));
return CancelResult.CANNOT_CANCEL;
@@ -406,7 +386,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return null;
}
@@ -419,8 +398,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
// Abandon operations cannot be canceled.
return false;
@@ -434,7 +411,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AbandonOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/AbsoluteSubtreeSpecification.java b/opends/src/server/org/opends/server/core/AbsoluteSubtreeSpecification.java
index 53d8abd..952bf51 100644
--- a/opends/src/server/org/opends/server/core/AbsoluteSubtreeSpecification.java
+++ b/opends/src/server/org/opends/server/core/AbsoluteSubtreeSpecification.java
@@ -22,12 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.SchemaMessages.*;
@@ -94,9 +92,6 @@
*/
public final class AbsoluteSubtreeSpecification extends
SimpleSubtreeSpecification {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME = AbsoluteSubtreeSpecification.class
- .getName();
// The optional search filter.
private SearchFilter filter;
@@ -118,7 +113,6 @@
*/
public static AbsoluteSubtreeSpecification valueOf(String s)
throws DirectoryException {
- assert debugEnter(CLASS_NAME, "valueOf");
// Default values.
DN absoluteBaseDN = null;
@@ -254,7 +248,6 @@
SearchFilter filter) {
super(absoluteBaseDN, minimumDepth, maximumDepth, chopBefore, chopAfter);
- assert debugConstructor(CLASS_NAME);
this.filter = filter;
}
@@ -265,7 +258,6 @@
* @return Returns the absolute base DN.
*/
public DN getAbsoluteBaseDN() {
- assert debugEnter(CLASS_NAME, "getAbsoluteBaseDN");
return getBaseDN();
}
@@ -276,7 +268,6 @@
* is no filter.
*/
public SearchFilter getFilter() {
- assert debugEnter(CLASS_NAME, "getFilter");
return filter;
}
@@ -285,7 +276,6 @@
*/
@Override
public boolean isWithinScope(Entry entry) {
- assert debugEnter(CLASS_NAME, "isWithinScope");
if (isDNWithinScope(entry.getDN())) {
try {
@@ -305,7 +295,6 @@
*/
@Override
public StringBuilder toString(StringBuilder builder) {
- assert debugEnter(CLASS_NAME, "toString");
builder.append("{ absoluteBase ");
StaticUtils.toRFC3641StringValue(builder, getBaseDN().toString());
@@ -371,7 +360,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -403,7 +391,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
int hash = commonComponentsHashCode();
diff --git a/opends/src/server/org/opends/server/core/AccessControlConfigManager.java b/opends/src/server/org/opends/server/core/AccessControlConfigManager.java
index dacc68b..3e9519f 100644
--- a/opends/src/server/org/opends/server/core/AccessControlConfigManager.java
+++ b/opends/src/server/org/opends/server/core/AccessControlConfigManager.java
@@ -27,7 +27,9 @@
package org.opends.server.core;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -63,7 +65,7 @@
public final class AccessControlConfigManager
implements AlertGenerator
{
- // Fully qualified class name for debugging purposes.
+ // Fully qualified class name.
private static final String CLASS_NAME =
"org.opends.server.core.AccessControlConfigManager";
@@ -82,7 +84,6 @@
* @return The access control manager.
*/
public static AccessControlConfigManager getInstance() {
- assert debugEnter(CLASS_NAME, "getInstance");
if (instance == null) {
instance = new AccessControlConfigManager();
@@ -98,7 +99,6 @@
* <code>false</code> otherwise.
*/
public boolean isAccessControlEnabled() {
- assert debugEnter(CLASS_NAME, "isEnabled");
return currentConfiguration.isEnabled();
}
@@ -112,7 +112,6 @@
* <code>null</code>).
*/
public AccessControlHandler getAccessControlHandler() {
- assert debugEnter(CLASS_NAME, "getAccessControlHandler");
return accessControlProvider.get().getInstance();
}
@@ -132,7 +131,6 @@
*/
void initializeAccessControl() throws ConfigException,
InitializationException {
- assert debugEnter(CLASS_NAME, "initializeAccessControl");
// Get the access control handler configuration entry.
ConfigEntry configEntry;
@@ -140,8 +138,10 @@
DN configEntryDN = DN.decode(DN_AUTHZ_HANDLER_CONFIG);
configEntry = DirectoryServer.getConfigEntry(configEntryDN);
} catch (Exception e) {
- assert debugException(CLASS_NAME,
- "initializeAccessControlConfigManager", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_AUTHZ_CANNOT_GET_ENTRY;
String message = getMessage(msgID,
@@ -173,7 +173,6 @@
* manager.
*/
private AccessControlConfigManager() {
- assert debugConstructor(CLASS_NAME);
this.accessControlProvider = new AtomicReference<AccessControlProvider>(
new DefaultAccessControlProvider());
@@ -194,7 +193,6 @@
*/
private void updateConfiguration(Configuration newConfiguration)
throws ConfigException, InitializationException {
- assert debugEnter(CLASS_NAME, "updateConfiguration");
DN configEntryDN = newConfiguration.getConfigEntry().getDN();
Class<? extends AccessControlProvider> newHandlerClass = null;
@@ -233,7 +231,10 @@
try {
newHandler = newHandlerClass.newInstance();
} catch (Exception e) {
- assert debugException(CLASS_NAME, "updateConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_AUTHZ_UNABLE_TO_INSTANTIATE_HANDLER;
String message = getMessage(msgID, newHandlerClass.getName(),
@@ -289,16 +290,12 @@
* Internal class implementing the change listener interface.
*/
private class ChangeListener implements ConfigChangeListener {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.core.AccessControlConfigManager.ChangeListener";
/**
* {@inheritDoc}
*/
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason) {
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable");
try {
// Parse the configuration entry.
@@ -316,8 +313,6 @@
*/
public ConfigChangeResult applyConfigurationChange(
ConfigEntry configEntry) {
- assert debugEnter(CLASS_NAME, "applyConfigurationChange", String
- .valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
ArrayList<String> messages = new ArrayList<String>();
@@ -345,9 +340,6 @@
* Internal class used to represent the parsed configuration entry.
*/
private static class Configuration {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.core.AccessControlConfigManager.Configuration";
// Flag indicating whether or not access control is enabled.
private boolean enabled;
@@ -371,7 +363,6 @@
*/
public static Configuration readConfiguration(
ConfigEntry configEntry) throws ConfigException {
- assert debugEnter(CLASS_NAME, "createConfiguration");
// The access control configuration entry must have the correct
// object class.
@@ -397,7 +388,6 @@
* <code>false</code> otherwise.
*/
public boolean isEnabled() {
- assert debugEnter(CLASS_NAME, "isEnabled");
return enabled;
}
@@ -408,7 +398,6 @@
* @return Returns the {@link AccessControlProvider} class.
*/
public Class<? extends AccessControlProvider> getProviderClass() {
- assert debugEnter(CLASS_NAME, "getProviderClass");
return providerClass;
}
@@ -419,7 +408,6 @@
* @return Returns the configuration entry.
*/
public ConfigEntry getConfigEntry() {
- assert debugEnter(CLASS_NAME, "getConfigEntry");
return configEntry;
}
@@ -436,7 +424,6 @@
*/
private Configuration(ConfigEntry configEntry, boolean enabled,
Class<? extends AccessControlProvider> providerClass) {
- assert debugConstructor(CLASS_NAME);
this.configEntry = configEntry;
this.enabled = enabled;
@@ -456,7 +443,6 @@
*/
private static boolean getEnabledAttribute(ConfigEntry configEntry)
throws ConfigException {
- assert debugEnter(CLASS_NAME, "getEnabledAttribute");
// See if the entry contains an attribute that indicates whether
// or not access control should be enabled.
@@ -499,7 +485,6 @@
*/
private static Class<? extends AccessControlProvider> getClassAttribute(
ConfigEntry configEntry) throws ConfigException {
- assert debugEnter(CLASS_NAME, "getClassAttribute");
// If access control is enabled then make sure that the class
// attribute is present.
@@ -525,7 +510,10 @@
return Class.forName(className).asSubclass(
AccessControlProvider.class);
} catch (ClassNotFoundException e) {
- assert debugException(CLASS_NAME, "updateConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_AUTHZ_UNABLE_TO_LOAD_CLASS;
String message = getMessage(msgID, className, String
@@ -533,7 +521,10 @@
stackTraceToSingleLineString(e));
throw new ConfigException(msgID, message, e);
} catch (ClassCastException e) {
- assert debugException(CLASS_NAME, "updateConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_AUTHZ_BAD_CLASS;
String message = getMessage(msgID, className, String
@@ -562,7 +553,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return currentConfiguration.getConfigEntry().getDN();
}
@@ -578,7 +568,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -598,7 +587,6 @@
*/
public LinkedHashMap<String,String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>();
diff --git a/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java b/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
index c0b66e1..cb848b7 100644
--- a/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
+++ b/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -71,11 +73,6 @@
public class AccountStatusNotificationHandlerConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.AccountStatusNotificationHandlerConfigManager";
@@ -95,7 +92,6 @@
*/
public AccountStatusNotificationHandlerConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
notificationHandlers =
@@ -121,7 +117,6 @@
public void initializeNotificationHandlers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeNotificationHandlers");
// First, get the configuration base entry.
@@ -133,8 +128,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeNotificationHandlers",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -237,8 +234,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for an account
@@ -273,7 +268,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -290,7 +288,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -306,7 +307,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -338,7 +342,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -367,8 +374,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -451,7 +456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -486,7 +494,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -528,7 +539,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -545,7 +559,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -587,8 +604,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -634,7 +649,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -651,7 +669,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -667,7 +688,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -729,7 +753,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -757,8 +784,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -808,7 +833,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -842,7 +870,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -863,7 +894,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -878,7 +912,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ACCTNOTHANDLER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -912,8 +949,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -932,8 +967,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/AddOperation.java b/opends/src/server/org/opends/server/core/AddOperation.java
index c6336d9..fb4d1bd 100644
--- a/opends/src/server/org/opends/server/core/AddOperation.java
+++ b/opends/src/server/org/opends/server/core/AddOperation.java
@@ -91,7 +91,9 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -110,11 +112,6 @@
implements PreParseAddOperation, PreOperationAddOperation,
PostOperationAddOperation, PostResponseAddOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.AddOperation";
@@ -180,16 +177,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawAttributes)
- });
this.rawEntryDN = rawEntryDN;
this.rawAttributes = rawAttributes;
@@ -229,16 +216,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawAttributes)
- });
this.entryDN = entryDN;
this.objectClasses = objectClasses;
@@ -292,7 +269,6 @@
*/
public final ByteString getRawEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRawEntryDN");
return rawEntryDN;
}
@@ -310,7 +286,6 @@
*/
public final void setRawEntryDN(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "setRawEntryDN", String.valueOf(rawEntryDN));
this.rawEntryDN = rawEntryDN;
@@ -329,7 +304,6 @@
*/
public final DN getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -347,7 +321,6 @@
*/
public final List<LDAPAttribute> getRawAttributes()
{
- assert debugEnter(CLASS_NAME, "getRawAttributes");
return rawAttributes;
}
@@ -363,8 +336,6 @@
*/
public final void addRawAttribute(LDAPAttribute rawAttribute)
{
- assert debugEnter(CLASS_NAME, "addRawAttribute",
- String.valueOf(rawAttribute));
rawAttributes.add(rawAttribute);
@@ -383,8 +354,6 @@
*/
public final void setRawAttributes(List<LDAPAttribute> rawAttributes)
{
- assert debugEnter(CLASS_NAME, "setRawAttributes",
- String.valueOf(rawAttributes));
this.rawAttributes = rawAttributes;
@@ -406,7 +375,6 @@
*/
public final Map<ObjectClass,String> getObjectClasses()
{
- assert debugEnter(CLASS_NAME, "getObjectClasses");
return objectClasses;
}
@@ -425,8 +393,6 @@
*/
public final void addObjectClass(ObjectClass objectClass, String name)
{
- assert debugEnter(CLASS_NAME, "addObjectClass", String.valueOf(objectClass),
- String.valueOf(name));
objectClasses.put(objectClass, name);
}
@@ -444,8 +410,6 @@
*/
public final void removeObjectClass(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "removeObjectClass",
- String.valueOf(objectClass));
objectClasses.remove(objectClass);
}
@@ -463,7 +427,6 @@
*/
public final Map<AttributeType,List<Attribute>> getUserAttributes()
{
- assert debugEnter(CLASS_NAME, "getUserAttributes");
return userAttributes;
}
@@ -481,7 +444,6 @@
*/
public final Map<AttributeType,List<Attribute>> getOperationalAttributes()
{
- assert debugEnter(CLASS_NAME, "getOperationalAttributes");
return operationalAttributes;
}
@@ -502,8 +464,6 @@
public final void setAttribute(AttributeType attributeType,
List<Attribute> attributeList)
{
- assert debugEnter(CLASS_NAME, "setAttribute", String.valueOf(attributeType),
- String.valueOf(attributeList));
if (attributeType.isOperational())
{
@@ -542,8 +502,6 @@
*/
public final void removeAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "removeAttribute",
- String.valueOf(attributeType));
if (attributeType.isOperational())
{
@@ -567,7 +525,6 @@
*/
public final Entry getEntryToAdd()
{
- assert debugEnter(CLASS_NAME, "getEntryToAdd");
return entry;
}
@@ -580,7 +537,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -593,7 +549,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -606,7 +561,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -622,7 +576,6 @@
*/
public final long getChangeNumber()
{
- assert debugEnter(CLASS_NAME, "getChangeNumber");
return changeNumber;
}
@@ -638,8 +591,6 @@
*/
public final void setChangeNumber(long changeNumber)
{
- assert debugEnter(CLASS_NAME, "setChangeNumber",
- String.valueOf(changeNumber));
this.changeNumber = changeNumber;
}
@@ -771,7 +722,6 @@
@Override()
public final ArrayList<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -806,7 +756,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
// Start the processing timer.
@@ -885,7 +834,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1118,7 +1070,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1147,7 +1102,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1180,7 +1138,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
break;
}
@@ -1198,7 +1159,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1438,7 +1402,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_ADD_INVALID_PWPOLICY_DN_SYNTAX;
appendErrorMessage(getMessage(msgID, String.valueOf(entryDN),
@@ -1472,7 +1439,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResponseData(de);
break addProcessing;
@@ -1688,7 +1658,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1714,7 +1687,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -1744,7 +1720,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1779,7 +1758,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1796,7 +1778,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1833,7 +1818,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1850,7 +1838,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -2025,7 +2016,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -2095,7 +2089,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -2106,7 +2103,10 @@
}
catch (CancelledOperationException coe)
{
- assert debugException(CLASS_NAME, "run", coe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, coe);
+ }
CancelResult cancelResult = coe.getCancelResult();
@@ -2145,7 +2145,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -2200,7 +2203,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ADD_ERROR_NOTIFYING_CHANGE_LISTENER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -2235,7 +2241,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ADD_ERROR_NOTIFYING_PERSISTENT_SEARCH;
String message = getMessage(msgID, String.valueOf(persistentSearch),
@@ -2263,8 +2272,6 @@
*/
private final void addObjectClassChain(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "addObjectClassChain",
- String.valueOf(objectClass));
if (! objectClasses.containsKey(objectClass))
{
@@ -2296,9 +2303,6 @@
Entry userEntry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "handlePasswordPolicy",
- String.valueOf(passwordPolicy),
- String.valueOf(userEntry));
// See if a password was specified.
@@ -2493,7 +2497,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -2508,7 +2511,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -2534,7 +2540,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -2547,8 +2552,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -2562,7 +2565,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AddOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/AuthenticatedUsers.java b/opends/src/server/org/opends/server/core/AuthenticatedUsers.java
index 5560f2d..551dd84 100644
--- a/opends/src/server/org/opends/server/core/AuthenticatedUsers.java
+++ b/opends/src/server/org/opends/server/core/AuthenticatedUsers.java
@@ -41,7 +41,6 @@
import org.opends.server.types.operation.PostResponseModifyOperation;
import org.opends.server.types.operation.PostResponseModifyDNOperation;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -60,11 +59,6 @@
public class AuthenticatedUsers
implements ChangeNotificationListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.AuthenticatedUsers";
@@ -80,7 +74,6 @@
*/
public AuthenticatedUsers()
{
- assert debugConstructor(CLASS_NAME);
userMap = new ConcurrentHashMap<DN,CopyOnWriteArraySet<ClientConnection>>();
@@ -99,8 +92,6 @@
*/
public synchronized void put(DN userDN, ClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "put", String.valueOf(userDN),
- String.valueOf(clientConnection));
CopyOnWriteArraySet<ClientConnection> connectionSet = userMap.get(userDN);
if (connectionSet == null)
@@ -127,8 +118,6 @@
*/
public synchronized void remove(DN userDN, ClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "put", String.valueOf(userDN),
- String.valueOf(clientConnection));
CopyOnWriteArraySet<ClientConnection> connectionSet = userMap.get(userDN);
if (connectionSet != null)
diff --git a/opends/src/server/org/opends/server/core/BackendConfigManager.java b/opends/src/server/org/opends/server/core/BackendConfigManager.java
index 05540ae..c3ee9e8 100644
--- a/opends/src/server/org/opends/server/core/BackendConfigManager.java
+++ b/opends/src/server/org/opends/server/core/BackendConfigManager.java
@@ -59,7 +59,9 @@
import org.opends.server.types.WritabilityMode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -77,11 +79,6 @@
public class BackendConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.BackendConfigManager";
@@ -99,7 +96,6 @@
*/
public BackendConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -120,7 +116,6 @@
public void initializeBackendConfig()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackendConfig");
registeredBackends = new ConcurrentHashMap<DN,Backend>();
@@ -137,7 +132,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CONFIG_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -192,7 +190,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -238,7 +239,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -287,7 +291,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BACKEND_ID;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -341,7 +348,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_WRITABILITY;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -380,7 +390,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BASE_DNS;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -420,7 +433,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CLASS;
String message = getMessage(msgID, String.valueOf(backendDN),
@@ -439,7 +455,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE;
String message = getMessage(msgID, String.valueOf(className),
@@ -484,7 +503,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK;
String message = getMessage(msgID, backendID,
@@ -503,7 +525,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE;
String message = getMessage(msgID, String.valueOf(className),
@@ -528,7 +553,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK;
message = getMessage(msgID, backendID,
@@ -557,7 +585,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackendConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND;
String message = getMessage(msgID, backendID,
@@ -592,8 +623,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN backendDN = configEntry.getDN();
@@ -614,7 +643,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -645,7 +677,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -674,7 +709,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BACKEND_ID;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -708,7 +746,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_WRITABILITY;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -770,7 +811,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
unacceptableReason.append(de.getMessage());
return false;
@@ -785,7 +829,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
unacceptableReason.append(de.getMessage());
return false;
@@ -795,7 +842,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BASE_DNS;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -831,7 +881,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CLASS;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -853,7 +906,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -883,8 +939,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN backendDN = configEntry.getDN();
Backend backend = registeredBackends.get(backendDN);
@@ -911,7 +965,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -989,7 +1046,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK;
String message = getMessage(msgID, backend.getBackendID(),
@@ -1010,7 +1070,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1047,7 +1110,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BACKEND_ID;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1101,7 +1167,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_WRITABILITY;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1140,7 +1209,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BASE_DNS;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1179,7 +1251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CLASS;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1227,7 +1302,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -1292,7 +1370,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK;
String message = getMessage(msgID, backendID,
@@ -1315,7 +1396,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -1339,7 +1423,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK;
String message = getMessage(msgID, backendID,
@@ -1369,7 +1456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND;
String message = getMessage(msgID, backendID,
@@ -1422,8 +1512,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN backendDN = configEntry.getDN();
@@ -1445,7 +1533,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -1476,11 +1567,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
- stackTraceToSingleLineString(e)));
+ stackTraceToSingleLineString(e)));
return false;
}
@@ -1516,11 +1610,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BACKEND_ID;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
- stackTraceToSingleLineString(e)));
+ stackTraceToSingleLineString(e)));
return false;
}
@@ -1550,7 +1647,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_WRITABILITY;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -1584,7 +1684,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BASE_DNS;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
@@ -1620,11 +1723,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CLASS;
unacceptableReason.append(getMessage(msgID, String.valueOf(backendDN),
- stackTraceToSingleLineString(e)));
+ stackTraceToSingleLineString(e)));
return false;
}
@@ -1637,12 +1743,15 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
- String.valueOf(backendDN),
- stackTraceToSingleLineString(e)));
+ String.valueOf(backendDN),
+ stackTraceToSingleLineString(e)));
return false;
}
@@ -1716,8 +1825,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN backendDN = configEntry.getDN();
@@ -1749,7 +1856,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1798,7 +1908,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1846,7 +1959,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BACKEND_ID;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1900,7 +2016,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_WRITABILITY;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1940,7 +2059,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_UNABLE_TO_DETERMINE_BASE_DNS;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1979,7 +2101,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_GET_CLASS;
messages.add(getMessage(msgID, String.valueOf(backendDN),
@@ -1997,7 +2122,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INSTANTIATE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -2038,7 +2166,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_ACQUIRE_SHARED_LOCK;
String message = getMessage(msgID, backendID,
@@ -2062,7 +2193,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_INITIALIZE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -2086,7 +2220,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_RELEASE_SHARED_LOCK;
String message = getMessage(msgID, backendID,
@@ -2116,7 +2253,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKEND_CANNOT_REGISTER_BACKEND;
String message = getMessage(msgID, backendID,
@@ -2155,8 +2295,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN backendDN = configEntry.getDN();
@@ -2200,8 +2338,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN backendDN = configEntry.getDN();
@@ -2233,7 +2369,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationDelete", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
for (BackendInitializationListener listener :
diff --git a/opends/src/server/org/opends/server/core/BindOperation.java b/opends/src/server/org/opends/server/core/BindOperation.java
index 4ced7f1..4abd5f6 100644
--- a/opends/src/server/org/opends/server/core/BindOperation.java
+++ b/opends/src/server/org/opends/server/core/BindOperation.java
@@ -72,10 +72,11 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.CoreConstants.*;
-import static org.opends.server.extensions.ExtensionsConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -99,11 +100,6 @@
implements PreParseBindOperation, PreOperationBindOperation,
PostOperationBindOperation, PostResponseBindOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.BindOperation";
@@ -211,15 +207,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawBindDN),
- String.valueOf(simplePassword)
- });
this.authType = AuthenticationType.SIMPLE;
this.saslMechanism = null;
@@ -283,17 +270,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawBindDN),
- String.valueOf(saslMechanism),
- String.valueOf(saslCredentials)
- });
this.authType = AuthenticationType.SASL;
this.saslMechanism = saslMechanism;
@@ -339,15 +315,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(bindDN),
- String.valueOf(simplePassword)
- });
this.authType = AuthenticationType.SIMPLE;
this.bindDN = bindDN;
@@ -409,17 +376,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(bindDN),
- String.valueOf(saslMechanism),
- String.valueOf(saslCredentials)
- });
this.authType = AuthenticationType.SASL;
this.bindDN = bindDN;
@@ -453,7 +409,6 @@
*/
public final AuthenticationType getAuthenticationType()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationType");
return authType;
}
@@ -470,7 +425,6 @@
*/
public final ByteString getRawBindDN()
{
- assert debugEnter(CLASS_NAME, "getRawBindDN");
return rawBindDN;
}
@@ -485,7 +439,6 @@
*/
public final void setRawBindDN(ByteString rawBindDN)
{
- assert debugEnter(CLASS_NAME, "setRawBindDN", String.valueOf(rawBindDN));
if (rawBindDN == null)
{
@@ -512,7 +465,6 @@
*/
public final DN getBindDN()
{
- assert debugEnter(CLASS_NAME, "getBindDN");
return bindDN;
}
@@ -526,7 +478,6 @@
*/
public final ByteString getSimplePassword()
{
- assert debugEnter(CLASS_NAME, "getSimplePassword");
return simplePassword;
}
@@ -541,8 +492,6 @@
*/
public final void setSimplePassword(ByteString simplePassword)
{
- assert debugEnter(CLASS_NAME, "setSimplePassword",
- String.valueOf(simplePassword));
if (simplePassword == null)
{
@@ -568,7 +517,6 @@
*/
public final String getSASLMechanism()
{
- assert debugEnter(CLASS_NAME, "getSASLMechanism");
return saslMechanism;
}
@@ -583,7 +531,6 @@
*/
public final ASN1OctetString getSASLCredentials()
{
- assert debugEnter(CLASS_NAME, "getSASLCredentials");
return saslCredentials;
}
@@ -600,8 +547,6 @@
public final void setSASLCredentials(String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugEnter(CLASS_NAME, "setSASLCredentials",
- String.valueOf(saslCredentials));
this.saslMechanism = saslMechanism;
this.saslCredentials = saslCredentials;
@@ -621,7 +566,6 @@
*/
public final ASN1OctetString getServerSASLCredentials()
{
- assert debugEnter(CLASS_NAME, "getServerSASLCredentials");
return serverSASLCredentials;
}
@@ -638,8 +582,6 @@
public final void setServerSASLCredentials(ASN1OctetString
serverSASLCredentials)
{
- assert debugEnter(CLASS_NAME, "setServerSASLCredentials",
- String.valueOf(serverSASLCredentials));
this.serverSASLCredentials = serverSASLCredentials;
}
@@ -658,7 +600,6 @@
*/
public final Entry getSASLAuthUserEntry()
{
- assert debugEnter(CLASS_NAME, "getSASLAuthUserEntry");
return saslAuthUserEntry;
}
@@ -676,8 +617,6 @@
*/
public final void setSASLAuthUserEntry(Entry saslAuthUserEntry)
{
- assert debugEnter(CLASS_NAME, "setSASLAuthUserEntry",
- String.valueOf(saslAuthUserEntry));
this.saslAuthUserEntry = saslAuthUserEntry;
}
@@ -693,7 +632,6 @@
*/
public final String getAuthFailureReason()
{
- assert debugEnter(CLASS_NAME, "getAuthFailureReason");
return authFailureReason;
}
@@ -709,7 +647,6 @@
*/
public final int getAuthFailureID()
{
- assert debugEnter(CLASS_NAME, "getAuthFailureID");
return authFailureID;
}
@@ -726,8 +663,6 @@
*/
public final void setAuthFailureReason(int id, String reason)
{
- assert debugEnter(CLASS_NAME, "setAuthFailureReason",
- String.valueOf(id), String.valueOf(reason));
if (id < 0)
{
@@ -754,7 +689,6 @@
*/
public final DN getUserEntryDN()
{
- assert debugEnter(CLASS_NAME, "getUserEntryDN");
return userEntryDN;
}
@@ -770,7 +704,6 @@
*/
public final AuthenticationInfo getAuthenticationInfo()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationInfo");
return authInfo;
}
@@ -787,8 +720,6 @@
*/
public final void setAuthenticationInfo(AuthenticationInfo authInfo)
{
- assert debugEnter(CLASS_NAME, "setAuthenticationInfo",
- String.valueOf(authInfo));
this.authInfo = authInfo;
}
@@ -801,7 +732,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -814,7 +744,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -827,7 +756,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -967,7 +895,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -1002,7 +929,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
// Start the processing timer and initially set the result to indicate that
@@ -1084,7 +1010,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.INVALID_CREDENTIALS);
setAuthFailureReason(de.getErrorMessageID(), de.getErrorMessage());
@@ -1234,7 +1163,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.INVALID_CREDENTIALS);
setAuthFailureReason(de.getErrorMessageID(),
@@ -1524,7 +1456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BIND_CANNOT_PROCESS_USER_SIZE_LIMIT;
String message =
@@ -1567,7 +1502,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BIND_CANNOT_PROCESS_USER_TIME_LIMIT;
String message =
@@ -1610,7 +1548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_BIND_CANNOT_PROCESS_USER_LOOKTHROUGH_LIMIT;
@@ -1696,7 +1637,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BIND_OPERATION_PASSWORD_VALIDATION_EXCEPTION;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1784,7 +1728,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResponseData(de);
break bindProcessing;
@@ -2035,7 +1982,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BIND_CANNOT_PROCESS_USER_SIZE_LIMIT;
String message =
@@ -2076,7 +2026,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BIND_CANNOT_PROCESS_USER_TIME_LIMIT;
String message =
@@ -2117,7 +2070,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_BIND_CANNOT_PROCESS_USER_LOOKTHROUGH_LIMIT;
@@ -2204,7 +2160,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResponseData(de);
}
@@ -2327,7 +2286,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
cancelRequest.addResponseMessage(getMessage(MSGID_CANNOT_CANCEL_BIND));
return CancelResult.CANNOT_CANCEL;
@@ -2341,7 +2299,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return null;
}
@@ -2354,8 +2311,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
// Bind operations cannot be canceled.
return false;
@@ -2369,7 +2324,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("BindOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java b/opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java
index 51b25e5..8d5afb4 100644
--- a/opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java
+++ b/opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java
@@ -52,12 +52,13 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
@@ -71,11 +72,6 @@
public class CertificateMapperConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.CertificateMapperConfigManager";
@@ -93,7 +89,6 @@
*/
public CertificateMapperConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
mappers = new ConcurrentHashMap<DN,CertificateMapper>();
@@ -116,7 +111,6 @@
public void initializeCertificateMappers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCertificateMappers");
// First, get the configuration base entry.
@@ -128,8 +122,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMappers",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +228,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a certificate
@@ -268,7 +262,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -300,7 +300,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS;
String message = getMessage(msgID, mapperClass.getName(),
@@ -332,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -361,8 +367,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -441,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -476,7 +483,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -518,7 +528,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -535,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -576,8 +592,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -623,7 +637,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -640,7 +657,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -656,7 +676,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS;
String message = getMessage(msgID, mapperClass.getName(),
@@ -694,7 +717,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -751,8 +777,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -802,7 +826,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -836,7 +863,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -857,7 +887,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -872,7 +905,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CERTMAPPER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -905,8 +941,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -925,8 +959,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/CompareOperation.java b/opends/src/server/org/opends/server/core/CompareOperation.java
index 082c102..b56a6f1 100644
--- a/opends/src/server/org/opends/server/core/CompareOperation.java
+++ b/opends/src/server/org/opends/server/core/CompareOperation.java
@@ -67,7 +67,9 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -85,11 +87,6 @@
implements PreParseCompareOperation, PreOperationCompareOperation,
PostOperationCompareOperation, PostResponseCompareOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.CompareOperation";
@@ -147,17 +144,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawAttributeType),
- String.valueOf(assertionValue)
- });
this.rawEntryDN = rawEntryDN;
this.rawAttributeType = rawAttributeType;
@@ -192,17 +178,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(entryDN),
- String.valueOf(attributeType),
- String.valueOf(assertionValue)
- });
this.entryDN = entryDN;
this.attributeType = attributeType;
@@ -226,7 +201,6 @@
*/
public final ByteString getRawEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRawEntryDN");
return rawEntryDN;
}
@@ -242,7 +216,6 @@
*/
public final void setRawEntryDN(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "setRawEntryDN");
this.rawEntryDN = rawEntryDN;
@@ -261,7 +234,6 @@
*/
public final DN getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -275,7 +247,6 @@
*/
public final String getRawAttributeType()
{
- assert debugEnter(CLASS_NAME, "getRawAttributeType");
return rawAttributeType;
}
@@ -291,8 +262,6 @@
*/
public final void setRawAttributeType(String rawAttributeType)
{
- assert debugEnter(CLASS_NAME, "setRawAttributeType",
- String.valueOf(rawAttributeType));
this.rawAttributeType = rawAttributeType;
@@ -310,7 +279,6 @@
*/
public final AttributeType getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -324,7 +292,6 @@
*/
public final ByteString getAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getAssertionValue");
return assertionValue;
}
@@ -339,8 +306,6 @@
*/
public final void setAssertionValue(ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "setAssertionValue",
- String.valueOf(assertionValue));
this.assertionValue = assertionValue;
}
@@ -356,7 +321,6 @@
*/
public final Entry getEntryToCompare()
{
- assert debugEnter(CLASS_NAME, "getEntryToCompare");
return entry;
}
@@ -369,7 +333,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -382,7 +345,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -395,7 +357,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -528,7 +489,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -563,7 +523,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -642,7 +601,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -725,7 +687,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
break;
}
@@ -737,7 +702,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -770,7 +738,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -796,7 +767,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -833,7 +807,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -850,7 +827,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -887,7 +867,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -904,7 +887,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1134,7 +1120,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -1149,7 +1134,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -1175,7 +1163,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -1188,8 +1175,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -1203,7 +1188,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("CompareOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java b/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
index db6f34b..42756ab 100644
--- a/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
+++ b/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
@@ -51,7 +51,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.CoreMessages.*;
@@ -70,11 +72,6 @@
public class ConnectionHandlerConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ConnectionHandlerConfigManager";
@@ -92,7 +89,6 @@
*/
public ConnectionHandlerConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -115,7 +111,6 @@
public void initializeConnectionHandlerConfig()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandlerConfig");
connectionHandlers = new ConcurrentHashMap<DN,ConnectionHandler>();
@@ -132,7 +127,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CONFIG_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -222,8 +220,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(connectionHandlerDN),
@@ -266,8 +266,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CLASS;
String message = getMessage(msgID, String.valueOf(connectionHandlerDN),
@@ -287,8 +289,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INSTANTIATE;
String message = getMessage(msgID, String.valueOf(className),
@@ -307,8 +311,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE;
String message = getMessage(msgID, String.valueOf(className),
@@ -353,8 +359,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN connectionHandlerDN = configEntry.getDN();
@@ -384,8 +388,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_CONFIG_CONNHANDLER_ERROR_INTERACTING_WITH_CONNHANDLER_ENTRY;
@@ -419,8 +425,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID,
@@ -461,8 +469,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CLASS;
unacceptableReason.append(getMessage(msgID,
@@ -480,8 +490,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INSTANTIATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -512,8 +524,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN connectionHandlerDN = configEntry.getDN();
ConnectionHandler connectionHandler =
@@ -598,7 +608,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(connectionHandlerDN),
@@ -637,7 +650,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CLASS;
messages.add(getMessage(msgID, String.valueOf(connectionHandlerDN),
@@ -692,7 +708,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -729,8 +748,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN connectionHandlerDN = configEntry.getDN();
@@ -761,8 +778,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_CONFIG_CONNHANDLER_ERROR_INTERACTING_WITH_CONNHANDLER_ENTRY;
@@ -796,8 +815,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID,
@@ -838,8 +859,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CLASS;
unacceptableReason.append(getMessage(msgID,
@@ -858,8 +881,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INSTANTIATE;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -919,8 +944,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -979,8 +1002,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1021,8 +1046,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_GET_CLASS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1041,8 +1068,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INSTANTIATE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -1060,8 +1089,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandlerConfig",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_CANNOT_INITIALIZE;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -1109,8 +1140,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -1129,8 +1158,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/CoreConfigManager.java b/opends/src/server/org/opends/server/core/CoreConfigManager.java
index 46a6047..1e96e79 100644
--- a/opends/src/server/org/opends/server/core/CoreConfigManager.java
+++ b/opends/src/server/org/opends/server/core/CoreConfigManager.java
@@ -54,7 +54,9 @@
import org.opends.server.types.WritabilityMode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -71,11 +73,6 @@
public class CoreConfigManager
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.CoreConfigManager";
@@ -113,7 +110,6 @@
*/
public CoreConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -134,7 +130,6 @@
public void initializeCoreConfig()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCoreConfig");
// Get the configuration root entry, since all the attributes we care about
@@ -172,7 +167,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_CHECK_SCHEMA,
@@ -213,7 +211,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_ALLOW_EXCEPTIONS,
@@ -250,7 +251,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_ADD_MISSING_RDN_ATTRS,
@@ -290,7 +294,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_SERVER_ERROR_RESULT_CODE,
@@ -347,7 +354,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_ENFORCE_STRICT_SYNTAX,
@@ -406,7 +416,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_STRUCTURAL_CLASS_BEHAVIOR,
@@ -444,7 +457,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_MAX_ALLOWED_CONNECTIONS,
@@ -483,7 +499,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_NOTIFY_ABANDONED_OPERATIONS,
@@ -520,7 +539,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_PROXY_MAPPER_DN, configRoot.getDN(),
@@ -554,7 +576,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_SIZE_LIMIT, configRoot.getDN(),
@@ -589,7 +614,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_TIME_LIMIT, configRoot.getDN(),
@@ -624,7 +652,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_LOOKTHROUGH_LIMIT, configRoot.getDN(),
@@ -680,7 +711,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_WRITABILITY_MODE,
@@ -716,7 +750,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_BIND_WITH_DN_REQUIRES_PW,
@@ -760,7 +797,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_INVALID_DEFAULT_PWPOLICY_DN,
@@ -795,7 +835,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "initializeCoreConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_CORE_REJECT_UNAUTHENTICATED_REQUESTS_INVALID,
String.valueOf(configEntryDN.toString()), String.valueOf(e));
@@ -818,7 +861,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -834,7 +876,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrs = new LinkedList<ConfigAttribute>();
@@ -846,7 +887,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
MSGID_CONFIG_CANNOT_GET_CONFIG_ENTRY, configEntryDN.toString(),
@@ -875,7 +919,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -905,7 +952,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -934,7 +984,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -966,7 +1019,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1002,7 +1058,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1039,7 +1098,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1069,7 +1131,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1099,7 +1164,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1128,7 +1196,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1158,7 +1229,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1189,7 +1263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1225,7 +1302,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1254,7 +1334,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1284,7 +1367,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred. Log a message and continue.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_ERROR,
@@ -1315,9 +1401,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry),
- String.valueOf(unacceptableReasons));
// Start out assuming that the configuration is valid.
@@ -1338,7 +1421,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_CHECK_SCHEMA;
@@ -1362,7 +1448,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_ALLOW_EXCEPTIONS;
@@ -1386,7 +1475,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_ADD_MISSING_RDN_ATTRS;
@@ -1415,7 +1507,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_SERVER_ERROR_RESULT_CODE;
@@ -1445,7 +1540,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_ENFORCE_STRICT_SYNTAX;
@@ -1476,7 +1574,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_STRUCTURAL_CLASS_BEHAVIOR;
@@ -1500,7 +1601,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_MAX_ALLOWED_CONNECTIONS;
@@ -1524,7 +1628,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_NOTIFY_ABANDONED_OPERATIONS;
@@ -1561,7 +1668,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_PROXY_MAPPER_DN;
@@ -1586,7 +1696,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_SIZE_LIMIT;
@@ -1611,7 +1724,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_TIME_LIMIT;
@@ -1641,7 +1757,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_WRITABILITY_MODE;
@@ -1664,7 +1783,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_BIND_WITH_DN_REQUIRES_PW;
@@ -1688,7 +1810,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_REJECT_UNAUTHENTICATED_REQUESTS_INVALID;
@@ -1733,7 +1858,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_CONFIG_CORE_INVALID_DEFAULT_PWPOLICY_DN;
@@ -1767,9 +1895,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ArrayList<String> resultMessages = new ArrayList<String>();
boolean adminActionRequired = false;
@@ -1800,7 +1925,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -1836,7 +1964,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -1874,7 +2005,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -1918,7 +2052,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -1973,7 +2110,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2028,7 +2168,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2070,7 +2213,10 @@
{
// An error occurred, but this should not be considered fatal. Log an
// error message and use the default.
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -2108,7 +2254,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2145,7 +2294,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2179,7 +2331,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2213,7 +2368,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2247,7 +2405,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2298,7 +2459,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2331,7 +2495,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2365,7 +2532,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
@@ -2409,7 +2579,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so we will not allow this configuration change to
// take place.
diff --git a/opends/src/server/org/opends/server/core/CoreConstants.java b/opends/src/server/org/opends/server/core/CoreConstants.java
index 7e41379..a11609d 100644
--- a/opends/src/server/org/opends/server/core/CoreConstants.java
+++ b/opends/src/server/org/opends/server/core/CoreConstants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
diff --git a/opends/src/server/org/opends/server/core/DefaultAccessControlProvider.java b/opends/src/server/org/opends/server/core/DefaultAccessControlProvider.java
index 8d73c6a..d12d2c8 100644
--- a/opends/src/server/org/opends/server/core/DefaultAccessControlProvider.java
+++ b/opends/src/server/org/opends/server/core/DefaultAccessControlProvider.java
@@ -22,13 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import org.opends.server.api.AccessControlHandler;
import org.opends.server.api.AccessControlProvider;
import org.opends.server.config.ConfigEntry;
@@ -46,9 +43,6 @@
* decision function which grants access to everything and anyone.
*/
class DefaultAccessControlProvider implements AccessControlProvider {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.core.DefaultAccessControlProvider";
/**
* The single handler instance.
@@ -61,7 +55,6 @@
public DefaultAccessControlProvider() {
super();
- assert debugConstructor(CLASS_NAME);
// No implementation required.
}
@@ -71,7 +64,6 @@
*/
public void initializeAccessControlHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException {
- assert debugEnter(CLASS_NAME, "initializeAccessControlHandler");
// Avoid potential race conditions constructing the handler instance
// and create it here.
@@ -82,7 +74,6 @@
* {@inheritDoc}
*/
public void finalizeAccessControlHandler() {
- assert debugEnter(CLASS_NAME, "finalizeAccessControlHandler");
// No implementation required.
}
@@ -91,7 +82,6 @@
* {@inheritDoc}
*/
public AccessControlHandler getInstance() {
- assert debugEnter(CLASS_NAME, "getInstance");
if (instance == null) {
instance = new Handler();
@@ -104,16 +94,12 @@
* control handler.
*/
private static class Handler extends AccessControlHandler {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- "org.opends.server.core.DefaultAccessControlProvider.Handler";
/**
* {@inheritDoc}
*/
@Override
public boolean isAllowed(AddOperation addOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -123,7 +109,6 @@
*/
@Override
public boolean isAllowed(BindOperation bindOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -133,7 +118,6 @@
*/
@Override
public boolean isAllowed(CompareOperation compareOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -143,7 +127,6 @@
*/
@Override
public boolean isAllowed(DeleteOperation deleteOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -153,7 +136,6 @@
*/
@Override
public boolean isAllowed(ExtendedOperation extendedOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -163,7 +145,6 @@
*/
@Override
public boolean isAllowed(ModifyOperation modifyOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -173,7 +154,6 @@
*/
@Override
public boolean isAllowed(ModifyDNOperation modifyDNOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -183,7 +163,6 @@
*/
@Override
public boolean isAllowed(SearchOperation searchOperation) {
- assert debugEnter(CLASS_NAME, "isAllowed");
return true;
}
@@ -194,7 +173,6 @@
@Override
public boolean maySend(SearchOperation searchOperation,
SearchResultEntry searchEntry) {
- assert debugEnter(CLASS_NAME, "maySend");
return true;
}
@@ -205,7 +183,6 @@
@Override
public SearchResultEntry filterEntry(
SearchOperation searchOperation, SearchResultEntry searchEntry) {
- assert debugEnter(CLASS_NAME, "filterEntry");
// No implementation required.
return searchEntry;
@@ -217,7 +194,6 @@
@Override
public boolean maySend(SearchOperation searchOperation,
SearchResultReference searchReference) {
- assert debugEnter(CLASS_NAME, "maySend");
return true;
}
diff --git a/opends/src/server/org/opends/server/core/DeleteOperation.java b/opends/src/server/org/opends/server/core/DeleteOperation.java
index 4d85931..8ba91b8 100644
--- a/opends/src/server/org/opends/server/core/DeleteOperation.java
+++ b/opends/src/server/org/opends/server/core/DeleteOperation.java
@@ -73,7 +73,9 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -91,11 +93,6 @@
implements PreParseDeleteOperation, PreOperationDeleteOperation,
PostOperationDeleteOperation, PostResponseDeleteOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.DeleteOperation";
@@ -143,11 +140,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN));
this.rawEntryDN = rawEntryDN;
@@ -177,11 +169,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(entryDN));
this.entryDN = entryDN;
@@ -203,7 +190,6 @@
*/
public final ByteString getRawEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRawEntryDN");
return rawEntryDN;
}
@@ -220,7 +206,6 @@
*/
public final void setRawEntryDN(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "setRawEntryDN");
this.rawEntryDN = rawEntryDN;
@@ -239,7 +224,6 @@
*/
public final DN getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -255,7 +239,6 @@
*/
public final Entry getEntryToDelete()
{
- assert debugEnter(CLASS_NAME, "getEntryToDelete");
return entry;
}
@@ -268,7 +251,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -281,7 +263,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -294,7 +275,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -310,7 +290,6 @@
*/
public final long getChangeNumber()
{
- assert debugEnter(CLASS_NAME, "getChangeNumber");
return changeNumber;
}
@@ -326,8 +305,6 @@
*/
public final void setChangeNumber(long changeNumber)
{
- assert debugEnter(CLASS_NAME, "setChangeNumber",
- String.valueOf(changeNumber));
this.changeNumber = changeNumber;
}
@@ -459,7 +436,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -494,7 +470,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -573,7 +548,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -632,7 +610,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
break deleteProcessing;
@@ -640,7 +621,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -666,7 +650,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -710,7 +697,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -736,7 +726,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -766,7 +759,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -801,7 +797,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -818,7 +817,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -855,7 +857,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -872,7 +877,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1068,7 +1076,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1138,7 +1149,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1149,7 +1163,10 @@
}
catch (CancelledOperationException coe)
{
- assert debugException(CLASS_NAME, "run", coe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, coe);
+ }
CancelResult cancelResult = coe.getCancelResult();
@@ -1178,7 +1195,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1229,7 +1249,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_DELETE_ERROR_NOTIFYING_CHANGE_LISTENER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1264,7 +1287,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_DELETE_ERROR_NOTIFYING_PERSISTENT_SEARCH;
String message = getMessage(msgID, String.valueOf(persistentSearch),
@@ -1290,7 +1316,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -1305,7 +1330,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -1331,7 +1359,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -1344,8 +1371,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -1359,7 +1384,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("DeleteOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 54fcf01..e6eccfb 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -89,7 +89,6 @@
import org.opends.server.config.JMXMBean;
import org.opends.server.extensions.ConfigFileHandler;
import org.opends.server.extensions.JMXAlertHandler;
-import org.opends.server.loggers.StartupDebugLogger;
import org.opends.server.loggers.StartupErrorLogger;
import org.opends.server.monitors.BackendMonitor;
import org.opends.server.monitors.ConnectionHandlerMonitor;
@@ -132,6 +131,7 @@
import org.opends.server.types.AttributeUsage;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.CryptoManager;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DITContentRule;
import org.opends.server.types.DITStructureRule;
@@ -161,7 +161,8 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -182,7 +183,7 @@
implements Thread.UncaughtExceptionHandler, AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.core.DirectoryServer";
@@ -497,8 +498,6 @@
// The schema configuration manager for the Directory Server.
private SchemaConfigManager schemaConfigManager;
- // The debug logger that will be used during the Directory Server startup.
- private StartupDebugLogger startupDebugLogger;
// The error logger that will be used during the Directory Server startup.
private StartupErrorLogger startupErrorLogger;
@@ -724,10 +723,6 @@
// Install default debug and error loggers for use until enough of the
// configuration has been read to allow the real loggers to be installed.
- removeAllDebugLoggers(true);
- startupDebugLogger = new StartupDebugLogger();
- startupDebugLogger.initializeDebugLogger(null);
- addDebugLogger(startupDebugLogger);
removeAllErrorLoggers(true);
startupErrorLogger = new StartupErrorLogger();
@@ -783,7 +778,6 @@
public static void initializeJMX()
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeJMX");
try
{
@@ -798,7 +792,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_CREATE_MBEAN_SERVER;
String message = getMessage(msgID, String.valueOf(e));
@@ -838,7 +835,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_LOAD_CONFIG_HANDLER_CLASS;
String message = getMessage(msgID, configClass, e);
@@ -851,7 +851,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_INSTANTIATE_CONFIG_HANDLER;
String message = getMessage(msgID, configClass, e);
@@ -866,13 +869,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "bootstrapServer", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER;
String message = getMessage(msgID, configClass, configFile, e);
@@ -891,7 +900,6 @@
*/
public static String getConfigFile()
{
- assert debugEnter(CLASS_NAME, "getConfigFile");
return directoryServer.configFile;
}
@@ -957,7 +965,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "startServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK;
String message = getMessage(msgID, lockFile,
@@ -1112,8 +1123,6 @@
sendAlertNotification(this, ALERT_TYPE_SERVER_STARTED, msgID, message);
- // Deregister the startup-specific debug and error loggers.
- removeDebugLogger(startupDebugLogger);
removeErrorLogger(startupErrorLogger);
@@ -1146,7 +1155,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1165,7 +1177,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1184,7 +1199,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1204,7 +1222,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1223,7 +1244,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1243,7 +1267,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1263,7 +1290,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1283,7 +1313,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1302,7 +1335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1321,7 +1357,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1341,7 +1380,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1362,7 +1404,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1382,7 +1427,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1401,7 +1449,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1421,7 +1472,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1440,7 +1494,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1459,7 +1516,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1478,7 +1538,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1498,7 +1561,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1518,7 +1584,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1538,7 +1607,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1558,7 +1630,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message = getMessage(msgID,
@@ -1578,7 +1653,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE;
String message =
@@ -1607,7 +1685,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, AttributeTypeSyntax.class.getName(),
@@ -1625,7 +1706,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, BinarySyntax.class.getName(),
@@ -1643,7 +1727,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, BooleanSyntax.class.getName(),
@@ -1662,7 +1749,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, DirectoryStringSyntax.class.getName(),
@@ -1680,7 +1770,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID,
@@ -1699,7 +1792,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, IA5StringSyntax.class.getName(),
@@ -1717,7 +1813,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, IntegerSyntax.class.getName(),
@@ -1735,7 +1834,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, GeneralizedTimeSyntax.class.getName(),
@@ -1753,7 +1855,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, ObjectClassSyntax.class.getName(),
@@ -1771,7 +1876,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, OIDSyntax.class.getName(),
@@ -1789,7 +1897,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX;
String message = getMessage(msgID, TelephoneNumberSyntax.class.getName(),
@@ -1808,7 +1919,6 @@
*/
public static AuthenticatedUsers getAuthenticatedUsers()
{
- assert debugEnter(CLASS_NAME, "getAuthenticatedUsers");
return directoryServer.authenticatedUsers;
}
@@ -1840,7 +1950,6 @@
*/
public static CryptoManager getCryptoManager()
{
- assert debugEnter(CLASS_NAME, "getCryptoManager");
return directoryServer.cryptoManager;
}
@@ -1861,7 +1970,6 @@
public void initializeMailServerPropertySets()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMailServerPropertySets");
mailServerPropertySets = new CopyOnWriteArrayList<Properties>();
@@ -1882,7 +1990,6 @@
*/
public static CopyOnWriteArrayList<Properties> getMailServerPropertySets()
{
- assert debugEnter(CLASS_NAME, "getMailServerPropertySets");
return directoryServer.mailServerPropertySets;
}
@@ -1925,7 +2032,6 @@
public void initializeSchema()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSchema");
// Create the schema configuration manager, and initialize the schema from
@@ -1949,7 +2055,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchema", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -1958,13 +2067,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeSchema", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchema", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER;
String message = getMessage(msgID, configClass, configFile, e);
@@ -1985,7 +2100,6 @@
public static Set<BackendInitializationListener>
getBackendInitializationListeners()
{
- assert debugEnter(CLASS_NAME, "getBackendInitializationListeners");
return directoryServer.backendInitializationListeners;
}
@@ -2002,8 +2116,6 @@
public static void registerBackendInitializationListener(
BackendInitializationListener listener)
{
- assert debugEnter(CLASS_NAME, "registerBackendInitializationListener",
- String.valueOf(listener));
directoryServer.backendInitializationListeners.add(listener);
}
@@ -2020,8 +2132,6 @@
public static void deregisterBackendInitializationListener(
BackendInitializationListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterBackendInitializationListener",
- String.valueOf(listener));
directoryServer.backendInitializationListeners.remove(listener);
}
@@ -2041,7 +2151,6 @@
private void initializeBackends()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackends");
backendConfigManager = new BackendConfigManager();
backendConfigManager.initializeBackendConfig();
@@ -2057,7 +2166,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeBackends", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_GET_ROOT_DSE_CONFIG_ENTRY;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -2084,7 +2196,6 @@
public void initializeGroupManager()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeGroupManager");
groupManager = new GroupManager();
groupManager.initializeGroupImplementations();
@@ -2103,7 +2214,6 @@
*/
public static GroupManager getGroupManager()
{
- assert debugEnter(CLASS_NAME, "getGroupManager");
return directoryServer.groupManager;
}
@@ -2123,7 +2233,6 @@
private void initializeSupportedControls()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSupportedControls");
supportedControls.add(OID_LDAP_ASSERTION);
supportedControls.add(OID_LDAP_READENTRY_PREREAD);
@@ -2153,7 +2262,6 @@
private void initializeSupportedFeatures()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSupportedFeatures");
supportedFeatures.add(OID_ALL_OPERATIONAL_ATTRS_FEATURE);
supportedFeatures.add(OID_MODIFY_INCREMENT_FEATURE);
@@ -2175,7 +2283,6 @@
private void initializeIdentityMappers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeIdentityMappers");
identityMapperConfigManager = new IdentityMapperConfigManager();
identityMapperConfigManager.initializeIdentityMappers();
@@ -2197,7 +2304,6 @@
private void initializeExtendedOperations()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperations");
extendedOperationConfigManager = new ExtendedOperationConfigManager();
extendedOperationConfigManager.initializeExtendedOperationHandlers();
@@ -2218,7 +2324,6 @@
private void initializeSASLMechanisms()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanisms");
saslConfigManager = new SASLConfigManager();
saslConfigManager.initializeSASLMechanismHandlers();
@@ -2259,7 +2364,6 @@
private void initializeConnectionHandlers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandlers");
connectionHandlerConfigManager = new ConnectionHandlerConfigManager();
connectionHandlerConfigManager.initializeConnectionHandlerConfig();
@@ -2281,7 +2385,6 @@
public void initializePasswordPolicyComponents()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordPolicyComponents");
// Initialize all the password storage schemes.
@@ -2320,7 +2423,6 @@
*/
public static OperatingSystem getOperatingSystem()
{
- assert debugEnter(CLASS_NAME, "getOperatingSystem");
return directoryServer.operatingSystem;
}
@@ -2336,7 +2438,6 @@
*/
public static ThreadGroup getDirectoryThreadGroup()
{
- assert debugEnter(CLASS_NAME, "getDirectoryThreadGroup");
return directoryServer.directoryThreadGroup;
}
@@ -2350,7 +2451,6 @@
*/
public static ConfigHandler getConfigHandler()
{
- assert debugEnter(CLASS_NAME, "getConfigHandler");
return directoryServer.configHandler;
}
@@ -2370,7 +2470,6 @@
public void initializePlugins()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePlugins");
pluginConfigManager.initializePluginConfig(null);
}
@@ -2394,7 +2493,6 @@
public void initializePlugins(Set<PluginType> pluginTypes)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePlugins");
pluginConfigManager = new PluginConfigManager();
pluginConfigManager.initializePluginConfig(pluginTypes);
@@ -2409,7 +2507,6 @@
*/
public static PluginConfigManager getPluginConfigManager()
{
- assert debugEnter(CLASS_NAME, "getPluginConfigManager");
return directoryServer.pluginConfigManager;
}
@@ -2429,7 +2526,6 @@
public static ConfigEntry getConfigEntry(DN entryDN)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigEntry", String.valueOf(entryDN));
return directoryServer.configHandler.getConfigEntry(entryDN);
}
@@ -2445,7 +2541,6 @@
*/
public static String getServerRoot()
{
- assert debugEnter(CLASS_NAME, "getServerRoot");
if (directoryServer.configHandler == null)
{
@@ -2478,7 +2573,6 @@
*/
public static long getStartTime()
{
- assert debugEnter(CLASS_NAME, "getStartTime");
return directoryServer.startUpTime;
}
@@ -2492,7 +2586,6 @@
*/
public static String getStartTimeUTC()
{
- assert debugEnter(CLASS_NAME, "getStartTimeUTC");
return directoryServer.startTimeUTC;
}
@@ -2506,7 +2599,6 @@
*/
public static Schema getSchema()
{
- assert debugEnter(CLASS_NAME, "getSchema");
return directoryServer.schema;
}
@@ -2520,7 +2612,6 @@
*/
public static void setSchema(Schema schema)
{
- assert debugEnter(CLASS_NAME, "setSchema", String.valueOf(schema));
directoryServer.schema = schema;
}
@@ -2537,7 +2628,6 @@
*/
public static ConcurrentHashMap<String,MatchingRule> getMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getMatchingRules");
return directoryServer.schema.getMatchingRules();
}
@@ -2553,7 +2643,6 @@
*/
public static LinkedHashSet<AttributeValue> getMatchingRuleSet()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleSet");
return directoryServer.schema.getMatchingRuleSet();
}
@@ -2571,7 +2660,6 @@
*/
public static MatchingRule getMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getMatchingRule", String.valueOf(lowerName));
return directoryServer.schema.getMatchingRule(lowerName);
}
@@ -2595,9 +2683,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerMatchingRule(matchingRule,
overwriteExisting);
@@ -2612,8 +2697,6 @@
*/
public static void deregisterMatchingRule(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterMatchingRule",
- String.valueOf(matchingRule));
directoryServer.schema.deregisterMatchingRule(matchingRule);
}
@@ -2633,7 +2716,6 @@
public static ConcurrentHashMap<String,ApproximateMatchingRule>
getApproximateMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRules");
return directoryServer.schema.getApproximateMatchingRules();
}
@@ -2652,8 +2734,6 @@
public static ApproximateMatchingRule
getApproximateMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule",
- String.valueOf(lowerName));
return directoryServer.schema.getApproximateMatchingRule(lowerName);
}
@@ -2679,9 +2759,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerApproximateMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerApproximateMatchingRule(matchingRule,
overwriteExisting);
@@ -2698,8 +2775,6 @@
public static void deregisterApproximateMatchingRule(ApproximateMatchingRule
matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterApproximateMatchingRule",
- String.valueOf(matchingRule));
directoryServer.schema.deregisterApproximateMatchingRule(matchingRule);
}
@@ -2719,7 +2794,6 @@
public static ConcurrentHashMap<String,EqualityMatchingRule>
getEqualityMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRules");
return directoryServer.schema.getEqualityMatchingRules();
}
@@ -2737,8 +2811,6 @@
*/
public static EqualityMatchingRule getEqualityMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule",
- String.valueOf(lowerName));
return directoryServer.schema.getEqualityMatchingRule(lowerName);
}
@@ -2763,9 +2835,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerEqualityMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerEqualityMatchingRule(matchingRule,
overwriteExisting);
@@ -2781,8 +2850,6 @@
public static void deregisterEqualityMatchingRule(EqualityMatchingRule
matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterEqualityMatchingRule",
- String.valueOf(matchingRule));
directoryServer.schema.deregisterEqualityMatchingRule(matchingRule);
}
@@ -2802,7 +2869,6 @@
public static ConcurrentHashMap<String,OrderingMatchingRule>
getOrderingMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRules");
return directoryServer.schema.getOrderingMatchingRules();
}
@@ -2820,8 +2886,6 @@
*/
public static OrderingMatchingRule getOrderingMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule",
- String.valueOf(lowerName));
return directoryServer.schema.getOrderingMatchingRule(lowerName);
}
@@ -2846,9 +2910,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerOrderingMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerOrderingMatchingRule(matchingRule,
overwriteExisting);
@@ -2864,8 +2925,6 @@
public static void deregisterOrderingMatchingRule(OrderingMatchingRule
matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterOrderingMatchingRule",
- String.valueOf(matchingRule));
directoryServer.schema.deregisterOrderingMatchingRule(matchingRule);
}
@@ -2885,7 +2944,6 @@
public static ConcurrentHashMap<String,SubstringMatchingRule>
getSubstringMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRules");
return directoryServer.schema.getSubstringMatchingRules();
}
@@ -2903,8 +2961,6 @@
*/
public static SubstringMatchingRule getSubstringMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule",
- String.valueOf(lowerName));
return directoryServer.schema.getSubstringMatchingRule(lowerName);
}
@@ -2929,9 +2985,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerSubstringMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerSubstringMatchingRule(matchingRule,
overwriteExisting);
@@ -2947,8 +3000,6 @@
public static void deregisterSubstringMatchingRule(SubstringMatchingRule
matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterSubstringMatchingRule",
- String.valueOf(matchingRule));
directoryServer.schema.deregisterSubstringMatchingRule(matchingRule);
}
@@ -2962,7 +3013,6 @@
*/
public static ConcurrentHashMap<String,ObjectClass> getObjectClasses()
{
- assert debugEnter(CLASS_NAME, "getObjectClasses");
return directoryServer.schema.getObjectClasses();
}
@@ -2978,7 +3028,6 @@
*/
public static LinkedHashSet<AttributeValue> getObjectClassSet()
{
- assert debugEnter(CLASS_NAME, "getObjectClassSet");
return directoryServer.schema.getObjectClassSet();
}
@@ -2996,7 +3045,6 @@
*/
public static ObjectClass getObjectClass(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getObjectClass", String.valueOf(lowerName));
return directoryServer.schema.getObjectClass(lowerName);
}
@@ -3021,8 +3069,6 @@
public static ObjectClass getObjectClass(String lowerName,
boolean returnDefault)
{
- assert debugEnter(CLASS_NAME, "getObjectClass", String.valueOf(lowerName),
- String.valueOf(returnDefault));
ObjectClass oc = directoryServer.schema.getObjectClass(lowerName);
if (returnDefault && (oc == null))
@@ -3053,9 +3099,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerObjectClass",
- String.valueOf(objectClass),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerObjectClass(objectClass, overwriteExisting);
}
@@ -3070,8 +3113,6 @@
*/
public static void deregisterObjectClass(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "deregisterObjectClass",
- String.valueOf(objectClass));
directoryServer.schema.deregisterObjectClass(objectClass);
}
@@ -3087,7 +3128,6 @@
*/
public static ObjectClass getTopObjectClass()
{
- assert debugEnter(CLASS_NAME, "getTopObjectClass");
ObjectClass objectClass =
directoryServer.schema.getObjectClass(TOP_OBJECTCLASS_NAME);
@@ -3124,8 +3164,6 @@
*/
public static ObjectClass getDefaultObjectClass(String name)
{
- assert debugEnter(CLASS_NAME, "getDefaultObjectClass",
- String.valueOf(name));
String lowerName = toLowerCase(name);
ObjectClass objectClass = directoryServer.schema.getObjectClass(lowerName);
@@ -3158,8 +3196,6 @@
*/
public static ObjectClass getDefaultAuxiliaryObjectClass(String name)
{
- assert debugEnter(CLASS_NAME, "getDefaultObjectClass",
- String.valueOf(name));
String lowerName = toLowerCase(name);
ObjectClass objectClass = directoryServer.schema.getObjectClass(lowerName);
@@ -3188,7 +3224,6 @@
*/
public static ConcurrentHashMap<String,AttributeType> getAttributeTypes()
{
- assert debugEnter(CLASS_NAME, "getAttributeTypes");
return directoryServer.schema.getAttributeTypes();
}
@@ -3204,7 +3239,6 @@
*/
public static LinkedHashSet<AttributeValue> getAttributeTypeSet()
{
- assert debugEnter(CLASS_NAME, "getAttributeTypeSet");
return directoryServer.schema.getAttributeTypeSet();
}
@@ -3222,8 +3256,6 @@
*/
public static AttributeType getAttributeType(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getAttributeType",
- String.valueOf(lowerName));
return directoryServer.schema.getAttributeType(lowerName);
}
@@ -3248,9 +3280,6 @@
public static AttributeType getAttributeType(String lowerName,
boolean returnDefault)
{
- assert debugEnter(CLASS_NAME, "getAttributeType",
- String.valueOf(lowerName),
- String.valueOf(returnDefault));
AttributeType type = directoryServer.schema.getAttributeType(lowerName);
if (returnDefault && (type == null))
@@ -3281,9 +3310,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerAttributeType",
- String.valueOf(attributeType),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerAttributeType(attributeType,
overwriteExisting);
@@ -3299,8 +3325,6 @@
*/
public static void deregisterAttributeType(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "deregisterAttributeType",
- String.valueOf(attributeType));
directoryServer.schema.deregisterAttributeType(attributeType);
}
@@ -3314,7 +3338,6 @@
*/
public static AttributeType getObjectClassAttributeType()
{
- assert debugEnter(CLASS_NAME, "getObjectClassAttributeType");
if (directoryServer.objectClassAttributeType == null)
{
@@ -3336,7 +3359,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getObjectClassAttributeType", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -3358,7 +3384,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "getObjectClassAttributeType", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -3380,8 +3409,6 @@
*/
public static AttributeType getDefaultAttributeType(String name)
{
- assert debugEnter(CLASS_NAME, "getDefaultAttributeType",
- String.valueOf(name));
return getDefaultAttributeType(name, getDefaultAttributeSyntax());
@@ -3403,8 +3430,6 @@
public static AttributeType getDefaultAttributeType(String name,
AttributeSyntax syntax)
{
- assert debugEnter(CLASS_NAME, "getDefaultAttributeType",
- String.valueOf(name));
String oid = toLowerCase(name) + "-oid";
@@ -3426,7 +3451,6 @@
*/
public static ConcurrentHashMap<String,AttributeSyntax> getAttributeSyntaxes()
{
- assert debugEnter(CLASS_NAME, "getAttributeSyntaxes");
return directoryServer.schema.getSyntaxes();
}
@@ -3442,7 +3466,6 @@
*/
public static LinkedHashSet<AttributeValue> getAttributeSyntaxSet()
{
- assert debugEnter(CLASS_NAME, "getAttributeSyntaxSet");
return directoryServer.schema.getSyntaxSet();
}
@@ -3463,8 +3486,6 @@
public static AttributeSyntax getAttributeSyntax(String oid,
boolean allowDefault)
{
- assert debugEnter(CLASS_NAME, "getAttributeSyntax", String.valueOf(oid),
- String.valueOf(allowDefault));
AttributeSyntax syntax = directoryServer.schema.getSyntax(oid);
if ((syntax == null) && allowDefault)
@@ -3495,9 +3516,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerAttributeSyntax",
- String.valueOf(syntax),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerSyntax(syntax, overwriteExisting);
}
@@ -3512,8 +3530,6 @@
*/
public static void deregisterAttributeSyntax(AttributeSyntax syntax)
{
- assert debugEnter(CLASS_NAME, "deregisterAttributeSyntax",
- String.valueOf(syntax));
directoryServer.schema.deregisterSyntax(syntax);
}
@@ -3529,7 +3545,6 @@
*/
public static AttributeSyntax getDefaultAttributeSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultAttributeSyntax");
return directoryServer.defaultSyntax;
}
@@ -3547,7 +3562,6 @@
*/
public static AttributeSyntax getDefaultBinarySyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultBinarySyntax");
return directoryServer.defaultBinarySyntax;
}
@@ -3565,7 +3579,6 @@
*/
public static AttributeSyntax getDefaultBooleanSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultBooleanSyntax");
return directoryServer.defaultBooleanSyntax;
}
@@ -3582,7 +3595,6 @@
*/
public static AttributeSyntax getDefaultDNSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultDNSyntax");
return directoryServer.defaultDNSyntax;
}
@@ -3600,7 +3612,6 @@
*/
public static AttributeSyntax getDefaultIntegerSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultIntegerSyntax");
return directoryServer.defaultIntegerSyntax;
}
@@ -3618,7 +3629,6 @@
*/
public static AttributeSyntax getDefaultStringSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultStringSyntax");
return directoryServer.defaultStringSyntax;
}
@@ -3633,7 +3643,6 @@
public static ConcurrentHashMap<MatchingRule,MatchingRuleUse>
getMatchingRuleUses()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUses");
return directoryServer.schema.getMatchingRuleUses();
}
@@ -3649,7 +3658,6 @@
*/
public static LinkedHashSet<AttributeValue> getMatchingRuleUseSet()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUseSet");
return directoryServer.schema.getMatchingRuleUseSet();
}
@@ -3667,8 +3675,6 @@
*/
public static MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUse",
- String.valueOf(matchingRule));
return directoryServer.schema.getMatchingRuleUse(matchingRule);
}
@@ -3693,9 +3699,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerMatchingRuleUse",
- String.valueOf(matchingRuleUse),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerMatchingRuleUse(matchingRuleUse,
overwriteExisting);
@@ -3711,8 +3714,6 @@
*/
public static void deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse)
{
- assert debugEnter(CLASS_NAME, "deregisterMatchingRuleUse",
- String.valueOf(matchingRuleUse));
directoryServer.schema.deregisterMatchingRuleUse(matchingRuleUse);
}
@@ -3727,7 +3728,6 @@
public static ConcurrentHashMap<ObjectClass,DITContentRule>
getDITContentRules()
{
- assert debugEnter(CLASS_NAME, "getDITContentRules");
return directoryServer.schema.getDITContentRules();
}
@@ -3743,7 +3743,6 @@
*/
public static LinkedHashSet<AttributeValue> getDITContentRuleSet()
{
- assert debugEnter(CLASS_NAME, "getDITContentRuleSet");
return directoryServer.schema.getDITContentRuleSet();
}
@@ -3761,8 +3760,6 @@
*/
public static DITContentRule getDITContentRule(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getDITContentRule",
- String.valueOf(objectClass));
return directoryServer.schema.getDITContentRule(objectClass);
}
@@ -3787,9 +3784,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerDITContentRule",
- String.valueOf(ditContentRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerDITContentRule(ditContentRule,
overwriteExisting);
@@ -3804,8 +3798,6 @@
*/
public static void deregisterDITContentRule(DITContentRule ditContentRule)
{
- assert debugEnter(CLASS_NAME, "deregisterDITContentRule",
- String.valueOf(ditContentRule));
directoryServer.schema.deregisterDITContentRule(ditContentRule);
}
@@ -3820,7 +3812,6 @@
public static ConcurrentHashMap<NameForm,DITStructureRule>
getDITStructureRules()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRules");
return directoryServer.schema.getDITStructureRulesByNameForm();
}
@@ -3836,7 +3827,6 @@
*/
public static LinkedHashSet<AttributeValue> getDITStructureRuleSet()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRuleSet");
return directoryServer.schema.getDITStructureRuleSet();
}
@@ -3854,8 +3844,6 @@
*/
public static DITStructureRule getDITStructureRule(int ruleID)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(ruleID));
return directoryServer.schema.getDITStructureRule(ruleID);
}
@@ -3873,8 +3861,6 @@
*/
public static DITStructureRule getDITStructureRule(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(nameForm));
return directoryServer.schema.getDITStructureRule(nameForm);
}
@@ -3899,9 +3885,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerDITStructureRule",
- String.valueOf(ditStructureRule),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerDITStructureRule(ditStructureRule,
overwriteExisting);
@@ -3918,8 +3901,6 @@
public static void deregisterDITStructureRule(DITStructureRule
ditStructureRule)
{
- assert debugEnter(CLASS_NAME, "deregisterDITStructureRule",
- String.valueOf(ditStructureRule));
directoryServer.schema.deregisterDITStructureRule(ditStructureRule);
}
@@ -3933,7 +3914,6 @@
*/
public static ConcurrentHashMap<ObjectClass,NameForm> getNameForms()
{
- assert debugEnter(CLASS_NAME, "getNameForms");
return directoryServer.schema.getNameFormsByObjectClass();
}
@@ -3949,7 +3929,6 @@
*/
public static LinkedHashSet<AttributeValue> getNameFormSet()
{
- assert debugEnter(CLASS_NAME, "getNameFormSet");
return directoryServer.schema.getNameFormSet();
}
@@ -3967,7 +3946,6 @@
*/
public static NameForm getNameForm(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getNameForm", String.valueOf(objectClass));
return directoryServer.schema.getNameForm(objectClass);
}
@@ -3985,7 +3963,6 @@
*/
public static NameForm getNameForm(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getNameForm", String.valueOf(lowerName));
return directoryServer.schema.getNameForm(lowerName);
}
@@ -4009,8 +3986,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerNameForm", String.valueOf(nameForm),
- String.valueOf(overwriteExisting));
directoryServer.schema.registerNameForm(nameForm, overwriteExisting);
}
@@ -4024,8 +3999,6 @@
*/
public static void deregisterNameForm(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "deregisterNameForm",
- String.valueOf(nameForm));
directoryServer.schema.deregisterNameForm(nameForm);
}
@@ -4040,7 +4013,6 @@
*/
public static MBeanServer getJMXMBeanServer()
{
- assert debugEnter(CLASS_NAME, "getJMXMBeanServer");
return directoryServer.mBeanServer;
}
@@ -4054,7 +4026,6 @@
*/
public static ConcurrentHashMap<DN,JMXMBean> getJMXMBeans()
{
- assert debugEnter(CLASS_NAME, "getJMXMBeans");
return directoryServer.mBeans;
}
@@ -4074,7 +4045,6 @@
*/
public static JMXMBean getJMXMBean(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "getJMXMBean", String.valueOf(configEntryDN));
return directoryServer.mBeans.get(configEntryDN);
}
@@ -4089,8 +4059,6 @@
public static void registerConfigurableComponent(ConfigurableComponent
component)
{
- assert debugEnter(CLASS_NAME, "registerConfigurableComponent",
- String.valueOf(component));
DN componentDN = component.getConfigurableComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4116,8 +4084,6 @@
public static void deregisterConfigurableComponent(ConfigurableComponent
component)
{
- assert debugEnter(CLASS_NAME, "deregisterConfigurableComponent",
- String.valueOf(component));
DN componentDN = component.getConfigurableComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4136,8 +4102,6 @@
*/
public static void registerInvokableComponent(InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "registerInvokableComponent",
- String.valueOf(component));
DN componentDN = component.getInvokableComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4162,8 +4126,6 @@
*/
public static void deregisterInvokableComponent(InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "deregisterInvokableComponent",
- String.valueOf(component));
DN componentDN = component.getInvokableComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4182,7 +4144,6 @@
*/
public static void registerAlertGenerator(AlertGenerator alertGenerator)
{
- assert debugEnter(CLASS_NAME, "registerAlertGenerator");
DN componentDN = alertGenerator.getComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4207,7 +4168,6 @@
*/
public static void deregisterAlertGenerator(AlertGenerator alertGenerator)
{
- assert debugEnter(CLASS_NAME, "deregisterAlertGenerator");
DN componentDN = alertGenerator.getComponentEntryDN();
JMXMBean mBean = directoryServer.mBeans.get(componentDN);
@@ -4228,7 +4188,6 @@
*/
public static CopyOnWriteArrayList<AlertHandler> getAlertHandlers()
{
- assert debugEnter(CLASS_NAME, "getAlertHandlers");
return directoryServer.alertHandlers;
}
@@ -4242,8 +4201,6 @@
*/
public static void registerAlertHandler(AlertHandler alertHandler)
{
- assert debugEnter(CLASS_NAME, "registerAlertHandler",
- String.valueOf(alertHandler));
directoryServer.alertHandlers.add(alertHandler);
}
@@ -4257,8 +4214,6 @@
*/
public static void deregisterAlertHandler(AlertHandler alertHandler)
{
- assert debugEnter(CLASS_NAME, "deregisterAlertHandler",
- String.valueOf(alertHandler));
directoryServer.alertHandlers.remove(alertHandler);
}
@@ -4279,9 +4234,6 @@
String alertType, int alertID,
String alertMessage)
{
- assert debugEnter(CLASS_NAME, "sendAlertNotification",
- String.valueOf(generator), String.valueOf(alertType),
- String.valueOf(alertID), String.valueOf(alertMessage));
if ((directoryServer.alertHandlers == null) ||
@@ -4300,7 +4252,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "sendAlertNotification", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -4334,7 +4289,6 @@
public static ConcurrentHashMap<String,PasswordStorageScheme>
getPasswordStorageSchemes()
{
- assert debugEnter(CLASS_NAME, "getPasswordStorageSchemes");
return directoryServer.passwordStorageSchemes;
}
@@ -4352,8 +4306,6 @@
*/
public static PasswordStorageScheme getPasswordStorageScheme(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getPasswordStorageScheme",
- String.valueOf(lowerName));
return directoryServer.passwordStorageSchemes.get(lowerName);
}
@@ -4371,7 +4323,6 @@
public static ConcurrentHashMap<String,PasswordStorageScheme>
getAuthPasswordStorageSchemes()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordStorageSchemes");
return directoryServer.authPasswordStorageSchemes;
}
@@ -4389,8 +4340,6 @@
*/
public static PasswordStorageScheme getAuthPasswordStorageScheme(String name)
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordStorageScheme",
- String.valueOf(name));
return directoryServer.authPasswordStorageSchemes.get(name);
}
@@ -4407,8 +4356,6 @@
*/
public static void registerPasswordStorageScheme(PasswordStorageScheme scheme)
{
- assert debugEnter(CLASS_NAME, "registerPasswordStorageScheme",
- String.valueOf(scheme));
String name = toLowerCase(scheme.getStorageSchemeName());
directoryServer.passwordStorageSchemes.put(name, scheme);
@@ -4432,8 +4379,6 @@
*/
public static void deregisterPasswordStorageScheme(String lowerName)
{
- assert debugEnter(CLASS_NAME, "deregisterPasswordStorageScheme",
- String.valueOf(lowerName));
PasswordStorageScheme scheme =
directoryServer.passwordStorageSchemes.remove(lowerName);
@@ -4457,7 +4402,6 @@
*/
public static ConcurrentHashMap<DN,PasswordValidator> getPasswordValidators()
{
- assert debugEnter(CLASS_NAME, "getPasswordValidators");
return directoryServer.passwordValidators;
}
@@ -4476,8 +4420,6 @@
*/
public static PasswordValidator getPasswordValidator(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "getPasswordValidator",
- String.valueOf(configEntryDN));
return directoryServer.passwordValidators.get(configEntryDN);
}
@@ -4496,8 +4438,6 @@
public static void registerPasswordValidator(DN configEntryDN,
PasswordValidator validator)
{
- assert debugEnter(CLASS_NAME, "registerPasswordValidator",
- String.valueOf(configEntryDN), String.valueOf(validator));
directoryServer.passwordValidators.put(configEntryDN, validator);
}
@@ -4513,8 +4453,6 @@
*/
public static void deregisterPasswordValidator(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "deregisterPasswordValidator",
- String.valueOf(configEntryDN));
directoryServer.passwordValidators.remove(configEntryDN);
}
@@ -4532,7 +4470,6 @@
public static ConcurrentHashMap<DN,AccountStatusNotificationHandler>
getAccountStatusNotificationHandlers()
{
- assert debugEnter(CLASS_NAME, "getAccountStatusNotificationHandlers");
return directoryServer.accountStatusNotificationHandlers;
}
@@ -4552,8 +4489,6 @@
public static AccountStatusNotificationHandler
getAccountStatusNotificationHandler(DN handlerDN)
{
- assert debugEnter(CLASS_NAME, "getAccountStatusNotificationHandler",
- String.valueOf(handlerDN));
return directoryServer.accountStatusNotificationHandlers.get(handlerDN);
}
@@ -4572,8 +4507,6 @@
public static void registerAccountStatusNotificationHandler(DN handlerDN,
AccountStatusNotificationHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerAccountStatusNotificationHandler",
- String.valueOf(handlerDN), String.valueOf(handler));
directoryServer.accountStatusNotificationHandlers.put(handlerDN, handler);
}
@@ -4589,8 +4522,6 @@
*/
public static void deregisterAccountStatusNotificationHandler(DN handlerDN)
{
- assert debugEnter(CLASS_NAME, "deregisterAccountStatusNotificationHandler",
- String.valueOf(handlerDN));
directoryServer.accountStatusNotificationHandlers.remove(handlerDN);
}
@@ -4608,7 +4539,6 @@
*/
public static ConcurrentHashMap<DN,PasswordGenerator> getPasswordGenerators()
{
- assert debugEnter(CLASS_NAME, "getPasswordGenerators");
return directoryServer.passwordGenerators;
}
@@ -4627,8 +4557,6 @@
*/
public static PasswordGenerator getPasswordGenerator(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "getPasswordGenerator",
- String.valueOf(configEntryDN));
return directoryServer.passwordGenerators.get(configEntryDN);
}
@@ -4647,8 +4575,6 @@
public static void registerPasswordGenerator(DN configEntryDN,
PasswordGenerator generator)
{
- assert debugEnter(CLASS_NAME, "registerPasswordGenerator",
- String.valueOf(configEntryDN), String.valueOf(generator));
directoryServer.passwordGenerators.put(configEntryDN, generator);
}
@@ -4664,8 +4590,6 @@
*/
public static void deregisterPasswordGenerator(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "deregisterPasswordGenerator",
- String.valueOf(configEntryDN));
directoryServer.passwordGenerators.remove(configEntryDN);
}
@@ -4682,7 +4606,6 @@
*/
public static PasswordPolicy[] getPasswordPolicies()
{
- assert debugEnter(CLASS_NAME, "getPasswordPolicies");
// The password policy objects are returned in an array to prevent the
// caller from modifying the map structure.
@@ -4711,8 +4634,6 @@
*/
public static PasswordPolicy getPasswordPolicy(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "getPasswordPolicy",
- String.valueOf(configEntryDN));
Validator.ensureNotNull(configEntryDN);
PasswordPolicyConfig config
@@ -4734,8 +4655,6 @@
public static void registerPasswordPolicy(DN configEntryDN,
PasswordPolicy policy)
{
- assert debugEnter(CLASS_NAME, "registerPasswordPolicy",
- String.valueOf(configEntryDN), String.valueOf(policy));
Validator.ensureNotNull(configEntryDN, policy);
PasswordPolicyConfig config = new PasswordPolicyConfig(policy);
@@ -4754,8 +4673,6 @@
*/
public static void deregisterPasswordPolicy(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "deregisterPasswordPolicy",
- String.valueOf(configEntryDN));
Validator.ensureNotNull(configEntryDN);
if (directoryServer.defaultPasswordPolicyDN.equals(configEntryDN))
@@ -4779,7 +4696,6 @@
*/
public static DN getDefaultPasswordPolicyDN()
{
- assert debugEnter(CLASS_NAME, "getDefaultPasswordPolicyDN");
return directoryServer.defaultPasswordPolicyDN;
}
@@ -4799,8 +4715,6 @@
*/
public static void setDefaultPasswordPolicyDN(DN defaultPasswordPolicyDN)
{
- assert debugEnter(CLASS_NAME, "setDefaultPasswordPolicyDN",
- String.valueOf(defaultPasswordPolicyDN));
directoryServer.defaultPasswordPolicyDN = defaultPasswordPolicyDN;
directoryServer.defaultPasswordPolicyConfig = null;
@@ -4817,7 +4731,6 @@
*/
public static PasswordPolicy getDefaultPasswordPolicy()
{
- assert debugEnter(CLASS_NAME, "getDefaultPasswordPolicy");
assert null != directoryServer.passwordPolicies.get(
directoryServer.defaultPasswordPolicyDN)
: "Internal Error: no default password policy defined." ;
@@ -4849,7 +4762,6 @@
*/
public static ConcurrentHashMap<String,MonitorProvider> getMonitorProviders()
{
- assert debugEnter(CLASS_NAME, "getMonitorProviders");
return directoryServer.monitorProviders;
}
@@ -4867,8 +4779,6 @@
*/
public static MonitorProvider getMonitorProvider(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getMonitorProvider",
- String.valueOf(lowerName));
return directoryServer.monitorProviders.get(lowerName);
}
@@ -4885,8 +4795,6 @@
*/
public static void registerMonitorProvider(MonitorProvider monitorProvider)
{
- assert debugEnter(CLASS_NAME, "registerMonitorProvider",
- String.valueOf(monitorProvider));
String lowerName = toLowerCase(monitorProvider.getMonitorInstanceName());
directoryServer.monitorProviders.put(lowerName, monitorProvider);
@@ -4910,7 +4818,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "registerMonitorProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -4925,8 +4836,6 @@
*/
public static void deregisterMonitorProvider(String lowerName)
{
- assert debugEnter(CLASS_NAME, "deregisterMonitorProvider",
- String.valueOf(lowerName));
MonitorProvider provider =
directoryServer.monitorProviders.remove(toLowerCase(lowerName));
@@ -4946,7 +4855,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "deregisterMonitorProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -4960,7 +4872,6 @@
*/
public static EntryCache getEntryCache()
{
- assert debugEnter(CLASS_NAME, "getEntryCache");
return directoryServer.entryCache;
}
@@ -4975,7 +4886,6 @@
*/
public static void setEntryCache(EntryCache entryCache)
{
- assert debugEnter(CLASS_NAME, "setEntryCache");
synchronized (directoryServer)
{
@@ -4994,7 +4904,6 @@
*/
public static Map<DN,KeyManagerProvider> getKeyManagerProviders()
{
- assert debugEnter(CLASS_NAME, "getKeyManagerProviders");
return directoryServer.keyManagerProviders;
}
@@ -5013,8 +4922,6 @@
*/
public static KeyManagerProvider getKeyManagerProvider(DN providerDN)
{
- assert debugEnter(CLASS_NAME, "getKeyManagerProvider",
- String.valueOf(providerDN));
return directoryServer.keyManagerProviders.get(providerDN);
}
@@ -5030,8 +4937,6 @@
public static void registerKeyManagerProvider(DN providerDN,
KeyManagerProvider provider)
{
- assert debugEnter(CLASS_NAME, "registerKeyManagerProvider",
- String.valueOf(providerDN), String.valueOf(provider));
directoryServer.keyManagerProviders.put(providerDN, provider);
}
@@ -5046,8 +4951,6 @@
*/
public static void deregisterKeyManagerProvider(DN providerDN)
{
- assert debugEnter(CLASS_NAME, "deregisterKeyManagerProvider",
- String.valueOf(providerDN));
directoryServer.keyManagerProviders.remove(providerDN);
}
@@ -5063,7 +4966,6 @@
*/
public static Map<DN,TrustManagerProvider> getTrustManagerProviders()
{
- assert debugEnter(CLASS_NAME, "getTrustManagerProviders");
return directoryServer.trustManagerProviders;
}
@@ -5082,8 +4984,6 @@
*/
public static TrustManagerProvider getTrustManagerProvider(DN providerDN)
{
- assert debugEnter(CLASS_NAME, "getTrustManagerProvider",
- String.valueOf(providerDN));
return directoryServer.trustManagerProviders.get(providerDN);
}
@@ -5100,8 +5000,6 @@
public static void registerTrustManagerProvider(DN providerDN,
TrustManagerProvider provider)
{
- assert debugEnter(CLASS_NAME, "registerTrustManagerProvider",
- String.valueOf(providerDN), String.valueOf(provider));
directoryServer.trustManagerProviders.put(providerDN, provider);
}
@@ -5116,8 +5014,6 @@
*/
public static void deregisterTrustManagerProvider(DN providerDN)
{
- assert debugEnter(CLASS_NAME, "deregisterTrustManagerProvider",
- String.valueOf(providerDN));
directoryServer.trustManagerProviders.remove(providerDN);
}
@@ -5133,7 +5029,6 @@
*/
public static Map<DN,CertificateMapper> getCertificateMappers()
{
- assert debugEnter(CLASS_NAME, "getCertificateMappers");
return directoryServer.certificateMappers;
}
@@ -5151,8 +5046,6 @@
*/
public static CertificateMapper getCertificateMapper(DN mapperDN)
{
- assert debugEnter(CLASS_NAME, "getCertificateMapper",
- String.valueOf(mapperDN));
return directoryServer.certificateMappers.get(mapperDN);
}
@@ -5168,8 +5061,6 @@
public static void registerCertificateMapper(DN mapperDN,
CertificateMapper mapper)
{
- assert debugEnter(CLASS_NAME, "registerCertificateMapper",
- String.valueOf(mapperDN), String.valueOf(mapper));
directoryServer.certificateMappers.put(mapperDN, mapper);
}
@@ -5183,8 +5074,6 @@
*/
public static void deregisterCertificateMapper(DN mapperDN)
{
- assert debugEnter(CLASS_NAME, "deregisterCertificateMapper",
- String.valueOf(mapperDN));
directoryServer.certificateMappers.remove(mapperDN);
}
@@ -5201,7 +5090,6 @@
*/
public static Set<Privilege> getRootPrivileges()
{
- assert debugEnter(CLASS_NAME, "getRootPrivileges");
return directoryServer.rootDNConfigManager.getRootPrivileges();
}
@@ -5218,7 +5106,6 @@
*/
public static CopyOnWriteArraySet<DN> getRootDNs()
{
- assert debugEnter(CLASS_NAME, "getRootDNs");
return directoryServer.rootDNs;
}
@@ -5236,7 +5123,6 @@
*/
public static boolean isRootDN(DN userDN)
{
- assert debugEnter(CLASS_NAME, "isRootDN", String.valueOf(userDN));
return directoryServer.rootDNs.contains(userDN);
}
@@ -5250,7 +5136,6 @@
*/
public static void registerRootDN(DN rootDN)
{
- assert debugEnter(CLASS_NAME, "registerRootDN", String.valueOf(rootDN));
directoryServer.rootDNs.add(rootDN);
}
@@ -5265,7 +5150,6 @@
*/
public static void deregisterRootDN(DN rootDN)
{
- assert debugEnter(CLASS_NAME, "deregisterRootDN", String.valueOf(rootDN));
directoryServer.rootDNs.remove(rootDN);
}
@@ -5282,7 +5166,6 @@
*/
public static ConcurrentHashMap<DN,DN> getAlternateRootBindDNs()
{
- assert debugEnter(CLASS_NAME, "getAlternateRootBindDNs");
return directoryServer.alternateRootBindDNs;
}
@@ -5301,8 +5184,6 @@
*/
public static DN getActualRootBindDN(DN alternateRootBindDN)
{
- assert debugEnter(CLASS_NAME, "getActualRootBindDN",
- String.valueOf(alternateRootBindDN));
return directoryServer.alternateRootBindDNs.get(alternateRootBindDN);
}
@@ -5323,9 +5204,6 @@
DN alternateRootBindDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerAlternateRootDN",
- String.valueOf(actualRootEntryDN),
- String.valueOf(alternateRootBindDN));
DN existingRootEntryDN =
directoryServer.alternateRootBindDNs.putIfAbsent(alternateRootBindDN,
@@ -5356,8 +5234,6 @@
*/
public static DN deregisterAlternateRootBindDN(DN alternateRootBindDN)
{
- assert debugEnter(CLASS_NAME, "deregisterAlternateRootBindDN",
- String.valueOf(alternateRootBindDN));
return directoryServer.alternateRootBindDNs.remove(alternateRootBindDN);
}
@@ -5373,7 +5249,6 @@
*/
public static ResultCode getServerErrorResultCode()
{
- assert debugEnter(CLASS_NAME, "getServerErrorResultCode");
return directoryServer.serverErrorResultCode;
}
@@ -5390,8 +5265,6 @@
*/
public static void setServerErrorResultCode(ResultCode serverErrorResultCode)
{
- assert debugEnter(CLASS_NAME, "setServerErrorResultCode",
- String.valueOf(serverErrorResultCode));
directoryServer.serverErrorResultCode = serverErrorResultCode;
}
@@ -5408,7 +5281,6 @@
*/
public static boolean addMissingRDNAttributes()
{
- assert debugEnter(CLASS_NAME, "addMissingRDNAttributes");
return directoryServer.addMissingRDNAttributes;
}
@@ -5426,8 +5298,6 @@
*/
public static void setAddMissingRDNAttributes(boolean addMissingRDNAttributes)
{
- assert debugEnter(CLASS_NAME, "setAddMissingRDNAttributes",
- String.valueOf(addMissingRDNAttributes));
directoryServer.addMissingRDNAttributes = addMissingRDNAttributes;
}
@@ -5446,7 +5316,6 @@
*/
public static boolean allowAttributeNameExceptions()
{
- assert debugEnter(CLASS_NAME, "allowAttributeNameExceptions");
return directoryServer.allowAttributeNameExceptions;
}
@@ -5464,8 +5333,6 @@
public static void setAllowAttributeNameExceptions(
boolean allowAttributeNameExceptions)
{
- assert debugEnter(CLASS_NAME, "setAllowAttributeNameExceptions",
- String.valueOf(allowAttributeNameExceptions));
directoryServer.allowAttributeNameExceptions = allowAttributeNameExceptions;
}
@@ -5480,7 +5347,6 @@
*/
public static boolean checkSchema()
{
- assert debugEnter(CLASS_NAME, "checkSchema");
return directoryServer.checkSchema;
}
@@ -5495,8 +5361,6 @@
*/
public static void setCheckSchema(boolean checkSchema)
{
- assert debugEnter(CLASS_NAME, "setCheckSchema",
- String.valueOf(checkSchema));
directoryServer.checkSchema = checkSchema;
}
@@ -5512,7 +5376,6 @@
*/
public static AcceptRejectWarn getSingleStructuralObjectClassPolicy()
{
- assert debugEnter(CLASS_NAME, "getSingleStructuralObjectClassPolicy");
return directoryServer.singleStructuralClassPolicy;
}
@@ -5530,7 +5393,6 @@
public static void setSingleStructuralObjectClassPolicy(
AcceptRejectWarn singleStructuralClassPolicy)
{
- assert debugEnter(CLASS_NAME, "getSingleStructuralObjectClassPolicy");
directoryServer.singleStructuralClassPolicy = singleStructuralClassPolicy;
}
@@ -5546,7 +5408,6 @@
*/
public static AcceptRejectWarn getSyntaxEnforcementPolicy()
{
- assert debugEnter(CLASS_NAME, "getSyntaxEnforcementPolicy");
return directoryServer.syntaxEnforcementPolicy;
}
@@ -5565,7 +5426,6 @@
public static void setSyntaxEnforcementPolicy(
AcceptRejectWarn syntaxEnforcementPolicy)
{
- assert debugEnter(CLASS_NAME, "getSyntaxEnforcementPolicy");
directoryServer.syntaxEnforcementPolicy = syntaxEnforcementPolicy;
}
@@ -5585,7 +5445,6 @@
*/
public static boolean notifyAbandonedOperations()
{
- assert debugEnter(CLASS_NAME, "notifyAbandonedOperations");
return directoryServer.notifyAbandonedOperations;
}
@@ -5606,8 +5465,6 @@
public static void setNotifyAbandonedOperations(
boolean notifyAbandonedOperations)
{
- assert debugEnter(CLASS_NAME, "setNotifyAbandonedOperations",
- String.valueOf(notifyAbandonedOperations));
directoryServer.notifyAbandonedOperations = notifyAbandonedOperations;
}
@@ -5623,7 +5480,6 @@
*/
public static Map<String,Backend> getBackends()
{
- assert debugEnter(CLASS_NAME, "getBackends");
return directoryServer.backends;
}
@@ -5640,7 +5496,6 @@
*/
public static Backend getBackend(String backendID)
{
- assert debugEnter(CLASS_NAME, "getBackend", String.valueOf(backendID));
return directoryServer.backends.get(backendID);
}
@@ -5658,7 +5513,6 @@
*/
public static boolean hasBackend(String backendID)
{
- assert debugEnter(CLASS_NAME, "hasBackend", String.valueOf(backendID));
return directoryServer.backends.containsKey(backendID);
}
@@ -5680,7 +5534,6 @@
public static void registerBackend(Backend backend)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerBackend", String.valueOf(backend));
ensureNotNull(backend);
@@ -5689,11 +5542,11 @@
synchronized (directoryServer)
{
- TreeMap<String,Backend> newBackends =
- new TreeMap<String,Backend>(directoryServer.backends);
+ TreeMap<String, Backend> newBackends =
+ new TreeMap<String, Backend>(directoryServer.backends);
if (newBackends.containsKey(backendID))
{
- int msgID = MSGID_REGISTER_BACKEND_ALREADY_EXISTS;
+ int msgID = MSGID_REGISTER_BACKEND_ALREADY_EXISTS;
String message = getMessage(msgID, backendID);
throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message,
msgID);
@@ -5723,7 +5576,6 @@
*/
public static void deregisterBackend(Backend backend)
{
- assert debugEnter(CLASS_NAME, "deregisterBackend", String.valueOf(backend));
ensureNotNull(backend);
@@ -5757,7 +5609,6 @@
*/
public static Map<DN,Backend> getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return directoryServer.baseDNs;
}
@@ -5775,8 +5626,6 @@
*/
public static Backend getBackendWithBaseDN(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "getBackendWithBaseDN",
- String.valueOf(baseDN));
return directoryServer.baseDNs.get(baseDN);
}
@@ -5796,8 +5645,6 @@
*/
public static Backend getBackend(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getBackendForEntry",
- String.valueOf(entryDN));
if (entryDN.isNullDN())
{
@@ -5844,9 +5691,6 @@
boolean isPrivate, boolean testOnly)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerBaseDN", String.valueOf(baseDN),
- String.valueOf(backend), String.valueOf(isPrivate),
- String.valueOf(testOnly));
ensureNotNull(baseDN, backend);
@@ -6059,7 +5903,6 @@
public static void deregisterBaseDN(DN baseDN, boolean testOnly)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deregisterBaseDN", String.valueOf(baseDN));
ensureNotNull(baseDN);
@@ -6203,7 +6046,6 @@
*/
public static Map<DN,Backend> getPublicNamingContexts()
{
- assert debugEnter(CLASS_NAME, "getPublicNamingContexts");
return directoryServer.publicNamingContexts;
}
@@ -6219,7 +6061,6 @@
*/
public static Map<DN,Backend> getPrivateNamingContexts()
{
- assert debugEnter(CLASS_NAME, "getPrivateNamingContexts");
return directoryServer.privateNamingContexts;
}
@@ -6237,7 +6078,6 @@
*/
public static boolean isNamingContext(DN dn)
{
- assert debugEnter(CLASS_NAME, "isNamingContext");
return (directoryServer.publicNamingContexts.containsKey(dn) ||
directoryServer.privateNamingContexts.containsKey(dn));
@@ -6252,7 +6092,6 @@
*/
public static Entry getRootDSE()
{
- assert debugEnter(CLASS_NAME, "getRootDSE");
return directoryServer.rootDSEBackend.getRootDSE();
}
@@ -6266,7 +6105,6 @@
*/
public static RootDSEBackend getRootDSEBackend()
{
- assert debugEnter(CLASS_NAME, "getRootDSEBackend");
return directoryServer.rootDSEBackend;
}
@@ -6282,7 +6120,6 @@
*/
public static DN getSchemaDN()
{
- assert debugEnter(CLASS_NAME, "getSchemaDN");
return directoryServer.schemaDN;
}
@@ -6297,7 +6134,6 @@
*/
public static void setSchemaDN(DN schemaDN)
{
- assert debugEnter(CLASS_NAME, "setSchemaDN", String.valueOf(schemaDN));
directoryServer.schemaDN = schemaDN;
}
@@ -6320,7 +6156,6 @@
public static Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// If the entry is the root DSE, then get and return that.
@@ -6329,7 +6164,6 @@
return directoryServer.rootDSEBackend.getRootDSE();
}
-
// Figure out which backend should be used for the entry. If it isn't
// appropriate for any backend, then return null.
Backend backend = getBackend(entryDN);
@@ -6338,7 +6172,6 @@
return null;
}
-
// Retrieve the requested entry from the backend.
return backend.getEntry(entryDN);
}
@@ -6360,7 +6193,6 @@
public static boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
// If the entry is the root DSE, then it will always exist.
@@ -6369,7 +6201,6 @@
return true;
}
-
// Figure out which backend should be used for the entry. If it isn't
// appropriate for any backend, then return false.
Backend backend = getBackend(entryDN);
@@ -6378,7 +6209,6 @@
return false;
}
-
// Ask the appropriate backend if the entry exists.
return backend.entryExists(entryDN);
}
@@ -6394,7 +6224,6 @@
*/
public static TreeSet<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return directoryServer.supportedControls;
}
@@ -6413,8 +6242,6 @@
*/
public static boolean isSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "isSupportedControl",
- String.valueOf(controlOID));
return directoryServer.supportedControls.contains(controlOID);
}
@@ -6431,8 +6258,6 @@
*/
public static void registerSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "registerSupportedControl",
- String.valueOf(controlOID));
synchronized (directoryServer.supportedControls)
{
@@ -6452,8 +6277,6 @@
*/
public static void deregisterSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedControl",
- String.valueOf(controlOID));
synchronized (directoryServer.supportedControls)
{
@@ -6472,7 +6295,6 @@
*/
public static TreeSet<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return directoryServer.supportedFeatures;
}
@@ -6491,8 +6313,6 @@
*/
public static boolean isSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "isSupportedFeature",
- String.valueOf(featureOID));
return directoryServer.supportedFeatures.contains(featureOID);
}
@@ -6509,8 +6329,6 @@
*/
public static void registerSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "registerSupportedFeature",
- String.valueOf(featureOID));
synchronized (directoryServer.supportedFeatures)
{
@@ -6530,8 +6348,6 @@
*/
public static void deregisterSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedFeature",
- String.valueOf(featureOID));
synchronized (directoryServer.supportedFeatures)
{
@@ -6551,7 +6367,6 @@
public static ConcurrentHashMap<String,ExtendedOperationHandler>
getSupportedExtensions()
{
- assert debugEnter(CLASS_NAME, "getSupportedExtensions");
return directoryServer.extendedOperationHandlers;
}
@@ -6568,8 +6383,6 @@
*/
public static ExtendedOperationHandler getExtendedOperationHandler(String oid)
{
- assert debugEnter(CLASS_NAME, "getExtendedOperationHandler",
- String.valueOf(oid));
return directoryServer.extendedOperationHandlers.get(oid);
}
@@ -6587,8 +6400,6 @@
public static void registerSupportedExtension(String oid,
ExtendedOperationHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerSupportedExtension",
- String.valueOf(oid), String.valueOf(handler));
directoryServer.extendedOperationHandlers.put(toLowerCase(oid), handler);
}
@@ -6603,8 +6414,6 @@
*/
public static void deregisterSupportedExtension(String oid)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedExtension",
- String.valueOf(oid));
directoryServer.extendedOperationHandlers.remove(toLowerCase(oid));
}
@@ -6621,7 +6430,6 @@
public static ConcurrentHashMap<String,SASLMechanismHandler>
getSupportedSASLMechanisms()
{
- assert debugEnter(CLASS_NAME, "getSupportedSASLMechanisms");
return directoryServer.saslMechanismHandlers;
}
@@ -6638,8 +6446,6 @@
*/
public static SASLMechanismHandler getSASLMechanismHandler(String name)
{
- assert debugEnter(CLASS_NAME, "getSASLMechanismHandler",
- String.valueOf(name));
return directoryServer.saslMechanismHandlers.get(name);
}
@@ -6656,8 +6462,6 @@
public static void registerSASLMechanismHandler(String name,
SASLMechanismHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerSASLMechanismHandler",
- String.valueOf(name), String.valueOf(handler));
// FIXME -- Should we force this name to be lowercase? If so, then will
// that cause the lower name to be used in the root DSE?
@@ -6673,8 +6477,6 @@
*/
public static void deregisterSASLMechanismHandler(String name)
{
- assert debugEnter(CLASS_NAME, "deregisterSASLMechanismHandler",
- String.valueOf(name));
// FIXME -- Should we force this name to be lowercase?
directoryServer.saslMechanismHandlers.remove(name);
@@ -6692,7 +6494,6 @@
*/
public static ConcurrentHashMap<DN,IdentityMapper> getIdentityMappers()
{
- assert debugEnter(CLASS_NAME, "getIdentityMappers");
return directoryServer.identityMappers;
}
@@ -6712,8 +6513,6 @@
*/
public static IdentityMapper getIdentityMapper(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "getIdentityMapper",
- String.valueOf(configEntryDN));
return directoryServer.identityMappers.get(configEntryDN);
}
@@ -6730,9 +6529,6 @@
public static void registerIdentityMapper(DN configEntryDN,
IdentityMapper identityMapper)
{
- assert debugEnter(CLASS_NAME, "registerIdentityMapper",
- String.valueOf(configEntryDN),
- String.valueOf(identityMapper));
directoryServer.identityMappers.put(configEntryDN, identityMapper);
}
@@ -6747,8 +6543,6 @@
*/
public static void deregisterIdentityMapper(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "deregisterIdentityMapper",
- String.valueOf(configEntryDN));
directoryServer.identityMappers.remove(configEntryDN);
}
@@ -6765,7 +6559,6 @@
*/
public static DN getProxiedAuthorizationIdentityMapperDN()
{
- assert debugEnter(CLASS_NAME, "getProxiedAuthorizationIdentityMapperDN");
return directoryServer.proxiedAuthorizationIdentityMapperDN;
}
@@ -6785,8 +6578,6 @@
public static void setProxiedAuthorizationIdentityMapperDN(
DN proxiedAuthorizationIdentityMapperDN)
{
- assert debugEnter(CLASS_NAME, "setProxiedAuthorizationIdentityMapperDN",
- String.valueOf(proxiedAuthorizationIdentityMapperDN));
directoryServer.proxiedAuthorizationIdentityMapperDN =
proxiedAuthorizationIdentityMapperDN;
@@ -6804,7 +6595,6 @@
*/
public static IdentityMapper getProxiedAuthorizationIdentityMapper()
{
- assert debugEnter(CLASS_NAME, "getProxiedAuthorizationIdentityMapper");
if (directoryServer.proxiedAuthorizationIdentityMapperDN == null)
{
@@ -6825,7 +6615,6 @@
*/
public static CopyOnWriteArrayList<ConnectionHandler> getConnectionHandlers()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandlers");
return directoryServer.connectionHandlers;
}
@@ -6840,8 +6629,6 @@
*/
public static void registerConnectionHandler(ConnectionHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerConnectionHandler",
- String.valueOf(handler));
synchronized (directoryServer.connectionHandlers)
{
@@ -6864,8 +6651,6 @@
*/
public static void deregisterConnectionHandler(ConnectionHandler handler)
{
- assert debugEnter(CLASS_NAME, "deregisterConnectionHandler",
- String.valueOf(handler));
synchronized (directoryServer.connectionHandlers)
{
@@ -6897,7 +6682,6 @@
private void initializeWorkQueue()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeWorkQueue");
DN configEntryDN;
try
@@ -6906,7 +6690,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeWorkQueue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_WORKQ_CANNOT_PARSE_DN;
String message = getMessage(msgID, DN_WORK_QUEUE_CONFIG,
@@ -6947,7 +6734,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeWorkQueue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_WORKQ_CANNOT_LOAD;
String message = getMessage(msgID, classAttr.activeValue(),
@@ -6961,7 +6751,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeWorkQueue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_WORKQ_CANNOT_INSTANTIATE;
String message = getMessage(msgID, classAttr.activeValue(),
@@ -6982,7 +6775,6 @@
*/
public static WorkQueue getWorkQueue()
{
- assert debugEnter(CLASS_NAME, "getWorkQueue");
return directoryServer.workQueue;
}
@@ -7001,7 +6793,6 @@
public static void enqueueRequest(Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "enqueueRequest", String.valueOf(operation));
// See if a bind is already in progress on the associated connection. If so
@@ -7110,7 +6901,6 @@
public static CopyOnWriteArrayList<ChangeNotificationListener>
getChangeNotificationListeners()
{
- assert debugEnter(CLASS_NAME, "getChangeNotificationListeners");
return directoryServer.changeNotificationListeners;
}
@@ -7128,8 +6918,6 @@
public static void registerChangeNotificationListener(
ChangeNotificationListener changeListener)
{
- assert debugEnter(CLASS_NAME, "registerChangeNotificationListener",
- String.valueOf(changeListener));
directoryServer.changeNotificationListeners.add(changeListener);
}
@@ -7147,8 +6935,6 @@
public static void deregisterChangeNotificationListener(
ChangeNotificationListener changeListener)
{
- assert debugEnter(CLASS_NAME, "deregisterChangeNotificationListener",
- String.valueOf(changeListener));
directoryServer.changeNotificationListeners.remove(changeListener);
}
@@ -7164,7 +6950,6 @@
*/
public static CopyOnWriteArrayList<PersistentSearch> getPersistentSearches()
{
- assert debugEnter(CLASS_NAME, "getPersistentSearches");
return directoryServer.persistentSearches;
}
@@ -7181,8 +6966,6 @@
*/
public static void registerPersistentSearch(PersistentSearch persistentSearch)
{
- assert debugEnter(CLASS_NAME, "registerPersistentSearch",
- String.valueOf(persistentSearch));
directoryServer.persistentSearches.add(persistentSearch);
persistentSearch.getSearchOperation().getClientConnection().
@@ -7202,8 +6985,6 @@
public static void deregisterPersistentSearch(PersistentSearch
persistentSearch)
{
- assert debugEnter(CLASS_NAME, "deregisterPersistentSearch",
- String.valueOf(persistentSearch));
directoryServer.persistentSearches.remove(persistentSearch);
persistentSearch.getSearchOperation().getClientConnection().
@@ -7223,7 +7004,6 @@
public static CopyOnWriteArrayList<SynchronizationProvider>
getSynchronizationProviders()
{
- assert debugEnter(CLASS_NAME, "getSynchronizationProviders");
return directoryServer.synchronizationProviders;
}
@@ -7238,8 +7018,6 @@
public static void registerSynchronizationProvider(SynchronizationProvider
provider)
{
- assert debugEnter(CLASS_NAME, "registerSynchronizationProvider",
- String.valueOf(provider));
directoryServer.synchronizationProviders.add(provider);
}
@@ -7255,8 +7033,6 @@
public static void deregisterSynchronizationProvider(SynchronizationProvider
provider)
{
- assert debugEnter(CLASS_NAME, "deregisterSynchronizationProvider",
- String.valueOf(provider));
directoryServer.synchronizationProviders.remove(provider);
}
@@ -7272,8 +7048,6 @@
*/
public static void registerShutdownListener(ServerShutdownListener listener)
{
- assert debugEnter(CLASS_NAME, "registerShutdownListener",
- String.valueOf(listener));
directoryServer.shutdownListeners.add(listener);
}
@@ -7288,8 +7062,6 @@
*/
public static void deregisterShutdownListener(ServerShutdownListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterShutdownListener",
- String.valueOf(listener));
directoryServer.shutdownListeners.remove(listener);
}
@@ -7306,8 +7078,6 @@
*/
public static void shutDown(String className, String reason)
{
- assert debugEnter(CLASS_NAME, "shutDown", String.valueOf(className),
- String.valueOf(reason));
synchronized (directoryServer)
{
@@ -7345,7 +7115,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
directoryServer.connectionHandlers.clear();
@@ -7393,7 +7166,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -7418,7 +7194,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -7434,7 +7213,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -7449,7 +7231,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -7478,7 +7263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -7515,9 +7303,12 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
- msgID = MSGID_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK;
+ msgID = MSGID_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK;
message = getMessage(msgID, backend.getBackendID(),
stackTraceToSingleLineString(e2));
logError(ErrorLogCategory.CONFIGURATION,
@@ -7527,7 +7318,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -7539,7 +7333,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -7558,7 +7355,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "startServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK;
message = getMessage(msgID, lockFile, stackTraceToSingleLineString(e));
@@ -7579,18 +7379,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "shutDown", e);
- }
-
-
- // Shutdown all debug loggers.
- try
- {
- removeAllDebugLoggers(true);
- }
- catch (Exception e)
- {
- e.printStackTrace();
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -7617,8 +7409,6 @@
*/
public static void restart(String className, String reason)
{
- assert debugEnter(CLASS_NAME, "restart", String.valueOf(className),
- String.valueOf(reason));
try
{
@@ -7653,7 +7443,6 @@
*/
public static long getMaxAllowedConnections()
{
- assert debugEnter(CLASS_NAME, "getMaxAllowedConnections");
return directoryServer.maxAllowedConnections;
}
@@ -7670,8 +7459,6 @@
*/
public static void setMaxAllowedConnections(long maxAllowedConnections)
{
- assert debugEnter(CLASS_NAME, "setMaxAllowedConnections",
- String.valueOf(maxAllowedConnections));
if (maxAllowedConnections > 0)
{
@@ -7698,8 +7485,6 @@
*/
public static long newConnectionAccepted(ClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "newConnectionAccepted",
- String.valueOf(clientConnection));
synchronized (directoryServer.establishedConnections)
{
@@ -7731,8 +7516,6 @@
*/
public static void connectionClosed(ClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "connectionClosed",
- String.valueOf(clientConnection));
synchronized (directoryServer.establishedConnections)
{
@@ -7750,7 +7533,6 @@
*/
public static long getCurrentConnections()
{
- assert debugEnter(CLASS_NAME, "getCurrentConnections");
return directoryServer.currentConnections;
}
@@ -7766,7 +7548,6 @@
*/
public static long getMaxConnections()
{
- assert debugEnter(CLASS_NAME, "getMaxConnections");
return directoryServer.maxConnections;
}
@@ -7782,7 +7563,6 @@
*/
public static long getTotalConnections()
{
- assert debugEnter(CLASS_NAME, "getTotalConnections");
return directoryServer.totalConnections;
}
@@ -7825,7 +7605,6 @@
*/
public static int getSizeLimit()
{
- assert debugEnter(CLASS_NAME, "getSizeLimit");
return directoryServer.sizeLimit;
}
@@ -7841,7 +7620,6 @@
*/
public static void setSizeLimit(int sizeLimit)
{
- assert debugEnter(CLASS_NAME, "setSizeLimit", String.valueOf(sizeLimit));
directoryServer.sizeLimit = sizeLimit;
}
@@ -7857,7 +7635,6 @@
*/
public static int getLookthroughLimit()
{
- assert debugEnter(CLASS_NAME, "getLookthroughLimit");
return directoryServer.lookthroughLimit;
}
@@ -7873,8 +7650,6 @@
*/
public static void setLookthroughLimit(int lookthroughLimit)
{
- assert debugEnter(CLASS_NAME, "setLookthroughLimit",
- String.valueOf(lookthroughLimit));
directoryServer.lookthroughLimit = lookthroughLimit;
}
@@ -7890,7 +7665,6 @@
*/
public static int getTimeLimit()
{
- assert debugEnter(CLASS_NAME, "getTimeLimit");
return directoryServer.timeLimit;
}
@@ -7906,7 +7680,6 @@
*/
public static void setTimeLimit(int timeLimit)
{
- assert debugEnter(CLASS_NAME, "setTimeLimit", String.valueOf(timeLimit));
directoryServer.timeLimit = timeLimit;
}
@@ -7921,7 +7694,6 @@
*/
public static WritabilityMode getWritabilityMode()
{
- assert debugEnter(CLASS_NAME, "getWritabilityMode");
return directoryServer.writabilityMode;
}
@@ -7937,8 +7709,6 @@
*/
public static void setWritabilityMode(WritabilityMode writabilityMode)
{
- assert debugEnter(CLASS_NAME, "setWritabilityMode",
- String.valueOf(writabilityMode));
directoryServer.writabilityMode = writabilityMode;
}
@@ -7956,7 +7726,6 @@
*/
public static boolean bindWithDNRequiresPassword()
{
- assert debugEnter(CLASS_NAME, "bindWithDNRequiresPassword");
return directoryServer.bindWithDNRequiresPassword;
}
@@ -7974,8 +7743,6 @@
public static void setBindWithDNRequiresPassword(boolean
bindWithDNRequiresPassword)
{
- assert debugEnter(CLASS_NAME, "setBindWithDNRequiresPassword",
- String.valueOf(bindWithDNRequiresPassword));
directoryServer.bindWithDNRequiresPassword = bindWithDNRequiresPassword;
}
@@ -7990,7 +7757,6 @@
*/
public static boolean rejectUnauthenticatedRequests()
{
- assert debugEnter(CLASS_NAME, "rejectUnauthenticatedRequests");
return directoryServer.rejectUnauthenticatedRequests;
}
@@ -8005,8 +7771,6 @@
public static void setRejectUnauthenticatedRequests(boolean
rejectUnauthenticatedRequests)
{
- assert debugEnter(CLASS_NAME, "rejectUnauthenticatedRequests",
- String.valueOf(rejectUnauthenticatedRequests));
directoryServer.rejectUnauthenticatedRequests =
rejectUnauthenticatedRequests;
@@ -8023,7 +7787,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
try
{
@@ -8038,7 +7801,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getComponentEntryDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This could theoretically happen if an alert needs to be sent before the
// configuration is initialized. In that case, just return an empty DN.
@@ -8057,7 +7823,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -8099,10 +7864,11 @@
*/
public void uncaughtException(Thread thread, Throwable exception)
{
- assert debugEnter(CLASS_NAME, "uncaughtException",
- String.valueOf(thread), String.valueOf(exception));
- assert debugException(CLASS_NAME, "uncaughtException", exception);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, exception);
+ }
int msgID = MSGID_UNCAUGHT_THREAD_EXCEPTION;
String message = getMessage(msgID, thread.getName(),
@@ -8418,7 +8184,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "startServer", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK;
String message = getMessage(msgID, lockFile,
@@ -8551,7 +8320,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "main", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
int msgID = MSGID_DSCORE_CANNOT_BOOTSTRAP;
String message = getMessage(msgID, ie.getMessage());
@@ -8572,7 +8344,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "main", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
int msgID = MSGID_DSCORE_CANNOT_START;
String message = getMessage(msgID, ie.getMessage());
diff --git a/opends/src/server/org/opends/server/core/DirectoryServerShutdownHook.java b/opends/src/server/org/opends/server/core/DirectoryServerShutdownHook.java
index 1b587fa..f1aa100 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServerShutdownHook.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServerShutdownHook.java
@@ -22,16 +22,14 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
import org.opends.server.api.DirectoryThread;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import org.opends.server.loggers.debug.DebugLogger;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -47,7 +45,7 @@
extends DirectoryThread
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.core.DirectoryServerShutdownHook";
@@ -62,7 +60,6 @@
{
super("Directory Server Shutdown Hook");
- assert debugConstructor(CLASS_NAME);
}
@@ -72,10 +69,8 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME, "run",
- "Directory Server shutdown hook has been invoked.");
+ DebugLogger.debugInfo(
+ "Directory Server shutdown hook has been invoked.");
DirectoryServer.shutDown(CLASS_NAME,
getMessage(MSGID_SHUTDOWN_DUE_TO_SHUTDOWN_HOOK));
diff --git a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
index 8c2c8eb..9350080 100644
--- a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
+++ b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -46,7 +46,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -62,11 +64,6 @@
public class EntryCacheConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.EntryCacheConfigManager";
@@ -75,7 +72,6 @@
*/
public EntryCacheConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -94,7 +90,6 @@
public void initializeEntryCache()
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeEntryCache");
// First, install a default entry cache so that there will be one even if
@@ -107,7 +102,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ENTRYCACHE_CANNOT_INSTALL_DEFAULT_CACHE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -126,7 +124,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_GET_CONFIG_ENTRY,
@@ -150,7 +151,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_REGISTER_ADD_LISTENER,
@@ -177,7 +181,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_WARNING,
MSGID_CONFIG_ENTRYCACHE_CANNOT_REGISTER_DELETE_LISTENER,
@@ -215,7 +222,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_UNABLE_TO_DETERMINE_ENABLED_STATE,
@@ -247,7 +257,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_DETERMINE_CLASS,
@@ -265,7 +278,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_LOAD_CLASS,
@@ -280,7 +296,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_INSTANTIATE_CLASS,
@@ -296,7 +315,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_ENTRYCACHE_CANNOT_INITIALIZE_CACHE,
@@ -329,8 +351,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -356,8 +376,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
@@ -388,8 +406,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -414,8 +430,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
@@ -446,8 +460,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -471,8 +483,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
diff --git a/opends/src/server/org/opends/server/core/ExtendedOperation.java b/opends/src/server/org/opends/server/core/ExtendedOperation.java
index 37a9514..156a48f 100644
--- a/opends/src/server/org/opends/server/core/ExtendedOperation.java
+++ b/opends/src/server/org/opends/server/core/ExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -68,10 +70,6 @@
implements PreParseExtendedOperation, PreOperationExtendedOperation,
PostOperationExtendedOperation, PostResponseExtendedOperation
{
- /*** The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ExtendedOperation";
@@ -124,16 +122,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(requestOID),
- String.valueOf(requestValue)
- });
this.requestOID = requestOID;
this.requestValue = requestValue;
@@ -154,7 +142,6 @@
*/
public final String getRequestOID()
{
- assert debugEnter(CLASS_NAME, "getRequestOID");
return requestOID;
}
@@ -170,7 +157,6 @@
*/
public final void setRequestOID(String requestOID)
{
- assert debugEnter(CLASS_NAME, "setRequestOID", String.valueOf(requestOID));
this.requestOID = requestOID;
}
@@ -185,7 +171,6 @@
*/
public final ASN1OctetString getRequestValue()
{
- assert debugEnter(CLASS_NAME, "getRequestValue");
return requestValue;
}
@@ -201,8 +186,6 @@
*/
public final void setRequestValue(ASN1OctetString requestValue)
{
- assert debugEnter(CLASS_NAME, "setRequestValue",
- String.valueOf(requestValue));
this.requestValue = requestValue;
}
@@ -217,7 +200,6 @@
*/
public final String getResponseOID()
{
- assert debugEnter(CLASS_NAME, "getResponseOID");
return responseOID;
}
@@ -232,8 +214,6 @@
*/
public final void setResponseOID(String responseOID)
{
- assert debugEnter(CLASS_NAME, "setResponseOID",
- String.valueOf(responseOID));
this.responseOID = responseOID;
}
@@ -248,7 +228,6 @@
*/
public final ASN1OctetString getResponseValue()
{
- assert debugEnter(CLASS_NAME, "getResponseValue");
return responseValue;
}
@@ -263,8 +242,6 @@
*/
public final void setResponseValue(ASN1OctetString responseValue)
{
- assert debugEnter(CLASS_NAME, "setResponseValue",
- String.valueOf(responseValue));
this.responseValue = responseValue;
}
@@ -277,7 +254,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -290,7 +266,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -303,7 +278,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -436,7 +410,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -471,7 +444,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -706,7 +678,6 @@
*/
public final void sendExtendedResponse()
{
- assert debugEnter(CLASS_NAME, "sendExtendedResponse");
if (! responseSent)
{
@@ -725,8 +696,6 @@
*/
public final void setResponseSent()
{
- assert debugEnter(CLASS_NAME, "setResponseSent",
- String.valueOf(responseSent));
this.responseSent = true;
}
@@ -739,7 +708,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -754,7 +722,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -780,7 +751,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -793,8 +763,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -808,7 +776,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ExtendedOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java b/opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java
index 669e675..26ef58a 100644
--- a/opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java
+++ b/opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java
@@ -53,7 +53,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -72,11 +74,6 @@
public class ExtendedOperationConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ExtendedOperationConfigManager";
@@ -94,7 +91,6 @@
*/
public ExtendedOperationConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
handlers = new ConcurrentHashMap<DN,ExtendedOperationHandler>();
@@ -117,7 +113,6 @@
public void initializeExtendedOperationHandlers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperationHandlers");
// First, get the configuration base entry.
@@ -129,8 +124,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeExtendedOperationHandlers",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -233,8 +230,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for an extended
@@ -269,7 +264,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -286,7 +284,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -302,7 +303,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -334,7 +338,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -363,8 +370,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -442,7 +447,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -477,7 +485,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -519,7 +530,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -536,7 +550,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -597,8 +614,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -644,7 +659,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -661,7 +679,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -677,7 +698,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -739,7 +763,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -766,8 +793,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -817,7 +842,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -851,7 +879,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -872,7 +903,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -887,7 +921,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_EXTOP_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -940,8 +977,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -960,8 +995,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/GroupManager.java b/opends/src/server/org/opends/server/core/GroupManager.java
index 0806dea..4a9bab7 100644
--- a/opends/src/server/org/opends/server/core/GroupManager.java
+++ b/opends/src/server/org/opends/server/core/GroupManager.java
@@ -68,7 +68,9 @@
import org.opends.server.types.operation.PostResponseModifyDNOperation;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -92,11 +94,6 @@
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener,
BackendInitializationListener, ChangeNotificationListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.GroupManager";
@@ -118,7 +115,6 @@
*/
public GroupManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
groupImplementations = new ConcurrentHashMap<DN,Group>();
@@ -145,7 +141,6 @@
public void initializeGroupImplementations()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeGroupImplementations");
// First, get the configuration base entry.
@@ -158,7 +153,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeGroupImplementations", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -251,7 +249,6 @@
*/
public void finalizeGroupManager()
{
- assert debugEnter(CLASS_NAME, "finalizeGroupManager");
deregisterAllGroups();
@@ -274,7 +271,6 @@
*/
public Iterable<Group> getGroupImplementations()
{
- assert debugEnter(CLASS_NAME, "getGroupImplementations");
return groupImplementations.values();
}
@@ -290,7 +286,6 @@
*/
public Iterable<Group> getGroupInstances()
{
- assert debugEnter(CLASS_NAME, "getGroupInstances");
return groupInstances.values();
}
@@ -308,7 +303,6 @@
*/
public Group getGroupInstance(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getGroupInstance", String.valueOf(entryDN));
Group group = groupInstances.get(entryDN);
if (group == null)
@@ -338,8 +332,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for an extended
@@ -374,7 +366,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -391,7 +386,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -406,7 +404,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS;
String message = getMessage(msgID, groupClass.getName(),
@@ -438,7 +439,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -467,8 +471,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -558,7 +560,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -593,7 +598,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -635,7 +643,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -651,7 +662,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -695,8 +709,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -742,7 +754,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -759,7 +774,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -775,7 +793,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS;
String message = getMessage(msgID, groupClass.getName(),
@@ -837,7 +858,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -864,8 +888,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -915,7 +937,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -949,7 +974,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -970,7 +998,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -985,7 +1016,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_GROUP_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -1017,8 +1051,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -1037,8 +1069,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -1078,8 +1108,6 @@
*/
public void performBackendInitializationProcessing(Backend backend)
{
- assert debugEnter(CLASS_NAME, "performBackendInitializationProcessing",
- String.valueOf(backend));
InternalClientConnection conn =
InternalClientConnection.getRootConnection();
@@ -1093,8 +1121,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Is there anything that we need to do here?
continue;
@@ -1112,8 +1142,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Is there anything that we need to do here?
continue;
@@ -1132,8 +1164,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Is there anything that we need to do here?
continue;
@@ -1148,8 +1182,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "performBackendInitializationProcessing", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Handle this.
continue;
@@ -1167,8 +1203,6 @@
*/
public void performBackendFinalizationProcessing(Backend backend)
{
- assert debugEnter(CLASS_NAME, "performBackendFinalizationProcessing",
- String.valueOf(backend));
Iterator<Map.Entry<DN,Group>> iterator =
groupInstances.entrySet().iterator();
@@ -1193,8 +1227,6 @@
public void handleAddOperation(PostResponseAddOperation addOperation,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "handleAddOperation",
- String.valueOf(addOperation), String.valueOf(entry));
List<Control> requestControls = addOperation.getRequestControls();
if (requestControls != null)
@@ -1220,8 +1252,6 @@
public void handleDeleteOperation(PostResponseDeleteOperation deleteOperation,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "handleDeleteOperation",
- String.valueOf(deleteOperation), String.valueOf(entry));
List<Control> requestControls = deleteOperation.getRequestControls();
if (requestControls != null)
@@ -1248,9 +1278,6 @@
public void handleModifyOperation(PostResponseModifyOperation modifyOperation,
Entry oldEntry, Entry newEntry)
{
- assert debugEnter(CLASS_NAME, "handleModifyOperation",
- String.valueOf(modifyOperation), String.valueOf(oldEntry),
- String.valueOf(newEntry));
List<Control> requestControls = modifyOperation.getRequestControls();
if (requestControls != null)
@@ -1292,9 +1319,6 @@
PostResponseModifyDNOperation modifyDNOperation,
Entry oldEntry, Entry newEntry)
{
- assert debugEnter(CLASS_NAME, "handleModifyDNOperation",
- String.valueOf(modifyDNOperation),
- String.valueOf(oldEntry), String.valueOf(newEntry));
List<Control> requestControls = modifyDNOperation.getRequestControls();
if (requestControls != null)
@@ -1329,8 +1353,6 @@
*/
private void createAndRegisterGroup(Entry entry)
{
- assert debugEnter(CLASS_NAME, "createAndRegisterGroup",
- String.valueOf(entry));
for (Group groupImplementation : groupImplementations.values())
{
@@ -1344,7 +1366,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createAndRegisterGroup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Do we need to do anything else?
}
diff --git a/opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java b/opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java
index 23f548b..020fdf6 100644
--- a/opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java
+++ b/opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,11 +72,6 @@
public class IdentityMapperConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.IdentityMapperConfigManager";
@@ -92,7 +89,6 @@
*/
public IdentityMapperConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
identityMappers = new ConcurrentHashMap<DN,IdentityMapper>();
@@ -114,7 +110,6 @@
public void initializeIdentityMappers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeIdentityMappers");
// First, get the configuration base entry.
@@ -126,8 +121,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeIdentityMappers",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -247,8 +244,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for an identity
@@ -283,7 +278,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -300,7 +298,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -316,7 +317,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS;
String message = getMessage(msgID, mapperClass.getName(),
@@ -348,7 +352,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -377,8 +384,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -457,7 +462,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -492,7 +500,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -534,7 +545,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -551,7 +565,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -592,8 +609,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -639,7 +654,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -656,7 +674,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -672,7 +693,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS;
String message = getMessage(msgID, mapperClass.getName(),
@@ -734,7 +758,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -762,8 +789,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -813,7 +838,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -847,7 +875,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -868,7 +899,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -883,7 +917,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_IDMAPPER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -916,8 +953,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -936,8 +971,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java b/opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java
index 6529579..b21868e 100644
--- a/opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java
+++ b/opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java
@@ -52,13 +52,13 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-
/**
@@ -71,11 +71,6 @@
public class KeyManagerProviderConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.KeyManagerProviderConfigManager";
@@ -93,7 +88,6 @@
*/
public KeyManagerProviderConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
providers = new ConcurrentHashMap<DN,KeyManagerProvider>();
@@ -116,7 +110,6 @@
public void initializeKeyManagerProviders()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeKeyManagerProviders");
// First, get the configuration base entry.
@@ -128,8 +121,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +227,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a key manager
@@ -268,7 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +281,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -301,7 +300,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS;
String message = getMessage(msgID, providerClass.getName(),
@@ -333,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -362,8 +367,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -442,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -477,7 +483,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -519,7 +528,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -536,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -577,8 +592,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -624,7 +637,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -641,7 +657,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -657,7 +676,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS;
String message = getMessage(msgID, providerClass.getName(),
@@ -695,7 +717,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -752,8 +777,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -803,7 +826,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -837,7 +863,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -858,7 +887,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -873,7 +905,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_KEYMANAGER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -906,8 +941,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -926,8 +959,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/LockFileManager.java b/opends/src/server/org/opends/server/core/LockFileManager.java
index 1c24426..78f46c9 100644
--- a/opends/src/server/org/opends/server/core/LockFileManager.java
+++ b/opends/src/server/org/opends/server/core/LockFileManager.java
@@ -37,7 +37,9 @@
import org.opends.server.api.Backend;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -52,11 +54,6 @@
*/
public class LockFileManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.LockFileManager";
@@ -90,8 +87,6 @@
public static boolean acquireSharedLock(String lockFile,
StringBuilder failureReason)
{
- assert debugEnter(CLASS_NAME, "acquireSharedLock",
- String.valueOf(lockFile));
mapLock.lock();
@@ -131,7 +126,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireSharedLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_CREATE;
failureReason.append(getMessage(msgID, lockFile,
@@ -149,7 +147,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireSharedLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_OPEN;
failureReason.append(getMessage(msgID, lockFile,
@@ -166,7 +167,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireSharedLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_SHARED_FAILED_LOCK;
failureReason.append(getMessage(msgID,
@@ -211,8 +215,6 @@
public static boolean acquireExclusiveLock(String lockFile,
StringBuilder failureReason)
{
- assert debugEnter(CLASS_NAME, "acquireExclusiveLock",
- String.valueOf(lockFile));
mapLock.lock();
@@ -250,7 +252,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireExclusiveLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_CREATE;
failureReason.append(getMessage(msgID, lockFile,
@@ -268,7 +273,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireExclusiveLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_OPEN;
failureReason.append(getMessage(msgID, lockFile,
@@ -285,7 +293,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "acquireExclusiveLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_LOCK_EXCLUSIVE_FAILED_LOCK;
failureReason.append(getMessage(msgID, lockFile,
@@ -335,8 +346,6 @@
public static boolean releaseLock(String lockFile,
StringBuilder failureReason)
{
- assert debugEnter(CLASS_NAME, "releaseLock",
- String.valueOf(lockFile));
mapLock.lock();
@@ -353,7 +362,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "releaseLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_UNLOCK_EXCLUSIVE_FAILED_RELEASE;
failureReason.append(getMessage(msgID, lockFile,
@@ -367,7 +379,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "releaseLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Even though we couldn't close the channel for some reason, this
// should still be OK because we released the lock above.
@@ -395,7 +410,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "releaseLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILELOCKER_UNLOCK_SHARED_FAILED_RELEASE;
failureReason.append(getMessage(msgID, lockFile,
@@ -409,7 +427,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "releaseLock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Even though we couldn't close the channel for some reason, this
// should still be OK because we released the lock above.
@@ -448,7 +469,6 @@
*/
public static String getLockDirectoryPath()
{
- assert debugEnter(CLASS_NAME, "getLockFileDirectory");
String lockDirectory = System.getProperty(PROPERTY_LOCK_DIRECTORY);
if ((lockDirectory == null) || (lockDirectory.length() == 0))
@@ -471,7 +491,6 @@
*/
public static String getServerLockFileName()
{
- assert debugEnter(CLASS_NAME, "getServerLockFileName");
StringBuilder buffer = new StringBuilder();
buffer.append(getLockDirectoryPath());
@@ -496,8 +515,6 @@
*/
public static String getBackendLockFileName(Backend backend)
{
- assert debugEnter(CLASS_NAME, "getBackendLockFileName",
- String.valueOf(backend));
StringBuilder buffer = new StringBuilder();
buffer.append(getLockDirectoryPath());
diff --git a/opends/src/server/org/opends/server/core/LoggerConfigManager.java b/opends/src/server/org/opends/server/core/LoggerConfigManager.java
index c234738..e7c5aff 100644
--- a/opends/src/server/org/opends/server/core/LoggerConfigManager.java
+++ b/opends/src/server/org/opends/server/core/LoggerConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -40,13 +40,11 @@
import org.opends.server.api.ConfigDeleteListener;
import org.opends.server.api.ConfigHandler;
import org.opends.server.api.ConfigurableComponent;
-import org.opends.server.api.DebugLogger;
import org.opends.server.api.ErrorLogger;
import org.opends.server.config.BooleanConfigAttribute;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.config.StringConfigAttribute;
-import org.opends.server.loggers.StartupDebugLogger;
import org.opends.server.loggers.StartupErrorLogger;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DN;
@@ -54,10 +52,12 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -87,10 +87,6 @@
private ConcurrentHashMap<DN,AccessLogger> activeAccessLoggers;
// A mapping between the DNs of the logger configuration entries and the
- // associated active debug loggers.
- private ConcurrentHashMap<DN,DebugLogger> activeDebugLoggers;
-
- // A mapping between the DNs of the logger configuration entries and the
// associated active error loggers.
private ConcurrentHashMap<DN,ErrorLogger> activeErrorLoggers;
@@ -104,12 +100,10 @@
*/
public LoggerConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
activeAccessLoggers = new ConcurrentHashMap<DN,AccessLogger>();
- activeDebugLoggers = new ConcurrentHashMap<DN,DebugLogger>();
activeErrorLoggers = new ConcurrentHashMap<DN,ErrorLogger>();
}
@@ -129,7 +123,6 @@
public void initializeLoggers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeLoggers");
// First, get the logger configuration base entry.
@@ -141,7 +134,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeLoggers", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -181,53 +177,60 @@
// configuration entries.
for (ConfigEntry childEntry : loggerBaseEntry.getChildren().values())
{
- childEntry.registerChangeListener(this);
-
- StringBuilder unacceptableReason = new StringBuilder();
- if (! configAddIsAcceptable(childEntry, unacceptableReason))
+ if(!childEntry.hasObjectClass(OC_DEBUG_LOGGER))
{
- logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
- MSGID_CONFIG_LOGGER_ENTRY_UNACCEPTABLE,
- childEntry.getDN().toString(), unacceptableReason.toString());
- continue;
- }
+ childEntry.registerChangeListener(this);
- try
- {
- ConfigChangeResult result = applyConfigurationAdd(childEntry);
- if (result.getResultCode() != ResultCode.SUCCESS)
+ StringBuilder unacceptableReason = new StringBuilder();
+ if (! configAddIsAcceptable(childEntry, unacceptableReason))
{
- StringBuilder buffer = new StringBuilder();
+ logError(ErrorLogCategory.CONFIGURATION,
+ ErrorLogSeverity.SEVERE_ERROR,
+ MSGID_CONFIG_LOGGER_ENTRY_UNACCEPTABLE,
+ childEntry.getDN().toString(),
+ unacceptableReason.toString());
+ continue;
+ }
- List<String> resultMessages = result.getMessages();
- if ((resultMessages == null) || (resultMessages.isEmpty()))
+ try
+ {
+ ConfigChangeResult result = applyConfigurationAdd(childEntry);
+ if (result.getResultCode() != ResultCode.SUCCESS)
{
- buffer.append(getMessage(MSGID_CONFIG_UNKNOWN_UNACCEPTABLE_REASON));
- }
- else
- {
- Iterator<String> iterator = resultMessages.iterator();
+ StringBuilder buffer = new StringBuilder();
- buffer.append(iterator.next());
- while (iterator.hasNext())
+ List<String> resultMessages = result.getMessages();
+ if ((resultMessages == null) || (resultMessages.isEmpty()))
{
- buffer.append(EOL);
- buffer.append(iterator.next());
+ buffer.append(
+ getMessage(MSGID_CONFIG_UNKNOWN_UNACCEPTABLE_REASON));
}
- }
+ else
+ {
+ Iterator<String> iterator = resultMessages.iterator();
+ buffer.append(iterator.next());
+ while (iterator.hasNext())
+ {
+ buffer.append(EOL);
+ buffer.append(iterator.next());
+ }
+ }
+
+ logError(ErrorLogCategory.CONFIGURATION,
+ ErrorLogSeverity.SEVERE_ERROR,
+ MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER,
+ childEntry.getDN().toString(), buffer.toString());
+ }
+ }
+ catch (Exception e)
+ {
logError(ErrorLogCategory.CONFIGURATION,
ErrorLogSeverity.SEVERE_ERROR,
MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER,
- childEntry.getDN().toString(), buffer.toString());
+ childEntry.getDN().toString(), String.valueOf(e));
}
}
- catch (Exception e)
- {
- logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
- MSGID_CONFIG_LOGGER_CANNOT_CREATE_LOGGER,
- childEntry.getDN().toString(), String.valueOf(e));
- }
}
@@ -244,12 +247,6 @@
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_WARNING,
MSGID_CONFIG_LOGGER_NO_ACTIVE_ERROR_LOGGERS);
}
-
- if (activeDebugLoggers.isEmpty())
- {
- logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.MILD_WARNING,
- MSGID_CONFIG_LOGGER_NO_ACTIVE_DEBUG_LOGGERS);
- }
}
@@ -262,7 +259,6 @@
*/
public void stopLoggers()
{
- assert debugEnter(CLASS_NAME, "stopLoggers");
StartupErrorLogger errorLogger = new StartupErrorLogger();
errorLogger.initializeErrorLogger(null);
@@ -270,11 +266,6 @@
removeAllErrorLoggers(true);
addErrorLogger(errorLogger);
- StartupDebugLogger debugLogger = new StartupDebugLogger();
- debugLogger.initializeDebugLogger(null);
-
- removeAllDebugLoggers(true);
- addDebugLogger(debugLogger);
}
@@ -295,8 +286,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for an access,
@@ -346,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -363,7 +355,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -380,7 +375,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
String message = getMessage(msgID, loggerClass.getName(),
@@ -398,7 +396,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
String message = getMessage(msgID, loggerClass.getName(),
@@ -410,21 +411,6 @@
}
else if (isDebugLogger)
{
- try
- {
- DebugLogger logger = (DebugLogger) loggerClass.newInstance();
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
-
- int msgID = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
- String message = getMessage(msgID, loggerClass.getName(),
- configEntry.getDN().toString(),
- String.valueOf(e));
- unacceptableReason.append(message);
- return false;
- }
}
@@ -448,7 +434,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -476,8 +465,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -516,7 +503,6 @@
boolean isActive = false;
AccessLogger accessLogger = null;
ErrorLogger errorLogger = null;
- DebugLogger debugLogger = null;
if (isAccessLogger)
{
accessLogger = activeAccessLoggers.get(configEntryDN);
@@ -527,11 +513,6 @@
errorLogger = activeErrorLoggers.get(configEntryDN);
isActive = (errorLogger != null);
}
- else if (isDebugLogger)
- {
- debugLogger = activeDebugLoggers.get(configEntryDN);
- isActive = (debugLogger != null);
- }
// See if this logger should be enabled or disabled.
@@ -581,11 +562,6 @@
activeErrorLoggers.remove(configEntryDN);
errorLogger.closeErrorLogger();
}
- else if (isDebugLogger)
- {
- activeDebugLoggers.remove(configEntryDN);
- debugLogger.closeDebugLogger();
- }
return new ConfigChangeResult(resultCode, adminActionRequired,
messages);
@@ -601,7 +577,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -636,7 +615,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -648,8 +630,7 @@
boolean classChanged = false;
String oldClassName = null;
- if (! (needsEnabled || (accessLogger == null) && (errorLogger == null) &&
- (debugLogger == null)))
+ if (! (needsEnabled || (accessLogger == null) && (errorLogger == null) ))
{
if (isAccessLogger)
{
@@ -661,11 +642,6 @@
oldClassName = errorLogger.getClass().getName();
classChanged = (! className.equals(oldClassName));
}
- else if (isDebugLogger)
- {
- oldClassName = debugLogger.getClass().getName();
- classChanged = (! className.equals(oldClassName));
- }
}
@@ -696,7 +672,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
messages.add(getMessage(msgID, className,
@@ -713,7 +692,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_ACCESS_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -739,7 +721,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
messages.add(getMessage(msgID, className,
@@ -756,7 +741,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_ERROR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -774,44 +762,6 @@
}
else
{
- try
- {
- // FIXME -- Should this be done with a dynamic class loader?
- Class loggerClass = Class.forName(className);
- debugLogger = (DebugLogger) loggerClass.newInstance();
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
-
- int msgID = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
- messages.add(getMessage(msgID, className,
- String.valueOf(configEntryDN),
- String.valueOf(e)));
- resultCode = DirectoryServer.getServerErrorResultCode();
- return new ConfigChangeResult(resultCode, adminActionRequired,
- messages);
- }
-
- try
- {
- debugLogger.initializeDebugLogger(configEntry);
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
-
- int msgID = MSGID_CONFIG_LOGGER_DEBUG_INITIALIZATION_FAILED;
- messages.add(getMessage(msgID, className,
- String.valueOf(configEntryDN),
- String.valueOf(e)));
- resultCode = DirectoryServer.getServerErrorResultCode();
- return new ConfigChangeResult(resultCode, adminActionRequired,
- messages);
- }
-
- addDebugLogger(debugLogger);
- activeDebugLoggers.put(configEntryDN, debugLogger);
return new ConfigChangeResult(resultCode, adminActionRequired,
messages);
}
@@ -841,15 +791,12 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
DN configEntryDN = configEntry.getDN();
if (activeAccessLoggers.containsKey(configEntryDN) ||
- activeErrorLoggers.containsKey(configEntryDN) ||
- activeDebugLoggers.containsKey(configEntryDN))
+ activeErrorLoggers.containsKey(configEntryDN) )
{
int msgID = MSGID_CONFIG_LOGGER_EXISTS;
String message = getMessage(msgID, String.valueOf(configEntryDN));
@@ -905,7 +852,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -922,7 +872,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -941,7 +894,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
String message = getMessage(msgID, loggerClass.getName(),
@@ -959,7 +915,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
String message = getMessage(msgID, loggerClass.getName(),
@@ -971,21 +930,6 @@
}
else if (isDebugLogger)
{
- try
- {
- logger = (DebugLogger) loggerClass.newInstance();
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
-
- int msgID = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
- String message = getMessage(msgID, loggerClass.getName(),
- configEntry.getDN().toString(),
- String.valueOf(e));
- unacceptableReason.append(message);
- return false;
- }
}
@@ -1039,7 +983,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -1066,8 +1013,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -1131,7 +1076,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1165,7 +1113,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1189,7 +1140,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -1206,7 +1160,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_ACCESS_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -1237,7 +1194,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -1254,7 +1214,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if(debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LOGGER_ERROR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -1275,46 +1238,6 @@
// class, and register it with the Directory Server.
else
{
- DebugLogger debugLogger;
-
- try
- {
- // FIXME -- Should this be done with a dynamic class loader?
- Class loggerClass = Class.forName(className);
- debugLogger = (DebugLogger) loggerClass.newInstance();
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
-
- int msgID = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
- messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
- String.valueOf(e)));
- resultCode = DirectoryServer.getServerErrorResultCode();
- return new ConfigChangeResult(resultCode, adminActionRequired,
- messages);
- }
-
-
- try
- {
- debugLogger.initializeDebugLogger(configEntry);
- }
- catch (Exception e)
- {
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
-
- int msgID = MSGID_CONFIG_LOGGER_DEBUG_INITIALIZATION_FAILED;
- messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
- String.valueOf(e)));
- resultCode = DirectoryServer.getServerErrorResultCode();
- return new ConfigChangeResult(resultCode, adminActionRequired,
- messages);
- }
-
-
- addDebugLogger(debugLogger);
- activeDebugLoggers.put(configEntryDN, debugLogger);
return new ConfigChangeResult(resultCode, adminActionRequired, messages);
}
}
@@ -1337,8 +1260,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -1357,8 +1278,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -1388,15 +1307,6 @@
}
- // See if the entry is registered as a debug logger. If so, deregister it
- // and stop the logger.
- DebugLogger debugLogger = activeDebugLoggers.remove(configEntryDN);
- if (debugLogger != null)
- {
- removeDebugLogger(debugLogger);
- debugLogger.closeDebugLogger();
- return new ConfigChangeResult(resultCode, adminActionRequired);
- }
// If we've gotten here, then it wasn't an active logger so we can just
diff --git a/opends/src/server/org/opends/server/core/ModifyDNOperation.java b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
index 6867dfa..4c79104 100644
--- a/opends/src/server/org/opends/server/core/ModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyDNOperation.java
@@ -82,7 +82,9 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -100,11 +102,6 @@
implements PreParseModifyDNOperation, PreOperationModifyDNOperation,
PostOperationModifyDNOperation, PostResponseModifyDNOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ModifyDNOperation";
@@ -183,18 +180,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawNewRDN),
- String.valueOf(deleteOldRDN),
- String.valueOf(rawNewSuperior)
- });
this.rawEntryDN = rawEntryDN;
this.rawNewRDN = rawNewRDN;
@@ -237,18 +222,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(entryDN),
- String.valueOf(newRDN),
- String.valueOf(deleteOldRDN),
- String.valueOf(newSuperior)
- });
this.entryDN = entryDN;
this.newRDN = newRDN;
@@ -286,7 +259,6 @@
*/
public final ByteString getRawEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRawEntryDN");
return rawEntryDN;
}
@@ -302,7 +274,6 @@
*/
public final void setRawEntryDN(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "setRawEntryDN");
this.rawEntryDN = rawEntryDN;
@@ -321,7 +292,6 @@
*/
public final DN getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -338,7 +308,6 @@
*/
public final ByteString getRawNewRDN()
{
- assert debugEnter(CLASS_NAME, "getRawNewRDN");
return rawNewRDN;
}
@@ -355,7 +324,6 @@
*/
public final void setRawNewRDN(ByteString rawNewRDN)
{
- assert debugEnter(CLASS_NAME, "setRawNewRDN", String.valueOf(rawNewRDN));
this.rawNewRDN = rawNewRDN;
@@ -374,7 +342,6 @@
*/
public final RDN getNewRDN()
{
- assert debugEnter(CLASS_NAME, "getNewRDN");
return newRDN;
}
@@ -389,7 +356,6 @@
*/
public final boolean deleteOldRDN()
{
- assert debugEnter(CLASS_NAME, "deleteOldRDN");
return deleteOldRDN;
}
@@ -404,8 +370,6 @@
*/
public final void setDeleteOldRDN(boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, "setDeleteOldRDN",
- String.valueOf(deleteOldRDN));
this.deleteOldRDN = deleteOldRDN;
}
@@ -422,7 +386,6 @@
*/
public final ByteString getRawNewSuperior()
{
- assert debugEnter(CLASS_NAME, "getRawNewSuperior");
return rawNewSuperior;
}
@@ -439,8 +402,6 @@
*/
public final void setRawNewSuperior(ByteString rawNewSuperior)
{
- assert debugEnter(CLASS_NAME, "setRawNewSuperior",
- String.valueOf(rawNewSuperior));
this.rawNewSuperior = rawNewSuperior;
@@ -461,7 +422,6 @@
*/
public final DN getNewSuperior()
{
- assert debugEnter(CLASS_NAME, "getNewSuperior");
return newSuperior;
}
@@ -487,7 +447,6 @@
*/
public final List<Modification> getModifications()
{
- assert debugEnter(CLASS_NAME, "getModifications");
return modifications;
}
@@ -504,8 +463,6 @@
*/
public final void addModification(Modification modification)
{
- assert debugEnter(CLASS_NAME, "addModification",
- String.valueOf(modification));
modifications.add(modification);
}
@@ -522,7 +479,6 @@
*/
public final Entry getOriginalEntry()
{
- assert debugEnter(CLASS_NAME, "getOriginalEntry");
return currentEntry;
}
@@ -539,7 +495,6 @@
*/
public final Entry getUpdatedEntry()
{
- assert debugEnter(CLASS_NAME, "getUpdatedEntry");
return newEntry;
}
@@ -552,7 +507,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -565,7 +519,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -578,7 +531,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -594,7 +546,6 @@
*/
public final long getChangeNumber()
{
- assert debugEnter(CLASS_NAME, "getChangeNumber");
return changeNumber;
}
@@ -610,8 +561,6 @@
*/
public final void setChangeNumber(long changeNumber)
{
- assert debugEnter(CLASS_NAME, "setChangeNumber",
- String.valueOf(changeNumber));
this.changeNumber = changeNumber;
}
@@ -756,7 +705,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -791,7 +739,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -871,7 +818,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -889,7 +839,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -913,7 +866,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1020,7 +976,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
LockManager.unlock(entryDN, currentLock);
@@ -1073,7 +1032,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1099,7 +1061,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
break;
}
@@ -1130,7 +1095,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1173,7 +1141,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1199,7 +1170,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -1229,7 +1203,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1253,7 +1230,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1288,7 +1268,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1305,7 +1288,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1342,7 +1328,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1359,7 +1348,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1655,7 +1647,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setResultCode(ResultCode.CONSTRAINT_VIOLATION);
@@ -1696,7 +1691,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setResultCode(ResultCode.CONSTRAINT_VIOLATION);
@@ -1822,7 +1820,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1943,7 +1944,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1954,7 +1958,10 @@
}
catch (CancelledOperationException coe)
{
- assert debugException(CLASS_NAME, "run", coe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, coe);
+ }
CancelResult cancelResult = coe.getCancelResult();
@@ -1984,7 +1991,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -2035,7 +2045,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MODDN_ERROR_NOTIFYING_CHANGE_LISTENER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -2070,7 +2083,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MODDN_ERROR_NOTIFYING_PERSISTENT_SEARCH;
String message = getMessage(msgID, String.valueOf(persistentSearch),
@@ -2096,7 +2112,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -2111,7 +2126,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -2137,7 +2155,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -2150,8 +2167,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -2165,7 +2180,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyDNOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/ModifyOperation.java b/opends/src/server/org/opends/server/core/ModifyOperation.java
index 292e824..81fd57f 100644
--- a/opends/src/server/org/opends/server/core/ModifyOperation.java
+++ b/opends/src/server/org/opends/server/core/ModifyOperation.java
@@ -95,7 +95,9 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -113,11 +115,6 @@
implements PreParseModifyOperation, PreOperationModifyOperation,
PostOperationModifyOperation, PostResponseModifyOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ModifyOperation";
@@ -185,16 +182,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawModifications)
- });
this.rawEntryDN = rawEntryDN;
this.rawModifications = rawModifications;
@@ -232,16 +219,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawEntryDN),
- String.valueOf(rawModifications)
- });
this.entryDN = entryDN;
this.modifications = modifications;
@@ -276,7 +253,6 @@
*/
public final ByteString getRawEntryDN()
{
- assert debugEnter(CLASS_NAME, "getRawEntryDN");
return rawEntryDN;
}
@@ -292,7 +268,6 @@
*/
public final void setRawEntryDN(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "setRawEntryDN");
this.rawEntryDN = rawEntryDN;
@@ -311,7 +286,6 @@
*/
public final DN getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -329,7 +303,6 @@
*/
public final List<LDAPModification> getRawModifications()
{
- assert debugEnter(CLASS_NAME, "getRawModifications");
return rawModifications;
}
@@ -345,8 +318,6 @@
*/
public final void addRawModification(LDAPModification rawModification)
{
- assert debugEnter(CLASS_NAME, "addRawModification",
- String.valueOf(rawModification));
rawModifications.add(rawModification);
@@ -362,8 +333,6 @@
*/
public final void setRawModifications(List<LDAPModification> rawModifications)
{
- assert debugEnter(CLASS_NAME, "setRawModifications",
- String.valueOf(rawModifications));
this.rawModifications = rawModifications;
@@ -382,7 +351,6 @@
*/
public final List<Modification> getModifications()
{
- assert debugEnter(CLASS_NAME, "getModifications");
return modifications;
}
@@ -402,8 +370,6 @@
public final void addModification(Modification modification)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addModification",
- String.valueOf(modification));
modifiedEntry.applyModification(modification);
modifications.add(modification);
@@ -420,7 +386,6 @@
*/
public final Entry getCurrentEntry()
{
- assert debugEnter(CLASS_NAME, "getCurrentEntry");
return currentEntry;
}
@@ -438,7 +403,6 @@
*/
public final Entry getModifiedEntry()
{
- assert debugEnter(CLASS_NAME, "getModifiedEntry");
return modifiedEntry;
}
@@ -458,7 +422,6 @@
*/
public final List<AttributeValue> getCurrentPasswords()
{
- assert debugEnter(CLASS_NAME, "getCurrentPasswords");
return currentPasswords;
}
@@ -477,7 +440,6 @@
*/
public final List<AttributeValue> getNewPasswords()
{
- assert debugEnter(CLASS_NAME, "getNewPasswords");
return newPasswords;
}
@@ -490,7 +452,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -503,7 +464,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -516,7 +476,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -532,7 +491,6 @@
*/
public final long getChangeNumber()
{
- assert debugEnter(CLASS_NAME, "getChangeNumber");
return changeNumber;
}
@@ -548,8 +506,6 @@
*/
public final void setChangeNumber(long changeNumber)
{
- assert debugEnter(CLASS_NAME, "setChangeNumber",
- String.valueOf(changeNumber));
this.changeNumber = changeNumber;
}
@@ -681,7 +637,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -716,7 +671,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
@@ -795,7 +749,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -818,7 +775,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -907,7 +867,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -937,7 +900,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
break;
}
@@ -976,7 +942,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1002,7 +971,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -1032,7 +1004,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1056,7 +1031,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1091,7 +1069,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1108,7 +1089,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1145,7 +1129,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1162,7 +1149,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1225,7 +1215,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1255,7 +1248,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1571,7 +1567,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1651,7 +1650,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
@@ -1695,7 +1697,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
@@ -1869,7 +1874,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResponseData(de);
break modifyProcessing;
@@ -1979,7 +1987,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResponseData(de);
break modifyProcessing;
@@ -2189,7 +2200,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX);
@@ -2237,7 +2251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setResultCode(ResultCode.INVALID_ATTRIBUTE_SYNTAX);
@@ -2516,7 +2533,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -2697,7 +2717,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -2708,7 +2731,10 @@
}
catch (CancelledOperationException coe)
{
- assert debugException(CLASS_NAME, "run", coe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, coe);
+ }
CancelResult cancelResult = coe.getCancelResult();
@@ -2737,7 +2763,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.SYNCHRONIZATION,
ErrorLogSeverity.SEVERE_ERROR,
@@ -2793,7 +2822,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MODIFY_ERROR_NOTIFYING_CHANGE_LISTENER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -2828,7 +2860,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_MODIFY_ERROR_NOTIFYING_PERSISTENT_SEARCH;
String message = getMessage(msgID, String.valueOf(persistentSearch),
@@ -2854,7 +2889,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -2869,7 +2903,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -2895,7 +2932,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -2908,8 +2944,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -2923,7 +2957,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/MonitorConfigManager.java b/opends/src/server/org/opends/server/core/MonitorConfigManager.java
index 8816476..ce0159f 100644
--- a/opends/src/server/org/opends/server/core/MonitorConfigManager.java
+++ b/opends/src/server/org/opends/server/core/MonitorConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,11 +72,6 @@
public class MonitorConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.MonitorConfigManager";
@@ -92,7 +89,6 @@
*/
public MonitorConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
@@ -115,7 +111,6 @@
public void initializeMonitorProviders()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProviders");
// First, get the monitor configuration base entry.
@@ -127,7 +122,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMonitorProviders", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -230,8 +228,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a monitor
@@ -266,7 +262,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -283,7 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -298,7 +300,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS;
String message = getMessage(msgID, monitorClass.getName(),
@@ -330,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -358,8 +366,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -437,7 +443,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -472,7 +481,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -514,7 +526,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -531,7 +546,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -572,8 +590,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -619,7 +635,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -636,7 +655,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -652,7 +674,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS;
String message = getMessage(msgID, monitorClass.getName(),
@@ -714,7 +739,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -741,8 +769,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -792,7 +818,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -826,7 +855,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -847,7 +879,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -862,7 +897,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_MONITOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -895,8 +933,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -915,8 +951,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/Operation.java b/opends/src/server/org/opends/server/core/Operation.java
index 36a7ef3..9f4128b 100644
--- a/opends/src/server/org/opends/server/core/Operation.java
+++ b/opends/src/server/org/opends/server/core/Operation.java
@@ -49,7 +49,6 @@
import org.opends.server.types.operation.PreParseOperation;
import static org.opends.server.core.CoreConstants.*;
-import static org.opends.server.loggers.Debug.*;
@@ -63,10 +62,6 @@
implements PreParseOperation, PreOperationOperation,
PostOperationOperation, PostResponseOperation, Runnable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.core.Operation";
@@ -158,9 +153,6 @@
protected Operation(ClientConnection clientConnection, long operationID,
int messageID, List<Control> requestControls)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection),
- String.valueOf(messageID),
- String.valueOf(requestControls));
this.clientConnection = clientConnection;
this.operationID = operationID;
@@ -283,7 +275,6 @@
*/
public final ClientConnection getClientConnection()
{
- assert debugEnter(CLASS_NAME, "getClientConnection");
return clientConnection;
}
@@ -299,7 +290,6 @@
*/
public final long getConnectionID()
{
- assert debugEnter(CLASS_NAME, "getConnectionID");
return clientConnection.getConnectionID();
}
@@ -313,7 +303,6 @@
*/
public final long getOperationID()
{
- assert debugEnter(CLASS_NAME, "getOperationID");
return operationID;
}
@@ -327,7 +316,6 @@
*/
public final int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
@@ -342,7 +330,6 @@
*/
public final List<Control> getRequestControls()
{
- assert debugEnter(CLASS_NAME, "getRequestControls");
return requestControls;
}
@@ -358,7 +345,6 @@
*/
public final void addRequestControl(Control control)
{
- assert debugEnter(CLASS_NAME, "addRequestControl", String.valueOf(control));
requestControls.add(control);
}
@@ -374,8 +360,6 @@
*/
public final void removeRequestControl(Control control)
{
- assert debugEnter(CLASS_NAME, "removeRequestControl",
- String.valueOf(control));
requestControls.remove(control);
}
@@ -423,7 +407,6 @@
*/
public final ResultCode getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -438,7 +421,6 @@
*/
public final void setResultCode(ResultCode resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -454,7 +436,6 @@
*/
public final StringBuilder getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -469,8 +450,6 @@
*/
public final void setErrorMessage(StringBuilder errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
if (errorMessage == null)
{
@@ -493,8 +472,6 @@
*/
public final void appendErrorMessage(String message)
{
- assert debugEnter(CLASS_NAME, "appendErrorMessage",
- String.valueOf(message));
if (errorMessage == null)
{
@@ -523,7 +500,6 @@
*/
public final StringBuilder getAdditionalLogMessage()
{
- assert debugEnter(CLASS_NAME, "getAdditionalLogMessage");
return additionalLogMessage;
}
@@ -540,8 +516,6 @@
*/
public final void setAdditionalLogMessage(StringBuilder additionalLogMessage)
{
- assert debugEnter(CLASS_NAME, "setAdditionalLogMessage",
- String.valueOf(additionalLogMessage));
if (additionalLogMessage == null)
{
@@ -564,8 +538,6 @@
*/
public final void appendAdditionalLogMessage(String message)
{
- assert debugEnter(CLASS_NAME, "appendAdditionalLogMessage",
- String.valueOf(message));
if (additionalLogMessage == null)
{
@@ -587,7 +559,6 @@
*/
public final DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -602,7 +573,6 @@
*/
public final void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -619,7 +589,6 @@
*/
public final List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -634,8 +603,6 @@
*/
public final void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -652,7 +619,6 @@
*/
public final void setResponseData(DirectoryException directoryException)
{
- assert debugEnter(CLASS_NAME, "setResponseData");
this.resultCode = directoryException.getResultCode();
this.matchedDN = directoryException.getMatchedDN();
@@ -672,7 +638,6 @@
*/
public final boolean isInternalOperation()
{
- assert debugEnter(CLASS_NAME, "isInternalOperation");
return isInternalOperation;
}
@@ -690,8 +655,6 @@
*/
public final void setInternalOperation(boolean isInternalOperation)
{
- assert debugEnter(CLASS_NAME, "setInternalOperation",
- String.valueOf(isInternalOperation));
this.isInternalOperation = isInternalOperation;
}
@@ -707,7 +670,6 @@
*/
public final boolean isSynchronizationOperation()
{
- assert debugEnter(CLASS_NAME, "isSynchronizationOperation");
return isSynchronizationOperation;
}
@@ -727,8 +689,6 @@
public final void setSynchronizationOperation(
boolean isSynchronizationOperation)
{
- assert debugEnter(CLASS_NAME, "setSynchronizationOperation",
- String.valueOf(isSynchronizationOperation));
this.isSynchronizationOperation = isSynchronizationOperation;
}
@@ -744,8 +704,6 @@
*/
public final void setDontSynchronize(boolean dontSynchronize)
{
- assert debugEnter(CLASS_NAME, "setDontSynchronize",
- String.valueOf(dontSynchronize));
this.dontSynchronizeFlag = dontSynchronize;
}
@@ -766,7 +724,6 @@
*/
public final Entry getAuthorizationEntry()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationEntry");
return authorizationEntry;
}
@@ -784,9 +741,6 @@
*/
public final void setAuthorizationEntry(Entry authorizationEntry)
{
- assert debugEnter(CLASS_NAME, "setAuthorizationEntry",
- String.valueOf(authorizationEntry));
-
this.authorizationEntry = authorizationEntry;
}
@@ -806,7 +760,6 @@
*/
public final DN getAuthorizationDN()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationDN");
if (authorizationEntry == null)
{
@@ -828,7 +781,6 @@
*/
public final Map<String,Object> getAttachments()
{
- assert debugEnter(CLASS_NAME, "getAttachments");
return attachments;
}
@@ -846,7 +798,6 @@
*/
public final Object getAttachment(String name)
{
- assert debugEnter(CLASS_NAME, "getAttachment", String.valueOf(name));
return attachments.get(name);
}
@@ -864,7 +815,6 @@
*/
public final Object removeAttachment(String name)
{
- assert debugEnter(CLASS_NAME, "removeAttachment", String.valueOf(name));
return attachments.remove(name);
}
@@ -884,8 +834,6 @@
*/
public final Object setAttachment(String name, Object value)
{
- assert debugEnter(CLASS_NAME, "putAttachment", String.valueOf(name),
- String.valueOf(value));
return attachments.put(name, value);
}
@@ -940,7 +888,6 @@
*/
public final void operationCompleted()
{
- assert debugEnter(CLASS_NAME, "operationCompleted");
// Notify the client connection that this operation is complete and that it
@@ -999,7 +946,6 @@
*/
public final CancelResult getCancelResult()
{
- assert debugEnter(CLASS_NAME, "getCancelResult");
return cancelResult;
}
@@ -1013,8 +959,6 @@
*/
public final void setCancelResult(CancelResult cancelResult)
{
- assert debugEnter(CLASS_NAME, "setCancelResult",
- String.valueOf(cancelResult));
this.cancelResult = cancelResult;
}
@@ -1032,8 +976,6 @@
*/
protected final void indicateCancelled(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "indicateCancelled",
- String.valueOf(cancelRequest));
setCancelResult(CancelResult.CANCELED);
@@ -1061,7 +1003,6 @@
*/
public final String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -1089,8 +1030,6 @@
*/
public boolean dontSynchronize()
{
- assert debugEnter(CLASS_NAME, "dontSynchronize");
-
return dontSynchronizeFlag;
}
}
diff --git a/opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java b/opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java
index ce7cc3e..83f5d4e 100644
--- a/opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java
+++ b/opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -71,11 +73,6 @@
public class PasswordGeneratorConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordGeneratorConfigManager";
@@ -93,7 +90,6 @@
*/
public PasswordGeneratorConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
passwordGenerators = new ConcurrentHashMap<DN,PasswordGenerator>();
@@ -116,7 +112,6 @@
public void initializePasswordGenerators()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordGenerators");
// First, get the configuration base entry.
@@ -128,8 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerators",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +229,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a password
@@ -268,7 +263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +283,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -301,7 +302,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS;
String message = getMessage(msgID, generatorClass.getName(),
@@ -333,7 +337,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -362,8 +369,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -444,7 +449,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -479,7 +487,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -521,7 +532,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -538,7 +552,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -579,8 +596,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -626,7 +641,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -643,7 +661,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -659,7 +680,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS;
String message = getMessage(msgID, generatorClass.getName(),
@@ -721,7 +745,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -748,8 +775,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -799,7 +824,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -833,7 +861,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -854,7 +885,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -869,7 +903,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWGENERATOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -902,8 +939,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -922,8 +957,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicy.java b/opends/src/server/org/opends/server/core/PasswordPolicy.java
index 12fc83e..1b1a3a9 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicy.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicy.java
@@ -58,7 +58,9 @@
import org.opends.server.types.InitializationException;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -73,11 +75,6 @@
*/
public class PasswordPolicy
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordPolicy";
@@ -201,7 +198,6 @@
*/
private PasswordPolicy()
{
- assert debugConstructor(CLASS_NAME);
configEntryDN = null;
passwordAttribute = null;
@@ -354,7 +350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_ATTRIBUTE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -420,7 +419,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_DEFAULT_STORAGE_SCHEMES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -448,7 +450,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_DEPRECATED_STORAGE_SCHEMES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -494,7 +499,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_VALIDATORS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -540,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_NOTIFICATION_HANDLERS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -566,7 +577,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_ALLOW_USER_PW_CHANGES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -592,7 +606,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_REQUIRE_CURRENT_PW;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -618,7 +635,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_FORCE_CHANGE_ON_ADD;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -644,7 +664,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_FORCE_CHANGE_ON_RESET;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -671,7 +694,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_SKIP_ADMIN_VALIDATION;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -711,7 +737,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PASSWORD_GENERATOR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -737,7 +766,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_REQUIRE_SECURE_AUTH;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -764,7 +796,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_REQUIRE_SECURE_CHANGES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -790,7 +825,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_ALLOW_MULTIPLE_PW_VALUES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -816,7 +854,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_ALLOW_PREENCODED;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -843,7 +884,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_MIN_AGE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -870,7 +914,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_MAX_AGE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -898,7 +945,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_MAX_RESET_AGE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -925,7 +975,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_WARNING_INTERVAL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -952,7 +1005,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_EXPIRE_WITHOUT_WARNING;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -990,7 +1046,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_ALLOW_EXPIRED_CHANGES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1016,7 +1075,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_GRACE_LOGIN_COUNT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1043,7 +1105,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LOCKOUT_FAILURE_COUNT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1071,7 +1136,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LOCKOUT_DURATION;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1100,7 +1168,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_FAILURE_EXPIRATION;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1145,7 +1216,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_REQUIRE_CHANGE_BY_TIME;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1189,7 +1263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LAST_LOGIN_TIME_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1197,7 +1274,6 @@
throw new InitializationException(msgID, message, e);
}
-
// Get the last login time format. If specified, it must be a valid format
// string.
msgID = MSGID_PWPOLICY_DESCRIPTION_LAST_LOGIN_TIME_FORMAT;
@@ -1219,8 +1295,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_INVALID_LAST_LOGIN_TIME_FORMAT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1237,7 +1315,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_LAST_LOGIN_TIME_FORMAT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1269,7 +1350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_INVALID_PREVIOUS_LAST_LOGIN_TIME_FORMAT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1288,7 +1372,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_PREVIOUS_LAST_LOGIN_TIME_FORMAT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1316,7 +1403,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "PasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWPOLICY_CANNOT_DETERMINE_IDLE_LOCKOUT_INTERVAL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1370,7 +1460,6 @@
*/
public AttributeType getPasswordAttribute()
{
- assert debugEnter(CLASS_NAME, "getPasswordAttribute");
return passwordAttribute;
}
@@ -1386,7 +1475,6 @@
*/
public boolean usesAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "usesAuthPasswordSyntax");
return authPasswordSyntax;
}
@@ -1403,7 +1491,6 @@
*/
public CopyOnWriteArrayList<PasswordStorageScheme> getDefaultStorageSchemes()
{
- assert debugEnter(CLASS_NAME, "getDefaultStorageSchemes");
return defaultStorageSchemes;
}
@@ -1422,8 +1509,6 @@
*/
public boolean isDefaultStorageScheme(String name)
{
- assert debugEnter(CLASS_NAME, "isDefaultStorageScheme",
- String.valueOf(name));
CopyOnWriteArrayList<PasswordStorageScheme> defaultSchemes =
getDefaultStorageSchemes();
@@ -1468,7 +1553,6 @@
*/
public CopyOnWriteArraySet<String> getDeprecatedStorageSchemes()
{
- assert debugEnter(CLASS_NAME, "getDeprecatedStorageSchemes");
return deprecatedStorageSchemes;
}
@@ -1486,8 +1570,6 @@
*/
public boolean isDeprecatedStorageScheme(String name)
{
- assert debugEnter(CLASS_NAME, "isDeprecatedStorageScheme",
- String.valueOf(name));
CopyOnWriteArraySet<String> deprecatedSchemes =
getDeprecatedStorageSchemes();
@@ -1517,7 +1599,6 @@
*/
public ConcurrentHashMap<DN,PasswordValidator> getPasswordValidators()
{
- assert debugEnter(CLASS_NAME, "getPasswordValidators");
return passwordValidators;
}
@@ -1535,7 +1616,6 @@
public ConcurrentHashMap<DN,AccountStatusNotificationHandler>
getAccountStatusNotificationHandlers()
{
- assert debugEnter(CLASS_NAME, "getAccountStatusNotificationHandlers");
return notificationHandlers;
}
@@ -1551,7 +1631,6 @@
*/
public boolean allowUserPasswordChanges()
{
- assert debugEnter(CLASS_NAME, "allowUserPasswordChanges");
return allowUserPasswordChanges;
}
@@ -1568,7 +1647,6 @@
*/
public boolean requireCurrentPassword()
{
- assert debugEnter(CLASS_NAME, "requireCurrentPassword");
return requireCurrentPassword;
}
@@ -1585,7 +1663,6 @@
*/
public boolean forceChangeOnAdd()
{
- assert debugEnter(CLASS_NAME, "forceChangeOnAdd");
return forceChangeOnAdd;
}
@@ -1602,7 +1679,6 @@
*/
public boolean forceChangeOnReset()
{
- assert debugEnter(CLASS_NAME, "forceChangeOnReset");
return forceChangeOnReset;
}
@@ -1620,7 +1696,6 @@
*/
public boolean skipValidationForAdministrators()
{
- assert debugEnter(CLASS_NAME, "skipValidationForAdministrators");
return skipValidationForAdministrators;
}
@@ -1634,7 +1709,6 @@
*/
public DN getPasswordGeneratorDN()
{
- assert debugEnter(CLASS_NAME, "getPasswordGeneratorDN");
return passwordGeneratorDN;
}
@@ -1650,7 +1724,6 @@
*/
public PasswordGenerator getPasswordGenerator()
{
- assert debugEnter(CLASS_NAME, "getPasswordGenerator");
return passwordGenerator;
}
@@ -1668,7 +1741,6 @@
*/
public boolean requireSecureAuthentication()
{
- assert debugEnter(CLASS_NAME, "requireSecureAuthentication");
return requireSecureAuthentication;
}
@@ -1687,7 +1759,6 @@
*/
public boolean requireSecurePasswordChanges()
{
- assert debugEnter(CLASS_NAME, "requireSecurePasswordChanges");
return requireSecurePasswordChanges;
}
@@ -1703,7 +1774,6 @@
*/
public boolean allowMultiplePasswordValues()
{
- assert debugEnter(CLASS_NAME, "allowMultiplePasswordValues");
return allowMultiplePasswordValues;
}
@@ -1719,7 +1789,6 @@
*/
public boolean allowPreEncodedPasswords()
{
- assert debugEnter(CLASS_NAME, "allowPreEncodedPasswords");
return allowPreEncodedPasswords;
}
@@ -1736,7 +1805,6 @@
*/
public int getMinimumPasswordAge()
{
- assert debugEnter(CLASS_NAME, "getMinimumPasswordAge");
if (minimumPasswordAge <= 0)
{
@@ -1758,7 +1826,6 @@
*/
public int getMaximumPasswordAge()
{
- assert debugEnter(CLASS_NAME, "getMaximumPasswordAge");
if (maximumPasswordAge < 0)
{
@@ -1781,7 +1848,6 @@
*/
public int getMaximumPasswordResetAge()
{
- assert debugEnter(CLASS_NAME, "getMaximumPasswordResetAge");
if (maximumPasswordResetAge < 0)
{
@@ -1803,7 +1869,6 @@
*/
public int getWarningInterval()
{
- assert debugEnter(CLASS_NAME, "getWarningInterval");
if (warningInterval < 0)
{
@@ -1826,7 +1891,6 @@
*/
public boolean expirePasswordsWithoutWarning()
{
- assert debugEnter(CLASS_NAME, "expirePasswordsWithoutWarning");
return expirePasswordsWithoutWarning;
}
@@ -1845,7 +1909,6 @@
*/
public boolean allowExpiredPasswordChanges()
{
- assert debugEnter(CLASS_NAME, "allowExpiredPasswordChanges");
return allowExpiredPasswordChanges;
}
@@ -1864,7 +1927,6 @@
*/
public int getGraceLoginCount()
{
- assert debugEnter(CLASS_NAME, "getGraceLoginCount");
if (graceLoginCount < 0)
{
@@ -1886,7 +1948,6 @@
*/
public int getLockoutFailureCount()
{
- assert debugEnter(CLASS_NAME, "getLockoutFailureCount");
if (lockoutFailureCount < 0)
{
@@ -1909,7 +1970,6 @@
*/
public int getLockoutDuration()
{
- assert debugEnter(CLASS_NAME, "getLockoutDuration");
if (lockoutDuration < 0)
{
@@ -1933,7 +1993,6 @@
*/
public int getLockoutFailureExpirationInterval()
{
- assert debugEnter(CLASS_NAME, "getLockoutFailureExpirationInterval");
if (lockoutFailureExpirationInterval < 0)
{
@@ -1958,7 +2017,6 @@
*/
public long getRequireChangeByTime()
{
- assert debugEnter(CLASS_NAME, "getRequireChangeTime");
if (requireChangeByTime < 0)
{
@@ -1978,7 +2036,6 @@
*/
public AttributeType getLastLoginTimeAttribute()
{
- assert debugEnter(CLASS_NAME, "getLastLoginTimeAttribute");
return lastLoginTimeAttribute;
}
@@ -1994,7 +2051,6 @@
*/
public String getLastLoginTimeFormat()
{
- assert debugEnter(CLASS_NAME, "getLastLoginTimeFormat");
return lastLoginTimeFormat;
}
@@ -2010,7 +2066,6 @@
*/
public CopyOnWriteArrayList<String> getPreviousLastLoginTimeFormats()
{
- assert debugEnter(CLASS_NAME, "getPreviousLastLoginTimeFormats");
return previousLastLoginTimeFormats;
}
@@ -2027,7 +2082,6 @@
*/
public int getIdleLockoutInterval()
{
- assert debugEnter(CLASS_NAME, "getIdleLockoutInterval");
if (idleLockoutInterval < 0)
{
@@ -2046,7 +2100,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -2063,7 +2116,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("Password Attribute: ");
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
index e079456..3651309 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyConfig.java
@@ -48,7 +48,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.util.ServerConstants.*;
@@ -63,11 +65,6 @@
public class PasswordPolicyConfig
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordPolicyConfig";
/**
* The password policy object corresponding to the configuration entry. The
@@ -87,7 +84,6 @@
*/
public PasswordPolicyConfig(PasswordPolicy policy)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(policy));
this.currentPolicy = policy;
DirectoryServer.registerConfigurableComponent(this);
@@ -100,7 +96,6 @@
*/
public void finalizePasswordPolicyConfig()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordPolicyConfig");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -116,7 +111,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return currentPolicy.getConfigEntryDN();
}
@@ -132,7 +126,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
// Create a list of units and values that we can use to represent time
@@ -409,8 +402,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
assert configEntry.getDN().equals(this.currentPolicy.getConfigEntryDN() )
: "Internal Error: mismatch between DN of configuration entry and"
@@ -422,14 +413,20 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
unacceptableReasons.add(ce.getMessage());
return false;
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
unacceptableReasons.add(ie.getMessage());
return false;
@@ -460,9 +457,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
assert configEntry.getDN().equals(this.currentPolicy.getConfigEntryDN() )
: "Internal Error: mismatch between DN of configuration entry and"
@@ -476,7 +470,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
ArrayList<String> messages = new ArrayList<String>();
messages.add(ce.getMessage());
return new ConfigChangeResult(
@@ -485,7 +482,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
ArrayList<String> messages = new ArrayList<String>();
messages.add(ie.getMessage());
return new ConfigChangeResult(
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyConfigManager.java b/opends/src/server/org/opends/server/core/PasswordPolicyConfigManager.java
index c8fad01..40ee5c1 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyConfigManager.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyConfigManager.java
@@ -40,7 +40,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +58,6 @@
public class PasswordPolicyConfigManager
implements ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordPolicyConfigManager";
@@ -69,7 +66,6 @@
*/
public PasswordPolicyConfigManager()
{
- assert debugConstructor(CLASS_NAME);
}
@@ -89,7 +85,6 @@
public void initializePasswordPolicies()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordPolicies");
// First, get the configuration base entry.
@@ -101,8 +96,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordPolicies",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWPOLICY_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -206,8 +203,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// See if we can create a password policy from the provided configuration
@@ -259,8 +254,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -322,8 +315,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// We'll allow the policy to be removed as long as it isn't the default.
@@ -357,8 +348,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
// We'll allow the policy to be removed as long as it isn't the default.
diff --git a/opends/src/server/org/opends/server/core/PasswordPolicyState.java b/opends/src/server/org/opends/server/core/PasswordPolicyState.java
index 54dedae..26a6394 100644
--- a/opends/src/server/org/opends/server/core/PasswordPolicyState.java
+++ b/opends/src/server/org/opends/server/core/PasswordPolicyState.java
@@ -58,8 +58,6 @@
import org.opends.server.types.ConditionResult;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.Entry;
import org.opends.server.types.Modification;
import org.opends.server.types.ModificationType;
@@ -67,7 +65,12 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugWarning;
+import static org.opends.server.loggers.debug.DebugLogger.debugError;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -80,11 +83,6 @@
*/
public class PasswordPolicyState
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordPolicyState";
@@ -208,8 +206,6 @@
boolean debug)
throws DirectoryException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(userEntry),
- String.valueOf(passwordPolicy));
this.userEntry = userEntry;
@@ -273,10 +269,9 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME, "<init>",
- "Could not determine password changed time for user " +
- userDNString);
+ debugWarning(
+ "Could not determine password changed time " +
+ "for user %s", userDNString);
}
}
}
@@ -295,7 +290,6 @@
private PasswordPolicy getPasswordPolicyInternal()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPasswordPolicy");
// See if the user entry contains the ds-pwp-password-policy-dn attribute to
@@ -309,10 +303,11 @@
// There is no policy subentry defined, so we'll use the default.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getPasswordPolicy",
- "Using the default password policy for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Using the default password policy for user %s",
+ userDNString);
+ }
}
return DirectoryServer.getDefaultPasswordPolicy();
@@ -330,16 +325,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getPasswordPolicy", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "getPasswordPolicy",
- "Could not parse password policy subentry DN \"" +
- v.getStringValue() + "\" for user \"" + userDNString +
- "\": " + stackTraceToSingleLineString(e));
+ debugError(
+ "Could not parse password policy subentry " +
+ "DN %s for user %s: %s",
+ v.getStringValue(), userDNString,
+ stackTraceToSingleLineString(e));
}
int msgID = MSGID_PWPSTATE_CANNOT_DECODE_SUBENTRY_VALUE_AS_DN;
@@ -354,13 +351,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "getPasswordPolicy",
- "Password policy subentry \"" +
- String.valueOf(subentryDN) + "\" for user \"" +
- userDNString + "\" is not defined in the Directory " +
- "Server.");
+ debugError(
+ "Password policy subentry %s for user %s " +
+ "is not defined in the Directory Server.",
+ String.valueOf(subentryDN), userDNString);
}
int msgID = MSGID_PWPSTATE_NO_SUCH_POLICY;
@@ -374,11 +368,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "getPasswordPolicy",
- "Using password policy subentry \"" +
- String.valueOf(subentryDN) + "\" for user \"" +
- userDNString + "\".");
+ if (debugEnabled())
+ {
+ debugInfo("Using password policy subentry %s for user " +
+ "%s.", String.valueOf(subentryDN), userDNString);
+ }
}
return policy;
@@ -390,10 +384,11 @@
// This shouldn't happen, but if it does then use the default.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getPasswordPolicy",
- "Falling back to the default password policy for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Falling back to the default password policy for " +
+ "user %s", userDNString);
+ }
}
return DirectoryServer.getDefaultPasswordPolicy();
@@ -411,18 +406,18 @@
*/
private String getValue(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getValue", String.valueOf(attributeType));
List<Attribute> attrList = userEntry.getAttribute(attributeType);
if ((attrList == null) || attrList.isEmpty())
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getValue",
- "Returning null because attribute " +
- attributeType.getNameOrOID() + " does not exist in user " +
- "entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning null because attribute %s does not " +
+ "exist in user entry %s", attributeType.getNameOrOID(),
+ userDNString);
+ }
}
return null;
@@ -436,10 +431,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getValue",
- "Returning value \"" + stringValue + "\" for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning value %s for user %s", stringValue,
+ userDNString);
+ }
}
return stringValue;
@@ -466,19 +462,18 @@
private long getGeneralizedTime(AttributeType attributeType)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getGeneralizedTime",
- String.valueOf(attributeType));
List<Attribute> attrList = userEntry.getAttribute(attributeType);
if ((attrList == null) || attrList.isEmpty())
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getGeneralizedTime",
- "Returning -1 because attribute " +
- attributeType.getNameOrOID() + " does not exist in user " +
- "entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning -1 because attribute %s does not " +
+ "exist in user entry %s", attributeType.getNameOrOID(),
+ userDNString);
+ }
}
return -1;
@@ -496,16 +491,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getGeneralizedTime", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getGeneralizedTime",
- "Unable to decode value " + v.getStringValue() +
- " for attribute " + attributeType.getNameOrOID() +
- " in user entry " + userDNString + ": " + e);
+ debugWarning(
+ "Unable to decode value %s for attribute " +
+ "%s in user entry %s: %s",
+ v.getStringValue(),
+ attributeType.getNameOrOID(), userDNString);
}
int msgID = MSGID_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME;
@@ -521,11 +518,12 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getGeneralizedTime",
- "Returning -1 for attribute " +
- attributeType.getNameOrOID() + " in user entry " +
- userDNString + " because all options have been exhausted.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning -1 for attribute %s in user entry %s " +
+ "because all options have been exhausted.",
+ attributeType.getNameOrOID(), userDNString);
+ }
}
return -1;
@@ -549,8 +547,6 @@
private List<Long> getGeneralizedTimes(AttributeType attributeType)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getGeneralizedTimes",
- String.valueOf(attributeType));
ArrayList<Long> timeValues = new ArrayList<Long>();
@@ -560,11 +556,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getGeneralizedTimes",
- "Returning an empty list because attribute " +
- attributeType.getNameOrOID() + " does not exist in user " +
- "entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning an empty list because attribute %s " +
+ "does not exist in user entry %s",
+ attributeType.getNameOrOID(), userDNString);
+ }
}
return timeValues;
@@ -582,16 +579,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getGeneralizedTimes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getGeneralizedTimes",
- "Unable to decode value " + v.getStringValue() +
- " for attribute " + attributeType.getNameOrOID() +
- " in user entry " + userDNString + ": " + e);
+ debugWarning(
+ "Unable to decode value %s for attribute " +
+ "%s in user entry %s: %s",
+ v.getStringValue(),
+ attributeType.getNameOrOID(),
+ userDNString, e);
}
int msgID = MSGID_PWPSTATE_CANNOT_DECODE_GENERALIZED_TIME;
@@ -626,19 +626,19 @@
private boolean getBoolean(AttributeType attributeType, boolean defaultValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getBoolean", String.valueOf(attributeType),
- String.valueOf(defaultValue));
List<Attribute> attrList = userEntry.getAttribute(attributeType);
if ((attrList == null) || attrList.isEmpty())
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getBoolean",
- "Returning default of " + defaultValue +
- " because attribute " + attributeType.getNameOrOID() +
- " does not exist in user entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning default of %b because attribute " +
+ "%s does not exist in user entry %s",
+ defaultValue, attributeType.getNameOrOID(),
+ attributeType.getNameOrOID());
+ }
}
return defaultValue;
@@ -655,10 +655,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "getBoolean",
- "Attribute " + attributeType.getNameOrOID() +
- " resolves to true for user entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Attribute %s resolves to true for user " +
+ "entry %s", attributeType.getNameOrOID(), userDNString);
+ }
}
return true;
@@ -668,10 +669,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "getBoolean",
- "Attribute " + attributeType.getNameOrOID() +
- " resolves to false for user entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Attribute %s resolves to false for user " +
+ "entry %s", attributeType.getNameOrOID(), userDNString);
+ }
}
return false;
@@ -680,11 +682,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.ERROR, CLASS_NAME, "getBoolean",
- "Unable to resolve value \"" + valueString +
- "\" for attribute " + attributeType.getNameOrOID() +
- " in user entry " + userDNString + " as a Boolean.");
+ debugError(
+ "Unable to resolve value %s for attribute " +
+ "%s in user entry %us as a Boolean.",
+ valueString, attributeType.getNameOrOID(),
+ userDNString);
}
int msgID = MSGID_PWPSTATE_CANNOT_DECODE_BOOLEAN;
@@ -700,11 +702,13 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getBoolean",
- "Returning default of " + defaultValue +" for attribute " +
- attributeType.getNameOrOID() + " in user entry " +
- userDNString + " because all options have been exhausted.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning default of %b for attribute %s in " +
+ "user entry %s because all options have been " +
+ "exhausted.", defaultValue, attributeType.getNameOrOID(),
+ userDNString);
+ }
}
return defaultValue;
@@ -719,7 +723,6 @@
*/
public PasswordPolicy getPolicy()
{
- assert debugEnter(CLASS_NAME, "getPasswordPolicy");
return passwordPolicy;
}
@@ -736,7 +739,6 @@
*/
public LinkedList<Modification> getModifications()
{
- assert debugEnter(CLASS_NAME, "getModifications");
return modifications;
}
@@ -750,7 +752,6 @@
*/
public LinkedHashSet<AttributeValue> getPasswordValues()
{
- assert debugEnter(CLASS_NAME, "getPasswordValues");
List<Attribute> attrList =
userEntry.getAttribute(passwordPolicy.getPasswordAttribute());
@@ -774,7 +775,6 @@
*/
public boolean requireSecureAuthentication()
{
- assert debugEnter(CLASS_NAME, "requireSecureAuthentication");
return passwordPolicy.requireSecureAuthentication();
}
@@ -788,7 +788,6 @@
*/
public long getCurrentTime()
{
- assert debugEnter(CLASS_NAME, "getCurrentTime");
return currentTime;
}
@@ -804,7 +803,6 @@
*/
public String getCurrentGeneralizedTime()
{
- assert debugEnter(CLASS_NAME, "getCurrentGeneralizedTime");
return currentGeneralizedTime;
}
@@ -816,14 +814,14 @@
*/
public void setPasswordChangedTime()
{
- assert debugEnter(CLASS_NAME, "setPasswordChangedTime");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setPasswordChangedTime",
- "Setting password changed time for user " + userDNString +
- " to current time of " + currentTime);
+ if (debugEnabled())
+ {
+ debugInfo("Setting password changed time for user %s to current time " +
+ "of %d", userDNString, currentTime);
+ }
}
if (passwordChangedTime != currentTime)
@@ -868,7 +866,6 @@
*/
public boolean isDisabled()
{
- assert debugEnter(CLASS_NAME, "isDisabled");
if ((isDisabled == null) || (isDisabled == ConditionResult.UNDEFINED))
{
@@ -880,10 +877,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "isDisabled",
- "User " + userDNString +
- " is administratively disabled.");
+ if (debugEnabled())
+ {
+ debugInfo("User %s is administratively disabled.", userDNString);
+ }
}
isDisabled = ConditionResult.TRUE;
@@ -893,10 +890,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "isDisabled",
- "User " + userDNString +
- " is not administratively disabled.");
+ if (debugEnabled())
+ {
+ debugInfo("User %s is not administratively disabled.",
+ userDNString);
+ }
}
isDisabled = ConditionResult.FALSE;
@@ -905,16 +903,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "isDisabled", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME, "isDisabled",
- "User " + userDNString +" is considered " +
- "administratively disabled because an error occurred " +
- "while attempting to make the determination: " +
- stackTraceToSingleLineString(e) + ".");
+ debugWarning(
+ "User %s is considered administratively disabled " +
+ "because an error occurred while attempting to make " +
+ "the determination: %s.",
+ userDNString, stackTraceToSingleLineString(e));
}
isDisabled = ConditionResult.TRUE;
@@ -926,10 +926,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isDisabled",
- "Returning stored result of false for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of false for user %s",
+ userDNString);
+ }
}
return false;
@@ -938,10 +939,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isDisabled",
- "Returning stored result of true for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of true for user %s",
+ userDNString);
+ }
}
return true;
@@ -959,14 +961,14 @@
*/
public void setDisabled(boolean isDisabled)
{
- assert debugEnter(CLASS_NAME, "setDisabled", String.valueOf(isDisabled));
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setDisabled",
- "Updating user " + userDNString +
- " to set the disabled flag to " + isDisabled);
+ if (debugEnabled())
+ {
+ debugInfo("Updating user %s to set the disabled flag to %b",
+ userDNString, isDisabled);
+ }
}
@@ -1031,7 +1033,6 @@
*/
public boolean isAccountExpired()
{
- assert debugEnter(CLASS_NAME, "isAccountExpired");
if ((isAccountExpired == null) ||
(isAccountExpired == ConditionResult.UNDEFINED))
@@ -1048,11 +1049,12 @@
// can't be expired.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "isAccountExpired",
- "The account for user " + userDNString +
- " is not expired because there is no expiration " +
- "time in the user's entry.");
+ if (debugEnabled())
+ {
+ debugInfo("The account for user %s is not expired because " +
+ "there is no expiration time in the user's entry.",
+ userDNString);
+ }
}
isAccountExpired = ConditionResult.FALSE;
@@ -1063,11 +1065,11 @@
// The user does have an expiration time, but it hasn't arrived yet.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "isAccountExpired",
- "The account for user " + userDNString +
- " is not expired because the expiration time has " +
- "not yet arrived.");
+ if (debugEnabled())
+ {
+ debugInfo("The account for user %s is not expired because the " +
+ "expiration time has not yet arrived.", userDNString);
+ }
}
isAccountExpired = ConditionResult.FALSE;
@@ -1078,11 +1080,11 @@
// The user does have an expiration time, and it is in the past.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "isAccountExpired",
- "The account for user " + userDNString +
- " is expired because the expiration time in that " +
- "account has passed.");
+ if (debugEnabled())
+ {
+ debugInfo("The account for user %s is expired because the " +
+ "expiration time in that account has passed.", userDNString);
+ }
}
isAccountExpired = ConditionResult.TRUE;
@@ -1091,16 +1093,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "isAccountExpired", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME, "isAccountExpired",
- "User " + userDNString +" is considered to have an " +
- "expired account because an error occurred " +
- "while attempting to make the determination: " +
- stackTraceToSingleLineString(e) + ".");
+ debugWarning(
+ "User %s is considered to have an expired account " +
+ "because an error occurred while attempting to make " +
+ "the determination: %s.",
+ userDNString, stackTraceToSingleLineString(e));
}
isAccountExpired = ConditionResult.TRUE;
@@ -1113,10 +1117,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isAccountExpired",
- "Returning stored result of false for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of false for user %s",
+ userDNString);
+ }
}
return false;
@@ -1125,10 +1130,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isAccountExpired",
- "Returning stored result of true for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of true for user %s",
+ userDNString);
+ }
}
return true;
@@ -1144,7 +1150,6 @@
*/
public List<Long> getAuthFailureTimes()
{
- assert debugEnter(CLASS_NAME, "getAuthFailureTimes");
if (authFailureTimes == null)
{
@@ -1176,11 +1181,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "getAuthFailureTimes",
- "Removing expired auth failure time " + l +
- " for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Removing expired auth failure time %d for user " +
+ "%s", l, userDNString);
+ }
}
iterator.remove();
@@ -1241,15 +1246,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getAuthFailureTimes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getAuthFailureTimes",
- "Error while processing auth failure times for user " +
- userDNString + ": " + stackTraceToSingleLineString(e));
+ debugWarning(
+ "Error while processing auth failure times " +
+ "for user %s: %s",
+ userDNString,
+ stackTraceToSingleLineString(e));
}
authFailureTimes = new ArrayList<Long>();
@@ -1269,11 +1277,12 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getAuthFailureTimes",
- "Returning auth failure time list of " +
- authFailureTimes.size() + " elements for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning auth failure time list of %d " +
+ "elements for user %s" +
+ authFailureTimes.size(), userDNString);
+ }
}
return authFailureTimes;
@@ -1287,14 +1296,14 @@
*/
public void updateAuthFailureTimes()
{
- assert debugEnter(CLASS_NAME, "updateAuthFailureTimes");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "updateAuthFailureTimes",
- "Updating authentication failure times for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Updating authentication failure times for user %s",
+ userDNString);
+ }
}
@@ -1359,14 +1368,14 @@
*/
public void clearAuthFailureTimes()
{
- assert debugEnter(CLASS_NAME, "clearAuthFailureTimes");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "clearAuthFailureTimes",
- "Clearing authentication failure times for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Clearing authentication failure times for user %s",
+ userDNString);
+ }
}
List<Long> failureTimes = getAuthFailureTimes();
@@ -1406,7 +1415,6 @@
*/
public boolean lockedDueToFailures()
{
- assert debugEnter(CLASS_NAME, "lockedDueToFailures");
int maxFailures = passwordPolicy.getLockoutFailureCount();
@@ -1414,10 +1422,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToFailures",
- "Returning false for user " + userDNString +
- " because lockout due to failures is not enabled.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because lockout due to " +
+ "failures is not enabled.", userDNString);
+ }
}
return false;
@@ -1442,16 +1451,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockedDueToFailures", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "lockedDueToFailures",
- "Returning true for user " + userDNString +
- " because an error occurred: " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Returning true for user %s because an error occurred: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
return true;
@@ -1471,45 +1480,46 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToFailures",
- "Setting the lock for user " + userDNString +
- " because there were enough preexisting failures even " +
- "though there was no account locked time.");
+ if (debugEnabled())
+ {
+ debugInfo("Setting the lock for user " + userDNString +
+ " because there were enough preexisting failures even " +
+ "though there was no account locked time.");
+ }
}
return true;
}
-
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME, "lockedDueToFailures",
- "Returning false for user " + userDNString +
- " because there is no locked time.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user because there is no locked " +
+ "time.", userDNString);
+ }
}
return false;
}
-
// There is a failure locked time, but it may be expired. See if that's the
// case.
if (passwordPolicy.getLockoutDuration() > 0)
{
long unlockTime = failureLockedTime +
- (1000L*passwordPolicy.getLockoutDuration());
+ (1000L * passwordPolicy.getLockoutDuration());
if (unlockTime > currentTime)
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToFailures",
- "Returning true for user " + userDNString +
- " because there is a locked time and the lockout " +
- "duration has not been reached.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s because there is a locked " +
+ "time and the lockout duration has not been reached.",
+ userDNString);
+ }
secondsUntilUnlock = (int) (unlockTime - currentTime);
}
@@ -1530,10 +1540,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToFailures",
- "Returning false for user " + userDNString +
- " because the existing lockout has expired.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s " +
+ "because the existing lockout has expired.", userDNString);
+ }
}
return false;
@@ -1543,11 +1554,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToFailures",
- "Returning true for user " + userDNString +
- " because there is a locked time and no lockout " +
- "duration.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s " +
+ "because there is a locked time and no lockout duration.",
+ userDNString);
+ }
}
return true;
@@ -1567,7 +1579,6 @@
*/
public int getSecondsUntilUnlock()
{
- assert debugEnter(CLASS_NAME, "getSecondsBeforeUnlock");
if (secondsUntilUnlock < 0)
{
@@ -1587,14 +1598,14 @@
*/
public void lockDueToFailures()
{
- assert debugEnter(CLASS_NAME, "lockDueToFailures");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockDueToFailures",
- "Locking user account " + userDNString +
- " due to too many failures.");
+ if (debugEnabled())
+ {
+ debugInfo("Locking user account %s due to too many failures.",
+ userDNString);
+ }
}
failureLockedTime = currentTime;
@@ -1632,13 +1643,13 @@
*/
public void clearFailureLockout()
{
- assert debugEnter(CLASS_NAME, "clearFailureLock");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "clearFailureLockout",
- "Clearing lockout failures for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Clearing lockout failures for user %s", userDNString);
+ }
}
if (! lockedDueToFailures())
@@ -1676,7 +1687,6 @@
*/
public long getLastLoginTime()
{
- assert debugEnter(CLASS_NAME, "getLastLoginTime");
if (lastLoginTime == Long.MIN_VALUE)
{
@@ -1687,10 +1697,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getLastLoginTime",
- "Returning -1 for user " + userDNString +
- " because no last login time will be maintained.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning -1 for user %s because no last " +
+ "login time will be maintained.", userDNString);
+ }
}
lastLoginTime = -1;
@@ -1702,10 +1713,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getLastLoginTime",
- "Returning -1 for user " + userDNString +
- " because no last login time value exists.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning -1 for user %s because no last " +
+ "login time value exists.", userDNString);
+ }
}
lastLoginTime = -1;
@@ -1726,19 +1738,22 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO,
- CLASS_NAME, "getLastLoginTime",
- "Returning last login time of " + lastLoginTime +
- " for user " + userDNString + " decoded using " +
- "current last login time format.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning last login time of %s for user " +
+ "%s decoded using current last login " +
+ "time format.", lastLoginTime, userDNString);
+ }
}
return lastLoginTime;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getLastLoginTime", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This could mean that the last login time was encoded using a
// previous format.
@@ -1746,36 +1761,39 @@
{
try
{
- dateFormat = new SimpleDateFormat(f);
+ dateFormat = new SimpleDateFormat(f);
lastLoginTime = dateFormat.parse(valueString).getTime();
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO,
- CLASS_NAME, "getLastLoginTime",
- "Returning last login time of " + lastLoginTime +
- " for user " + userDNString + " decoded using " +
- "previous last login time format of " + f);
+ if (debugEnabled())
+ {
+ debugInfo("Returning last login time of %s for " +
+ "user %s decoded using previous " +
+ "last login time format of %s",
+ lastLoginTime, userDNString, f);
+ }
}
return lastLoginTime;
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getLastLoginTime", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING,
- CLASS_NAME, "getLastLoginTime",
- "Returning -1 for user " + userDNString +
- " because the last login time value " + valueString +
- "could not be parsed using any known format.");
+ debugWarning(
+ "Returning -1 for user %s because the " +
+ "last login time value %s could not " +
+ "be parsed using any known format.",
+ userDNString, valueString);
}
lastLoginTime = -1;
@@ -1788,21 +1806,22 @@
// We shouldn't get here.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.WARNING,
- CLASS_NAME, "getLastLoginTime",
- "Returning -1 for user " + userDNString +
- " because even though there appears to be a last " +
- "login time value we couldn't decipher it.");
+ debugWarning(
+ "Returning -1 for user %s because even though " +
+ "there appears to be a last login time " +
+ "value we couldn't decipher it.",
+ userDNString);
}
return -1;
}
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getLastLoginTime",
- "Returning previously calculated last login time of " +
- lastLoginTime + " for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning previously calculated last login time " +
+ "of %s for user %s", lastLoginTime, userDNString);
+ }
}
return lastLoginTime;
@@ -1815,10 +1834,9 @@
*/
public void setLastLoginTime()
{
- assert debugEnter(CLASS_NAME, "setLastLoginTime");
- AttributeType type = passwordPolicy.getLastLoginTimeAttribute();
- String format = passwordPolicy.getLastLoginTimeFormat();
+ AttributeType type = passwordPolicy.getLastLoginTimeAttribute();
+ String format = passwordPolicy.getLastLoginTimeFormat();
if ((type == null) || (format == null))
{
@@ -1833,15 +1851,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setLastLoginTime", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.WARNING,
- CLASS_NAME, "setLastLoginTime",
- "Unable to set last login time for user " + userDNString +
- " because an error occurred: " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Unable to set last login time for user %s because an " +
+ "error occurred: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
return;
@@ -1853,10 +1873,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setLastLoginTime",
- "Not updating last login time for user " + userDNString +
- " because the new value matches the existing value.");
+ if (debugEnabled())
+ {
+ debugInfo("Not updating last login time for user %s because the " +
+ "new value matches the existing value.", userDNString);
+ }
}
return;
@@ -1881,10 +1902,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setLastLoginTime",
- "Updated the last login time for user " + userDNString +
- " to " + timestamp);
+ if (debugEnabled())
+ {
+ debugInfo("Updated the last login time for user %s to %s",
+ userDNString, timestamp);
+ }
}
}
@@ -1899,7 +1921,6 @@
*/
public boolean lockedDueToIdleInterval()
{
- assert debugEnter(CLASS_NAME, "lockedDueToIdleInterval");
if ((isIdleLocked == null) || (isIdleLocked == ConditionResult.UNDEFINED))
{
@@ -1907,10 +1928,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToIdleInterval",
- "Returning false for user " + userDNString +
- " because no idle lockout interval is defined.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because no idle lockout " +
+ "interval is defined.", userDNString);
+ }
}
isIdleLocked = ConditionResult.FALSE;
@@ -1918,7 +1940,7 @@
}
long lockTime = currentTime -
- (passwordPolicy.getIdleLockoutInterval()*1000L);
+ (passwordPolicy.getIdleLockoutInterval() * 1000L);
long lastLoginTime = getLastLoginTime();
if (lastLoginTime > 0)
{
@@ -1926,12 +1948,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "lockedDueToIdleInterval",
- "Returning false for user " + userDNString +
- " because the last login time is in an acceptable " +
- "window.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because the last login " +
+ "time is in an acceptable window.", userDNString);
+ }
}
isIdleLocked = ConditionResult.FALSE;
@@ -1943,12 +1964,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "lockedDueToIdleInterval",
- "Returning false for user " + userDNString +
- " because the password changed time is in an " +
- "acceptable window.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user because the password " +
+ "changed time is in an acceptable window.", userDNString);
+ }
}
isIdleLocked = ConditionResult.FALSE;
@@ -1958,12 +1978,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "lockedDueToIdleInterval",
- "Returning true for user " + userDNString +
- " because neither last login time nor password " +
- "changed time are in an acceptable window.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user because neither last " +
+ "login time nor password changed time are in an " +
+ "acceptable window.", userDNString);
+ }
}
isIdleLocked = ConditionResult.TRUE;
@@ -1977,13 +1997,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "lockedDueToIdleInterval",
- "Returning true for user " + userDNString +
- " because there is no last login time and the " +
- "password changed time is not in an acceptable " +
- "window.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s because there is no last " +
+ "login time and the password changed time is not in " +
+ "an acceptable window.", userDNString);
+ }
}
isIdleLocked = ConditionResult.TRUE;
@@ -1993,12 +2012,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "lockedDueToIdleInterval",
- "Returning false for user " + userDNString +
- " because there is no last login time but the " +
- "password changed time is in an acceptable window.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because there is no " +
+ "last login time but the password changed time is in an " +
+ "acceptable window.", userDNString);
+ }
}
isIdleLocked = ConditionResult.FALSE;
@@ -2012,10 +2031,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToIdleInterval",
- "Returning stored result of true for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of true for user %s",
+ userDNString);
+ }
}
return true;
@@ -2024,10 +2044,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToIdleInterval",
- "Returning stored result of false for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of false for user %s",
+ userDNString);
+ }
}
return false;
@@ -2045,7 +2066,6 @@
*/
public boolean mustChangePassword()
{
- assert debugEnter(CLASS_NAME, "mustChangePassword");
// If the password policy doesn't use force change on add or force change on
// reset, or if it forbits the user from changing their password, then this
@@ -2078,10 +2098,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "mustChangePassword",
- "Returning true for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %", userDNString);
+ }
}
mustChangePassword = ConditionResult.TRUE;
@@ -2091,10 +2111,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "mustChangePassword",
- "Returning false for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s", userDNString);
+ }
}
mustChangePassword = ConditionResult.FALSE;
@@ -2103,16 +2123,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mustChangePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "mustChangePassword",
- "Returning true for user " + userDNString +
- " because an unexpected error occurred: " +
- stackTraceToSingleLineString(e));
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s because an unexpected " +
+ "error occurred: %s",
+ userDNString, stackTraceToSingleLineString(e));
+ }
}
mustChangePassword = ConditionResult.TRUE;
@@ -2125,10 +2148,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "mustChangePassword",
- "Returning stored result of true for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of true for user %s",
+ userDNString);
+ }
}
return true;
@@ -2137,10 +2161,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "mustChangePassword",
- "Returning stored result of false for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning stored result of false for user %s",
+ userDNString);
+ }
}
return false;
@@ -2158,15 +2183,14 @@
*/
public void setMustChangePassword(boolean mustChangePassword)
{
- assert debugEnter(CLASS_NAME, "setMustChangePassword",
- String.valueOf(mustChangePassword));
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setMustChangePassword",
- "Updating user " + userDNString +
- " to set the reset flag to " + mustChangePassword);
+ if (debugEnabled())
+ {
+ debugInfo("Updating user %s to set the reset flag to %b",
+ userDNString, mustChangePassword);
+ }
}
if (mustChangePassword ==
@@ -2230,44 +2254,46 @@
*/
public boolean lockedDueToMaximumResetAge()
{
- assert debugEnter(CLASS_NAME, "lockedDueToMaximumResetAge");
if (passwordPolicy.getMaximumPasswordResetAge() <= 0)
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToMaximumResetAge",
- "Returning false for user " + userDNString +
- " because there is no maximum reset age .");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because there is no maximum " +
+ "reset age .", userDNString);
+ }
}
return false;
}
- if (! mustChangePassword())
+ if (!mustChangePassword())
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToMaximumResetAge",
- "Returning false for user " + userDNString +
- " because the user's password has not been reset.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false for user %s because the user's password " +
+ "has not been reset.", userDNString);
+ }
}
return false;
}
long maxResetTime = passwordChangedTime +
- (1000L * passwordPolicy.getMaximumPasswordResetAge());
+ (1000L * passwordPolicy.getMaximumPasswordResetAge());
boolean locked = (maxResetTime < currentTime);
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "lockedDueToMaximumResetAge",
- "Returning " + locked + " for user " + userDNString +
- " after comparing the current and max reset times.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning %b for user %s after comparing the current and " +
+ "max reset times.", locked, userDNString);
+ }
}
return locked;
@@ -2289,7 +2315,6 @@
*/
public long getPasswordExpirationTime()
{
- assert debugEnter(CLASS_NAME, "getPasswordExpirationTime");
if (expirationTime == Long.MIN_VALUE)
{
@@ -2460,10 +2485,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getPasswordExpirationTime",
- "Returning password expiration time of " + expirationTime +
- " for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning password expiration time of %s for user " +
+ "%s", expirationTime, userDNString);
+ }
}
secondsUntilExpiration = (int) (expirationTime - currentTime);
@@ -2480,7 +2506,6 @@
*/
public boolean isPasswordExpired()
{
- assert debugEnter(CLASS_NAME, "isPasswordExpired");
if ((isPasswordExpired == null) ||
(isPasswordExpired == ConditionResult.UNDEFINED))
@@ -2510,7 +2535,6 @@
*/
public boolean isWithinMinimumAge()
{
- assert debugEnter(CLASS_NAME, "isWithinMinimumAge");
int minAge = passwordPolicy.getMinimumPasswordAge();
if (minAge <= 0)
@@ -2518,9 +2542,10 @@
// There is no minimum age, so the user isn't in it.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isWithinMinimumAge",
- "Returning false because there is no minimum age.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false because there is no minimum age.");
+ }
}
return false;
@@ -2530,9 +2555,10 @@
// It's been long enough since the user changed their password.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isWithinMinimumAge",
- "Returning false because the minimum age has expired.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false because the minimum age has expired.");
+ }
}
return false;
@@ -2542,10 +2568,11 @@
// The user is in a must-change mode, so the minimum age doesn't apply.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "isWithinMinimumAge",
- "Returning false because the account is in a " +
- "must-change state.");
+ if (debugEnabled())
+ {
+ debugInfo("Returning false because the account is in a must-change " +
+ "state.");
+ }
}
return false;
@@ -2555,8 +2582,7 @@
// The user is within the minimum age.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.WARNING,
- CLASS_NAME, "isWithinMinimumAge", "Returning true.");
+ debugWarning("Returning true.");
}
return true;
@@ -2579,7 +2605,6 @@
*/
public boolean mayUseGraceLogin()
{
- assert debugEnter(CLASS_NAME, "mayUseGraceLogin");
if ((mayUseGraceLogin == null) ||
(mayUseGraceLogin == ConditionResult.UNDEFINED))
@@ -2609,7 +2634,6 @@
*/
public boolean shouldWarn()
{
- assert debugEnter(CLASS_NAME, "shouldWarn");
if ((shouldWarn == null) || (shouldWarn == ConditionResult.UNDEFINED))
{
@@ -2637,7 +2661,6 @@
*/
public boolean isFirstWarning()
{
- assert debugEnter(CLASS_NAME, "isFirstWarning");
if ((isFirstWarning == null) ||
(isFirstWarning == ConditionResult.UNDEFINED))
@@ -2666,7 +2689,6 @@
*/
public int getSecondsUntilExpiration()
{
- assert debugEnter(CLASS_NAME, "getSecondsUntilExpiration");
long expirationTime = getPasswordExpirationTime();
if (expirationTime < 0)
@@ -2695,7 +2717,6 @@
*/
public long getRequiredChangeTime()
{
- assert debugEnter(CLASS_NAME, "getRequiredChangeTime");
if (requiredChangeTime == Long.MIN_VALUE)
{
@@ -2708,16 +2729,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getRequiredChangeTime", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getRequiredChangeTime",
- "An error occurred while attempting to determine the " +
- "required change time for user " + userDNString + ": " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "An error occurred while attempting to " +
+ "determine the required change time for " +
+ "user %s: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
requiredChangeTime = -1;
@@ -2727,10 +2750,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getRequiredChangeTime",
- "Returning required change time of " + requiredChangeTime +
- " for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning required change time of %s for user %s",
+ requiredChangeTime, userDNString);
+ }
}
return requiredChangeTime;
@@ -2744,13 +2768,13 @@
*/
public void setRequiredChangeTime()
{
- assert debugEnter(CLASS_NAME, "setRequiredChangeTime");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setRequiredChangeTime",
- "Updating required change time for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Updating required change time for user %s", userDNString);
+ }
}
@@ -2796,7 +2820,6 @@
*/
public long getWarnedTime()
{
- assert debugEnter(CLASS_NAME, "getWarnedTime");
if (warnedTime == Long.MIN_VALUE)
@@ -2809,14 +2832,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getWarnedTime", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME, "getWarnedTime",
- "Unable to decode the warned time for user " +
- userDNString + ": " + stackTraceToSingleLineString(e));
+ debugWarning(
+ "Unable to decode the warned time for user " +
+ "%s: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
warnedTime = -1;
@@ -2826,10 +2852,11 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getWarnedTime",
- "Returning a warned time of " + warnedTime + " for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning a warned time of %d for user %s",
+ warnedTime, userDNString);
+ }
}
return warnedTime;
@@ -2842,18 +2869,17 @@
*/
public void setWarnedTime()
{
- assert debugEnter(CLASS_NAME, "setWarnedTime");
long warnTime = getWarnedTime();
if (warnTime == currentTime)
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setWarnedTime",
- "Not updating warned time for user " + userDNString +
- " because the warned time is the same as the current " +
- "time.");
+ if (debugEnabled())
+ {
+ debugInfo("Not updating warned time for user %s because the warned " +
+ "time is the same as the current time.", userDNString);
+ }
}
return;
@@ -2881,9 +2907,10 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "setWarnedTime",
- "Updated the warned time for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Updated the warned time for user %s", userDNString);
+ }
}
}
@@ -2894,7 +2921,6 @@
*/
public void clearWarnedTime()
{
- assert debugEnter(CLASS_NAME, "clearWarnedTime");
AttributeType type =
DirectoryServer.getAttributeType(OP_ATTR_PWPOLICY_WARNED_TIME, true);
@@ -2910,9 +2936,10 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "clearWarnedTime",
- "Cleared the warned time for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Cleared the warned time for user %s", userDNString);
+ }
}
}
@@ -2927,7 +2954,6 @@
*/
public List<Long> getGraceLoginTimes()
{
- assert debugEnter(CLASS_NAME, "getGraceLoginTimes");
if (graceLoginTimes == null)
@@ -2946,15 +2972,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getGraceLoginTimes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getGraceLoginTimes",
- "Error while processing grace login times for user " +
- userDNString + ": " + stackTraceToSingleLineString(e));
+ debugWarning(
+ "Error while processing grace login times " +
+ "for user %s: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
graceLoginTimes = new ArrayList<Long>();
@@ -2974,9 +3002,10 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "getGraceLoginTimes",
- "Returning grace login times for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning grace login times for user %s", userDNString);
+ }
}
return graceLoginTimes;
@@ -2992,7 +3021,6 @@
*/
public int getGraceLoginsRemaining()
{
- assert debugEnter(CLASS_NAME, "getGraceLoginsRemaining");
int maxGraceLogins = passwordPolicy.getGraceLoginCount();
if (maxGraceLogins <= 0)
@@ -3012,13 +3040,13 @@
*/
public void updateGraceLoginTimes()
{
- assert debugEnter(CLASS_NAME, "updateGraceLoginTimes");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "updateGraceLoginTimes",
- "Updating grace login times for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Updating grace login times for user %s", userDNString);
+ }
}
@@ -3083,13 +3111,13 @@
*/
public void clearGraceLoginTimes()
{
- assert debugEnter(CLASS_NAME, "clearGraceLoginTimes");
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "clearGraceLoginTimes",
- "Clearing grace login times for user " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Clearing grace login times for user %s", userDNString);
+ }
}
List<Long> graceTimes = getGraceLoginTimes();
@@ -3151,12 +3179,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getClearPasswords",
- "User entry " + userDNString + " contains an " +
- "authPassword with scheme " + pwComponents[0] +
- " that is not defined in the server.");
+ debugWarning("User entry %s contains an " +
+ "authPassword with scheme %s " +
+ "that is not defined in the " +
+ "server.", userDNString, pwComponents[0]);
}
continue;
@@ -3172,15 +3198,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getClearPasswords", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getClearPasswords",
- "Cannot get clear authPassword value for user " +
- userDNString + ": " + e);
+ debugWarning(
+ "Cannot get clear authPassword " +
+ "value for user %s: %s",
+ userDNString, e);
}
}
}
@@ -3202,12 +3230,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getClearPasswords",
- "User entry " + userDNString + " contains a " +
- "password with scheme " + pwComponents[0] +
- " that is not defined in the server.");
+ debugWarning(
+ "User entry %s contains a password " +
+ "with scheme %s that is not " +
+ "defined in the server.",
+ userDNString, pwComponents[0]);
}
continue;
@@ -3222,15 +3249,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getClearPasswords", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getClearPasswords",
- "Cannot get clear password value for user " +
- userDNString + ": " + e);
+ debugWarning(
+ "Cannot get clear password value for " +
+ "user %s: %s", userDNString, e);
}
}
}
@@ -3254,7 +3282,6 @@
*/
public boolean passwordMatches(ByteString password)
{
- assert debugEnter(CLASS_NAME, "passwordMatches", "ByteString");
List<Attribute> attrList =
@@ -3263,11 +3290,13 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "passwordMatches",
- "Returning false because user " + userDNString +
- " does not have any values for password attribute " +
- passwordPolicy.getPasswordAttribute().getNameOrOID());
+ if (debugEnabled())
+ {
+ debugInfo("Returning false because user %s does not have any " +
+ "values for password attribute %s",
+ userDNString,
+ passwordPolicy.getPasswordAttribute().getNameOrOID());
+ }
}
return false;
@@ -3291,12 +3320,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "passwordMatches",
- "User entry " + userDNString + " contains a " +
- "password with scheme " + pwComponents[0] +
- " that is not defined in the server.");
+ debugWarning(
+ "User entry %s contains a password with scheme %s " +
+ "that is not defined in the server.",
+ userDNString, pwComponents[0]);
}
continue;
@@ -3307,12 +3334,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "passwordMatches",
- "Returning true for user " + userDNString +
- " because the provided password matches a " +
- "value encoded with scheme " + pwComponents[0]);
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s because the provided " +
+ "password matches a value encoded with scheme %s",
+ userDNString, pwComponents[0]);
+ }
}
return true;
@@ -3320,16 +3347,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "passwordMatches",
- "An error occurred while attempting to process a " +
- "password value for user " + userDNString + ": " +
- stackTraceToSingleLineString(e));
+ debugError(
+ "An error occurred while attempting to process a " +
+ "password value for user %s: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
}
}
@@ -3351,12 +3379,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "passwordMatches",
- "User entry " + userDNString + " contains a " +
- "password with scheme " + pwComponents[0] +
- " that is not defined in the server.");
+ debugWarning(
+ "User entry %s contains a password with scheme %s " +
+ "that is not defined in the server.",
+ userDNString, pwComponents[0]);
}
continue;
@@ -3367,12 +3393,12 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "passwordMatches",
- "Returning true for user " + userDNString +
- " because the provided password matches a " +
- "value encoded with scheme " + pwComponents[0]);
+ if (debugEnabled())
+ {
+ debugInfo("Returning true for user %s because the provided " +
+ "password matches a value encoded with scheme %s",
+ userDNString, pwComponents[0]);
+ }
}
return true;
@@ -3380,31 +3406,32 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "passwordMatches",
- "An error occurred while attempting to process a " +
- "password value for user " + userDNString + ": " +
- stackTraceToSingleLineString(e));
+ debugError(
+ "An error occurred while attempting to process a " +
+ "password value for user %s: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
}
}
}
}
-
// If we've gotten here, then we couldn't find a match.
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "passwordMatches",
- "Returning false because the provided password does not " +
- "match any of the stored password values for user " +
- userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Returning false because the provided password does not " +
+ "match any of the stored password values for user %s",
+ userDNString);
+ }
}
return false;
@@ -3422,7 +3449,6 @@
*/
public boolean passwordIsPreEncoded(ByteString passwordValue)
{
- assert debugEnter(CLASS_NAME, "isPreEncoded", "ByteString");
if (passwordPolicy.usesAuthPasswordSyntax())
{
@@ -3450,7 +3476,6 @@
public List<ByteString> encodePassword(ByteString password)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
List<PasswordStorageScheme> schemes =
passwordPolicy.getDefaultStorageSchemes();
@@ -3499,9 +3524,6 @@
Set<ByteString> currentPasswords,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "passwordIsAcceptable",
- String.valueOf(operation), String.valueOf(userEntry),
- "ByteString", "StringBuilder");
for (DN validatorDN : passwordPolicy.getPasswordValidators().keySet())
{
@@ -3513,11 +3535,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "passwordIsAcceptable",
- "The password provided for user " + userDNString +
- " failed the " + validatorDN.toString() +
- " password validator.");
+ if (debugEnabled())
+ {
+ debugInfo("The password provided for user %s failed the %s " +
+ "password validator.", userDNString, validatorDN.toString());
+ }
}
return false;
@@ -3526,11 +3548,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "passwordIsAcceptable",
- "The password provided for user " + userDNString +
- " passed the " + validatorDN.toString() +
- " password validator.");
+ if (debugEnabled())
+ {
+ debugInfo("The password provided for user %s passed the %s " +
+ "password validator.", userDNString, validatorDN.toString());
+ }
}
}
}
@@ -3549,18 +3571,16 @@
*/
public void handleDeprecatedStorageSchemes(ByteString password)
{
- assert debugEnter(CLASS_NAME, "handleDeprecatedStorageSchemes",
- "ByteString");
if (passwordPolicy.getDefaultStorageSchemes().isEmpty())
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "Doing nothing for user " + userDNString +
- " because no deprecated storage schemes have been " +
- "defined.");
+ if (debugEnabled())
+ {
+ debugInfo("Doing nothing for user %s because no " +
+ "deprecated storage schemes have been defined.", userDNString);
+ }
}
return;
@@ -3573,10 +3593,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "Doing nothing for entry " + userDNString +
- " because no password values were found.");
+ if (debugEnabled())
+ {
+ debugInfo("Doing nothing for entry %s because no password values " +
+ "were found.", userDNString);
+ }
}
return;
@@ -3609,13 +3630,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Skipping password value for user " +
- userDNString + " because the associated storage " +
- "scheme \"" + schemeName +
- "\" is not configured for use.");
+ debugWarning(
+ "Skipping password value for user %s because the " +
+ "associated storage scheme %s is not " +
+ "configured for use.",
+ userDNString, schemeName);
}
continue;
@@ -3633,12 +3652,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "Marking password with scheme " +
- pwComponents[0] + " for removal from user " +
- "entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Marking password with scheme %s for removal " +
+ "from user entry %s", pwComponents[0], userDNString);
+ }
}
iterator.remove();
@@ -3652,18 +3670,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "handleDeprecatedStorageSchemes",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Skipping password value for user " + userDNString +
- " because an error occurred while attempting " +
- "to decode it based on the user password syntax: " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Skipping password value for user %s because an " +
+ "error occurred while attempting to decode it " +
+ "based on the user password syntax: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
}
}
@@ -3673,10 +3691,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "User entry " + userDNString + " does not have any " +
- "password values encoded using deprecated schemes.");
+ if (debugEnabled())
+ {
+ debugInfo("User entry %s does not have any password values " +
+ "encoded using deprecated schemes.", userDNString);
+ }
}
}
else
@@ -3698,18 +3717,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "handleDeprecatedStorageSchemes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Unable to encode password for user " +
- userDNString + " using default scheme " +
- s.getStorageSchemeName() + ": " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Unable to encode password for user %s using " +
+ "default scheme %s: %s",
+ userDNString, s.getStorageSchemeName(),
+ stackTraceToSingleLineString(e));
}
}
}
@@ -3719,12 +3738,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Not updating user entry " + userDNString +
- " because removing deprecated schemes would leave " +
- "the user without a password.");
+ debugWarning(
+ "Not updating user entry %s because removing " +
+ "deprecated schemes would leave the user " +
+ "without a password.", userDNString);
}
return;
@@ -3758,13 +3775,12 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Updating user entry " + userDNString +
- "to replace password values encoded with deprecated " +
- "schemes with values encoded with the default " +
- "schemes.");
+ if (debugEnabled())
+ {
+ debugInfo("Updating user entry %s to replace password values " +
+ "encoded with deprecated schemes with values encoded " +
+ "with the default schemes.", userDNString);
+ }
}
}
}
@@ -3788,13 +3804,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Skipping password value for user " +
- userDNString + " because the associated storage " +
- "scheme \"" + pwComponents[0] +
- "\" is not configured for use.");
+ debugWarning(
+ "Skipping password value for user %s because the " +
+ "associated storage scheme %s is not " +
+ "configured for use.",
+ userDNString, pwComponents[0]);
}
continue;
@@ -3813,12 +3827,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "Marking password with scheme " +
- pwComponents[0] + " for removal from user " +
- "entry " + userDNString);
+ if (debugEnabled())
+ {
+ debugInfo("Marking password with scheme %s for removal " +
+ "from user entry %s", pwComponents[0], userDNString);
+ }
}
iterator.remove();
@@ -3832,18 +3845,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "handleDeprecatedStorageSchemes",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Skipping password value for user " + userDNString +
- " because an error occurred while attempting " +
- "to decode it based on the user password syntax: " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Skipping password value for user %s because an error " +
+ "occurred while attempting to decode it based on " +
+ "the user password syntax: %s",
+ userDNString, stackTraceToSingleLineString(e));
}
}
}
@@ -3853,10 +3866,11 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.INFO,
- CLASS_NAME, "handleDeprecatedStorageSchemes",
- "User entry " + userDNString + " does not have any " +
- "password values encoded using deprecated schemes.");
+ if (debugEnabled())
+ {
+ debugInfo("User entry %s does not have any password values " +
+ "encoded using deprecated schemes.", userDNString);
+ }
}
}
else
@@ -3878,18 +3892,18 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "handleDeprecatedStorageSchemes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Unable to encode password for user " +
- userDNString + " using default scheme " +
- s.getStorageSchemeName() + ": " +
- stackTraceToSingleLineString(e));
+ debugWarning(
+ "Unable to encode password for user %s using " +
+ "default scheme %s: %s",
+ userDNString, s.getStorageSchemeName(),
+ stackTraceToSingleLineString(e));
}
}
}
@@ -3899,12 +3913,10 @@
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Not updating user entry " + userDNString +
- " because removing deprecated schemes would leave " +
- "the user without a password.");
+ debugWarning(
+ "Not updating user entry %s because removing " +
+ "deprecated schemes would leave the user " +
+ "without a password.", userDNString);
}
return;
@@ -3938,13 +3950,12 @@
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY,
- DebugLogSeverity.INFO, CLASS_NAME,
- "handleDeprecatedStorageSchemes",
- "Updating user entry " + userDNString +
- "to replace password values encoded with deprecated " +
- "schemes with values encoded with the default " +
- "schemes.");
+ if (debugEnabled())
+ {
+ debugInfo("Updating user entry %sto replace password values " +
+ "encoded with deprecated schemes with values encoded " +
+ "with the default schemes.", userDNString);
+ }
}
}
}
@@ -3963,20 +3974,19 @@
* generate the new password.
*/
public ByteString generatePassword()
- throws DirectoryException
+ throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "generatePassword");
PasswordGenerator generator = passwordPolicy.getPasswordGenerator();
if (generator == null)
{
if (debug)
{
- debugMessage(DebugLogCategory.PASSWORD_POLICY, DebugLogSeverity.WARNING,
- CLASS_NAME, "generatePassword",
- "Unable to generate a new password for user " +
- userDNString + " because no password generator has been " +
- "defined in the associated password policy.");
+ debugWarning(
+ "Unable to generate a new password for user %s " +
+ "because no password generator has been " +
+ "defined in the associated password policy.",
+ userDNString);
}
return null;
@@ -4000,9 +4010,6 @@
AccountStatusNotificationType notificationType,
DN userDN, int messageID, String message)
{
- assert debugEnter(CLASS_NAME, "generateAccountStatusNotification",
- String.valueOf(notificationType), String.valueOf(userDN),
- String.valueOf(messageID), String.valueOf(message));
Collection<AccountStatusNotificationHandler> handlers =
@@ -4030,8 +4037,6 @@
public void generateAccountStatusNotification(
AccountStatusNotification notification)
{
- assert debugEnter(CLASS_NAME, "generateAccountStatusNotification",
- String.valueOf(notification));
Collection<AccountStatusNotificationHandler> handlers =
@@ -4059,7 +4064,6 @@
public void updateUserEntry()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "updateUserEntry");
// If there are no modifications, then there's nothing to do.
diff --git a/opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java b/opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java
index a067549..9953baf 100644
--- a/opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java
+++ b/opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,11 +72,6 @@
public class PasswordStorageSchemeConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordStorageSchemeConfigManager";
@@ -92,7 +89,6 @@
*/
public PasswordStorageSchemeConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
storageSchemes = new ConcurrentHashMap<DN,PasswordStorageScheme>();
@@ -115,7 +111,6 @@
public void initializePasswordStorageSchemes()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageSchemes");
// First, get the configuration base entry.
@@ -127,8 +122,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageSchemes",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -231,8 +228,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a password
@@ -267,7 +262,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -284,7 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -300,7 +301,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS;
String message = getMessage(msgID, schemeClass.getName(),
@@ -332,7 +336,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -361,8 +368,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -444,7 +449,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -479,7 +487,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -521,7 +532,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -538,7 +552,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -579,8 +596,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -626,7 +641,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -643,7 +661,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -659,7 +680,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS;
String message = getMessage(msgID, schemeClass.getName(),
@@ -721,7 +745,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -749,8 +776,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -800,7 +825,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -834,7 +862,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -855,7 +886,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -870,7 +904,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWSCHEME_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -903,8 +940,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -923,8 +958,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java b/opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java
index 16fcfe3..74a5736 100644
--- a/opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java
+++ b/opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,13 +52,13 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-
/**
@@ -71,11 +71,6 @@
public class PasswordValidatorConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PasswordValidatorConfigManager";
@@ -93,7 +88,6 @@
*/
public PasswordValidatorConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
passwordValidators = new ConcurrentHashMap<DN,PasswordValidator>();
@@ -116,7 +110,6 @@
public void initializePasswordValidators()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordValidators");
// First, get the configuration base entry.
@@ -128,8 +121,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordValidators",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +227,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a password
@@ -268,7 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +281,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -301,7 +300,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS;
String message = getMessage(msgID, validatorClass.getName(),
@@ -333,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -362,8 +367,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -444,7 +447,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -479,7 +485,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -521,7 +530,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -538,7 +550,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -579,8 +594,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -626,7 +639,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -643,7 +659,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -659,7 +678,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS;
String message = getMessage(msgID, validatorClass.getName(),
@@ -721,7 +743,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -748,8 +773,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -799,7 +822,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -833,7 +859,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -854,7 +883,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -869,7 +901,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PWVALIDATOR_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -902,8 +937,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -922,8 +955,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/PersistentSearch.java b/opends/src/server/org/opends/server/core/PersistentSearch.java
index 2ae86ec..e4f4a4b 100644
--- a/opends/src/server/org/opends/server/core/PersistentSearch.java
+++ b/opends/src/server/org/opends/server/core/PersistentSearch.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -40,7 +40,9 @@
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
@@ -50,11 +52,6 @@
*/
public class PersistentSearch
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PersistentSearch";
@@ -93,9 +90,6 @@
Set<PersistentSearchChangeType> changeTypes,
boolean returnECs)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(searchOperation),
- String.valueOf(changeTypes),
- String.valueOf(returnECs));
this.searchOperation = searchOperation;
this.changeTypes = changeTypes;
@@ -115,7 +109,6 @@
*/
public SearchOperation getSearchOperation()
{
- assert debugEnter(CLASS_NAME, "getSearchOperation");
return searchOperation;
}
@@ -129,7 +122,6 @@
*/
public Set<PersistentSearchChangeType> getChangeTypes()
{
- assert debugEnter(CLASS_NAME, "getChangeTypes");
return changeTypes;
}
@@ -143,7 +135,6 @@
*/
public boolean getReturnECs()
{
- assert debugEnter(CLASS_NAME, "getReturnECs");
return returnECs;
}
@@ -157,7 +148,6 @@
*/
public DN getBaseDN()
{
- assert debugEnter(CLASS_NAME, "getBaseDN");
return baseDN;
}
@@ -171,7 +161,6 @@
*/
public SearchScope getScope()
{
- assert debugEnter(CLASS_NAME, "getScope");
return scope;
}
@@ -185,7 +174,6 @@
*/
public SearchFilter getFilter()
{
- assert debugEnter(CLASS_NAME, "getFilter");
return filter;
}
@@ -200,8 +188,6 @@
*/
public void processAdd(AddOperation addOperation, Entry entry)
{
- assert debugEnter(CLASS_NAME, "processAdd", String.valueOf(addOperation),
- String.valueOf(entry));
// See if we care about add operations.
@@ -254,7 +240,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processAdd", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// FIXME -- Do we need to do anything here?
@@ -285,7 +274,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
DirectoryServer.deregisterPersistentSearch(this);
@@ -295,7 +287,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "processAdd", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
}
@@ -310,8 +305,6 @@
*/
public void processDelete(DeleteOperation deleteOperation, Entry entry)
{
- assert debugEnter(CLASS_NAME, "processDelete",
- String.valueOf(deleteOperation), String.valueOf(entry));
// See if we care about delete operations.
@@ -364,7 +357,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processDelete", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// FIXME -- Do we need to do anything here?
@@ -395,7 +391,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processDelete", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
DirectoryServer.deregisterPersistentSearch(this);
@@ -405,7 +404,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "processDelete", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
}
@@ -422,9 +424,6 @@
public void processModify(ModifyOperation modifyOperation, Entry oldEntry,
Entry newEntry)
{
- assert debugEnter(CLASS_NAME, "processModify",
- String.valueOf(modifyOperation), String.valueOf(oldEntry),
- String.valueOf(newEntry));
// See if we care about modify operations.
@@ -478,7 +477,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processModify", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// FIXME -- Do we need to do anything here?
@@ -509,7 +511,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processModify", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
DirectoryServer.deregisterPersistentSearch(this);
@@ -519,7 +524,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "processModify", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
}
@@ -536,9 +544,6 @@
public void processModifyDN(ModifyDNOperation modifyDNOperation,
Entry oldEntry, Entry newEntry)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(modifyDNOperation),
- String.valueOf(oldEntry), String.valueOf(newEntry));
// See if we care about modify DN operations.
@@ -614,7 +619,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processModifyDN", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// FIXME -- Do we need to do anything here?
@@ -646,7 +654,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processModifyDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
DirectoryServer.deregisterPersistentSearch(this);
@@ -656,7 +667,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "processModifyDN", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
}
@@ -670,7 +684,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -687,7 +700,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("PersistentSearch(connID=");
buffer.append(searchOperation.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/PluginConfigManager.java b/opends/src/server/org/opends/server/core/PluginConfigManager.java
index e6ee05a..791fd6a 100644
--- a/opends/src/server/org/opends/server/core/PluginConfigManager.java
+++ b/opends/src/server/org/opends/server/core/PluginConfigManager.java
@@ -73,7 +73,9 @@
import org.opends.server.types.SearchResultReference;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -92,11 +94,6 @@
public class PluginConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.PluginConfigManager";
@@ -163,7 +160,6 @@
*/
public PluginConfigManager()
{
- assert debugConstructor(CLASS_NAME);
pluginLock = new ReentrantLock();
@@ -240,7 +236,6 @@
public void initializePluginConfig(Set<PluginType> pluginTypes)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePluginConfig");
registeredPlugins.clear();
@@ -256,7 +251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_CONFIG_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -312,7 +310,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_ERROR_INTERACTING_WITH_PLUGIN_ENTRY;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -357,7 +358,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_PLUGIN_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -420,7 +424,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_PLUGIN_TYPES;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -464,7 +471,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_CLASS;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -483,7 +493,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_PLUGIN_CANNOT_INSTANTIATE;
String message = getMessage(msgID, String.valueOf(className),
@@ -503,7 +516,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePluginConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_PLUGIN_CANNOT_INITIALIZE;
String message = getMessage(msgID, String.valueOf(className),
@@ -541,7 +557,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizePlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -564,7 +583,6 @@
*/
public ConcurrentHashMap<DN,DirectoryServerPlugin> getRegisteredPlugins()
{
- assert debugEnter(CLASS_NAME, "getRegisteredPlugins");
return registeredPlugins;
}
@@ -582,8 +600,6 @@
*/
public DirectoryServerPlugin getRegisteredPlugin(DN pluginDN)
{
- assert debugEnter(CLASS_NAME, "getRegisteredPlugin",
- String.valueOf(pluginDN));
return registeredPlugins.get(pluginDN);
}
@@ -606,8 +622,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a plugin.
@@ -641,7 +655,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_CLASS;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -658,7 +675,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_CLASS;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -674,7 +694,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_INSTANTIATE;
String message = getMessage(msgID, pluginClass.getName(),
@@ -706,7 +729,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -738,7 +764,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_PLUGIN_TYPES;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -766,8 +795,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -844,7 +871,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -896,7 +926,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_PLUGIN_TYPES;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -931,7 +964,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_GET_CLASS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -973,7 +1009,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_INSTANTIATE;
messages.add(getMessage(msgID, className,
@@ -991,7 +1030,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_PLUGIN_CANNOT_INITIALIZE;
messages.add(getMessage(msgID, className,
@@ -1031,8 +1073,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -1052,8 +1092,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1083,8 +1121,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -1103,8 +1139,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1131,8 +1165,6 @@
private void registerPlugin(DirectoryServerPlugin plugin, DN pluginEntryDN,
HashSet<PluginType> pluginTypes)
{
- assert debugEnter(CLASS_NAME, "registerPlugin",
- String.valueOf(plugin), String.valueOf(pluginTypes));
pluginLock.lock();
@@ -1334,8 +1366,6 @@
private DirectoryServerPlugin[] addPlugin(DirectoryServerPlugin[] pluginArray,
DirectoryServerPlugin plugin)
{
- assert debugEnter(CLASS_NAME, "addPlugin", String.valueOf(pluginArray),
- String.valueOf(plugin));
DirectoryServerPlugin[] newPlugins =
new DirectoryServerPlugin[pluginArray.length+1];
@@ -1355,8 +1385,6 @@
*/
private void deregisterPlugin(DN configEntryDN)
{
- assert debugEnter(CLASS_NAME, "deregisterPlugin",
- String.valueOf(configEntryDN));
pluginLock.lock();
@@ -1566,8 +1594,6 @@
removePlugin(DirectoryServerPlugin[] pluginArray,
DirectoryServerPlugin plugin)
{
- assert debugEnter(CLASS_NAME, "addPlugin", String.valueOf(pluginArray),
- String.valueOf(plugin));
int slot = -1;
int length = pluginArray.length;
@@ -1620,7 +1646,6 @@
*/
public StartupPluginResult invokeStartupPlugins()
{
- assert debugEnter(CLASS_NAME, "invokeStartupPlugins");
StartupPluginResult result = null;
@@ -1633,7 +1658,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeStartupPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_STARTUP_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -1699,8 +1727,6 @@
*/
public void invokeShutdownPlugins(String reason)
{
- assert debugEnter(CLASS_NAME, "invokeShutdownPlugins",
- String.valueOf(reason));
for (DirectoryServerPlugin p : shutdownPlugins)
@@ -1711,7 +1737,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeShutdownPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_SHUTDOWN_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -1735,8 +1764,6 @@
public PostConnectPluginResult invokePostConnectPlugins(ClientConnection
clientConnection)
{
- assert debugEnter(CLASS_NAME, "invokePostConnectPlugins",
- String.valueOf(clientConnection));
PostConnectPluginResult result = null;
@@ -1749,7 +1776,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostConnectPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_CONNECT_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -1766,7 +1796,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "invokePostConnectPlugins", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return new PostConnectPluginResult(true, false);
@@ -1790,7 +1823,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostConnectPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return new PostConnectPluginResult(true, false);
@@ -1833,8 +1869,6 @@
DisconnectReason disconnectReason,
int messageID, String message)
{
- assert debugEnter(CLASS_NAME, "invokePostConnectPlugins",
- String.valueOf(clientConnection));
PostDisconnectPluginResult result = null;
@@ -1848,7 +1882,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostDisconnectPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_DISCONNECT_PLUGIN_EXCEPTION;
String msg = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -1904,8 +1941,6 @@
public LDIFPluginResult invokeLDIFImportPlugins(LDIFImportConfig importConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "invokeLDIFImportPlugins",
- String.valueOf(importConfig), String.valueOf(entry));
LDIFPluginResult result = null;
@@ -1917,7 +1952,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeLDIFImportPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_LDIF_IMPORT_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -1970,8 +2008,6 @@
public LDIFPluginResult invokeLDIFExportPlugins(LDIFExportConfig exportConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "invokeLDIFExportPlugins",
- String.valueOf(exportConfig), String.valueOf(entry));
LDIFPluginResult result = null;
@@ -1983,7 +2019,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeLDIFExportPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_LDIF_EXPORT_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -2035,8 +2074,6 @@
public PreParsePluginResult invokePreParseAbandonPlugins(
AbandonOperation abandonOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseAbandonPlugins",
- String.valueOf(abandonOperation));
PreParsePluginResult result = null;
@@ -2048,7 +2085,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseAbandonPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2117,8 +2157,6 @@
public PreParsePluginResult invokePreParseAddPlugins(AddOperation
addOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseAddPlugins",
- String.valueOf(addOperation));
PreParsePluginResult result = null;
@@ -2130,7 +2168,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseAddPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2197,8 +2238,6 @@
public PreParsePluginResult invokePreParseBindPlugins(
BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseBindPlugins",
- String.valueOf(bindOperation));
PreParsePluginResult result = null;
@@ -2210,7 +2249,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseBindPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2277,8 +2319,6 @@
public PreParsePluginResult invokePreParseComparePlugins(
CompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseComparePlugins",
- String.valueOf(compareOperation));
PreParsePluginResult result = null;
@@ -2290,7 +2330,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseComparePlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2359,8 +2402,6 @@
public PreParsePluginResult invokePreParseDeletePlugins(
DeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseDeletePlugins",
- String.valueOf(deleteOperation));
PreParsePluginResult result = null;
@@ -2372,7 +2413,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseDeletePlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2441,8 +2485,6 @@
public PreParsePluginResult invokePreParseExtendedPlugins(
ExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseExtendedPlugins",
- String.valueOf(extendedOperation));
PreParsePluginResult result = null;
@@ -2454,7 +2496,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseExtendedPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2523,8 +2568,6 @@
public PreParsePluginResult invokePreParseModifyPlugins(
ModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseModifyPlugins",
- String.valueOf(modifyOperation));
PreParsePluginResult result = null;
@@ -2536,7 +2579,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseModifyPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2605,8 +2651,6 @@
public PreParsePluginResult invokePreParseModifyDNPlugins(
ModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseModifyDNPlugins",
- String.valueOf(modifyDNOperation));
PreParsePluginResult result = null;
@@ -2618,7 +2662,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseModifyDNPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2687,8 +2734,6 @@
public PreParsePluginResult invokePreParseSearchPlugins(
SearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseSearchPlugins",
- String.valueOf(searchOperation));
PreParsePluginResult result = null;
@@ -2700,7 +2745,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseSearchPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2769,8 +2817,6 @@
public PreParsePluginResult invokePreParseUnbindPlugins(
UnbindOperation unbindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreParseUnbindPlugins",
- String.valueOf(unbindOperation));
PreParsePluginResult result = null;
@@ -2782,7 +2828,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreParseUnbindPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_PARSE_PLUGIN_EXCEPTION;
String message =
@@ -2851,8 +2900,6 @@
public PreOperationPluginResult invokePreOperationAddPlugins(
AddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationAddPlugins",
- String.valueOf(addOperation));
PreOperationPluginResult result = null;
@@ -2864,7 +2911,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationAddPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -2931,8 +2981,6 @@
public PreOperationPluginResult invokePreOperationBindPlugins(
BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationBindPlugins",
- String.valueOf(bindOperation));
PreOperationPluginResult result = null;
@@ -2944,7 +2992,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationBindPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3011,8 +3062,6 @@
public PreOperationPluginResult invokePreOperationComparePlugins(
CompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationComparePlugins",
- String.valueOf(compareOperation));
PreOperationPluginResult result = null;
@@ -3024,8 +3073,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationComparePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3094,8 +3145,6 @@
public PreOperationPluginResult invokePreOperationDeletePlugins(
DeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationDeletePlugins",
- String.valueOf(deleteOperation));
PreOperationPluginResult result = null;
@@ -3107,7 +3156,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationDeletePlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3176,8 +3228,6 @@
public PreOperationPluginResult invokePreOperationExtendedPlugins(
ExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationExtendedPlugins",
- String.valueOf(extendedOperation));
PreOperationPluginResult result = null;
@@ -3189,8 +3239,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationExtendedPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3259,8 +3311,6 @@
public PreOperationPluginResult invokePreOperationModifyPlugins(
ModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationModifyPlugins",
- String.valueOf(modifyOperation));
PreOperationPluginResult result = null;
@@ -3272,7 +3322,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationModifyPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3341,8 +3394,6 @@
public PreOperationPluginResult invokePreOperationModifyDNPlugins(
ModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationModifyDNPlugins",
- String.valueOf(modifyDNOperation));
PreOperationPluginResult result = null;
@@ -3354,8 +3405,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationModifyDNPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3424,8 +3477,6 @@
public PreOperationPluginResult invokePreOperationSearchPlugins(
SearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "invokePreOperationSearchPlugins",
- String.valueOf(searchOperation));
PreOperationPluginResult result = null;
@@ -3437,8 +3488,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePreOperationSearchPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PRE_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3507,8 +3560,6 @@
public PostOperationPluginResult invokePostOperationAbandonPlugins(
AbandonOperation abandonOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationAbandonPlugins",
- String.valueOf(abandonOperation));
PostOperationPluginResult result = null;
@@ -3520,8 +3571,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationAbandonPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3590,8 +3643,6 @@
public PostOperationPluginResult invokePostOperationAddPlugins(
AddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationAddPlugins",
- String.valueOf(addOperation));
PostOperationPluginResult result = null;
@@ -3603,7 +3654,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationAddPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3670,8 +3724,6 @@
public PostOperationPluginResult invokePostOperationBindPlugins(
BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationBindPlugins",
- String.valueOf(bindOperation));
PostOperationPluginResult result = null;
@@ -3683,7 +3735,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationBindPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3750,8 +3805,6 @@
public PostOperationPluginResult invokePostOperationComparePlugins(
CompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationComparePlugins",
- String.valueOf(compareOperation));
PostOperationPluginResult result = null;
@@ -3763,8 +3816,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationComparePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3833,8 +3888,6 @@
public PostOperationPluginResult invokePostOperationDeletePlugins(
DeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationDeletePlugins",
- String.valueOf(deleteOperation));
PostOperationPluginResult result = null;
@@ -3846,8 +3899,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationDeletePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3916,8 +3971,6 @@
public PostOperationPluginResult invokePostOperationExtendedPlugins(
ExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationExtendedPlugins",
- String.valueOf(extendedOperation));
PostOperationPluginResult result = null;
@@ -3929,8 +3982,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationExtendedPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -3999,8 +4054,6 @@
public PostOperationPluginResult invokePostOperationModifyPlugins(
ModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationModifyPlugins",
- String.valueOf(modifyOperation));
PostOperationPluginResult result = null;
@@ -4012,8 +4065,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationModifyPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -4082,8 +4137,6 @@
public PostOperationPluginResult invokePostOperationModifyDNPlugins(
ModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationModifyDNPlugins",
- String.valueOf(modifyDNOperation));
PostOperationPluginResult result = null;
@@ -4095,8 +4148,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationModifyDNPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -4165,8 +4220,6 @@
public PostOperationPluginResult invokePostOperationSearchPlugins(
SearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationSearchPlugins",
- String.valueOf(searchOperation));
PostOperationPluginResult result = null;
@@ -4178,8 +4231,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationSearchPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -4248,8 +4303,6 @@
public PostOperationPluginResult invokePostOperationUnbindPlugins(
UnbindOperation unbindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostOperationUnbindPlugins",
- String.valueOf(unbindOperation));
PostOperationPluginResult result = null;
@@ -4261,8 +4314,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostOperationUnbindPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_OPERATION_PLUGIN_EXCEPTION;
String message =
@@ -4331,8 +4386,6 @@
public PostResponsePluginResult invokePostResponseAddPlugins(
AddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseAddPlugins",
- String.valueOf(addOperation));
PostResponsePluginResult result = null;
@@ -4344,7 +4397,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseAddPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4405,8 +4461,6 @@
public PostResponsePluginResult invokePostResponseBindPlugins(
BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseBindPlugins",
- String.valueOf(bindOperation));
PostResponsePluginResult result = null;
@@ -4418,7 +4472,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseBindPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4479,8 +4536,6 @@
public PostResponsePluginResult invokePostResponseComparePlugins(
CompareOperation compareOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseComparePlugins",
- String.valueOf(compareOperation));
PostResponsePluginResult result = null;
@@ -4492,8 +4547,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseComparePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4554,8 +4611,6 @@
public PostResponsePluginResult invokePostResponseDeletePlugins(
DeleteOperation deleteOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseDeletePlugins",
- String.valueOf(deleteOperation));
PostResponsePluginResult result = null;
@@ -4567,7 +4622,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseDeletePlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4628,8 +4686,6 @@
public PostResponsePluginResult invokePostResponseExtendedPlugins(
ExtendedOperation extendedOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseExtendedPlugins",
- String.valueOf(extendedOperation));
PostResponsePluginResult result = null;
@@ -4641,8 +4697,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseExtendedPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4703,8 +4761,6 @@
public PostResponsePluginResult invokePostResponseModifyPlugins(
ModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseModifyPlugins",
- String.valueOf(modifyOperation));
PostResponsePluginResult result = null;
@@ -4716,7 +4772,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseModifyPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4777,8 +4836,6 @@
public PostResponsePluginResult invokePostResponseModifyDNPlugins(
ModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseModifyDNPlugins",
- String.valueOf(modifyDNOperation));
PostResponsePluginResult result = null;
@@ -4790,8 +4847,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseModifyDNPlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4852,8 +4911,6 @@
public PostResponsePluginResult invokePostResponseSearchPlugins(
SearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "invokePostResponseSearchPlugins",
- String.valueOf(searchOperation));
PostResponsePluginResult result = null;
@@ -4865,7 +4922,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokePostResponseSearchPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_POST_RESPONSE_PLUGIN_EXCEPTION;
String message =
@@ -4928,9 +4988,6 @@
SearchOperation searchOperation,
SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "invokeSearchResultEntryPlugins",
- String.valueOf(searchOperation),
- String.valueOf(searchEntry));
SearchEntryPluginResult result = null;
@@ -4942,7 +4999,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeSearchResultEntryPlugins", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_SEARCH_ENTRY_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -5001,9 +5061,6 @@
SearchOperation searchOperation,
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "invokeSearchResultReferencePlugins",
- String.valueOf(searchOperation),
- String.valueOf(searchReference));
SearchReferencePluginResult result = null;
@@ -5015,8 +5072,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeSearchResultReferencePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_SEARCH_REFERENCE_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
@@ -5074,8 +5133,6 @@
invokeIntermediateResponsePlugins(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "invokeIntermediateResponsePlugins",
- String.valueOf(intermediateResponse));
IntermediateResponsePluginResult result = null;
Operation operation = intermediateResponse.getOperation();
@@ -5088,8 +5145,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invokeIntermediateResponsePlugins",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_INTERMEDIATE_RESPONSE_PLUGIN_EXCEPTION;
String message = getMessage(msgID, String.valueOf(p.getPluginEntryDN()),
diff --git a/opends/src/server/org/opends/server/core/RFC3672SubtreeSpecification.java b/opends/src/server/org/opends/server/core/RFC3672SubtreeSpecification.java
index 011032e..61a89e1 100644
--- a/opends/src/server/org/opends/server/core/RFC3672SubtreeSpecification.java
+++ b/opends/src/server/org/opends/server/core/RFC3672SubtreeSpecification.java
@@ -22,12 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.SchemaMessages.*;
@@ -53,9 +51,6 @@
*/
public final class RFC3672SubtreeSpecification extends
SimpleSubtreeSpecification {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME = RFC3672SubtreeSpecification.class
- .getName();
// The root DN.
private DN rootDN;
@@ -139,7 +134,6 @@
* The item's object class.
*/
public ItemRefinement(String objectClass) {
- assert debugConstructor(CLASS_NAME);
this.objectClass = objectClass;
this.normalizedObjectClass = StaticUtils.toLowerCase(objectClass
@@ -176,7 +170,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -196,7 +189,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
return normalizedObjectClass.hashCode();
}
@@ -218,7 +210,6 @@
* The refinement which must be <code>false</code>.
*/
public NotRefinement(Refinement refinement) {
- assert debugConstructor(CLASS_NAME);
this.refinement = refinement;
}
@@ -245,7 +236,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -265,7 +255,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
return refinement.hashCode();
}
@@ -288,7 +277,6 @@
* <code>true</code>.
*/
public AndRefinement(Collection<Refinement> refinementSet) {
- assert debugConstructor(CLASS_NAME);
this.refinementSet = refinementSet;
}
@@ -340,7 +328,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -360,7 +347,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
return refinementSet.hashCode();
}
@@ -383,7 +369,6 @@
* <code>true</code>.
*/
public OrRefinement(Collection<Refinement> refinementSet) {
- assert debugConstructor(CLASS_NAME);
this.refinementSet = refinementSet;
}
@@ -435,7 +420,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -455,7 +439,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
return refinementSet.hashCode();
}
@@ -476,7 +459,6 @@
*/
public static RFC3672SubtreeSpecification valueOf(DN rootDN, String s)
throws DirectoryException {
- assert debugEnter(CLASS_NAME, "valueOf");
// Default values.
DN relativeBaseDN = null;
@@ -692,7 +674,6 @@
super(relativeBaseDN == null ? rootDN : rootDN.concat(relativeBaseDN),
minimumDepth, maximumDepth, chopBefore, chopAfter);
- assert debugConstructor(CLASS_NAME);
this.rootDN = rootDN;
this.relativeBaseDN = relativeBaseDN;
@@ -705,7 +686,6 @@
* @return Returns the root DN.
*/
public DN getRootDN() {
- assert debugEnter(CLASS_NAME, "getRootDN");
return rootDN;
}
@@ -716,7 +696,6 @@
* was specified.
*/
public DN getRelativeBaseDN() {
- assert debugEnter(CLASS_NAME, "getRelativeBaseDN");
return relativeBaseDN;
}
@@ -727,7 +706,6 @@
* <code>null</code> if none were specified.
*/
public Refinement getRefinements() {
- assert debugEnter(CLASS_NAME, "getRefinements");
return refinements;
}
@@ -736,7 +714,6 @@
*/
@Override
public boolean isWithinScope(Entry entry) {
- assert debugEnter(CLASS_NAME, "isWithinScope");
if (isDNWithinScope(entry.getDN())) {
if (refinements != null) {
@@ -754,7 +731,6 @@
*/
@Override
public StringBuilder toString(StringBuilder builder) {
- assert debugEnter(CLASS_NAME, "toString");
boolean isFirstElement = true;
@@ -852,7 +828,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -884,7 +859,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
int hash = commonComponentsHashCode();
diff --git a/opends/src/server/org/opends/server/core/RelativeSubtreeSpecification.java b/opends/src/server/org/opends/server/core/RelativeSubtreeSpecification.java
index f53de92..232b59d 100644
--- a/opends/src/server/org/opends/server/core/RelativeSubtreeSpecification.java
+++ b/opends/src/server/org/opends/server/core/RelativeSubtreeSpecification.java
@@ -22,12 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.SchemaMessages.*;
@@ -88,9 +86,6 @@
*/
public final class RelativeSubtreeSpecification extends
SimpleSubtreeSpecification {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME = RelativeSubtreeSpecification.class
- .getName();
// The root DN.
private DN rootDN;
@@ -116,7 +111,6 @@
*/
public static RelativeSubtreeSpecification valueOf(DN rootDN, String s)
throws DirectoryException {
- assert debugEnter(CLASS_NAME, "valueOf");
// Default values.
DN relativeBaseDN = null;
@@ -251,7 +245,6 @@
super(relativeBaseDN == null ? rootDN : rootDN.concat(relativeBaseDN),
minimumDepth, maximumDepth, chopBefore, chopAfter);
- assert debugConstructor(CLASS_NAME);
this.rootDN = rootDN;
this.relativeBaseDN = relativeBaseDN;
@@ -264,7 +257,6 @@
* @return Returns the root DN.
*/
public DN getRootDN() {
- assert debugEnter(CLASS_NAME, "getRootDN");
return rootDN;
}
@@ -275,7 +267,6 @@
* was specified.
*/
public DN getRelativeBaseDN() {
- assert debugEnter(CLASS_NAME, "getRelativeBaseDN");
return relativeBaseDN;
}
@@ -286,7 +277,6 @@
* is no filter.
*/
public SearchFilter getFilter() {
- assert debugEnter(CLASS_NAME, "getFilter");
return filter;
}
@@ -295,7 +285,6 @@
*/
@Override
public boolean isWithinScope(Entry entry) {
- assert debugEnter(CLASS_NAME, "isWithinScope");
if (isDNWithinScope(entry.getDN())) {
try {
@@ -315,7 +304,6 @@
*/
@Override
public StringBuilder toString(StringBuilder builder) {
- assert debugEnter(CLASS_NAME, "toString");
boolean isFirstElement = true;
@@ -413,7 +401,6 @@
*/
@Override
public boolean equals(Object obj) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == obj) {
return true;
@@ -445,7 +432,6 @@
*/
@Override
public int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
int hash = commonComponentsHashCode();
diff --git a/opends/src/server/org/opends/server/core/RootDNConfigManager.java b/opends/src/server/org/opends/server/core/RootDNConfigManager.java
index 0affa1e..e6c549e 100644
--- a/opends/src/server/org/opends/server/core/RootDNConfigManager.java
+++ b/opends/src/server/org/opends/server/core/RootDNConfigManager.java
@@ -56,7 +56,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -76,11 +78,6 @@
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener,
ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.RootDNConfigManager";
@@ -102,7 +99,6 @@
*/
public RootDNConfigManager()
{
- assert debugConstructor(CLASS_NAME);
bindMappings = new ConcurrentHashMap<DN,List<DN>>();
}
@@ -123,7 +119,6 @@
public void initializeRootDNs()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeRootDNs");
// First, get the base configuration entry for the root DNs.
@@ -136,7 +131,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeRootDNs", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_ROOTDN_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -192,7 +190,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeRootDNs", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_ERROR_DETERMINING_ROOT_PRIVILEGES;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -280,7 +281,6 @@
*/
public Set<Privilege> getRootPrivileges()
{
- assert debugEnter(CLASS_NAME, "getRootPrivileges");
return rootPrivileges;
}
@@ -303,8 +303,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a root DN.
@@ -349,7 +347,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS;
String message = getMessage(msgID, String.valueOf(configEntry.getDN()),
@@ -377,8 +378,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -404,7 +403,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS;
messages.add(getMessage(msgID, stackTraceToSingleLineString(e)));
@@ -443,7 +445,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_REGISTER_ALTERNATE_BIND_DN;
messages.add(getMessage(msgID, String.valueOf(alternateBindDN),
@@ -483,8 +488,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN, and that
@@ -544,7 +547,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -570,8 +576,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -597,7 +601,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_PARSE_ALTERNATE_BIND_DNS;
messages.add(getMessage(msgID, stackTraceToSingleLineString(e)));
@@ -636,7 +643,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
msgID = MSGID_CONFIG_ROOTDN_CANNOT_REGISTER_ALTERNATE_BIND_DN;
messages.add(getMessage(msgID, String.valueOf(alternateBindDN),
@@ -677,8 +687,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -697,8 +705,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -732,8 +738,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
-
return rootDNConfigBaseDN;
}
@@ -748,8 +752,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
-
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
LinkedList<String> currentValues = new LinkedList<String>();
@@ -789,8 +791,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "List<String>");
int msgID = MSGID_CONFIG_ROOTDN_DESCRIPTION_ROOT_PRIVILEGE;
@@ -823,7 +823,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeRootDNs", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_ROOTDN_ERROR_DETERMINING_ROOT_PRIVILEGES;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -861,9 +864,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -914,7 +914,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeRootDNs", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
diff --git a/opends/src/server/org/opends/server/core/SASLConfigManager.java b/opends/src/server/org/opends/server/core/SASLConfigManager.java
index ea63ada..811762b 100644
--- a/opends/src/server/org/opends/server/core/SASLConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SASLConfigManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -71,11 +73,6 @@
public class SASLConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.SASLConfigManager";
@@ -93,7 +90,6 @@
*/
public SASLConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
handlers = new ConcurrentHashMap<DN,SASLMechanismHandler>();
@@ -116,7 +112,6 @@
public void initializeSASLMechanismHandlers()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandlers");
// First, get the configuration base entry.
@@ -128,8 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandlers",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +229,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a SASL
@@ -268,7 +263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +283,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -301,7 +302,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -333,7 +337,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -362,8 +369,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -440,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -475,7 +483,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -517,7 +528,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -534,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -574,8 +591,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -621,7 +636,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -638,7 +656,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -654,7 +675,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS;
String message = getMessage(msgID, handlerClass.getName(),
@@ -716,7 +740,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -743,8 +770,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -794,7 +819,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -828,7 +856,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -849,7 +880,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -864,7 +898,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SASL_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -896,8 +933,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -916,8 +951,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/SchemaConfigManager.java b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
index 7dc5091..4bff723 100644
--- a/opends/src/server/org/opends/server/core/SchemaConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SchemaConfigManager.java
@@ -70,7 +70,9 @@
import org.opends.server.util.LDIFReader;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -92,11 +94,6 @@
public class SchemaConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.SchemaConfigManager";
// The schema that has been parsed from the server configuration.
@@ -112,7 +109,6 @@
*/
public SchemaConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
@@ -128,7 +124,6 @@
*/
public static String getSchemaDirectoryPath()
{
- assert debugEnter(CLASS_NAME, "getSchemaDirectoryPath");
String schemaDirPath = System.getProperty(PROPERTY_SCHEMA_DIRECTORY);
if ((schemaDirPath == null) || (schemaDirPath.length() == 0))
@@ -155,7 +150,6 @@
*/
public Schema getSchema()
{
- assert debugEnter(CLASS_NAME, "getSchema");
return schema;
}
@@ -176,7 +170,6 @@
public void initializeMatchingRules()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRules");
// First, get the matching rule configuration base entry.
@@ -188,7 +181,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_MR_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -280,7 +276,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_MR_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(mrEntryDN),
@@ -322,7 +321,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_GET_CLASS;
String message = getMessage(msgID, String.valueOf(mrEntryDN),
@@ -341,7 +343,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INSTANTIATE;
String message = getMessage(msgID, String.valueOf(className),
@@ -360,7 +365,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_MR_CANNOT_INITIALIZE;
String message = getMessage(msgID, String.valueOf(className),
@@ -379,7 +387,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeMatchingRules", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
msgID = MSGID_CONFIG_SCHEMA_MR_CONFLICTING_MR;
String message = getMessage(msgID, String.valueOf(mrEntryDN),
@@ -407,7 +418,6 @@
public void initializeAttributeSyntaxes()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeAttributeSyntaxes");
// First, get the attribute syntax configuration base entry.
@@ -419,7 +429,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_GET_SYNTAX_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -510,7 +523,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
@@ -551,7 +567,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_GET_CLASS;
String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
@@ -570,7 +589,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INSTANTIATE;
String message = getMessage(msgID, String.valueOf(className),
@@ -589,7 +611,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CANNOT_INITIALIZE;
String message = getMessage(msgID, String.valueOf(className),
@@ -608,7 +633,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeAttributeSyntaxes", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
msgID = MSGID_CONFIG_SCHEMA_SYNTAX_CONFLICTING_SYNTAX;
String message = getMessage(msgID, String.valueOf(syntaxEntryDN),
@@ -641,7 +669,6 @@
public void initializeSchemaFromFiles()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSchemaFromFiles");
// Construct the path to the directory that should contain the schema files
@@ -697,13 +724,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_LIST_FILES;
String message = getMessage(msgID, schemaDirPath,
@@ -757,8 +790,6 @@
public static void loadSchemaFile(Schema schema, String schemaFile)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "loadSchemaFile", String.valueOf(schema),
- String.valueOf(schemaFile));
loadSchemaFile(schema, schemaFile, true);
}
@@ -790,8 +821,6 @@
boolean failOnError)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "loadSchemaFile", String.valueOf(schema),
- String.valueOf(schemaFile), String.valueOf(failOnError));
// Create an LDIF reader to use when reading the files.
@@ -804,7 +833,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_OPEN_FILE;
String message = getMessage(msgID, schemaFile, schemaDirPath,
@@ -837,7 +869,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_READ_LDIF_ENTRY;
String message = getMessage(msgID, schemaFile, schemaDirPath,
@@ -861,7 +896,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -879,7 +917,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
attrTypeSyntax = new AttributeTypeSyntax();
attrTypeSyntax.initializeSyntax(null);
@@ -910,7 +951,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
ocSyntax = new ObjectClassSyntax();
ocSyntax.initializeSyntax(null);
@@ -941,7 +985,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
nfSyntax = new NameFormSyntax();
nfSyntax.initializeSyntax(null);
@@ -972,7 +1019,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
dcrSyntax = new DITContentRuleSyntax();
dcrSyntax.initializeSyntax(null);
@@ -1004,7 +1054,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
dsrSyntax = new DITStructureRuleSyntax();
dsrSyntax.initializeSyntax(null);
@@ -1036,7 +1089,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
mruSyntax = new MatchingRuleUseSyntax();
mruSyntax.initializeSyntax(null);
@@ -1083,8 +1139,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE;
String message = getMessage(msgID, schemaFile,
@@ -1103,7 +1161,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_ATTR_TYPE;
String message = getMessage(msgID, schemaFile,
@@ -1130,8 +1191,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_ATTR_TYPE;
String message = getMessage(msgID, schemaFile,
@@ -1147,7 +1210,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1170,8 +1236,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC;
String message = getMessage(msgID, schemaFile,
@@ -1190,7 +1258,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_OC;
String message = getMessage(msgID, schemaFile,
@@ -1218,8 +1289,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_OC;
String message = getMessage(msgID, schemaFile,
@@ -1234,8 +1307,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1260,8 +1335,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM;
String message = getMessage(msgID, schemaFile,
@@ -1280,7 +1357,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_NAME_FORM;
String message = getMessage(msgID, schemaFile,
@@ -1308,8 +1388,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_NAME_FORM;
String message = getMessage(msgID, schemaFile,
@@ -1324,8 +1406,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1350,8 +1434,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR;
String message = getMessage(msgID, schemaFile,
@@ -1370,7 +1456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DCR;
String message = getMessage(msgID, schemaFile,
@@ -1398,8 +1487,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DCR;
String message = getMessage(msgID, schemaFile,
@@ -1414,8 +1505,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1441,8 +1534,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR;
String message = getMessage(msgID, schemaFile,
@@ -1461,7 +1556,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_DSR;
String message = getMessage(msgID, schemaFile,
@@ -1489,8 +1587,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_DSR;
String message = getMessage(msgID, schemaFile,
@@ -1505,8 +1605,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1532,8 +1634,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU;
String message = getMessage(msgID, schemaFile,
@@ -1552,7 +1656,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CANNOT_PARSE_MRU;
String message = getMessage(msgID, schemaFile,
@@ -1580,8 +1687,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_CONFIG_SCHEMA_CONFLICTING_MRU;
String message = getMessage(msgID, schemaFile,
@@ -1596,8 +1705,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "initializeSchemaFromFiles",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1623,8 +1734,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -1647,8 +1756,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -1683,8 +1790,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -1706,8 +1811,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -1738,8 +1841,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI -- Should we allow deletes of elements with this as superior?
@@ -1759,8 +1860,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/SearchOperation.java b/opends/src/server/org/opends/server/core/SearchOperation.java
index b950974..dbe0239 100644
--- a/opends/src/server/org/opends/server/core/SearchOperation.java
+++ b/opends/src/server/org/opends/server/core/SearchOperation.java
@@ -82,7 +82,9 @@
import static org.opends.server.core.CoreConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -100,11 +102,6 @@
PostOperationSearchOperation, PostResponseSearchOperation,
SearchEntrySearchOperation, SearchReferenceSearchOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.SearchOperation";
@@ -212,22 +209,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(rawFilter),
- String.valueOf(attributes)
- });
this.rawBaseDN = rawBaseDN;
this.scope = scope;
@@ -325,22 +306,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(baseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes)
- });
this.baseDN = baseDN;
this.scope = scope;
@@ -421,7 +386,6 @@
*/
public final ByteString getRawBaseDN()
{
- assert debugEnter(CLASS_NAME, "getRawBaseDN");
return rawBaseDN;
}
@@ -437,7 +401,6 @@
*/
public final void setRawBaseDN(ByteString rawBaseDN)
{
- assert debugEnter(CLASS_NAME, "setRawBaseDN", String.valueOf(rawBaseDN));
this.rawBaseDN = rawBaseDN;
@@ -456,7 +419,6 @@
*/
public final DN getBaseDN()
{
- assert debugEnter(CLASS_NAME, "getBaseDN");
return baseDN;
}
@@ -471,7 +433,6 @@
*/
public final void setBaseDN(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "setBaseDN", String.valueOf(baseDN));
this.baseDN = baseDN;
}
@@ -485,7 +446,6 @@
*/
public final SearchScope getScope()
{
- assert debugEnter(CLASS_NAME, "getScope");
return scope;
}
@@ -500,7 +460,6 @@
*/
public final void setScope(SearchScope scope)
{
- assert debugEnter(CLASS_NAME, "setScope", String.valueOf(scope));
this.scope = scope;
}
@@ -514,7 +473,6 @@
*/
public final DereferencePolicy getDerefPolicy()
{
- assert debugEnter(CLASS_NAME, "getDerefPolicy");
return derefPolicy;
}
@@ -530,8 +488,6 @@
*/
public final void setDerefPolicy(DereferencePolicy derefPolicy)
{
- assert debugEnter(CLASS_NAME, "setDerefPolicy",
- String.valueOf(derefPolicy));
this.derefPolicy = derefPolicy;
}
@@ -545,7 +501,6 @@
*/
public final int getSizeLimit()
{
- assert debugEnter(CLASS_NAME, "getSizeLimit");
return sizeLimit;
}
@@ -560,7 +515,6 @@
*/
public final void setSizeLimit(int sizeLimit)
{
- assert debugEnter(CLASS_NAME, "setSizeLimit", String.valueOf(sizeLimit));
this.sizeLimit = sizeLimit;
}
@@ -574,7 +528,6 @@
*/
public final int getTimeLimit()
{
- assert debugEnter(CLASS_NAME, "getTimeLimit");
return timeLimit;
}
@@ -589,7 +542,6 @@
*/
public final void setTimeLimit(int timeLimit)
{
- assert debugEnter(CLASS_NAME, "setTimeLimit", String.valueOf(timeLimit));
this.timeLimit = timeLimit;
}
@@ -603,7 +555,6 @@
*/
public final boolean getTypesOnly()
{
- assert debugEnter(CLASS_NAME, "getTypesOnly");
return typesOnly;
}
@@ -618,7 +569,6 @@
*/
public final void setTypesOnly(boolean typesOnly)
{
- assert debugEnter(CLASS_NAME, "setTypesOnly", String.valueOf(typesOnly));
this.typesOnly = typesOnly;
}
@@ -636,7 +586,6 @@
*/
public final LDAPFilter getRawFilter()
{
- assert debugEnter(CLASS_NAME, "getRawFilter");
return rawFilter;
}
@@ -652,7 +601,6 @@
*/
public final void setRawFilter(LDAPFilter rawFilter)
{
- assert debugEnter(CLASS_NAME, "setRawFilter", String.valueOf(rawFilter));
this.rawFilter = rawFilter;
@@ -671,7 +619,6 @@
*/
public final SearchFilter getFilter()
{
- assert debugEnter(CLASS_NAME, "getFilter");
return filter;
}
@@ -686,7 +633,6 @@
*/
public final LinkedHashSet<String> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -702,8 +648,6 @@
*/
public final void setAttributes(LinkedHashSet<String> attributes)
{
- assert debugEnter(CLASS_NAME, "setAttributes",
- String.valueOf(attributes));
if (attributes == null)
{
@@ -726,7 +670,6 @@
*/
public final int getEntriesSent()
{
- assert debugEnter(CLASS_NAME, "getEntriesSent");
return entriesSent;
}
@@ -742,7 +685,6 @@
*/
public final int getReferencesSent()
{
- assert debugEnter(CLASS_NAME, "getReferencesSent");
return referencesSent;
}
@@ -755,7 +697,6 @@
@Override()
public final long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -768,7 +709,6 @@
@Override()
public final long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -781,7 +721,6 @@
@Override()
public final long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -805,7 +744,6 @@
*/
public final boolean returnEntry(Entry entry, List<Control> controls)
{
- assert debugEnter(CLASS_NAME, "returnEntry", String.valueOf(entry));
// See if the operation has been abandoned. If so, then don't send the
@@ -816,7 +754,6 @@
return false;
}
-
// See if the size limit has been exceeded. If so, then don't send the
// entry and indicate that the search should end.
if ((sizeLimit > 0) && (entriesSent >= sizeLimit))
@@ -827,7 +764,6 @@
return false;
}
-
// See if the time limit has expired. If so, then don't send the entry and
// indicate that the search should end.
if ((timeLimit > 0) && (TimeThread.getTime() >= timeLimitExpiration))
@@ -838,7 +774,6 @@
return false;
}
-
// Determine whether the provided entry is a subentry and if so whether it
// should be returned.
if ((scope != SearchScope.BASE_OBJECT) && (! returnLDAPSubentries) &&
@@ -935,7 +870,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "returnEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1231,7 +1169,6 @@
*/
public final boolean returnReference(SearchResultReference reference)
{
- assert debugEnter(CLASS_NAME, "returnReference", String.valueOf(reference));
// See if the operation has been abandoned. If so, then don't send the
// reference and indicate that the search should end.
@@ -1323,7 +1260,6 @@
*/
public final void sendSearchResultDone()
{
- assert debugEnter(CLASS_NAME, "sendSearchResultDone");
// Send the search result done message to the client. We want to make sure
@@ -1499,7 +1435,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
return responseControls;
}
@@ -1534,7 +1469,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
setResultCode(ResultCode.UNDEFINED);
boolean sendResponse = true;
@@ -1623,7 +1557,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1642,7 +1579,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1679,7 +1619,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1700,7 +1643,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
@@ -1732,7 +1678,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -1768,7 +1717,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1785,7 +1737,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1822,7 +1777,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1839,7 +1797,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -1865,7 +1826,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -1903,7 +1867,10 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "run", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
setResultCode(ResultCode.valueOf(le.getResultCode()));
appendErrorMessage(le.getMessage());
@@ -2030,7 +1997,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
setResultCode(de.getResultCode());
appendErrorMessage(de.getErrorMessage());
@@ -2047,7 +2017,10 @@
}
catch (CancelledOperationException coe)
{
- assert debugException(CLASS_NAME, "run", coe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, coe);
+ }
CancelResult cancelResult = coe.getCancelResult();
@@ -2071,7 +2044,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
setResultCode(DirectoryServer.getServerErrorResultCode());
@@ -2152,7 +2128,6 @@
private final void searchBackend(Backend backend)
throws DirectoryException, CancelledOperationException
{
- assert debugEnter(CLASS_NAME, "searchBackend", String.valueOf(backend));
// Check for and handle a request to cancel this operation.
@@ -2193,7 +2168,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
@@ -2214,7 +2188,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancel", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
cancelResult = getCancelResult();
@@ -2240,7 +2217,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return cancelRequest;
}
@@ -2253,8 +2229,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
this.cancelRequest = cancelRequest;
return true;
@@ -2268,7 +2242,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("SearchOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java b/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
index 4cb3ded..964c564 100644
--- a/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
+++ b/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
diff --git a/opends/src/server/org/opends/server/core/SimpleSubtreeSpecification.java b/opends/src/server/org/opends/server/core/SimpleSubtreeSpecification.java
index b548c3d..4cc88d8 100644
--- a/opends/src/server/org/opends/server/core/SimpleSubtreeSpecification.java
+++ b/opends/src/server/org/opends/server/core/SimpleSubtreeSpecification.java
@@ -22,13 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.util.Scanner;
@@ -49,9 +46,6 @@
public abstract class SimpleSubtreeSpecification extends
SubtreeSpecification {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME = SimpleSubtreeSpecification.class
- .getName();
// The absolute base of the subtree.
private DN baseDN;
@@ -379,7 +373,6 @@
*/
protected SimpleSubtreeSpecification(DN baseDN, int minimumDepth,
int maximumDepth, Iterable<DN> chopBefore, Iterable<DN> chopAfter) {
- assert debugConstructor(CLASS_NAME);
this.baseDN = baseDN;
this.minimumDepth = minimumDepth;
@@ -421,7 +414,6 @@
* otherwise.
*/
protected final boolean isDNWithinScope(DN dn) {
- assert debugEnter(CLASS_NAME, "isDNWithinScope");
if (!dn.isDescendantOf(baseDN)) {
return false;
@@ -473,7 +465,6 @@
* @return Returns the absolute base DN of the subtree specification.
*/
protected final DN getBaseDN() {
- assert debugEnter(CLASS_NAME, "getBaseDN");
return baseDN;
}
@@ -487,7 +478,6 @@
*/
protected final boolean commonComponentsEquals(
SimpleSubtreeSpecification other) {
- assert debugEnter(CLASS_NAME, "commonComponentsEquals");
if (this == other) {
return true;
@@ -526,7 +516,6 @@
* @return The computed hash code.
*/
protected final int commonComponentsHashCode() {
- assert debugEnter(CLASS_NAME, "commonComponentsHashCode");
int hash = minimumDepth * 31 + maximumDepth;
@@ -548,7 +537,6 @@
* <code>null</code> if there are not any.
*/
public final Iterable<DN> getChopAfter() {
- assert debugEnter(CLASS_NAME, "getChopAfter");
if (chopAfter != null) {
return chopAfter.values();
@@ -564,7 +552,6 @@
* <code>null</code> if there are not any.
*/
public final Iterable<DN> getChopBefore() {
- assert debugEnter(CLASS_NAME, "getChopBefore");
if (chopBefore != null) {
return chopBefore.values();
@@ -579,7 +566,6 @@
* @return Returns the maximum depth (<0 indicates unlimited depth).
*/
public final int getMaximumDepth() {
- assert debugEnter(CLASS_NAME, "getMaximumDepth");
return maximumDepth;
}
@@ -589,7 +575,6 @@
* @return Returns the minimum depth (<=0 indicates unlimited depth).
*/
public final int getMinimumDepth() {
- assert debugEnter(CLASS_NAME, "getMinimumDepth");
return minimumDepth;
}
}
diff --git a/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java b/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
index e5920a4..4474658 100644
--- a/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
+++ b/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
@@ -48,7 +48,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -66,11 +68,6 @@
public class SynchronizationProviderConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.SynchronizationProviderConfigManager";
@@ -88,7 +85,6 @@
*/
public SynchronizationProviderConfigManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -112,7 +108,6 @@
public void initializeSynchronizationProviders()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSynchronizationProviders");
registeredProviders = new ConcurrentHashMap<DN,SynchronizationProvider>();
@@ -128,8 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_GET_CONFIG_BASE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -185,8 +182,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -224,8 +223,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -260,8 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
String message = getMessage(msgID, String.valueOf(providerDN),
@@ -279,8 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -299,8 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSynchronizationProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
String message = getMessage(msgID, String.valueOf(providerClassName),
@@ -367,8 +374,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
DN providerDN = configEntry.getDN();
@@ -393,7 +398,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
unacceptableReason.append(getMessage(msgID, String.valueOf(providerDN),
@@ -422,7 +430,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
unacceptableReason.append(getMessage(msgID,
@@ -457,7 +468,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
unacceptableReason.append(getMessage(msgID,
@@ -481,7 +495,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -497,7 +514,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
unacceptableReason.append(getMessage(msgID, String.valueOf(className),
@@ -529,8 +549,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN providerDN = configEntry.getDN();
@@ -561,7 +579,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_SYNCH_CANNOT_CHECK_FOR_PROVIDER_CONFIG_OC;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -602,7 +623,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_ENABLED_STATE;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -643,7 +667,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_DETERMINE_CLASS;
messages.add(getMessage(msgID, String.valueOf(providerDN),
@@ -672,7 +699,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_LOAD_PROVIDER_CLASS;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -694,7 +724,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_UNABLE_TO_INSTANTIATE_PROVIDER;
messages.add(getMessage(msgID, String.valueOf(className),
@@ -725,7 +758,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_SYNCH_ERROR_INITIALIZING_PROVIDER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -783,8 +819,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -804,8 +838,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
// NYI
@@ -830,8 +862,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// NYI
@@ -850,8 +880,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
// NYI
diff --git a/opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java b/opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java
index ec0dcfc..e433490 100644
--- a/opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java
+++ b/opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -71,11 +73,6 @@
public class TrustManagerProviderConfigManager
implements ConfigChangeListener, ConfigAddListener, ConfigDeleteListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.TrustManagerProviderConfigManager";
@@ -93,7 +90,6 @@
*/
public TrustManagerProviderConfigManager()
{
- assert debugConstructor(CLASS_NAME);
configHandler = DirectoryServer.getConfigHandler();
providers = new ConcurrentHashMap<DN,TrustManagerProvider>();
@@ -116,7 +112,6 @@
public void initializeTrustManagerProviders()
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTrustManagerProviders");
// First, get the configuration base entry.
@@ -128,8 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProviders",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_CANNOT_GET_BASE;
String message = getMessage(msgID, String.valueOf(e));
@@ -232,8 +229,6 @@
public boolean configChangeIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configChangeIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that the entry has an appropriate objectclass for a trust
@@ -268,7 +263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -285,7 +283,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -301,7 +302,10 @@
}
catch(Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS;
String message = getMessage(msgID, providerClass.getName(),
@@ -333,7 +337,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configChangeIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -362,8 +369,6 @@
*/
public ConfigChangeResult applyConfigurationChange(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationChange",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -442,7 +447,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -477,7 +485,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -519,7 +530,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS;
messages.add(getMessage(msgID, className,
@@ -536,7 +550,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationChange", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className,
@@ -577,8 +594,6 @@
public boolean configAddIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configAddIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// Make sure that no entry already exists with the specified DN.
@@ -624,7 +639,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -641,7 +659,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -657,7 +678,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS;
String message = getMessage(msgID, providerClass.getName(),
@@ -695,7 +719,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "configAddIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -752,8 +779,6 @@
*/
public ConfigChangeResult applyConfigurationAdd(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationAdd",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
@@ -803,7 +828,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_ENABLED_VALUE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -837,7 +865,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS_NAME;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -858,7 +889,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INVALID_CLASS;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -873,7 +907,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyConfigurationAdd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_TRUSTMANAGER_INITIALIZATION_FAILED;
messages.add(getMessage(msgID, className, String.valueOf(configEntryDN),
@@ -906,8 +943,6 @@
public boolean configDeleteIsAcceptable(ConfigEntry configEntry,
StringBuilder unacceptableReason)
{
- assert debugEnter(CLASS_NAME, "configDeleteIsAcceptable",
- String.valueOf(configEntry), "java.lang.StringBuilder");
// A delete should always be acceptable, so just return true.
@@ -926,8 +961,6 @@
*/
public ConfigChangeResult applyConfigurationDelete(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "applyConfigurationDelete",
- String.valueOf(configEntry));
DN configEntryDN = configEntry.getDN();
diff --git a/opends/src/server/org/opends/server/core/UnbindOperation.java b/opends/src/server/org/opends/server/core/UnbindOperation.java
index 9a2f096..7dd1dd6 100644
--- a/opends/src/server/org/opends/server/core/UnbindOperation.java
+++ b/opends/src/server/org/opends/server/core/UnbindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.core;
@@ -41,7 +41,6 @@
import org.opends.server.types.operation.PreParseUnbindOperation;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -55,11 +54,6 @@
extends Operation
implements PreParseUnbindOperation, PostOperationUnbindOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.UnbindOperation";
@@ -86,10 +80,6 @@
{
super(clientConnection, operationID, messageID, requestControls);
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls));
}
@@ -162,7 +152,6 @@
@Override()
public final List<Control> getResponseControls()
{
- assert debugEnter(CLASS_NAME, "getResponseControls");
// An unbind operation can never have a response, so just return an empty
// list.
@@ -199,7 +188,6 @@
@Override()
public long getProcessingStartTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStartTime");
return processingStartTime;
}
@@ -212,7 +200,6 @@
@Override()
public long getProcessingStopTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingStopTime");
return processingStopTime;
}
@@ -225,7 +212,6 @@
@Override()
public long getProcessingTime()
{
- assert debugEnter(CLASS_NAME, "getProcessingTime");
return (processingStopTime - processingStartTime);
}
@@ -238,7 +224,6 @@
@Override()
public final void run()
{
- assert debugEnter(CLASS_NAME, "run");
// Get the plugin config manager that will be used for invoking plugins.
@@ -281,7 +266,6 @@
@Override()
public final CancelResult cancel(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancel", String.valueOf(cancelRequest));
cancelRequest.addResponseMessage(getMessage(MSGID_CANNOT_CANCEL_UNBIND));
return CancelResult.CANNOT_CANCEL;
@@ -295,7 +279,6 @@
@Override()
public final CancelRequest getCancelRequest()
{
- assert debugEnter(CLASS_NAME, "getCancelRequest");
return null;
}
@@ -308,8 +291,6 @@
@Override()
boolean setCancelRequest(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "setCancelRequest",
- String.valueOf(cancelRequest));
// Unbind operations cannot be canceled.
return false;
@@ -323,7 +304,6 @@
@Override()
public final void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("UnbindOperation(connID=");
buffer.append(clientConnection.getConnectionID());
diff --git a/opends/src/server/org/opends/server/core/package-info.java b/opends/src/server/org/opends/server/core/package-info.java
index 342af92..f83fabf 100644
--- a/opends/src/server/org/opends/server/core/package-info.java
+++ b/opends/src/server/org/opends/server/core/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/extensions/AnonymousSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/AnonymousSASLMechanismHandler.java
index 2f23864..465cc62 100644
--- a/opends/src/server/org/opends/server/extensions/AnonymousSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/AnonymousSASLMechanismHandler.java
@@ -40,7 +40,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -58,11 +57,6 @@
public class AnonymousSASLMechanismHandler
extends SASLMechanismHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.AnonymousSASLMechanismHandler";
@@ -75,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -87,8 +80,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
// No real implementation is required. Simply register with the Directory
@@ -105,7 +96,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_ANONYMOUS);
}
@@ -119,8 +109,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// See if the client provided SASL credentials including trace information.
@@ -155,7 +143,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is not a password-based mechanism.
return false;
@@ -169,7 +156,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This is not a secure mechanism.
return false;
diff --git a/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
index 47b7a40..2105a97 100644
--- a/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/Base64PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -39,11 +39,11 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.util.StaticUtils.*;
-
/**
@@ -55,11 +55,6 @@
public class Base64PasswordStorageScheme
extends PasswordStorageScheme
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.Base64PasswordStorageScheme";
@@ -72,7 +67,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -84,8 +78,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -98,7 +90,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_BASE64;
}
@@ -112,7 +103,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
return ByteStringFactory.create(Base64.encode(plaintext.value()));
}
@@ -126,8 +116,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -147,9 +135,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
String userString = Base64.encode(plaintextPassword.value());
@@ -165,7 +150,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return true;
}
@@ -179,8 +163,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
try
{
@@ -189,7 +171,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getPlaintextValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -207,7 +192,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does not support the authentication password syntax.
return false;
@@ -222,8 +206,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
@@ -241,9 +223,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
// This storage scheme does not support the authentication password syntax.
@@ -260,8 +239,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
String message = getMessage(msgID, getStorageSchemeName());
@@ -277,7 +254,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// Base64-encoded values may be easily decoded with no key or special
// knowledge.
diff --git a/opends/src/server/org/opends/server/extensions/BlindTrustManagerProvider.java b/opends/src/server/org/opends/server/extensions/BlindTrustManagerProvider.java
index 723517d..eed82fc 100644
--- a/opends/src/server/org/opends/server/extensions/BlindTrustManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/BlindTrustManagerProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -38,9 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.messages.ExtensionsMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
@@ -56,11 +53,6 @@
extends TrustManagerProvider
implements X509TrustManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.BlindTrustManagerProvider";
@@ -71,7 +63,6 @@
*/
public BlindTrustManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -96,8 +87,6 @@
public void initializeTrustManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTrustManagerProvider",
- String.valueOf(configEntry));
// No implementation is required.
}
@@ -110,7 +99,6 @@
*/
public void finalizeTrustManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeTrustManagerProvider");
// No implementation is required.
}
@@ -130,7 +118,6 @@
public TrustManager[] getTrustManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getTrustManagers");
return new TrustManager[] { this };
}
@@ -146,8 +133,6 @@
*/
public void checkClientTrusted(X509Certificate[] chain, String authType)
{
- assert debugEnter(CLASS_NAME, "checkClientTrusted",
- String.valueOf(chain), String.valueOf(authType));
// As long as we don't throw an exception, then the client certificate will
// be considered trusted.
@@ -164,8 +149,6 @@
*/
public void checkServerTrusted(X509Certificate[] chain, String authType)
{
- assert debugEnter(CLASS_NAME, "checkServerTrusted",
- String.valueOf(chain), String.valueOf(authType));
// As long as we don't throw an exception, then the server certificate will
// be considered trusted.
@@ -182,7 +165,6 @@
*/
public X509Certificate[] getAcceptedIssuers()
{
- assert debugEnter(CLASS_NAME, "getAcceptedIssuers");
return new X509Certificate[0];
}
diff --git a/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
index 1978be9..4326ee5 100644
--- a/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
@@ -61,9 +61,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -88,11 +88,6 @@
extends SASLMechanismHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.CRAMMD5SASLMechanismHandler";
@@ -133,7 +128,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -145,8 +139,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -162,9 +154,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_SASLCRAMMD5_CANNOT_GET_MESSAGE_DIGEST;
+ int msgID = MSGID_SASLCRAMMD5_CANNOT_GET_MESSAGE_DIGEST;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
throw new InitializationException(msgID, message, e);
}
@@ -211,7 +206,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLCRAMMD5_CANNOT_GET_IDENTITY_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -232,7 +230,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterConfigurableComponent(this);
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_CRAM_MD5);
@@ -247,8 +244,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// The CRAM-MD5 bind process uses two stages. See if the client provided
@@ -352,11 +347,14 @@
}
catch (ParseException pe)
{
- assert debugException(CLASS_NAME, "processSASLBind", pe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, pe);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
- int msgID = MSGID_SASLCRAMMD5_INVALID_DIGEST_CONTENT;
+ int msgID = MSGID_SASLCRAMMD5_INVALID_DIGEST_CONTENT;
String message = getMessage(msgID, pe.getMessage());
bindOperation.setAuthFailureReason(msgID, message);
return;
@@ -378,11 +376,14 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
- int msgID = MSGID_SASLCRAMMD5_CANNOT_DECODE_USERNAME_AS_DN;
+ int msgID = MSGID_SASLCRAMMD5_CANNOT_DECODE_USERNAME_AS_DN;
String message = getMessage(msgID, userName, de.getErrorMessage());
bindOperation.setAuthFailureReason(msgID, message);
return;
@@ -432,11 +433,14 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
- int msgID = MSGID_SASLCRAMMD5_CANNOT_GET_ENTRY_BY_DN;
+ int msgID = MSGID_SASLCRAMMD5_CANNOT_GET_ENTRY_BY_DN;
String message = getMessage(msgID, String.valueOf(userDN),
de.getErrorMessage());
bindOperation.setAuthFailureReason(msgID, message);
@@ -461,11 +465,14 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
- int msgID = MSGID_SASLCRAMMD5_CANNOT_MAP_USERNAME;
+ int msgID = MSGID_SASLCRAMMD5_CANNOT_MAP_USERNAME;
String message = getMessage(msgID, String.valueOf(userName),
de.getErrorMessage());
bindOperation.setAuthFailureReason(msgID, message);
@@ -568,8 +575,6 @@
*/
private byte[] generateDigest(ByteString password, ByteString challenge)
{
- assert debugEnter(CLASS_NAME, "generateDigest",
- String.valueOf(password), String.valueOf(challenge));
// Get the byte arrays backing the password and challenge.
@@ -634,7 +639,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -651,7 +655,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -682,8 +685,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Look at the identity mapper configuration.
@@ -718,7 +719,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLCRAMMD5_CANNOT_GET_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -752,9 +756,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -800,7 +801,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLCRAMMD5_CANNOT_GET_IDENTITY_MAPPER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -839,7 +843,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is a password-based mechanism.
return true;
@@ -853,7 +856,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This may be considered a secure mechanism.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/CancelExtendedOperation.java b/opends/src/server/org/opends/server/extensions/CancelExtendedOperation.java
index 7517a25..ba5bae4 100644
--- a/opends/src/server/org/opends/server/extensions/CancelExtendedOperation.java
+++ b/opends/src/server/org/opends/server/extensions/CancelExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -41,7 +41,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -59,11 +61,6 @@
public class CancelExtendedOperation
extends ExtendedOperationHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.CancelExtendedOperation";
@@ -76,7 +73,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -101,8 +97,6 @@
public void initializeExtendedOperationHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperationHandler",
- String.valueOf(configEntry));
// No special configuration is required.
@@ -117,7 +111,6 @@
*/
public void finalizeExtendedOperationHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeExtendedOperationHandler");
DirectoryServer.deregisterSupportedExtension(OID_CANCEL_REQUEST);
}
@@ -131,8 +124,6 @@
*/
public void processExtendedOperation(ExtendedOperation operation)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(operation));
// The value of the request must be a sequence containing an integer element
@@ -159,7 +150,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
operation.setResultCode(ResultCode.PROTOCOL_ERROR);
diff --git a/opends/src/server/org/opends/server/extensions/CertificateValidationPolicy.java b/opends/src/server/org/opends/server/extensions/CertificateValidationPolicy.java
index 9919ea9..ae7c859 100644
--- a/opends/src/server/org/opends/server/extensions/CertificateValidationPolicy.java
+++ b/opends/src/server/org/opends/server/extensions/CertificateValidationPolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
diff --git a/opends/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java
index 6a71496..fc834f8 100644
--- a/opends/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/ClearPasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -38,7 +38,6 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -55,11 +54,6 @@
public class ClearPasswordStorageScheme
extends PasswordStorageScheme
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.ClearPasswordStorageScheme";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -84,8 +77,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -98,7 +89,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_CLEAR;
}
@@ -112,7 +102,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
return plaintext.duplicate();
}
@@ -126,7 +115,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme", "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -146,9 +134,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
return Arrays.equals(plaintextPassword.value(), storedPassword.value());
}
@@ -161,7 +146,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return true;
}
@@ -175,8 +159,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
return storedPassword.duplicate();
}
@@ -189,7 +171,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does not support the authentication password syntax.
return false;
@@ -204,8 +185,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
@@ -223,9 +202,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
// This storage scheme does not support the authentication password syntax.
@@ -242,8 +218,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
String message = getMessage(msgID, getStorageSchemeName());
@@ -259,7 +233,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// Clear-text passwords are not obscured in any way.
return false;
diff --git a/opends/src/server/org/opends/server/extensions/ConfigFileHandler.java b/opends/src/server/org/opends/server/extensions/ConfigFileHandler.java
index 0466c65..566eb39 100644
--- a/opends/src/server/org/opends/server/extensions/ConfigFileHandler.java
+++ b/opends/src/server/org/opends/server/extensions/ConfigFileHandler.java
@@ -101,7 +101,9 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -119,7 +121,7 @@
implements AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.ConfigFileHandler";
@@ -169,7 +171,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -192,8 +193,6 @@
public void initializeConfigHandler(String configFile, boolean checkSchema)
throws InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConfigHandler",
- String.valueOf(configFile));
// Initialize the config lock.
@@ -215,13 +214,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CANNOT_VERIFY_EXISTENCE;
String message = getMessage(msgID, configFile, String.valueOf(e));
@@ -244,7 +249,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_UNABLE_TO_APPLY_STARTUP_CHANGES;
String message = getMessage(msgID, changesFile.getAbsolutePath(),
@@ -266,7 +274,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CANNOT_OPEN_FOR_READ;
String message = getMessage(msgID, configFile, String.valueOf(e));
@@ -282,7 +293,10 @@
}
catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
try
{
@@ -290,7 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_INVALID_LDIF_ENTRY;
@@ -300,7 +317,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -308,7 +328,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_CONFIG_FILE_READ_ERROR;
@@ -326,7 +349,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_EMPTY;
@@ -349,7 +375,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
try
{
@@ -357,14 +386,20 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -372,7 +407,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
// This should not happen, so we can use a generic error here.
@@ -400,7 +438,10 @@
}
catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
try
{
@@ -408,7 +449,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_INVALID_LDIF_ENTRY;
@@ -418,7 +462,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -426,7 +473,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_CONFIG_FILE_READ_ERROR;
@@ -445,7 +495,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
break;
@@ -462,7 +515,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_DUPLICATE_ENTRY;
@@ -483,7 +539,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_UNKNOWN_PARENT;
@@ -502,7 +561,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_CONFIG_FILE_NO_PARENT;
@@ -524,7 +586,10 @@
catch (Exception e)
{
// This should not happen.
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -532,7 +597,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_CONFIG_FILE_GENERIC_ERROR;
@@ -561,7 +629,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CANNOT_DETERMINE_SERVER_ROOT;
String message = getMessage(msgID, ENV_VAR_INSTANCE_ROOT);
@@ -590,13 +661,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CANNOT_DETERMINE_SERVER_ROOT;
String message = getMessage(msgID, ENV_VAR_INSTANCE_ROOT);
@@ -620,7 +697,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_CANNOT_REGISTER_AS_PRIVATE_SUFFIX;
String message = getMessage(msgID, configRootEntry.getDN(),
@@ -652,8 +732,6 @@
private void applyChangesFile(File sourceFile, File changesFile)
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "applyChangesFile",
- String.valueOf(sourceFile), String.valueOf(changesFile));
// FIXME -- Do we need to do anything special for configuration archiving?
@@ -722,7 +800,6 @@
sourceFile.renameTo(oldSource);
new File(tempFile).renameTo(sourceFile);
-
// Move the changes file out of the way so it doesn't get applied again.
File newChanges = new File(changesFile.getAbsolutePath() + ".applied");
if (newChanges.exists())
@@ -743,7 +820,6 @@
*/
public void finalizeConfigHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeConfigHandler");
try
{
@@ -751,7 +827,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeConfigHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -788,7 +867,6 @@
public ConfigEntry getConfigRootEntry()
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigRootEntry");
return configRootEntry;
}
@@ -809,7 +887,6 @@
public ConfigEntry getConfigEntry(DN entryDN)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigEntry", String.valueOf(entryDN));
return configEntries.get(entryDN);
}
@@ -823,7 +900,6 @@
*/
public String getServerRoot()
{
- assert debugEnter(CLASS_NAME, "getServerRoot");
return serverRoot;
}
@@ -849,8 +925,6 @@
public void initializeBackend(ConfigEntry configEntry, DN[] baseDNs)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeBackend",
- String.valueOf(configEntry));
// No action is required, since all initialization was performed in the
// initializeConfigHandler method.
@@ -865,7 +939,6 @@
*/
public DN[] getBaseDNs()
{
- assert debugEnter(CLASS_NAME, "getBaseDNs");
return baseDNs;
}
@@ -877,7 +950,6 @@
*/
public long getEntryCount()
{
- assert debugEnter(CLASS_NAME, "getEntryCount");
return configEntries.size();
}
@@ -895,7 +967,6 @@
*/
public boolean isLocal()
{
- assert debugEnter(CLASS_NAME, "isLocal");
// The configuration information will always be local.
return true;
@@ -917,7 +988,6 @@
public Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
ConfigEntry configEntry = configEntries.get(entryDN);
if (configEntry == null)
@@ -948,7 +1018,6 @@
public boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN));
return configEntries.containsKey(entryDN);
}
@@ -971,8 +1040,6 @@
public void addEntry(Entry entry, AddOperation addOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addEntry", String.valueOf(entry),
- String.valueOf(addOperation));
// If there is an add operation, then make sure that the associated user has
@@ -1080,7 +1147,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "addEntry", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
int msgID = MSGID_CONFIG_FILE_ADD_FAILED;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1123,8 +1193,6 @@
public void deleteEntry(DN entryDN, DeleteOperation deleteOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "deleteEntry", String.valueOf(entryDN),
- String.valueOf(deleteOperation));
// If there is a delete operation, then make sure that the associated user
@@ -1228,7 +1296,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "deleteEntry", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
int msgID = MSGID_CONFIG_FILE_DELETE_FAILED;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1271,8 +1342,6 @@
public void replaceEntry(Entry entry, ModifyOperation modifyOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "replaceEntry", String.valueOf(entry),
- String.valueOf(modifyOperation));
// If there is a modify operation, then make sure that the associated user
@@ -1463,8 +1532,6 @@
ModifyDNOperation modifyDNOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "renameEntry", String.valueOf(currentDN),
- String.valueOf(entry), String.valueOf(modifyDNOperation));
// If there is a modify DN operation, then make sure that the associated
@@ -1507,7 +1574,6 @@
public void search(SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "search", String.valueOf(searchOperation));
// Make sure that the associated user has the CONFIG_READ privilege.
@@ -1633,8 +1699,6 @@
SearchOperation searchOperation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "searchSubtree", String.valueOf(baseEntry),
- String.valueOf(filter), String.valueOf(searchOperation));
Entry e = baseEntry.getEntry();
if (filter.matchesEntry(e))
@@ -1669,7 +1733,6 @@
public void writeUpdatedConfig()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "writeUpdatedConfig");
// FIXME -- This needs support for encryption.
@@ -1709,7 +1772,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeUpdatedConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CANNOT_CREATE_ARCHIVE_DIR;
String message = getMessage(msgID, archiveDirectory.getAbsolutePath(),
@@ -1749,7 +1815,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeUpdatedConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1782,7 +1851,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeUpdatedConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CANNOT_WRITE_CONFIG_ARCHIVE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1822,7 +1894,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeUpdatedConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_WRITE_CANNOT_EXPORT_NEW_CONFIG;
String message = getMessage(msgID, String.valueOf(tempConfig),
@@ -1846,7 +1921,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeUpdatedConfig", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_WRITE_CANNOT_RENAME_NEW_CONFIG;
String message = getMessage(msgID, String.valueOf(tempConfig),
@@ -1899,7 +1977,6 @@
*/
public boolean supportsLDIFExport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFExport");
return true;
}
@@ -1923,7 +2000,6 @@
LDIFExportConfig exportConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "exportLDIF", String.valueOf(exportConfig));
LDIFWriter writer;
try
@@ -1934,7 +2010,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_LDIF_WRITE_ERROR;
String message = getMessage(msgID, String.valueOf(e));
@@ -1948,7 +2027,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exportLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_CLOSE_ERROR;
String message = getMessage(msgID, String.valueOf(e));
@@ -1974,8 +2056,6 @@
private void writeEntryAndChildren(LDIFWriter writer, ConfigEntry configEntry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "writeEntryAndChildren",
- String.valueOf(writer), String.valueOf(configEntry));
try
{
@@ -1984,7 +2064,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeEntryAndChildren", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_FILE_WRITE_ERROR;
String message = getMessage(msgID, configEntry.getDN().toString(),
@@ -2016,7 +2099,6 @@
*/
public boolean supportsLDIFImport()
{
- assert debugEnter(CLASS_NAME, "supportsLDIFImport");
return false;
}
@@ -2040,7 +2122,6 @@
LDIFImportConfig importConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "importLDIF", String.valueOf(importConfig));
int msgID = MSGID_CONFIG_FILE_UNWILLING_TO_IMPORT;
String message = getMessage(msgID);
@@ -2063,7 +2144,6 @@
*/
public boolean supportsBackup()
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// We do support an online backup mechanism for the configuration.
return true;
@@ -2089,7 +2169,6 @@
public boolean supportsBackup(BackupConfig backupConfig,
StringBuilder unsupportedReason)
{
- assert debugEnter(CLASS_NAME, "supportsBackup");
// We should support online backup for the configuration in any form. This
@@ -2117,9 +2196,6 @@
public void createBackup(ConfigEntry configEntry, BackupConfig backupConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createBackup",
- String.valueOf(configEntry),
- String.valueOf(backupConfig));
// Get the properties to use for the backup. We don't care whether or not
@@ -2158,7 +2234,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_MAC;
String message = getMessage(msgID, macAlgorithm,
@@ -2179,7 +2258,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_DIGEST;
String message = getMessage(msgID, digestAlgorithm,
@@ -2229,7 +2311,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKUP_CANNOT_CREATE_ARCHIVE_FILE;
String message = getMessage(msgID, String.valueOf(filename),
@@ -2254,7 +2339,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_CONFIG_BACKUP_CANNOT_GET_CIPHER;
String message = getMessage(msgID, cipherAlgorithm,
@@ -2297,7 +2385,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKUP_CANNOT_DETERMINE_CONFIG_FILE_LOCATION;
message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -2345,7 +2436,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -2408,7 +2502,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -2435,7 +2532,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKUP_CANNOT_CLOSE_ZIP_STREAM;
message = getMessage(msgID, filename, backupDirectory.getPath(),
@@ -2476,7 +2576,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createBackup", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_BACKUP_CANNOT_UPDATE_BACKUP_DESCRIPTOR;
message = getMessage(msgID, backupDirectory.getDescriptorPath(),
@@ -2504,9 +2607,6 @@
String backupID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
// NYI
@@ -2522,7 +2622,6 @@
*/
public boolean supportsRestore()
{
- assert debugEnter(CLASS_NAME, "supportsRestore");
// We will provide a restore, but only for offline operations.
@@ -2548,8 +2647,6 @@
RestoreConfig restoreConfig)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "restoreBackup", String.valueOf(configEntry),
- String.valueOf(restoreConfig));
// First, make sure that the requested backup exists.
@@ -3080,7 +3177,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return configRootEntry.getDN();
}
@@ -3096,7 +3192,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -3115,7 +3210,6 @@
*/
public LinkedHashMap<String,String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>();
diff --git a/opends/src/server/org/opends/server/extensions/DefaultEntryCache.java b/opends/src/server/org/opends/server/extensions/DefaultEntryCache.java
index 06cacca..d38fb79 100644
--- a/opends/src/server/org/opends/server/extensions/DefaultEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/DefaultEntryCache.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -40,7 +40,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.LockType;
-import static org.opends.server.loggers.Debug.*;
@@ -53,11 +52,6 @@
public class DefaultEntryCache
extends EntryCache
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.DefaultEntryCache";
@@ -68,7 +62,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -91,8 +84,6 @@
public void initializeEntryCache(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeEntryCache",
- String.valueOf(configEntry));
// No implementation required.
}
@@ -106,7 +97,6 @@
*/
public void finalizeEntryCache()
{
- assert debugEnter(CLASS_NAME, "finalizeEntryCache");
// No implementation required.
}
@@ -125,7 +115,6 @@
*/
public boolean containsEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "containsEntry", String.valueOf(entryDN));
// This implementation does not store any entries.
return false;
@@ -145,7 +134,6 @@
*/
public Entry getEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// This implementation does not store any entries.
return null;
@@ -165,7 +153,6 @@
*/
public long getEntryID(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntryID", String.valueOf(entryDN));
// This implementation does not store any entries.
return -1;
@@ -191,8 +178,6 @@
*/
public Entry getEntry(DN entryDN, LockType lockType, List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN),
- String.valueOf(lockType), "java.util.List<Lock>");
// This implementation does not store entries.
return null;
@@ -221,9 +206,6 @@
public Entry getEntry(Backend backend, long entryID, LockType lockType,
List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(backend),
- String.valueOf(entryID), String.valueOf(lockType),
- "java.util.List<Lock>");
// This implementation does not store entries.
return null;
@@ -243,8 +225,6 @@
*/
public void putEntry(Entry entry, Backend backend, long entryID)
{
- assert debugEnter(CLASS_NAME, "putEntry", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// This implementation does not store entries.
}
@@ -271,8 +251,6 @@
*/
public boolean putEntryIfAbsent(Entry entry, Backend backend, long entryID)
{
- assert debugEnter(CLASS_NAME, "putEntryIfAbsent", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// This implementation does not store entries, so we will never have a
// conflict.
@@ -288,7 +266,6 @@
*/
public void removeEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "removeEntry", String.valueOf(entryDN));
// This implementation does not store entries.
}
@@ -301,7 +278,6 @@
*/
public void clear()
{
- assert debugEnter(CLASS_NAME, "clear");
// This implementation does not store entries.
}
@@ -316,7 +292,6 @@
*/
public void clearBackend(Backend backend)
{
- assert debugEnter(CLASS_NAME, "clearBackend", String.valueOf(backend));
// This implementation does not store entries.
}
@@ -330,7 +305,6 @@
*/
public void clearSubtree(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "clearSubtree", String.valueOf(baseDN));
// This implementation does not store entries.
}
@@ -345,7 +319,6 @@
*/
public void handleLowMemory()
{
- assert debugEnter(CLASS_NAME, "handleLowMemory");
// This implementation does not store entries, so there are no resources
// that it can free.
diff --git a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
index 9a3303a..04dd705 100644
--- a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
@@ -72,8 +72,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -99,11 +100,6 @@
extends SASLMechanismHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.DigestMD5SASLMechanismHandler";
@@ -140,7 +136,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -152,8 +147,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -169,7 +162,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_MESSAGE_DIGEST;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -211,7 +207,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_IDENTITY_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -237,7 +236,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_REALM;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -259,7 +261,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterConfigurableComponent(this);
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_DIGEST_MD5);
@@ -274,8 +275,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// The DIGEST-MD5 bind process uses two stages. See if the client provided
@@ -432,7 +431,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This isn't necessarily fatal because we're going to retry using UTF-8,
// but we want to log it anyway.
@@ -451,7 +453,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is fatal because either we can't parse the credentials as a
// string at all, or we know we need to do so using UTF-8 and can't.
@@ -566,7 +571,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -583,7 +591,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -659,7 +670,10 @@
}
catch (ParseException pe)
{
- assert debugException(CLASS_NAME, "processSASLBind", pe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, pe);
+ }
int msgID = MSGID_SASLDIGESTMD5_CANNOT_PARSE_RESPONSE_DIGEST;
String message = getMessage(msgID, stackTraceToSingleLineString(pe));
@@ -770,7 +784,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -825,7 +842,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -866,7 +886,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -921,7 +944,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -977,7 +1003,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -1023,7 +1052,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -1106,7 +1138,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.EXTENSIONS,
ErrorLogSeverity.SEVERE_WARNING,
@@ -1148,7 +1183,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -1191,7 +1229,6 @@
*/
private String generateNonce()
{
- assert debugEnter(CLASS_NAME, "generateNonce");
byte[] nonceBytes = new byte[16];
@@ -1234,9 +1271,6 @@
StringBuilder token)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readToken", String.valueOf(credentials),
- String.valueOf(startPos), String.valueOf(length),
- "java.lang.StringBuilder");
// If the position is greater than or equal to the length, then we shouldn't
@@ -1395,19 +1429,6 @@
String qop, String charset)
throws UnsupportedEncodingException
{
- assert debugEnter(CLASS_NAME, "generateResponseDigest",
- new String[]
- {
- String.valueOf(userName),
- String.valueOf(authzID),
- String.valueOf(password),
- String.valueOf(realm),
- String.valueOf(nonce),
- String.valueOf(cnonce),
- String.valueOf(nonceCount),
- String.valueOf(digestURI),
- String.valueOf(charset)
- });
digestLock.lock();
@@ -1515,19 +1536,6 @@
String qop, String charset)
throws UnsupportedEncodingException
{
- assert debugEnter(CLASS_NAME, "generateResponseDigest",
- new String[]
- {
- String.valueOf(userName),
- String.valueOf(authzID),
- String.valueOf(password),
- String.valueOf(realm),
- String.valueOf(nonce),
- String.valueOf(cnonce),
- String.valueOf(nonceCount),
- String.valueOf(digestURI),
- String.valueOf(charset)
- });
digestLock.lock();
@@ -1618,7 +1626,6 @@
*/
private String getHexString(byte[] byteArray)
{
- assert debugEnter(CLASS_NAME, "getHexString", String.valueOf(byteArray));
StringBuilder buffer = new StringBuilder(2*byteArray.length);
for (byte b : byteArray)
@@ -1640,7 +1647,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1657,7 +1663,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1693,8 +1698,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Look at the identity mapper configuration.
@@ -1729,7 +1732,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1750,7 +1756,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_REALM;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1784,9 +1793,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -1832,7 +1838,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_IDENTITY_MAPPER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1858,7 +1867,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLDIGESTMD5_CANNOT_GET_REALM;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1940,7 +1952,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is a password-based mechanism.
return true;
@@ -1954,7 +1965,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This may be considered a secure mechanism.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/DigestMD5StateInfo.java b/opends/src/server/org/opends/server/extensions/DigestMD5StateInfo.java
index ddf8df8..8262097 100644
--- a/opends/src/server/org/opends/server/extensions/DigestMD5StateInfo.java
+++ b/opends/src/server/org/opends/server/extensions/DigestMD5StateInfo.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure that will hold state information for use
* in the DIGEST-MD5 authentication process. This information will support both
@@ -39,11 +34,6 @@
*/
public class DigestMD5StateInfo
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.DigestMD5StateInfo";
@@ -66,8 +56,6 @@
*/
public DigestMD5StateInfo(String nonce, String nonceCount)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(nonce),
- String.valueOf(nonceCount));
this.nonce = nonce;
this.nonceCount = nonceCount;
@@ -83,7 +71,6 @@
*/
public String getNonce()
{
- assert debugEnter(CLASS_NAME, "getNonce");
return nonce;
}
@@ -99,7 +86,6 @@
*/
public String getNonceCount()
{
- assert debugEnter(CLASS_NAME, "getNonceCount");
return nonceCount;
}
@@ -115,7 +101,6 @@
*/
public void setNonceCount(String nonceCount)
{
- assert debugEnter(CLASS_NAME, "setNonceCount", String.valueOf(nonceCount));
this.nonceCount = nonceCount;
}
diff --git a/opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java b/opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java
index 4239bd7..d4f5d56 100644
--- a/opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java
+++ b/opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -49,7 +49,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -66,11 +68,6 @@
extends AccountStatusNotificationHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.ErrorLogAccountStatusNotificationHandler";
@@ -122,8 +119,6 @@
public void initializeStatusNotificationHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeStatusNotificationHandler",
- String.valueOf(configEntry));
configEntryDN = configEntry.getDN();
@@ -160,8 +155,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeStatusNotificationHandler",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ERRORLOG_ACCTNOTHANDLER_CANNOT_GET_NOTIFICATION_TYPES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -191,9 +188,6 @@
notificationType,
DN userDN, int messageID, String message)
{
- assert debugEnter(CLASS_NAME, "handleStatusNotification",
- String.valueOf(notificationType), String.valueOf(userDN),
- String.valueOf(messageID), String.valueOf(message));
if (notificationTypes.contains(notificationType))
{
@@ -215,7 +209,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -231,7 +224,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -273,8 +265,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "List<String>");
// Initialize the set of notification types that should generate log
@@ -310,7 +300,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ERRORLOG_ACCTNOTHANDLER_CANNOT_GET_NOTIFICATION_TYPES;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -349,9 +342,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -392,7 +382,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
resultCode = DirectoryServer.getServerErrorResultCode();
diff --git a/opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java b/opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java
index 666523d..839965a 100644
--- a/opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java
+++ b/opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -59,7 +59,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -79,11 +81,6 @@
extends IdentityMapper
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.ExactMatchIdentityMapper";
@@ -118,8 +115,6 @@
public void initializeIdentityMapper(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeIdentityMapper",
- String.valueOf(configEntry));
configEntryDN = configEntry.getDN();
@@ -176,7 +171,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeIdentityMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -221,7 +219,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeIdentityMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_BASE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -249,7 +250,6 @@
*/
public void finalizeIdentityMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeIdentityMapper");
// Deregister with the server as a configurable component.
@@ -276,7 +276,6 @@
public Entry getEntryForID(String id)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntryForID", String.valueOf(id));
// Get the attribute type and base DN arrays as local variables to protect
@@ -405,7 +404,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -421,7 +419,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -448,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getConfigurationAttributes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
}
@@ -481,8 +481,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configAcceptable = true;
@@ -532,7 +530,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_ATTR;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -553,7 +554,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_BASE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -586,9 +590,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -658,7 +659,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_ATTR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -706,7 +710,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXACTMAP_CANNOT_DETERMINE_MATCH_BASE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/extensions/ExtensionsConstants.java b/opends/src/server/org/opends/server/extensions/ExtensionsConstants.java
index d4b5936..edb7f94 100644
--- a/opends/src/server/org/opends/server/extensions/ExtensionsConstants.java
+++ b/opends/src/server/org/opends/server/extensions/ExtensionsConstants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
diff --git a/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
index 3a285fb..207ede2 100644
--- a/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
@@ -59,7 +59,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -79,11 +81,6 @@
extends SASLMechanismHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.ExternalSASLMechanismHandler";
@@ -129,7 +126,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -141,8 +137,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -176,7 +170,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLEXTERNAL_CANNOT_GET_VALIDATION_POLICY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -204,7 +201,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLEXTERNAL_CANNOT_GET_CERT_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -276,7 +276,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterConfigurableComponent(this);
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_EXTERNAL);
@@ -291,8 +290,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// Get the client connection used for the bind request, and get the
@@ -377,7 +374,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResponseData(de);
return;
@@ -453,7 +453,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -500,7 +503,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -533,7 +539,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -550,7 +555,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -594,8 +598,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Look at the validation policy configuration.
@@ -624,7 +626,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLEXTERNAL_CANNOT_GET_VALIDATION_POLICY;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -651,7 +656,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLEXTERNAL_CANNOT_GET_CERT_ATTR;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -734,9 +742,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -773,7 +778,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
resultCode = ResultCode.INVALID_ATTRIBUTE_SYNTAX;
@@ -801,7 +809,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLEXTERNAL_CANNOT_GET_CERT_ATTR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -927,7 +938,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is not a password-based mechanism.
return false;
@@ -941,7 +951,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This may be considered a secure mechanism.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
index cfd7249..37696af 100644
--- a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -63,7 +63,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -101,11 +103,6 @@
extends EntryCache
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.FIFOEntryCache";
@@ -175,7 +172,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// All initialization should be performed in the initializeEntryCache.
}
@@ -200,8 +196,6 @@
public void initializeEntryCache(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeEntryCache",
- String.valueOf(configEntry));
configEntryDN = configEntry.getDN();
@@ -237,7 +231,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -272,7 +269,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -304,7 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -347,7 +350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter. Log a warning and continue.
logError(ErrorLogCategory.CONFIGURATION,
@@ -370,7 +376,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -412,7 +421,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter. Log a warning and continue.
logError(ErrorLogCategory.CONFIGURATION,
@@ -435,7 +447,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -453,7 +468,6 @@
*/
public void finalizeEntryCache()
{
- assert debugEnter(CLASS_NAME, "finalizeEntryCache");
// Release all memory currently in use by this cache.
@@ -467,7 +481,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "finalizeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -489,7 +506,6 @@
*/
public boolean containsEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "containsEntry", String.valueOf(entryDN));
// Indicate whether the DN map contains the specified DN.
return dnMap.containsKey(entryDN);
@@ -509,7 +525,6 @@
*/
public Entry getEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
// Simply return the entry from the DN map.
@@ -538,7 +553,6 @@
*/
public long getEntryID(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntryID", String.valueOf(entryDN));
// Simply return the ID from the DN map.
CacheEntry e = dnMap.get(entryDN);
@@ -572,8 +586,6 @@
*/
public Entry getEntry(DN entryDN, LockType lockType, List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN),
- String.valueOf(lockType), "java.util.List<Lock>");
// Get the entry from the DN map if it is present. If not, then return
@@ -606,7 +618,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -616,7 +631,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -640,7 +658,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -650,7 +671,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -689,9 +713,6 @@
public Entry getEntry(Backend backend, long entryID, LockType lockType,
List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(backend),
- String.valueOf(entryID), String.valueOf(lockType),
- "java.util.List<Lock>");
// Get the hash map for the provided backend. If it isn't present, then
// return null.
@@ -733,7 +754,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -743,7 +767,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -767,7 +794,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -777,7 +807,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -808,8 +841,6 @@
*/
public void putEntry(Entry entry, Backend backend, long entryID)
{
- assert debugEnter(CLASS_NAME, "putEntry", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// If there is a set of exclude filters, then make sure that the provided
@@ -827,7 +858,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does then we can't be sure whether
// the entry should be excluded, so we will by default.
@@ -854,7 +888,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does, then just ignore it.
}
@@ -881,7 +918,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return;
}
@@ -955,7 +995,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return;
}
@@ -987,8 +1030,6 @@
*/
public boolean putEntryIfAbsent(Entry entry, Backend backend, long entryID)
{
- assert debugEnter(CLASS_NAME, "putEntryIfAbsent", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// If there is a set of exclude filters, then make sure that the provided
@@ -1006,7 +1047,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does then we can't be sure whether
// the entry should be excluded, so we will by default.
@@ -1033,7 +1077,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does, then just ignore it.
}
@@ -1061,7 +1108,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We can't rule out the possibility of a conflict, so return false.
return false;
@@ -1148,7 +1198,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We can't be sure there wasn't a conflict, so return false.
return false;
@@ -1168,7 +1221,6 @@
*/
public void removeEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "removeEntry", String.valueOf(entryDN));
// Acquire the lock on the cache. We should not return until the entry is
@@ -1205,7 +1257,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "removeEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but there's not much that we can do if it does.
}
@@ -1223,7 +1278,6 @@
*/
public void clear()
{
- assert debugEnter(CLASS_NAME, "clear");
// Acquire a lock on the cache. We should not return until the cache has
// been cleared, so we will block until we can obtain the lock.
@@ -1242,7 +1296,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clear", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but there's not much that we can do if it does.
}
@@ -1262,7 +1319,6 @@
*/
public void clearBackend(Backend backend)
{
- assert debugEnter(CLASS_NAME, "clearBackend", String.valueOf(backend));
// Acquire a lock on the cache. We should not return until the cache has
// been cleared, so we will block until we can obtain the lock.
@@ -1305,7 +1361,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but there's not much that we can do if it does.
}
@@ -1324,7 +1383,6 @@
*/
public void clearSubtree(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "clearSubtree", String.valueOf(baseDN));
// Determine which backend should be used for the provided base DN. If
@@ -1349,7 +1407,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearBackend", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but there's not much that we can do if it does.
}
@@ -1370,8 +1431,6 @@
*/
private void clearSubtree(DN baseDN, Backend backend)
{
- assert debugEnter(CLASS_NAME, "clearSubtree", String.valueOf(baseDN),
- String.valueOf(backend));
// See if there are any entries for the provided backend in the cache. If
@@ -1404,7 +1463,7 @@
}
entriesExamined++;
- if ((entriesExamined % 1000) == 0)
+ if ((entriesExamined % 1000) == 0)
{
cacheLock.unlock();
Thread.currentThread().yield();
@@ -1444,7 +1503,6 @@
*/
public void handleLowMemory()
{
- assert debugEnter(CLASS_NAME, "handleLowMemory");
// Grab the lock on the cache and wait until we have it.
@@ -1484,7 +1542,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "handleLowMemory", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but there's not much that we can do if it does.
}
@@ -1505,7 +1566,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1521,7 +1581,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1601,8 +1660,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Start out assuming that the configuration is valid.
@@ -1624,7 +1681,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_MAX_MEMORY_PCT;
@@ -1648,7 +1708,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_MAX_ENTRIES;
@@ -1672,7 +1735,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_LOCK_TIMEOUT;
@@ -1713,7 +1779,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_FIFOCACHE_INVALID_INCLUDE_FILTER;
@@ -1729,7 +1798,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_INCLUDE_FILTERS;
@@ -1770,7 +1842,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_FIFOCACHE_INVALID_EXCLUDE_FILTER;
@@ -1786,7 +1861,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_EXCLUDE_FILTERS;
@@ -1820,9 +1898,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
// Create a set of variables to use for the result.
@@ -1852,7 +1927,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_MAX_MEMORY_PCT;
@@ -1882,7 +1960,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_MAX_ENTRIES;
@@ -1917,7 +1998,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_LOCK_TIMEOUT;
@@ -1962,7 +2046,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_FIFOCACHE_INVALID_INCLUDE_FILTER;
@@ -1983,7 +2070,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_INCLUDE_FILTERS;
@@ -2028,7 +2118,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_FIFOCACHE_INVALID_EXCLUDE_FILTER;
@@ -2049,7 +2142,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_FIFOCACHE_INVALID_EXCLUDE_FILTERS;
diff --git a/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java b/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
index 81fc912..445365a 100644
--- a/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
@@ -56,7 +56,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -71,11 +73,6 @@
extends KeyManagerProvider
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.FileBasedKeyManagerProvider";
@@ -109,7 +106,6 @@
*/
public FileBasedKeyManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -134,8 +130,6 @@
public void initializeKeyManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeKeyManagerProvider",
- String.valueOf(configEntry));
// Store the DN of the configuration entry.
@@ -170,19 +164,28 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -213,8 +216,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider",
- kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE;
String message = getMessage(msgID, String.valueOf(typeStr),
@@ -226,13 +231,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -285,13 +296,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -329,13 +346,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -401,13 +424,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -432,7 +461,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -460,7 +492,6 @@
*/
public void finalizeKeyManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeKeyManagerProvider");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -481,7 +512,6 @@
public KeyManager[] getKeyManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getKeyManagers");
KeyStore keyStore;
@@ -496,7 +526,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getKeyManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILE_KEYMANAGER_CANNOT_LOAD;
String message = getMessage(msgID, keyStoreFile,
@@ -516,7 +549,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getKeyManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILE_KEYMANAGER_CANNOT_CREATE_FACTORY;
String message = getMessage(msgID, keyStoreFile,
@@ -537,7 +573,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -553,7 +588,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -635,8 +669,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
DN configEntryDN = configEntry.getDN();
@@ -673,14 +705,20 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
unacceptableReasons.add(ce.getMessage());
return false;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -711,7 +749,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE;
String message = getMessage(msgID, String.valueOf(typeStr),
@@ -724,7 +765,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -770,7 +814,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -809,7 +856,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -878,7 +928,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -904,7 +957,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -948,9 +1004,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
@@ -990,7 +1043,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -999,7 +1055,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1034,7 +1093,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE;
messages.add(getMessage(msgID, String.valueOf(newKeyStoreType),
@@ -1050,7 +1112,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_TYPE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1108,7 +1173,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1158,7 +1226,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1248,7 +1319,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1279,7 +1353,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java b/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
index 63e71ff..2ebaf4b 100644
--- a/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -55,7 +55,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -70,11 +72,6 @@
extends TrustManagerProvider
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.FileBasedTrustManagerProvider";
@@ -108,7 +105,6 @@
*/
public FileBasedTrustManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -133,8 +129,6 @@
public void initializeTrustManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTrustManagerProvider",
- String.valueOf(configEntry));
// Store the DN of the configuration entry.
@@ -169,19 +163,28 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -213,8 +216,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider",
- kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE;
String message = getMessage(msgID, String.valueOf(typeStr),
@@ -226,13 +231,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -287,13 +298,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -331,13 +348,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -403,13 +426,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -434,7 +463,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeTrustManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -455,7 +487,6 @@
*/
public void finalizeTrustManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeTrustManagerProvider");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -475,7 +506,6 @@
public TrustManager[] getTrustManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getTrustManagers");
KeyStore trustStore;
@@ -490,7 +520,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getTrustManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_LOAD;
String message = getMessage(msgID, trustStoreFile,
@@ -510,7 +543,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getTrustManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_CREATE_FACTORY;
String message = getMessage(msgID, trustStoreFile,
@@ -531,7 +567,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -547,7 +582,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -629,8 +663,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Make sure that a trust store file was provided.
@@ -664,14 +696,20 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
unacceptableReasons.add(ce.getMessage());
return false;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -702,7 +740,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE;
String message = getMessage(msgID, String.valueOf(typeStr),
@@ -715,7 +756,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -759,7 +803,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -797,7 +844,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -865,7 +915,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -890,7 +943,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -926,9 +982,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
@@ -968,7 +1021,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -977,7 +1033,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1012,7 +1071,10 @@
}
catch (KeyStoreException kse)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", kse);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, kse);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE;
messages.add(getMessage(msgID, String.valueOf(newTrustStoreType),
@@ -1028,7 +1090,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_TYPE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1086,7 +1151,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1136,7 +1204,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1226,7 +1297,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FILE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1257,7 +1331,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java b/opends/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
index 1f788a4..ddab6a5 100644
--- a/opends/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
+++ b/opends/src/server/org/opends/server/extensions/FilteredStaticGroupMemberList.java
@@ -41,7 +41,9 @@
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.Validator.*;
@@ -56,11 +58,6 @@
public class FilteredStaticGroupMemberList
extends MemberList
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.FilteredStaticGroupMemberList";
@@ -112,7 +109,6 @@
public FilteredStaticGroupMemberList(DN groupDN, Set<DN> memberDNs, DN baseDN,
SearchScope scope, SearchFilter filter)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(memberDNs));
ensureNotNull(groupDN, memberDNs);
@@ -227,7 +223,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "nextMemberEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_STATICMEMBERS_CANNOT_GET_ENTRY;
String message = getMessage(msgID, String.valueOf(nextDN),
@@ -253,7 +252,6 @@
@Override()
public boolean hasMoreMembers()
{
- assert debugEnter(CLASS_NAME, "hasMoreMembers");
if (! memberDNIterator.hasNext())
{
@@ -272,7 +270,6 @@
public DN nextMemberDN()
throws MembershipException
{
- assert debugEnter(CLASS_NAME, "nextMemberDN");
if (! memberDNIterator.hasNext())
{
@@ -299,7 +296,6 @@
public Entry nextMemberEntry()
throws MembershipException
{
- assert debugEnter(CLASS_NAME, "nextMemberEntry");
if (! memberDNIterator.hasNext())
{
@@ -330,7 +326,6 @@
@Override()
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
// No implementation is required.
}
diff --git a/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java b/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
index 26f1a8c..8448fe3 100644
--- a/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
@@ -62,7 +62,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -79,11 +81,6 @@
extends CertificateMapper
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.FingerprintCertificateMapper";
@@ -127,7 +124,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -138,8 +134,6 @@
public void initializeCertificateMapper(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCertificateMapper",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -180,7 +174,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_FINGERPRINT_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -214,7 +211,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_FINGERPRINT_ALGORITHM;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -242,7 +242,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -260,7 +263,6 @@
*/
public void finalizeCertificateMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeCertificateMapper");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -273,8 +275,6 @@
public Entry mapCertificateToUser(Certificate[] certificateChain)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "mapCertificateToUser",
- String.valueOf(certificateChain));
// Make sure that a peer certificate was provided.
@@ -295,7 +295,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_FCM_PEER_CERT_NOT_X509;
String message =
@@ -316,7 +319,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
String peerSubject = peerCertificate.getSubjectX500Principal().getName(
X500Principal.RFC2253);
@@ -390,7 +396,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -406,7 +411,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -460,8 +464,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
DN configEntryDN = configEntry.getDN();
boolean configAcceptable = true;
@@ -503,7 +505,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_FINGERPRINT_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -540,7 +545,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_FINGERPRINT_ALGORITHM;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -569,7 +577,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_FCM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -607,9 +618,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
DN configEntryDN = configEntry.getDN();
ResultCode resultCode = ResultCode.SUCCESS;
@@ -659,7 +667,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -702,7 +713,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -734,7 +748,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
diff --git a/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
index a9954f5..f0a7293 100644
--- a/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
@@ -56,7 +56,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -72,11 +74,6 @@
extends SASLMechanismHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.GSSAPISASLMechanismHandler";
@@ -114,7 +111,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -126,8 +122,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -167,7 +161,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_IDENTITY_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -199,7 +196,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_SERVER_FQDN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -227,7 +227,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_KDC_ADDRESS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -255,7 +258,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_REALM;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -282,7 +288,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_KEYTAB_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -355,7 +364,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterConfigurableComponent(this);
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_GSSAPI);
@@ -370,8 +378,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// GSSAPI binds use multiple stages, so we need to determine whether this is
@@ -402,7 +408,10 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "processSASLBind", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
bindOperation.setAuthFailureReason(ie.getMessageID(), ie.getMessage());
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -436,7 +445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
else if (bindOperation.getResultCode() == ResultCode.SASL_BIND_IN_PROGRESS)
@@ -476,8 +488,6 @@
public Entry getUserForAuthzID(BindOperation bindOperation, String authzID)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getUserForAuthzID",
- String.valueOf(bindOperation), String.valueOf(authzID));
return identityMapper.getEntryForID(authzID);
}
@@ -493,7 +503,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -510,7 +519,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -553,8 +561,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Look at the identity mapper configuration
@@ -590,7 +596,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_IDENTITY_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -615,7 +624,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_SERVER_FQDN;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -636,7 +648,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_KDC_ADDRESS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -657,7 +672,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_REALM;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -691,9 +709,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -742,7 +757,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_IDENTITY_MAPPER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -777,7 +795,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_SERVER_FQDN;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -807,7 +828,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_KDC_ADDRESS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -837,7 +861,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLGSSAPI_CANNOT_GET_REALM;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -1000,7 +1027,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is not a password-based mechanism.
return false;
@@ -1014,7 +1040,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This may be considered a secure mechanism.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/GSSAPIStateInfo.java b/opends/src/server/org/opends/server/extensions/GSSAPIStateInfo.java
index 35cc403..83939c4 100644
--- a/opends/src/server/org/opends/server/extensions/GSSAPIStateInfo.java
+++ b/opends/src/server/org/opends/server/extensions/GSSAPIStateInfo.java
@@ -51,7 +51,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -66,11 +68,6 @@
public class GSSAPIStateInfo
implements PrivilegedExceptionAction<Boolean>, CallbackHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.GSSAPIStateInfo";
@@ -118,8 +115,6 @@
BindOperation bindOperation, String serverFQDN)
throws InitializationException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(bindOperation),
- String.valueOf(serverFQDN));
this.gssapiHandler = gssapiHandler;
this.bindOperation = bindOperation;
@@ -140,7 +135,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SASLGSSAPI_CANNOT_CREATE_LOGIN_CONTEXT;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -153,7 +151,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SASLGSSAPI_CANNOT_AUTHENTICATE_SERVER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -176,8 +177,6 @@
*/
public void setBindOperation(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "setBindOperation",
- String.valueOf(bindOperation));
this.bindOperation = bindOperation;
}
@@ -194,7 +193,6 @@
*/
public Entry getUserEntry()
{
- assert debugEnter(CLASS_NAME, "getUserEntry");
return userEntry;
}
@@ -213,7 +211,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "dispose", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -227,7 +228,6 @@
*/
public void processAuthenticationStage()
{
- assert debugEnter(CLASS_NAME, "processAuthenticationStage");
try
{
@@ -235,7 +235,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processAuthenticationStage", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -253,7 +256,6 @@
*/
public Boolean run()
{
- assert debugEnter(CLASS_NAME, "run");
if (saslServer == null)
@@ -275,7 +277,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SASLGSSAPI_CANNOT_CREATE_SASL_SERVER;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -319,7 +324,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -327,7 +335,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "run", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
int msgID = MSGID_SASLGSSAPI_CANNOT_EVALUATE_RESPONSE;
@@ -362,7 +373,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_SASLGSSAPI_NO_AUTHZ_ID;
@@ -381,7 +395,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "run", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
try
{
@@ -389,7 +406,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -410,7 +430,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
int msgID = MSGID_SASLGSSAPI_CANNOT_MAP_AUTHZID;
@@ -444,7 +467,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return true;
@@ -467,7 +493,6 @@
public void handle(Callback[] callbacks)
throws UnsupportedCallbackException
{
- assert debugEnter(CLASS_NAME, "handle", String.valueOf(callbacks));
for (Callback callback : callbacks)
diff --git a/opends/src/server/org/opends/server/extensions/InternalConnectionSecurityProvider.java b/opends/src/server/org/opends/server/extensions/InternalConnectionSecurityProvider.java
index 735fc4c..927643a 100644
--- a/opends/src/server/org/opends/server/extensions/InternalConnectionSecurityProvider.java
+++ b/opends/src/server/org/opends/server/extensions/InternalConnectionSecurityProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -34,7 +34,6 @@
import org.opends.server.api.ConnectionSecurityProvider;
import org.opends.server.types.DirectoryException;
-import static org.opends.server.loggers.Debug.*;
@@ -49,11 +48,6 @@
public class InternalConnectionSecurityProvider
extends NullConnectionSecurityProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.InternalConnectionSecurityProvider";
@@ -63,8 +57,6 @@
public InternalConnectionSecurityProvider()
{
super();
-
- assert debugConstructor(CLASS_NAME);
}
@@ -82,8 +74,6 @@
ClientConnection clientConnection, SocketChannel socketChannel)
{
super(clientConnection, socketChannel);
-
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection));
}
@@ -93,7 +83,6 @@
*/
public String getSecurityMechanismName()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanismName");
return "INTERNAL";
}
@@ -105,7 +94,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
// Internal connections are inherently secure.
return true;
@@ -134,9 +122,6 @@
SocketChannel socketChannel)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "newInstance",
- String.valueOf(clientConnection),
- String.valueOf(socketChannel));
return new InternalConnectionSecurityProvider(clientConnection,
socketChannel);
diff --git a/opends/src/server/org/opends/server/extensions/JMXAlertHandler.java b/opends/src/server/org/opends/server/extensions/JMXAlertHandler.java
index f386a88..aa330e5 100644
--- a/opends/src/server/org/opends/server/extensions/JMXAlertHandler.java
+++ b/opends/src/server/org/opends/server/extensions/JMXAlertHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -56,8 +56,10 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.DN;
import org.opends.server.types.InitializationException;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -75,7 +77,7 @@
implements AlertHandler, DynamicMBean, DirectoryServerMBean
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.JMXAlertHandler";
@@ -103,7 +105,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -125,8 +126,6 @@
public void initializeAlertHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeAlertHandler",
- String.valueOf(configEntry));
sequenceNumber = new AtomicLong(1);
@@ -155,7 +154,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeAlertHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JMX_ALERT_HANDLER_CANNOT_REGISTER;
String message = getMessage(msgID, String.valueOf(e));
@@ -172,7 +174,6 @@
*/
public void finalizeAlertHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeAlertHandler");
// No action is required.
}
@@ -186,7 +187,6 @@
*/
public ObjectName getObjectName()
{
- assert debugEnter(CLASS_NAME, "getObjectName");
return objectName;
}
@@ -206,9 +206,6 @@
public void sendAlertNotification(AlertGenerator generator, String alertType,
int alertID, String alertMessage)
{
- assert debugEnter(CLASS_NAME, "sendAlertNotification",
- String.valueOf(generator), String.valueOf(alertID),
- String.valueOf(alertMessage));
sendNotification(new Notification(alertType, generator.getClassName(),
sequenceNumber.getAndIncrement(),
@@ -227,7 +224,6 @@
*/
public MBeanNotificationInfo[] getNotificationInfo()
{
- assert debugEnter(CLASS_NAME, "getNotificationInfo");
ArrayList<MBeanNotificationInfo> notifications =
new ArrayList<MBeanNotificationInfo>();
@@ -262,7 +258,6 @@
public Attribute getAttribute(String attribute)
throws AttributeNotFoundException
{
- assert debugEnter(CLASS_NAME, "getAttribute");
// There are no attributes for this MBean.
int msgID = MSGID_CONFIG_JMX_ATTR_NO_ATTR;
@@ -288,7 +283,6 @@
public void setAttribute(Attribute attribute)
throws AttributeNotFoundException, InvalidAttributeValueException
{
- assert debugEnter(CLASS_NAME, "setAttribute", String.valueOf(attribute));
// There are no attributes for this MBean.
@@ -309,7 +303,6 @@
*/
public AttributeList getAttributes(String[] attributes)
{
- assert debugEnter(CLASS_NAME, "getAttributes", String.valueOf(attributes));
// There are no attributes for this MBean.
@@ -329,7 +322,6 @@
*/
public AttributeList setAttributes(AttributeList attributes)
{
- assert debugEnter(CLASS_NAME, "setAttributes", String.valueOf(attributes));
// There are no attributes for this MBean.
return new AttributeList();
@@ -357,8 +349,6 @@
public Object invoke(String actionName, Object[] params, String[] signature)
throws MBeanException
{
- assert debugEnter(CLASS_NAME, "invoke", String.valueOf(actionName),
- String.valueOf(params), String.valueOf(signature));
// There are no invokable components for this MBean.
StringBuilder buffer = new StringBuilder();
@@ -395,7 +385,6 @@
*/
public MBeanInfo getMBeanInfo()
{
- assert debugEnter(CLASS_NAME, "getMBeanInfo");
return new MBeanInfo(CLASS_NAME, "JMX Alert Handler",
new MBeanAttributeInfo[0], new MBeanConstructorInfo[0],
diff --git a/opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java b/opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java
index 0a03f5f..2ab2ba1 100644
--- a/opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java
+++ b/opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -49,7 +49,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -64,11 +66,6 @@
extends PasswordValidator
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.LengthBasedPasswordValidator";
@@ -90,7 +87,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// All initialization must be done in the initializePasswordValidator
// method.
@@ -105,8 +101,6 @@
public void initializePasswordValidator(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordValidator",
- String.valueOf(configEntry));
configEntryDN = configEntry.getDN();
@@ -130,7 +124,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordValidator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWLENGTHVALIDATOR_CANNOT_DETERMINE_MIN_LENGTH;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -156,7 +153,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordValidator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWLENGTHVALIDATOR_CANNOT_DETERMINE_MAX_LENGTH;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -186,7 +186,6 @@
@Override()
public void finalizePasswordValidator()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordValidator");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -202,10 +201,6 @@
Operation operation, Entry userEntry,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "passwordIsAcceptable",
- "ByteString", "Set<ByteString>",
- String.valueOf(operation), String.valueOf(userEntry),
- "java.lang.StringBuilder");
int numChars = newPassword.stringValue().length();
@@ -234,7 +229,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -246,7 +240,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrs = new LinkedList<ConfigAttribute>();
@@ -272,8 +265,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Get the configured minimum length.
@@ -294,7 +285,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWLENGTHVALIDATOR_CANNOT_DETERMINE_MIN_LENGTH;
unacceptableReasons.add(getMessage(msgID,
@@ -320,7 +314,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PWLENGTHVALIDATOR_CANNOT_DETERMINE_MAX_LENGTH;
unacceptableReasons.add(getMessage(msgID,
@@ -352,9 +349,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -380,7 +374,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -410,7 +407,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
diff --git a/opends/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java
index 6a5e8e5..f47eb57 100644
--- a/opends/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/MD5PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -46,7 +46,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -67,7 +69,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.MD5PasswordStorageScheme";
@@ -91,7 +93,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +104,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -112,7 +111,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_MD5,
@@ -131,7 +133,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_MD5;
}
@@ -145,7 +146,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] digestBytes;
@@ -157,7 +157,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -183,8 +186,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -201,7 +202,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -230,9 +234,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
byte[] userPWDigestBytes;
@@ -244,7 +245,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -260,7 +264,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.EXTENSIONS, ErrorLogSeverity.MILD_ERROR,
MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD,
@@ -280,7 +287,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does not support the authentication password syntax.
return false;
@@ -295,8 +301,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
@@ -314,9 +318,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
// This storage scheme does not support the authentication password syntax.
@@ -331,7 +332,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -345,8 +345,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_MD5);
@@ -364,8 +362,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
String message = getMessage(msgID, getStorageSchemeName());
@@ -381,7 +377,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// MD5 may be considered reasonably secure for this purpose.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/NullConnectionSecurityProvider.java b/opends/src/server/org/opends/server/extensions/NullConnectionSecurityProvider.java
index 74e1ab4..14a742e 100644
--- a/opends/src/server/org/opends/server/extensions/NullConnectionSecurityProvider.java
+++ b/opends/src/server/org/opends/server/extensions/NullConnectionSecurityProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -39,10 +39,11 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DisconnectReason;
import org.opends.server.types.InitializationException;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.ExtensionsMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -55,11 +56,6 @@
public class NullConnectionSecurityProvider
extends ConnectionSecurityProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.NullConnectionSecurityProvider";
@@ -93,7 +89,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -112,7 +107,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection));
this.clientConnection = clientConnection;
this.socketChannel = socketChannel;
@@ -140,8 +134,6 @@
public void initializeConnectionSecurityProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionSecurityProvider",
- String.valueOf(configEntry));
clearBuffer = null;
clientConnection = null;
@@ -156,7 +148,6 @@
*/
public void finalizeConnectionSecurityProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeConnectionSecurityProvider");
// No implementation is required.
}
@@ -170,7 +161,6 @@
*/
public String getSecurityMechanismName()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanismName");
return "NULL";
}
@@ -187,7 +177,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
// This is not a secure provider.
return false;
@@ -216,9 +205,6 @@
SocketChannel socketChannel)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "newInstance",
- String.valueOf(clientConnection),
- String.valueOf(socketChannel));
return new NullConnectionSecurityProvider(clientConnection,
socketChannel);
@@ -243,7 +229,6 @@
*/
public void disconnect(boolean connectionValid)
{
- assert debugEnter(CLASS_NAME, "disconnect");
// No implementation is required.
}
@@ -260,7 +245,6 @@
*/
public int getClearBufferSize()
{
- assert debugEnter(CLASS_NAME, "getClearBufferSize");
return BUFFER_SIZE;
}
@@ -277,7 +261,6 @@
*/
public int getEncodedBufferSize()
{
- assert debugEnter(CLASS_NAME, "getEncodedBufferSize");
return BUFFER_SIZE;
}
@@ -299,7 +282,6 @@
*/
public boolean readData()
{
- assert debugEnter(CLASS_NAME, "readData");
clearBuffer.clear();
while (true)
@@ -336,7 +318,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "readData", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
// An error occurred while trying to read data from the client.
// Disconnect and return.
@@ -345,7 +330,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An unexpected error occurred. Disconnect and return.
clientConnection.disconnect(DisconnectReason.SERVER_ERROR, true,
@@ -378,7 +366,6 @@
*/
public boolean writeData(ByteBuffer clearData)
{
- assert debugEnter(CLASS_NAME, "writeData", "java.nio.ByteBuffer");
int position = clearData.position();
int limit = clearData.limit();
@@ -401,7 +388,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "writeData", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
// An error occurred while trying to write data to the client. Disconnect
// and return.
@@ -410,7 +400,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An unexpected error occurred. Disconnect and return.
clientConnection.disconnect(DisconnectReason.SERVER_ERROR, true,
diff --git a/opends/src/server/org/opends/server/extensions/NullKeyManagerProvider.java b/opends/src/server/org/opends/server/extensions/NullKeyManagerProvider.java
index f5304da..a45cbf9 100644
--- a/opends/src/server/org/opends/server/extensions/NullKeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/NullKeyManagerProvider.java
@@ -36,8 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.messages.MessageHandler.*;
@@ -49,11 +47,6 @@
public class NullKeyManagerProvider
extends KeyManagerProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.NullKeyManagerProvider";
@@ -64,7 +57,6 @@
*/
public NullKeyManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -89,8 +81,6 @@
public void initializeKeyManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeKeyManagerProvider",
- String.valueOf(configEntry));
// No implementation is required.
}
@@ -103,7 +93,6 @@
*/
public void finalizeKeyManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeKeyManagerProvider");
// No implementation is required.
}
@@ -123,7 +112,6 @@
public KeyManager[] getKeyManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getKeyManagers");
return new KeyManager[0];
}
diff --git a/opends/src/server/org/opends/server/extensions/NullTrustManagerProvider.java b/opends/src/server/org/opends/server/extensions/NullTrustManagerProvider.java
index 4d2d429..cae6d48 100644
--- a/opends/src/server/org/opends/server/extensions/NullTrustManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/NullTrustManagerProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -36,9 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.messages.ExtensionsMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
@@ -51,11 +48,6 @@
public class NullTrustManagerProvider
extends TrustManagerProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.NullTrustManagerProvider";
@@ -66,7 +58,6 @@
*/
public NullTrustManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -91,8 +82,6 @@
public void initializeTrustManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeTrustManagerProvider",
- String.valueOf(configEntry));
// No implementation is required.
}
@@ -105,7 +94,6 @@
*/
public void finalizeTrustManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeTrustManagerProvider");
// No implementation is required.
}
@@ -125,7 +113,6 @@
public TrustManager[] getTrustManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getTrustManagers");
return new TrustManager[0];
}
diff --git a/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java b/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
index 5b8881b..bad56c0 100644
--- a/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
@@ -54,7 +54,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -70,11 +72,6 @@
extends KeyManagerProvider
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.PKCS11KeyManagerProvider";
@@ -109,7 +106,6 @@
*/
public PKCS11KeyManagerProvider()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -134,8 +130,6 @@
public void initializeKeyManagerProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeKeyManagerProvider",
- String.valueOf(configEntry));
// Store the DN of the configuration entry.
@@ -186,13 +180,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -230,13 +230,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -302,13 +308,19 @@
}
catch (InitializationException ie)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
throw ie;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -333,7 +345,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeKeyManagerProvider", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -361,7 +376,6 @@
*/
public void finalizeKeyManagerProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeKeyManagerProvider");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -381,7 +395,6 @@
public KeyManager[] getKeyManagers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getKeyManagers");
KeyStore keyStore;
try
@@ -391,7 +404,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getKeyManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_LOAD;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -410,7 +426,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getKeyManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_CREATE_FACTORY;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -430,7 +449,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -446,7 +464,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -514,8 +531,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
DN configEntryDN = configEntry.getDN();
@@ -556,7 +571,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -595,7 +613,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -664,7 +685,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -690,7 +714,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -734,9 +761,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
boolean adminActionRequired = false;
@@ -788,7 +812,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_PROPERTY;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -838,7 +865,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_ENVAR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -928,7 +958,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FILE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -959,7 +992,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PKCS11_KEYMANAGER_CANNOT_DETERMINE_PIN_FROM_ATTR;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java b/opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
index a8ff127..45978c0 100644
--- a/opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
+++ b/opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
@@ -79,7 +79,9 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -96,11 +98,6 @@
extends ExtendedOperationHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.PasswordModifyExtendedOperation";
@@ -127,7 +124,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -152,8 +148,6 @@
public void initializeExtendedOperationHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperationHandler",
- String.valueOf(configEntry));
configEntryDN = configEntry.getDN();
@@ -186,8 +180,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeExtendedOperationHandler",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
stackTraceToSingleLineString(e));
@@ -214,7 +210,6 @@
*/
public void finalizeExtendedOperationHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeExtendedOperationHandler");
DirectoryServer.deregisterConfigurableComponent(this);
@@ -230,8 +225,6 @@
*/
public void processExtendedOperation(ExtendedOperation operation)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(operation));
// Initialize the variables associated with components that may be included
// in the request.
@@ -298,7 +291,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
operation.setResultCode(ResultCode.PROTOCOL_ERROR);
@@ -383,7 +379,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
operation.setResultCode(ResultCode.INVALID_DN_SYNTAX);
@@ -439,7 +438,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
if (oldPassword == null)
{
@@ -483,7 +485,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
operation.setResultCode(DirectoryServer.getServerErrorResultCode());
@@ -796,7 +801,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
if (oldPassword == null)
{
@@ -925,7 +933,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
if (oldPassword == null)
{
@@ -990,7 +1001,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// We couldn't decode the provided password value, so remove it
// from the user's entry.
@@ -1026,7 +1040,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// We couldn't decode the provided password value, so remove it
// from the user's entry.
@@ -1202,8 +1219,6 @@
*/
private Entry getEntryByDN(ExtendedOperation operation, DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntryByDN", String.valueOf(operation),
- String.valueOf(entryDN));
// Retrieve the user's entry from the directory. If it does not exist, then
// fail.
@@ -1233,7 +1248,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntryByDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
break;
}
@@ -1247,7 +1265,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "getEntryByDN", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
operation.setResultCode(de.getResultCode());
operation.appendErrorMessage(de.getErrorMessage());
@@ -1265,7 +1286,6 @@
*/
public Set<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return supportedControlOIDs;
}
@@ -1281,7 +1301,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1297,7 +1316,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
List<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1327,8 +1345,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "List<String>");
// Make sure that the specified identity mapper is OK.
@@ -1363,7 +1379,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntry.getDN()),
@@ -1437,7 +1456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
resultCode = DirectoryServer.getServerErrorResultCode();
diff --git a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
index 7afe91d..61f8d01 100644
--- a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
@@ -57,9 +57,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -82,11 +82,6 @@
extends SASLMechanismHandler
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.PlainSASLMechanismHandler";
@@ -110,7 +105,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -122,8 +116,6 @@
public void initializeSASLMechanismHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSASLMechanismHandler",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -163,7 +155,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSASLMechanismHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLPLAIN_CANNOT_GET_IDENTITY_MAPPER;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -184,7 +179,6 @@
@Override()
public void finalizeSASLMechanismHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeSASLMechanismHandler");
DirectoryServer.deregisterConfigurableComponent(this);
DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_PLAIN);
@@ -199,8 +193,6 @@
@Override()
public void processSASLBind(BindOperation bindOperation)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindOperation));
// Get the SASL credentials provided by the user and decode them.
@@ -288,7 +280,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -342,7 +337,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -371,7 +369,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -415,7 +416,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -470,7 +474,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -516,7 +523,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSASLBind", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -568,7 +578,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processSASLBind", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
bindOperation.setResultCode(ResultCode.INVALID_CREDENTIALS);
@@ -601,7 +614,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -618,7 +630,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -649,8 +660,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Look at the identity mapper configuration.
@@ -685,7 +694,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLPLAIN_CANNOT_GET_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -719,9 +731,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -767,7 +776,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SASLPLAIN_CANNOT_GET_IDENTITY_MAPPER;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -806,7 +818,6 @@
@Override()
public boolean isPasswordBased(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isPasswordBased", String.valueOf(mechanism));
// This is a password-based mechanism.
return true;
@@ -820,7 +831,6 @@
@Override()
public boolean isSecure(String mechanism)
{
- assert debugEnter(CLASS_NAME, "isSecure", String.valueOf(mechanism));
// This is not a secure mechanism.
return false;
diff --git a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
index b9379ca..d978ac0 100644
--- a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
+++ b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -53,7 +53,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -69,11 +71,6 @@
extends PasswordGenerator
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.RandomPasswordGenerator";
@@ -119,8 +116,6 @@
public void initializePasswordGenerator(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordGenerator",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -171,7 +166,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -234,7 +232,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
String message = getMessage(msgID, String.valueOf(formatString));
@@ -260,7 +261,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -279,7 +283,6 @@
*/
public void finalizePasswordGenerator()
{
- assert debugEnter(CLASS_NAME, "finalizePasswordGenerator");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -301,8 +304,6 @@
public ByteString generatePassword(Entry userEntry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "generatePassword",
- String.valueOf(userEntry));
StringBuilder buffer = new StringBuilder(totalLength);
@@ -335,7 +336,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
@@ -352,7 +352,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -401,8 +400,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Get the character sets for use in generating the password. At least one
@@ -451,7 +448,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -502,7 +502,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
String message = getMessage(msgID, String.valueOf(formatString));
@@ -519,7 +522,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -553,9 +559,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -621,7 +624,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_CHARSETS;
messages.add(getMessage(msgID, stackTraceToSingleLineString(e)));
@@ -694,7 +700,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_INVALID_PWFORMAT;
messages.add(getMessage(msgID, String.valueOf(newFormatString)));
@@ -718,7 +727,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordGenerator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_RANDOMPWGEN_CANNOT_DETERMINE_PWFORMAT;
messages.add(getMessage(msgID, stackTraceToSingleLineString(e)));
diff --git a/opends/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java
index 9e005e3..00dc392 100644
--- a/opends/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SHA1PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -46,7 +46,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -67,7 +69,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SHA1PasswordStorageScheme";
@@ -91,7 +93,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +104,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -112,7 +111,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_SHA_1,
@@ -131,7 +133,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SHA_1;
}
@@ -145,7 +146,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", String.valueOf(plaintext));
byte[] digestBytes;
@@ -157,7 +157,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -183,8 +186,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -201,7 +202,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -229,9 +233,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
byte[] userPWDigestBytes;
@@ -243,7 +244,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -259,7 +263,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.EXTENSIONS, ErrorLogSeverity.MILD_ERROR,
MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD,
@@ -279,7 +286,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does not support the authentication password syntax.
return false;
@@ -294,8 +300,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
@@ -313,9 +317,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
// This storage scheme does not support the authentication password syntax.
@@ -330,7 +331,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -344,8 +344,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SHA_1);
@@ -363,8 +361,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_DOES_NOT_SUPPORT_AUTH_PASSWORD;
String message = getMessage(msgID, getStorageSchemeName());
@@ -380,7 +376,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// SHA-1 should be considered secure.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
index 9683992..cb48b60 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -47,7 +47,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,7 +72,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SaltedMD5PasswordStorageScheme";
@@ -105,7 +107,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -117,8 +118,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -126,7 +125,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_MD5,
@@ -147,7 +149,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SALTED_MD5;
}
@@ -161,7 +162,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] plainBytes = plaintext.value();
byte[] saltBytes = new byte[NUM_SALT_BYTES];
@@ -185,7 +185,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -218,8 +221,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -248,7 +249,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -282,9 +286,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
// Base64-decode the stored value and take the last 8 bytes as the salt.
@@ -302,7 +303,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -330,7 +334,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -350,7 +357,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does support the authentication password syntax.
return true;
@@ -364,7 +370,6 @@
@Override()
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return AUTH_PASSWORD_SCHEME_NAME_SALTED_MD5;
}
@@ -378,8 +383,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
byte[] plainBytes = plaintext.value();
@@ -404,7 +407,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -439,9 +445,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
byte[] saltBytes;
@@ -453,7 +456,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "authPasswordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -486,7 +492,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -500,8 +505,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SALTED_MD5);
@@ -519,8 +522,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, AUTH_PASSWORD_SCHEME_NAME_SALTED_MD5);
@@ -536,7 +537,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// MD5 may be considered reasonably secure for this purpose.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java
index 1149430..be17b93 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedSHA1PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -47,7 +47,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,7 +72,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SaltedSHA1PasswordStorageScheme";
@@ -105,7 +107,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -117,8 +118,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -126,7 +125,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_SHA_1,
@@ -146,7 +148,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SALTED_SHA_1;
}
@@ -160,7 +161,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] plainBytes = plaintext.value();
byte[] saltBytes = new byte[NUM_SALT_BYTES];
@@ -184,7 +184,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -217,8 +220,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -247,7 +248,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -281,9 +285,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
// Base64-decode the stored value and take the last 8 bytes as the salt.
@@ -301,7 +302,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -329,7 +333,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -349,7 +356,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does support the authentication password syntax.
return true;
@@ -363,7 +369,6 @@
@Override()
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_1;
}
@@ -377,8 +382,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
byte[] plainBytes = plaintext.value();
@@ -403,7 +406,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -438,9 +444,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
byte[] saltBytes;
@@ -452,7 +455,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "authPasswordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -485,7 +491,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -499,8 +504,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SALTED_SHA_1);
@@ -518,8 +521,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_1);
@@ -535,7 +536,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// SHA-1 should be considered secure.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
index c6d4ce4..cffd419 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -47,7 +47,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,7 +72,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SaltedSHA256PasswordStorageScheme";
@@ -106,7 +108,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -118,8 +119,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -128,7 +127,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_SHA_256,
@@ -149,7 +151,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SALTED_SHA_256;
}
@@ -163,7 +164,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] plainBytes = plaintext.value();
byte[] saltBytes = new byte[NUM_SALT_BYTES];
@@ -187,7 +187,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -220,8 +223,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -250,7 +251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -284,9 +288,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
// Base64-decode the stored value and take the last 8 bytes as the salt.
@@ -304,7 +305,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -332,7 +336,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -352,7 +359,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does support the authentication password syntax.
return true;
@@ -366,7 +372,6 @@
@Override()
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_256;
}
@@ -380,8 +385,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
byte[] plainBytes = plaintext.value();
@@ -406,7 +409,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -441,9 +447,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
byte[] saltBytes;
@@ -455,7 +458,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "authPasswordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -488,7 +494,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -502,8 +507,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SALTED_SHA_256);
@@ -521,8 +524,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID,
@@ -539,7 +540,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// SHA-2 should be considered secure.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java
index dd207dd..3e7c429 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedSHA384PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -47,7 +47,9 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -70,7 +72,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SaltedSHA384PasswordStorageScheme";
@@ -106,7 +108,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -118,8 +119,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -128,7 +127,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_SHA_384,
@@ -149,7 +151,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SALTED_SHA_384;
}
@@ -163,7 +164,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] plainBytes = plaintext.value();
byte[] saltBytes = new byte[NUM_SALT_BYTES];
@@ -187,7 +187,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -220,8 +223,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -250,7 +251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -284,9 +288,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
// Base64-decode the stored value and take the last 8 bytes as the salt.
@@ -304,7 +305,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -332,7 +336,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -352,7 +359,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does support the authentication password syntax.
return true;
@@ -366,7 +372,6 @@
@Override()
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_384;
}
@@ -380,8 +385,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
byte[] plainBytes = plaintext.value();
@@ -406,7 +409,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -441,9 +447,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
byte[] saltBytes;
@@ -455,7 +458,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "authPasswordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -488,7 +494,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -502,8 +507,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SALTED_SHA_384);
@@ -521,8 +524,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID,
@@ -539,7 +540,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// SHA-2 should be considered secure.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java
index f2ba389..e2b5d5b 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedSHA512PasswordStorageScheme.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -47,8 +47,10 @@
import org.opends.server.util.Base64;
import static org.opends.server.extensions.ExtensionsConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -70,7 +72,7 @@
extends PasswordStorageScheme
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.extensions.SaltedSHA512PasswordStorageScheme";
@@ -106,7 +108,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -118,8 +119,6 @@
public void initializePasswordStorageScheme(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializePasswordStorageScheme",
- String.valueOf(configEntry));
try
{
@@ -128,7 +127,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePasswordStorageScheme", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_INITIALIZE_MESSAGE_DIGEST;
String message = getMessage(msgID, MESSAGE_DIGEST_ALGORITHM_SHA_512,
@@ -148,7 +150,6 @@
@Override()
public String getStorageSchemeName()
{
- assert debugEnter(CLASS_NAME, "getStorageSchemeName");
return STORAGE_SCHEME_NAME_SALTED_SHA_512;
}
@@ -162,7 +163,6 @@
public ByteString encodePassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePassword", "ByteString");
byte[] plainBytes = plaintext.value();
byte[] saltBytes = new byte[NUM_SALT_BYTES];
@@ -186,7 +186,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -219,8 +222,6 @@
public ByteString encodePasswordWithScheme(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodePasswordWithScheme",
- "ByteString");
StringBuilder buffer = new StringBuilder();
buffer.append('{');
@@ -249,7 +250,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -283,9 +287,6 @@
public boolean passwordMatches(ByteString plaintextPassword,
ByteString storedPassword)
{
- assert debugEnter(CLASS_NAME, "passwordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(storedPassword));
// Base64-decode the stored value and take the last 8 bytes as the salt.
@@ -303,7 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_BASE64_DECODE_STORED_PASSWORD;
String message = getMessage(msgID, storedPassword.stringValue(),
@@ -331,7 +335,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "passwordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -351,7 +358,6 @@
@Override()
public boolean supportsAuthPasswordSyntax()
{
- assert debugEnter(CLASS_NAME, "supportsAuthPasswordSyntax");
// This storage scheme does support the authentication password syntax.
return true;
@@ -365,7 +371,6 @@
@Override()
public String getAuthPasswordSchemeName()
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordSchemeName");
return AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_512;
}
@@ -379,8 +384,6 @@
public ByteString encodeAuthPassword(ByteString plaintext)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "encodeAuthPassword",
- String.valueOf(plaintext));
byte[] plainBytes = plaintext.value();
@@ -405,7 +408,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "encodePassword", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PWSCHEME_CANNOT_ENCODE_PASSWORD;
String message = getMessage(msgID, CLASS_NAME,
@@ -440,9 +446,6 @@
public boolean authPasswordMatches(ByteString plaintextPassword,
String authInfo, String authValue)
{
- assert debugEnter(CLASS_NAME, "authPasswordMatches",
- String.valueOf(plaintextPassword),
- String.valueOf(authInfo), String.valueOf(authValue));
byte[] saltBytes;
@@ -454,7 +457,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "authPasswordMatches", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -487,7 +493,6 @@
@Override()
public boolean isReversible()
{
- assert debugEnter(CLASS_NAME, "isReversible");
return false;
}
@@ -501,8 +506,6 @@
public ByteString getPlaintextValue(ByteString storedPassword)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getPlaintextValue",
- String.valueOf(storedPassword));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID, STORAGE_SCHEME_NAME_SALTED_SHA_512);
@@ -520,8 +523,6 @@
String authValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAuthPasswordPlaintextValue",
- String.valueOf(authInfo), String.valueOf(authValue));
int msgID = MSGID_PWSCHEME_NOT_REVERSIBLE;
String message = getMessage(msgID,
@@ -538,7 +539,6 @@
@Override()
public boolean isStorageSchemeSecure()
{
- assert debugEnter(CLASS_NAME, "isStorageSchemeSecure");
// SHA-2 should be considered secure.
return true;
diff --git a/opends/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java b/opends/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
index 97dfa1d..9e8c62e 100644
--- a/opends/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
+++ b/opends/src/server/org/opends/server/extensions/SimpleStaticGroupMemberList.java
@@ -39,7 +39,9 @@
import org.opends.server.types.MemberList;
import org.opends.server.types.MembershipException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.Validator.*;
@@ -54,11 +56,6 @@
public class SimpleStaticGroupMemberList
extends MemberList
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.SimpleStaticGroupMemberList";
@@ -85,7 +82,6 @@
*/
public SimpleStaticGroupMemberList(DN groupDN, Set<DN> memberDNs)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(memberDNs));
ensureNotNull(groupDN, memberDNs);
@@ -102,7 +98,6 @@
@Override()
public boolean hasMoreMembers()
{
- assert debugEnter(CLASS_NAME, "hasMoreMembers");
return memberDNIterator.hasNext();
}
@@ -116,7 +111,6 @@
public DN nextMemberDN()
throws MembershipException
{
- assert debugEnter(CLASS_NAME, "nextMemberDN");
if (memberDNIterator.hasNext())
{
@@ -135,7 +129,6 @@
public Entry nextMemberEntry()
throws MembershipException
{
- assert debugEnter(CLASS_NAME, "nextMemberEntry");
if (memberDNIterator.hasNext())
{
@@ -156,7 +149,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "nextMemberEntry", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_STATICMEMBERS_CANNOT_GET_ENTRY;
String message = getMessage(msgID, String.valueOf(memberDN),
@@ -177,7 +173,6 @@
@Override()
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
// No implementation is required.
}
diff --git a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
index 5d475e3..c6b53ff 100644
--- a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -60,7 +60,9 @@
import org.opends.server.types.SearchFilter;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -78,11 +80,6 @@
extends EntryCache
implements ConfigurableComponent, Runnable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.SoftReferenceEntryCache";
@@ -142,7 +139,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
dnMap = new ConcurrentHashMap<DN,SoftReference<CacheEntry>>();
idMap = new ConcurrentHashMap<Backend,
@@ -179,8 +175,6 @@
public void initializeEntryCache(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeEntryCache",
- String.valueOf(configEntry));
dnMap.clear();
idMap.clear();
@@ -211,7 +205,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -254,7 +251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter. Log a warning and continue.
logError(ErrorLogCategory.CONFIGURATION,
@@ -277,7 +277,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -319,7 +322,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter. Log a warning and continue.
logError(ErrorLogCategory.CONFIGURATION,
@@ -342,7 +348,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Log an error message.
logError(ErrorLogCategory.CONFIGURATION, ErrorLogSeverity.SEVERE_ERROR,
@@ -360,7 +369,6 @@
*/
public void finalizeEntryCache()
{
- assert debugEnter(CLASS_NAME, "finalizeEntryCache");
dnMap.clear();
idMap.clear();
@@ -380,7 +388,6 @@
*/
public boolean containsEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "containsEntry", String.valueOf(entryDN));
// Indicate whether the DN map contains the specified DN.
return dnMap.containsKey(entryDN);
@@ -400,7 +407,6 @@
*/
public Entry getEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN));
SoftReference<CacheEntry> ref = dnMap.get(entryDN);
if (ref == null)
@@ -435,7 +441,6 @@
*/
public long getEntryID(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "getEntryID", String.valueOf(entryDN));
SoftReference<CacheEntry> ref = dnMap.get(entryDN);
if (ref == null)
@@ -477,8 +482,6 @@
public Entry getEntry(DN entryDN, LockType lockType,
List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN),
- String.valueOf(lockType), "java.util.List<Lock>");
SoftReference<CacheEntry> ref = dnMap.get(entryDN);
if (ref == null)
@@ -514,7 +517,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -524,7 +530,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -549,7 +558,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -559,7 +571,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -601,9 +616,6 @@
public Entry getEntry(Backend backend, long entryID,
LockType lockType, List<Lock> lockList)
{
- assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(backend),
- String.valueOf(entryID), String.valueOf(lockType),
- "java.util.List<Lock>");
ConcurrentHashMap<Long,SoftReference<CacheEntry>> map = idMap.get(backend);
if (map == null)
@@ -643,7 +655,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -653,7 +668,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -678,7 +696,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The attempt to add the lock to the list failed, so we need to
// release the lock and return null.
@@ -688,7 +709,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getEntry", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
return null;
@@ -719,8 +743,6 @@
*/
public void putEntry(Entry entry, Backend backend, long entryID)
{
- assert debugEnter(CLASS_NAME, "putEntry", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// If there is a set of exclude filters, then make sure that the provided
@@ -738,7 +760,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does then we can't be sure whether
// the entry should be excluded, so we will by default.
@@ -765,7 +790,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does, then just ignore it.
}
@@ -828,8 +856,6 @@
public boolean putEntryIfAbsent(Entry entry, Backend backend,
long entryID)
{
- assert debugEnter(CLASS_NAME, "putIfAbsent", String.valueOf(entry),
- String.valueOf(backend), String.valueOf(entryID));
// If there is a set of exclude filters, then make sure that the provided
@@ -847,7 +873,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does then we can't be sure whether
// the entry should be excluded, so we will by default.
@@ -874,7 +903,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "putEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This shouldn't happen, but if it does, then just ignore it.
}
@@ -925,7 +957,6 @@
*/
public void removeEntry(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "removeEntry", String.valueOf(entryDN));
SoftReference<CacheEntry> ref = dnMap.remove(entryDN);
@@ -960,7 +991,6 @@
*/
public void clear()
{
- assert debugEnter(CLASS_NAME, "clear");
dnMap.clear();
idMap.clear();
@@ -976,7 +1006,6 @@
*/
public void clearBackend(Backend backend)
{
- assert debugEnter(CLASS_NAME, "clearBackend", String.valueOf(backend));
// FIXME -- Would it be better just to dump everything?
@@ -1008,7 +1037,6 @@
*/
public void clearSubtree(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "clearSubtree", String.valueOf(baseDN));
// Determine the backend used to hold the specified base DN and clear it.
@@ -1034,7 +1062,6 @@
*/
public void handleLowMemory()
{
- assert debugEnter(CLASS_NAME, "handleLowMemory");
// This function should automatically be taken care of by the nature of the
@@ -1053,7 +1080,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1069,7 +1095,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -1133,8 +1158,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
// Start out assuming that the configuration is valid.
@@ -1155,7 +1178,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_LOCK_TIMEOUT;
@@ -1196,7 +1222,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTER;
@@ -1212,7 +1241,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTERS;
@@ -1253,7 +1285,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_SOFTREFCACHE_INVALID_EXCLUDE_FILTER;
@@ -1269,7 +1304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeEntryCache", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_EXCLUDE_FILTERS;
@@ -1303,9 +1341,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
// Create a set of variables to use for the result.
@@ -1334,7 +1369,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_LOCK_TIMEOUT;
@@ -1379,7 +1417,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTER;
@@ -1400,7 +1441,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTERS;
@@ -1445,7 +1489,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't decode this filter, so it isn't valid.
msgID = MSGID_SOFTREFCACHE_INVALID_EXCLUDE_FILTER;
@@ -1466,7 +1513,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An error occurred, so the provided value must not be valid.
msgID = MSGID_SOFTREFCACHE_INVALID_EXCLUDE_FILTERS;
@@ -1567,7 +1617,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java b/opends/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java
index 6430b65..769e45c 100644
--- a/opends/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java
+++ b/opends/src/server/org/opends/server/extensions/StartTLSExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -41,7 +41,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -59,11 +61,6 @@
public class StartTLSExtendedOperation
extends ExtendedOperationHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.StartTLSExtendedOperation";
@@ -76,7 +73,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -101,8 +97,6 @@
public void initializeExtendedOperationHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperationHandler",
- String.valueOf(configEntry));
// FIXME -- Are there any configurable options that we should support?
DirectoryServer.registerSupportedExtension(OID_START_TLS_REQUEST, this);
@@ -116,7 +110,6 @@
*/
public void finalizeExtendedOperationHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeExtendedOperationHandler");
DirectoryServer.deregisterSupportedExtension(OID_START_TLS_REQUEST);
}
@@ -130,8 +123,6 @@
*/
public void processExtendedOperation(ExtendedOperation operation)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(operation));
// We should always include the StartTLS OID in the response (the same OID
@@ -186,7 +177,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.MILD_ERROR,
MSGID_STARTTLS_ERROR_ON_ENABLE,
@@ -205,7 +199,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processExtendedOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.MILD_ERROR,
MSGID_STARTTLS_ERROR_SENDING_CLEAR_RESPONSE,
diff --git a/opends/src/server/org/opends/server/extensions/StaticGroup.java b/opends/src/server/org/opends/server/extensions/StaticGroup.java
index 1f7a590..95907a0 100644
--- a/opends/src/server/org/opends/server/extensions/StaticGroup.java
+++ b/opends/src/server/org/opends/server/extensions/StaticGroup.java
@@ -57,7 +57,9 @@
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -77,11 +79,6 @@
public class StaticGroup
extends Group
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.StaticGroup";
@@ -104,7 +101,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// No initialization is required here.
}
@@ -126,9 +122,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(groupEntryDN),
- String.valueOf(memberAttributeType),
- String.valueOf(memberDNs));
ensureNotNull(groupEntryDN, memberAttributeType, memberDNs);
@@ -146,8 +139,6 @@
public void initializeGroupImplementation(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeGroupImplementation",
- String.valueOf(configEntry));
// No additional initialization is required.
}
@@ -162,7 +153,6 @@
public StaticGroup newInstance(Entry groupEntry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "newInstance", String.valueOf(groupEntry));
ensureNotNull(groupEntry);
@@ -219,7 +209,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "newInstance", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_STATICGROUP_CANNOT_DECODE_MEMBER_VALUE_AS_DN;
String message =
@@ -247,7 +240,6 @@
public SearchFilter getGroupDefinitionFilter()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getGroupDefinitionFilter");
// FIXME -- This needs to exclude enhanced groups once we have support for
// them.
@@ -264,7 +256,6 @@
@Override()
public boolean isGroupDefinition(Entry entry)
{
- assert debugEnter(CLASS_NAME, "isGroupDefinition", String.valueOf(entry));
ensureNotNull(entry);
// FIXME -- This needs to exclude enhanced groups once we have support for
@@ -300,7 +291,6 @@
@Override()
public DN getGroupDN()
{
- assert debugEnter(CLASS_NAME, "getGroupDN");
return groupEntryDN;
}
@@ -313,7 +303,6 @@
@Override()
public boolean supportsNestedGroups()
{
- assert debugEnter(CLASS_NAME, "supportsNestedGroups");
// FIXME -- We should add support for nested groups.
return false;
@@ -327,7 +316,6 @@
@Override()
public List<DN> getNestedGroupDNs()
{
- assert debugEnter(CLASS_NAME, "getNestedGroupDNs");
// FIXME -- We should add support for nested groups.
return Collections.<DN>emptyList();
@@ -342,8 +330,6 @@
public void addNestedGroup(DN nestedGroupDN)
throws UnsupportedOperationException, DirectoryException
{
- assert debugEnter(CLASS_NAME, "addNestedGroup",
- String.valueOf(nestedGroupDN));
// FIXME -- We should add support for nested groups.
throw new UnsupportedOperationException();
@@ -358,8 +344,6 @@
public void removeNestedGroup(DN nestedGroupDN)
throws UnsupportedOperationException, DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeNestedGroup",
- String.valueOf(nestedGroupDN));
// FIXME -- We should add support for nested groups.
throw new UnsupportedOperationException();
@@ -374,7 +358,6 @@
public boolean isMember(DN userDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "isMember", String.valueOf(userDN));
return memberDNs.contains(userDN);
}
@@ -388,7 +371,6 @@
public boolean isMember(Entry userEntry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "isMember", String.valueOf(userEntry));
return memberDNs.contains(userEntry.getDN());
}
@@ -402,7 +384,6 @@
public MemberList getMembers()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getMembers");
return new SimpleStaticGroupMemberList(groupEntryDN, memberDNs);
}
@@ -417,8 +398,6 @@
SearchFilter filter)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getMembers", String.valueOf(baseDN),
- String.valueOf(scope), String.valueOf(filter));
if ((baseDN == null) && (filter == null))
{
@@ -439,7 +418,6 @@
@Override()
public boolean mayAlterMemberList()
{
- assert debugEnter(CLASS_NAME, "mayAlterMemberList");
return true;
}
@@ -453,7 +431,6 @@
public void addMember(Entry userEntry)
throws UnsupportedOperationException, DirectoryException
{
- assert debugEnter(CLASS_NAME, "addMember", String.valueOf(userEntry));
ensureNotNull(userEntry);
@@ -519,7 +496,6 @@
public void removeMember(DN userDN)
throws UnsupportedOperationException, DirectoryException
{
- assert debugEnter(CLASS_NAME, "removeMember", String.valueOf(userDN));
ensureNotNull(userDN);
@@ -582,7 +558,6 @@
@Override()
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("StaticGroup(");
buffer.append(groupEntryDN);
diff --git a/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
index f5777fa..56efdae 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
@@ -59,7 +59,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -78,12 +80,6 @@
extends CertificateMapper
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions." +
- "SubjectAttributeToUserAttributeCertificateMapper";
@@ -107,7 +103,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -118,8 +113,6 @@
public void initializeCertificateMapper(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCertificateMapper",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -205,7 +198,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SATUACM_CANNOT_GET_ATTR_MAP;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -233,7 +229,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SATUACM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -251,7 +250,6 @@
*/
public void finalizeCertificateMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeCertificateMapper");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -264,8 +262,6 @@
public Entry mapCertificateToUser(Certificate[] certificateChain)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "mapCertificateToUser",
- String.valueOf(certificateChain));
// Make sure that a peer certificate was provided.
@@ -286,7 +282,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SATUACM_PEER_CERT_NOT_X509;
String message =
@@ -394,7 +393,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -410,7 +408,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -465,8 +462,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
DN configEntryDN = configEntry.getDN();
boolean configAcceptable = true;
@@ -563,7 +558,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SATUACM_CANNOT_GET_ATTR_MAP;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -592,7 +590,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SATUACM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -630,9 +631,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
DN configEntryDN = configEntry.getDN();
ResultCode resultCode = ResultCode.SUCCESS;
@@ -749,7 +747,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -781,7 +782,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
diff --git a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
index 5e0f536..f9aebd4 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
@@ -58,7 +58,9 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -75,11 +77,6 @@
extends CertificateMapper
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.SubjectDNToUserAttributeCertificateMapper";
@@ -103,7 +100,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -114,8 +110,6 @@
public void initializeCertificateMapper(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCertificateMapper",
- String.valueOf(configEntry));
this.configEntryDN = configEntry.getDN();
@@ -156,7 +150,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SDTUACM_CANNOT_GET_SUBJECT_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -184,7 +181,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeCertificateMapper", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SDTUACM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -202,7 +202,6 @@
*/
public void finalizeCertificateMapper()
{
- assert debugEnter(CLASS_NAME, "finalizeCertificateMapper");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -215,8 +214,6 @@
public Entry mapCertificateToUser(Certificate[] certificateChain)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "mapCertificateToUser",
- String.valueOf(certificateChain));
// Make sure that a peer certificate was provided.
@@ -237,7 +234,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SDTUACM_PEER_CERT_NOT_X509;
String message =
@@ -310,7 +310,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -326,7 +325,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -374,8 +372,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
DN configEntryDN = configEntry.getDN();
boolean configAcceptable = true;
@@ -416,7 +412,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SDTUACM_CANNOT_GET_SUBJECT_ATTR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -438,7 +437,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_SDTUACM_CANNOT_GET_BASE_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -476,9 +478,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
DN configEntryDN = configEntry.getDN();
ResultCode resultCode = ResultCode.SUCCESS;
@@ -527,7 +526,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -559,7 +561,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
diff --git a/opends/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java
index 956ac7e..a396167 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectEqualsDNCertificateMapper.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -44,7 +44,9 @@
import org.opends.server.types.LockManager;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -59,11 +61,6 @@
public class SubjectEqualsDNCertificateMapper
extends CertificateMapper
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.SubjectEqualsDNCertificateMapper";
@@ -76,7 +73,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -98,8 +94,6 @@
public void initializeCertificateMapper(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeCertificateMapper",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -129,8 +123,6 @@
public Entry mapCertificateToUser(Certificate[] certificateChain)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "mapCertificateToUser",
- String.valueOf(certificateChain));
// Make sure that a peer certificate was provided.
@@ -151,7 +143,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SEDCM_PEER_CERT_NOT_X509;
String message =
@@ -170,7 +165,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SEDCM_CANNOT_DECODE_SUBJECT_AS_DN;
String message = getMessage(msgID, String.valueOf(peerPrincipal),
@@ -209,7 +207,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_SEDCM_CANNOT_GET_ENTRY;
String message = getMessage(msgID, String.valueOf(subjectDN),
@@ -219,7 +220,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "mapCertificateToUser", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SEDCM_CANNOT_GET_ENTRY;
String message = getMessage(msgID, String.valueOf(subjectDN),
diff --git a/opends/src/server/org/opends/server/extensions/TLSCapableConnection.java b/opends/src/server/org/opends/server/extensions/TLSCapableConnection.java
index 2094d70..a7371b8 100644
--- a/opends/src/server/org/opends/server/extensions/TLSCapableConnection.java
+++ b/opends/src/server/org/opends/server/extensions/TLSCapableConnection.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
diff --git a/opends/src/server/org/opends/server/extensions/TLSConnectionSecurityProvider.java b/opends/src/server/org/opends/server/extensions/TLSConnectionSecurityProvider.java
index 4dc1a09..b2507ca 100644
--- a/opends/src/server/org/opends/server/extensions/TLSConnectionSecurityProvider.java
+++ b/opends/src/server/org/opends/server/extensions/TLSConnectionSecurityProvider.java
@@ -52,7 +52,9 @@
import org.opends.server.types.SSLClientAuthPolicy;
import org.opends.server.util.SelectableCertificateKeyManager;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -69,12 +71,6 @@
public class TLSConnectionSecurityProvider
extends ConnectionSecurityProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.TLSConnectionSecurityProvider";
-
/**
@@ -140,7 +136,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -165,7 +160,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(clientConnection));
this.clientConnection = clientConnection;
this.socketChannel = socketChannel;
@@ -212,8 +206,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionSecurityProvider",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TLS_SECURITY_PROVIDER_CANNOT_INITIALIZE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -292,8 +288,6 @@
public void initializeConnectionSecurityProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionSecurityProvider",
- String.valueOf(configEntry));
// Initialize default values for the connection-specific variables.
clientConnection = null;
@@ -321,7 +315,6 @@
*/
public void finalizeConnectionSecurityProvider()
{
- assert debugEnter(CLASS_NAME, "finalizeConnectionSecurityProvider");
// No implementation is required.
}
@@ -335,7 +328,6 @@
*/
public String getSecurityMechanismName()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanismName");
return SSL_CONTEXT_INSTANCE_NAME;
}
@@ -352,7 +344,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
// This should be considered secure.
return true;
@@ -381,9 +372,6 @@
SocketChannel socketChannel)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "newInstance",
- String.valueOf(clientConnection),
- String.valueOf(socketChannel));
return new TLSConnectionSecurityProvider(clientConnection, socketChannel,
this);
@@ -408,7 +396,6 @@
*/
public void disconnect(boolean connectionValid)
{
- assert debugEnter(CLASS_NAME, "disconnect");
if (connectionValid)
{
@@ -471,7 +458,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -488,7 +478,6 @@
*/
public int getClearBufferSize()
{
- assert debugEnter(CLASS_NAME, "getClearBufferSize");
return clearBufferSize;
}
@@ -505,7 +494,6 @@
*/
public int getEncodedBufferSize()
{
- assert debugEnter(CLASS_NAME, "getEncodedBufferSize");
return sslBufferSize;
}
@@ -527,7 +515,6 @@
*/
public boolean readData()
{
- assert debugEnter(CLASS_NAME, "readData");
while (true)
@@ -662,7 +649,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "readData", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
// An error occurred while trying to communicate with the client.
// Disconnect and return.
@@ -671,7 +661,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An unexpected error occurred while trying to process the data read.
// Disconnect and return.
@@ -705,7 +698,6 @@
*/
public boolean writeData(ByteBuffer clearData)
{
- assert debugEnter(CLASS_NAME, "writeData", "java.nio.ByteBuffer");
int originalPosition = clearData.position();
int originalLimit = clearData.limit();
@@ -958,7 +950,10 @@
}
catch (IOException ioe)
{
- assert debugException(CLASS_NAME, "writeData", ioe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
// An error occurred while trying to communicate with the client.
// Disconnect and return.
@@ -967,7 +962,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "writeData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// An unexpected error occurred while trying to process the data read.
// Disconnect and return.
@@ -988,7 +986,6 @@
*/
public String[] getEnabledProtocols()
{
- assert debugEnter(CLASS_NAME, "getEnabledProtocols");
return enabledProtocols;
}
@@ -1004,8 +1001,6 @@
*/
public void setEnabledProtocols(String[] enabledProtocols)
{
- assert debugEnter(CLASS_NAME, "setEnabledProtocols",
- String.valueOf(enabledProtocols));
this.enabledProtocols = enabledProtocols;
}
@@ -1019,7 +1014,6 @@
*/
public String[] getEnabledCipherSuites()
{
- assert debugEnter(CLASS_NAME, "getEnabledCipherSuites");
return enabledCipherSuites;
}
@@ -1034,8 +1028,6 @@
*/
public void setEnabledCipherSuites(String[] enabledCipherSuites)
{
- assert debugEnter(CLASS_NAME, "setEnabledCipherSuites",
- String.valueOf(enabledCipherSuites));
this.enabledCipherSuites = enabledCipherSuites;
}
@@ -1049,7 +1041,6 @@
*/
public SSLClientAuthPolicy getSSLClientAuthPolicy()
{
- assert debugEnter(CLASS_NAME, "getSSLClientAuthPolicy");
return sslClientAuthPolicy;
}
@@ -1064,8 +1055,6 @@
*/
public void setSSLClientAuthPolicy(SSLClientAuthPolicy sslClientAuthPolicy)
{
- assert debugEnter(CLASS_NAME, "setSSLClientAuthPolicy",
- String.valueOf(sslClientAuthPolicy));
this.sslClientAuthPolicy = sslClientAuthPolicy;
}
@@ -1079,7 +1068,6 @@
*/
public SSLSession getSSLSession()
{
- assert debugEnter(CLASS_NAME, "getSSLSession");
return sslEngine.getSession();
}
@@ -1097,7 +1085,6 @@
*/
public Certificate[] getClientCertificateChain()
{
- assert debugEnter(CLASS_NAME, "getClientCertificateChain");
try
{
@@ -1105,7 +1092,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getClientCertificateChain", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return null;
}
diff --git a/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java b/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
index e50758c..57f6d11 100644
--- a/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
+++ b/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
@@ -56,7 +56,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.CoreMessages.*;
@@ -72,10 +74,6 @@
extends WorkQueue
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.core.WorkQueue";
@@ -134,7 +132,6 @@
*/
public TraditionalWorkQueue()
{
- assert debugConstructor(CLASS_NAME);
// No implementation should be performed here.
}
@@ -147,8 +144,6 @@
public void initializeWorkQueue(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeWorkQueue",
- String.valueOf(configEntry));
shutdownRequested = false;
@@ -194,7 +189,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -240,7 +238,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -291,7 +292,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_CREATE_MONITOR;
String message = getMessage(msgID, TraditionalWorkQueueMonitor.class,
@@ -308,7 +312,6 @@
*/
public void finalizeWorkQueue(String reason)
{
- assert debugEnter(CLASS_NAME, "finalizeWorkQueue");
shutdownRequested = true;
@@ -326,7 +329,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processServerShutdown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_WARNING,
MSGID_QUEUE_UNABLE_TO_CANCEL, String.valueOf(o),
@@ -344,7 +350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processServerShutdown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_WARNING,
MSGID_QUEUE_UNABLE_TO_NOTIFY_THREAD, t.getName(),
@@ -363,7 +372,6 @@
*/
public boolean shutdownRequested()
{
- assert debugEnter(CLASS_NAME, "shutdownRequested");
return shutdownRequested;
}
@@ -384,7 +392,6 @@
public void submitOperation(Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "submitOperation", String.valueOf(operation));
if (shutdownRequested)
{
@@ -420,7 +427,6 @@
*/
public Operation nextOperation(TraditionalWorkerThread workerThread)
{
- assert debugEnter(CLASS_NAME, "nextOperation");
return retryNextOperation(workerThread, 0);
}
@@ -446,7 +452,6 @@
private Operation retryNextOperation(TraditionalWorkerThread workerThread,
int numFailures)
{
- assert debugEnter(CLASS_NAME, "retryNextOperation");
// See if we should kill off this thread. This could be necessary if the
@@ -477,7 +482,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "retryNextOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -537,7 +545,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "retryNextOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -573,14 +584,17 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "nextOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should not happen. The only recourse we have is to log a message
// and try again.
logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_WARNING,
MSGID_WORKER_WAITING_UNCAUGHT_EXCEPTION,
Thread.currentThread().getName(), String.valueOf(e));
- return retryNextOperation(workerThread, numFailures+1);
+ return retryNextOperation(workerThread, numFailures + 1);
}
}
@@ -597,7 +611,6 @@
*/
public boolean removeOperation(Operation operation)
{
- assert debugEnter(CLASS_NAME, "removeOperation", String.valueOf(operation));
return opQueue.remove(operation);
}
@@ -615,7 +628,6 @@
*/
public long getOpsSubmitted()
{
- assert debugEnter(CLASS_NAME, "getOpsSubmitted");
return opsSubmitted.longValue();
}
@@ -631,7 +643,6 @@
*/
public long getOpsRejectedDueToQueueFull()
{
- assert debugEnter(CLASS_NAME, "getOpsRejectedDueToQueueFull");
return queueFullRejects.longValue();
}
@@ -649,7 +660,6 @@
*/
public int size()
{
- assert debugEnter(CLASS_NAME, "size");
return opQueue.size();
}
@@ -665,7 +675,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -681,7 +690,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -724,8 +732,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List");
boolean configIsAcceptable = true;
@@ -765,7 +771,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -809,7 +818,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -843,9 +855,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ArrayList<String> resultMessages = new ArrayList<String>();
@@ -890,7 +899,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_NUM_WORKER_THREADS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -935,7 +947,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_WORK_QUEUE_CANNOT_DETERMINE_QUEUE_CAPACITY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -990,7 +1005,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -1046,7 +1064,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
}
}
}
@@ -1062,7 +1083,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -1081,7 +1105,6 @@
*/
public boolean isIdle()
{
- assert debugEnter(CLASS_NAME, "isIdle");
if (opQueue.size() > 0)
{
diff --git a/opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java b/opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java
index e704054..f9e7c9e 100644
--- a/opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java
+++ b/opends/src/server/org/opends/server/extensions/TraditionalWorkerThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -33,13 +33,15 @@
import org.opends.server.core.Operation;
import org.opends.server.types.CancelRequest;
import org.opends.server.types.CancelResult;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.DisconnectReason;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugWarning;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -54,11 +56,6 @@
public class TraditionalWorkerThread
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.core.WorkerThread";
@@ -96,8 +93,6 @@
{
super("Worker Thread " + threadID);
- assert debugConstructor(CLASS_NAME, String.valueOf(workQueue),
- String.valueOf(threadID));
this.workQueue = workQueue;
@@ -117,7 +112,6 @@
*/
public void setStoppedByReducedThreadNumber()
{
- assert debugEnter(CLASS_NAME, "setStoppedByReducedThreadNumber");
stoppedByReducedThreadNumber = true;
}
@@ -135,7 +129,6 @@
*/
public boolean isActive()
{
- assert debugEnter(CLASS_NAME, "isActive");
return (isAlive() && (operation != null));
}
@@ -148,9 +141,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
- assert debugMessage(DebugLogCategory.CORE_SERVER, DebugLogSeverity.INFO,
- CLASS_NAME, "run", getName() + " starting.");
workerThread = currentThread();
@@ -190,12 +180,14 @@
}
catch (Exception e)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME, "run",
- "Uncaught exception in worker thread while " +
- "processing operation " +
- String.valueOf(operation) + ": " + e);
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Uncaught exception in worker thread while processing " +
+ "operation %s: %s", String.valueOf(operation), e);
+
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -213,12 +205,14 @@
}
catch (Exception e2)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME, "run",
- "Exception in worker thread while trying to " +
- "log a message about an uncaught exception " + e +
- ": " + e2);
- assert debugException(CLASS_NAME, "run", e2);
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Exception in worker thread while trying to log a " +
+ "message about an uncaught exception %s: %s", e, e2);
+
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
@@ -234,12 +228,14 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "run", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
}
}
-
// If we have gotten here, then we presume that the server thread is
// shutting down. However, if that's not the case then that is a problem
// and we will want to log a message.
@@ -255,8 +251,10 @@
}
- assert debugMessage(DebugLogCategory.CORE_SERVER, DebugLogSeverity.INFO,
- CLASS_NAME, "run", getName() + " exiting.");
+ if (debugEnabled())
+ {
+ debugInfo(getName() + " exiting.");
+ }
}
@@ -267,11 +265,11 @@
*/
public void shutDown()
{
- assert debugEnter(CLASS_NAME, "shutDown");
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME, "shutDown",
- getName() + " being signaled to shut down.");
+ if (debugEnabled())
+ {
+ debugInfo(getName() + " being signaled to shut down.");
+ }
// Set a flag that indicates that the thread should stop running.
shutdownRequested = true;
@@ -287,11 +285,13 @@
}
catch (Exception e)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME, "shutDown",
- "Caught an exception while trying to interrupt " +
- "the worker thread waiting for work: " + e);
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Caught an exception while trying to interrupt the worker " +
+ "thread waiting for work: %s", e);
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
else
@@ -304,12 +304,13 @@
}
catch (Exception e)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME, "shutDown",
- "Caught an exception while trying to abandon the " +
- "operation in progress for the worker thread: " +
- e);
- assert debugException(CLASS_NAME, "shutDown", e);
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Caught an exception while trying to abandon the " +
+ "operation in progress for the worker thread: %s", e);
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java b/opends/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java
index 4008e88..5ebdf9c 100644
--- a/opends/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java
+++ b/opends/src/server/org/opends/server/extensions/WhoAmIExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.extensions;
@@ -39,7 +39,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -53,11 +52,6 @@
public class WhoAmIExtendedOperation
extends ExtendedOperationHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.extensions.WhoAmIExtendedOperation";
@@ -70,7 +64,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -95,8 +88,6 @@
public void initializeExtendedOperationHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeExtendedOperationHandler",
- String.valueOf(configEntry));
// No special configuration is required.
@@ -111,7 +102,6 @@
*/
public void finalizeExtendedOperationHandler()
{
- assert debugEnter(CLASS_NAME, "finalizeExtendedOperationHandler");
DirectoryServer.deregisterSupportedExtension(OID_WHO_AM_I_REQUEST);
}
@@ -125,8 +115,6 @@
*/
public void processExtendedOperation(ExtendedOperation operation)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(operation));
// Get the client connection and determine the DN of the user associated
@@ -142,7 +130,6 @@
return;
}
-
// Get the auth info from the client connection.
AuthenticationInfo authInfo = clientConnection.getAuthenticationInfo();
if ((authInfo == null) || (authInfo.getAuthenticationDN() == null))
@@ -154,7 +141,6 @@
return;
}
-
// Get the DN of the authenticated user and put that in the response.
// FIXME -- Do we need to support the use of an authorization ID that is
// different from the authentication ID?
diff --git a/opends/src/server/org/opends/server/extensions/package-info.java b/opends/src/server/org/opends/server/extensions/package-info.java
index 66f1bbb..b4ed4cd 100644
--- a/opends/src/server/org/opends/server/extensions/package-info.java
+++ b/opends/src/server/org/opends/server/extensions/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/interop/LazyDN.java b/opends/src/server/org/opends/server/interop/LazyDN.java
index 2af7b5a..71978c2 100644
--- a/opends/src/server/org/opends/server/interop/LazyDN.java
+++ b/opends/src/server/org/opends/server/interop/LazyDN.java
@@ -31,7 +31,9 @@
import org.opends.server.types.DN;
import org.opends.server.types.RDN;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.util.StaticUtils.*;
@@ -55,10 +57,6 @@
public class LazyDN
extends DN
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.interop.LazyDN";
@@ -89,7 +87,6 @@
*/
public LazyDN(String dnString)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dnString));
this.dnString = dnString;
this.decodedDN = null;
@@ -104,7 +101,6 @@
public boolean isNullDN()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "isNullDN");
return getDecodedDN().isNullDN();
}
@@ -118,7 +114,6 @@
public int getNumComponents()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getNumComponents");
return getDecodedDN().getNumComponents();
}
@@ -132,8 +127,6 @@
public RDN getRDN()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getRDN");
-
return getDecodedDN().getRDN();
}
@@ -146,7 +139,6 @@
public RDN getRDN(int pos)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getRDN", String.valueOf(pos));
return getDecodedDN().getRDN(pos);
}
@@ -160,7 +152,6 @@
public DN getParent()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getParent");
return getDecodedDN().getParent();
}
@@ -174,7 +165,6 @@
public DN getParentDNInSuffix()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getParentDNInSuffix");
return getDecodedDN().getParentDNInSuffix();
}
@@ -188,7 +178,6 @@
public DN concat(RDN rdn)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "concat", String.valueOf(rdn));
return getDecodedDN().concat(rdn);
}
@@ -202,7 +191,6 @@
public DN concat(RDN[] rdnComponents)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "concat", String.valueOf(rdnComponents));
return getDecodedDN().concat(rdnComponents);
}
@@ -216,7 +204,6 @@
public DN concat(DN relativeBaseDN)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "concat", String.valueOf(relativeBaseDN));
return getDecodedDN().concat(relativeBaseDN);
}
@@ -230,7 +217,6 @@
public boolean isDescendantOf(DN dn)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "isDescendantOf", String.valueOf(dn));
return getDecodedDN().isDescendantOf(dn);
}
@@ -244,7 +230,6 @@
public boolean isAncestorOf(DN dn)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "isAncestorOf", String.valueOf(dn));
return getDecodedDN().isAncestorOf(dn);
}
@@ -258,7 +243,6 @@
public boolean equals(Object o)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
return getDecodedDN().equals(o);
}
@@ -272,7 +256,6 @@
public int hashCode()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "hashCode");
return getDecodedDN().hashCode();
}
@@ -285,7 +268,6 @@
@Override()
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
return dnString;
}
@@ -298,7 +280,6 @@
@Override()
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append(dnString);
}
@@ -312,7 +293,6 @@
public String toNormalizedString()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "toNormalizedString");
return getDecodedDN().toNormalizedString();
}
@@ -326,8 +306,6 @@
public void toNormalizedString(StringBuilder buffer)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "toNormalizedString",
- "java.lang.StringBuilder");
getDecodedDN().toNormalizedString(buffer);
}
@@ -341,7 +319,6 @@
public int compareTo(DN dn)
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "compareTo", String.valueOf(dn));
return getDecodedDN().compareTo(dn);
}
@@ -358,7 +335,6 @@
private DN getDecodedDN()
throws RuntimeException
{
- assert debugEnter(CLASS_NAME, "getDecodedDN");
if (decodedDN == null)
{
@@ -368,7 +344,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getDecodedDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new RuntimeException(stackTraceToSingleLineString(e));
}
diff --git a/opends/src/server/org/opends/server/loggers/Access.java b/opends/src/server/org/opends/server/loggers/Access.java
index 41bbf66..268d018 100644
--- a/opends/src/server/org/opends/server/loggers/Access.java
+++ b/opends/src/server/org/opends/server/loggers/Access.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/ActionType.java b/opends/src/server/org/opends/server/loggers/ActionType.java
index 166ee0b..df4464b 100644
--- a/opends/src/server/org/opends/server/loggers/ActionType.java
+++ b/opends/src/server/org/opends/server/loggers/ActionType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/AsyncronousLogPublisher.java b/opends/src/server/org/opends/server/loggers/AsyncronousLogPublisher.java
new file mode 100644
index 0000000..86d32fd
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/AsyncronousLogPublisher.java
@@ -0,0 +1,262 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import org.opends.server.api.DirectoryThread;
+import org.opends.server.api.ServerShutdownListener;
+import org.opends.server.api.LogPublisher;
+import org.opends.server.core.DirectoryServer;
+
+import java.util.concurrent.ConcurrentLinkedQueue;
+
+/**
+ * A LogPublisher which publishes log records asynchronously to a
+ * wrapped LogPublisher. In this way, any LogPublisher may be made to
+ * behave asynchronously - i.e. callers of LogPublisher#publish(LogRecord) will
+ * not block waiting for the record to be published. Note that this
+ * means that the ErrorHandler will receive logging exceptions asynchronously
+ * as well.
+ */
+public class AsyncronousLogPublisher
+ implements ServerShutdownListener, LogPublisher
+{
+ /** The wrapped LogPublisher. */
+ private final LogPublisher publisher;
+
+ /** Queue to store unpublished records. */
+ private final ConcurrentLinkedQueue<PublishRequest> queue;
+
+ private String name;
+ private int interval;
+ private boolean stopRequested;
+ private PublisherThread publisherThread;
+
+ /**
+ * Structure encapsulating a queued publish request.
+ */
+ private static class PublishRequest
+ {
+ public final LogRecord record;
+ public final LogErrorHandler handler;
+
+ PublishRequest(LogRecord record, LogErrorHandler handler)
+ {
+ this.record = record;
+ this.handler = handler;
+ }
+ }
+
+ /**
+ * Construct a new AsyncronousLogPublisher wrapper.
+ *
+ * @param name the name of the thread.
+ * @param interval the interval at which the queue will be flushed.
+ * @param publisher the publisher to wrap around.
+ */
+ public AsyncronousLogPublisher(String name, int interval,
+ LogPublisher publisher)
+ {
+ this.name = name;
+ this.interval = interval;
+ this.publisher = publisher;
+
+ this.queue = new ConcurrentLinkedQueue<PublishRequest>();
+ this.publisherThread = null;
+ this.stopRequested = false;
+
+ // We will lazily launch the publisherThread
+ // to ensure initialization safety.
+
+ DirectoryServer.registerShutdownListener(this);
+ }
+
+ /**
+ * The publisher thread is responsible for emptying the queue of log records
+ * waiting to published.
+ */
+ private class PublisherThread extends DirectoryThread
+ {
+ public PublisherThread()
+ {
+ super(name);
+ }
+ /**
+ * the run method of the publisherThread. Run until queue is empty
+ * AND we've been asked to terminate
+ */
+ public void run()
+ {
+ while (!isShuttingDown() || !queue.isEmpty()) {
+ PublishRequest request= null;
+ try {
+ request= queue.poll();
+ if (request != null) {
+ publisher.publish(request.record, request.handler);
+ }
+ else
+ {
+ sleep(interval);
+ }
+ }
+ catch (InterruptedException ex) {
+ // Ignore. We'll rerun the loop
+ // and presumably fall out.
+ }
+ catch (Throwable t) {
+ // Forward exception to error handler
+ if (request != null && request.handler != null) {
+ LogErrorHandler handler= request.handler;
+ handler.handleError(request.record, t);
+ }
+ }
+ }
+ }
+ }
+
+ // Method needs to be synchronized with _shutdown mutator, as we don't
+ // want shutdown to start after we check for it, but before we queue
+ // request.
+ private synchronized void publishAsynchronously(LogRecord record,
+ LogErrorHandler handler)
+ {
+ // If shutting down reject, otherwise publish (if we have a publisher!)
+ if (isShuttingDown()) {
+ if (handler != null) {
+ handler.handleError(record, new Exception("Shutdown requested."));
+ }
+ }
+ else {
+ // Launch writer publisherThread if not running. Make sure start is
+ // only called ONCE by a publisherThread.
+ if (publisherThread == null) {
+ publisherThread = new PublisherThread();
+ publisherThread.start();
+ }
+ // Put request on queue for writer
+ queue.add(new PublishRequest(record, handler));
+ }
+ }
+
+ /**
+ * Publish the log record asyncronously.
+ *
+ * @param record the log record to publish.
+ * @param handler the error handler to use if an error occurs.
+ */
+ public void publish(LogRecord record, LogErrorHandler handler)
+ {
+ // No publisher? Off to the bit bucket.
+ if (publisher != null) {
+ try {
+ // Enqueue record; writer will pick it up later.
+ publishAsynchronously(record, handler);
+ }
+ catch (Throwable t) {
+ // Forward a logging exception to the error handler
+ handler.handleError(record, t);
+ }
+ }
+ }
+
+ /**
+ * Retrieves the human-readable name for this shutdown listener.
+ *
+ * @return The human-readable name for this shutdown listener.
+ */
+ public String getShutdownListenerName()
+ {
+ return "AsyncronousLogPublisher Thread " + name;
+ }
+
+ /**
+ * Indicates that the Directory Server has received a request to stop running
+ * and that this shutdown listener should take any action necessary to prepare
+ * for it.
+ *
+ * @param reason The human-readable reason for the shutdown.
+ */
+ public void processServerShutdown(String reason)
+ {
+ shutdown(true);
+ }
+
+ /**
+ * Queries whether the publisher is in shutdown mode.
+ */
+ private synchronized boolean isShuttingDown()
+ {
+ return stopRequested;
+ }
+
+ /**
+ * Tell the publisher to start shutting down.
+ */
+ private synchronized void startShutDown()
+ {
+ stopRequested = true;
+ }
+
+ /**
+ * Shutdown the publisher.
+ */
+ public void shutdown()
+ {
+ shutdown(true);
+ DirectoryServer.deregisterShutdownListener(this);
+ }
+
+ private void shutdown(boolean shutdownWrapped)
+ {
+ startShutDown();
+
+ // Wait for publisher thread to terminate
+ while (publisherThread != null && publisherThread.isAlive()) {
+ try {
+ publisherThread.join();
+ }
+ catch (InterruptedException ex) {
+ // Ignore; we gotta wait..
+ }
+ }
+
+ // The writer publisherThread SHOULD have drained the queue.
+ // If not, handle outstanding requests ourselves,
+ // indicating the request was not processed due to shutdown.
+ while (!queue.isEmpty()) {
+ PublishRequest request= queue.poll();
+ if (request != null) {
+ if (request.handler != null) {
+ request.handler.handleError(request.record,
+ new Exception("Shutdown requested."));
+ }
+ }
+ }
+
+ // Shutdown the wrapped publisher.
+ if (shutdownWrapped && publisher != null) publisher.shutdown();
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/Debug.java b/opends/src/server/org/opends/server/loggers/Debug.java
deleted file mode 100644
index b5c3833..0000000
--- a/opends/src/server/org/opends/server/loggers/Debug.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.loggers;
-
-
-
-import java.nio.ByteBuffer;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.opends.server.api.DebugLogger;
-import org.opends.server.api.ProtocolElement;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-
-
-
-
-/**
- * This class defines the wrapper that will invoke all registered debug loggers
- * for each type of debugging that may be performed.
- */
-public class Debug
-{
- // The set of debug loggers that have been registered with the server. It
- // will initially be empty.
- private static CopyOnWriteArrayList<DebugLogger> debugLoggers =
- new CopyOnWriteArrayList<DebugLogger>();
-
- // A mutex that will be used to provide threadsafe access to methods changing
- // the set of defined loggers.
- private static ReentrantLock loggerMutex = new ReentrantLock();
-
-
-
- /**
- * Adds a new debug logger to which debug messages should be sent.
- *
- * @param logger The debug logger to which messages should be sent.
- */
- public static void addDebugLogger(DebugLogger logger)
- {
- loggerMutex.lock();
-
- try
- {
- for (DebugLogger l : debugLoggers)
- {
- if (l.equals(logger))
- {
- return;
- }
- }
-
- debugLoggers.add(logger);
- }
- catch (Exception e)
- {
- // This should never happen.
- e.printStackTrace();
- }
- finally
- {
- loggerMutex.unlock();
- }
- }
-
-
-
- /**
- * Removes the provided debug logger so it will no longer be sent any new
- * debug messages.
- *
- * @param logger The debug logger to remove from the set.
- */
- public static void removeDebugLogger(DebugLogger logger)
- {
- loggerMutex.lock();
-
- try
- {
- debugLoggers.remove(logger);
- }
- catch (Exception e)
- {
- // This should never happen.
- e.printStackTrace();
- }
- finally
- {
- loggerMutex.unlock();
- }
- }
-
-
-
- /**
- * Removes all active debug loggers so that no debug messages will be sent
- * anywhere.
- *
- * @param closeLoggers Indicates whether the loggers should be closed as
- * they are unregistered.
- */
- public static void removeAllDebugLoggers(boolean closeLoggers)
- {
- loggerMutex.lock();
-
- try
- {
- if (closeLoggers)
- {
- DebugLogger[] loggers = new DebugLogger[debugLoggers.size()];
- debugLoggers.toArray(loggers);
-
- debugLoggers.clear();
-
- for (DebugLogger logger : loggers)
- {
- logger.closeDebugLogger();
- }
- }
- else
- {
- debugLoggers.clear();
- }
- }
- catch (Exception e)
- {
- // This should never happen.
- e.printStackTrace();
- }
- finally
- {
- loggerMutex.unlock();
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified raw data
- * was read.
- *
- * @param className The fully-qualified name of the Java class in which the
- * data was read.
- * @param methodName The name of the method in which the data was read.
- * @param buffer The byte buffer containing the data that has been read.
- * The byte buffer must be in the same state when this
- * method returns as when it was entered.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugBytesRead(String className, String methodName,
- ByteBuffer buffer)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugBytesRead(className, methodName, buffer);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified raw data
- * was written.
- *
- * @param className The fully-qualified name of the Java class in which the
- * data was written.
- * @param methodName The name of the method in which the data was written.
- * @param buffer The byte buffer containing the data that has been
- * written. The byte buffer must be in the same state
- * when this method returns as when it was entered.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugBytesWritten(String className, String methodName,
- ByteBuffer buffer)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugBytesWritten(className, methodName, buffer);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the constructor for
- * the specified class has been invoked.
- *
- * @param className The fully-qualified name of the Java class whose
- * constructor has been invoked.
- * @param args The set of arguments provided for the constructor.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugConstructor(String className, String... args)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugConstructor(className, args);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified method
- * has been entered.
- *
- * @param className The fully-qualified name of the Java class in which the
- * specified method resides.
- * @param methodName The name of the method that has been entered.
- * @param args The set of arguments provided to the method.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugEnter(String className, String methodName,
- String... args)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugEnter(className, methodName, args);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a generic message to the debug logger using the provided
- * information.
- *
- * @param category The category associated with this debug message.
- * @param severity The severity associated with this debug message.
- * @param className The fully-qualified name of the Java class in which the
- * debug message was generated.
- * @param methodName The name of the method in which the debug message was
- * generated.
- * @param message The actual contents of the debug message.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugMessage(DebugLogCategory category,
- DebugLogSeverity severity,
- String className, String methodName,
- String message)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugMessage(category, severity, className, methodName, message);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger containing information from the
- * provided exception that was thrown.
- *
- * @param className The fully-qualified name of the Java class in which the
- * exception was thrown.
- * @param methodName The name of the method in which the exception was
- * thrown.
- * @param exception The exception that was thrown.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugException(String className, String methodName,
- Throwable exception)
- {
-// exception.printStackTrace();
-
-
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugException(className, methodName, exception);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been read.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was read.
- * @param methodName The name of the method in which the protocol
- * element was read.
- * @param protocolElement The protocol element that was read.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugProtocolElementRead(String className,
- String methodName,
- ProtocolElement
- protocolElement)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugProtocolElementRead(className, methodName, protocolElement);
- }
-
- return true;
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been written.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was written.
- * @param methodName The name of the method in which the protocol
- * element was written.
- * @param protocolElement The protocol element that was written.
- *
- * @return <CODE>true</CODE>, so that this method can be used in assertions
- * for conditional execution.
- */
- public static boolean debugProtocolElementWritten(String className,
- String methodName,
- ProtocolElement
- protocolElement)
- {
- for (DebugLogger logger : debugLoggers)
- {
- logger.debugProtocolElementWritten(className, methodName,
- protocolElement);
- }
-
- return true;
- }
-}
-
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryAccessLogger.java b/opends/src/server/org/opends/server/loggers/DirectoryAccessLogger.java
index 25502e4..4b5d3ee 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryAccessLogger.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryAccessLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryAuditLogger.java b/opends/src/server/org/opends/server/loggers/DirectoryAuditLogger.java
index 09be7c9..5f7175a 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryAuditLogger.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryAuditLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryDebugLogger.java b/opends/src/server/org/opends/server/loggers/DirectoryDebugLogger.java
deleted file mode 100644
index 07d521e..0000000
--- a/opends/src/server/org/opends/server/loggers/DirectoryDebugLogger.java
+++ /dev/null
@@ -1,738 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006-2007 Sun Microsystems, Inc.
- */
-package org.opends.server.loggers;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.opends.server.api.ConfigurableComponent;
-import org.opends.server.api.DebugLogger;
-import org.opends.server.api.ProtocolElement;
-import org.opends.server.config.ConfigAttribute;
-import org.opends.server.config.ConfigEntry;
-import org.opends.server.config.ConfigException;
-import org.opends.server.config.MultiChoiceConfigAttribute;
-import org.opends.server.config.StringConfigAttribute;
-import org.opends.server.core.DirectoryServer;
-import org.opends.server.types.ConfigChangeResult;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-import org.opends.server.types.DN;
-import org.opends.server.types.ResultCode;
-import org.opends.server.util.StaticUtils;
-import org.opends.server.util.ServerConstants;
-
-import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.messages.ConfigMessages.*;
-import static org.opends.server.messages.LoggerMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
-
-
-
-/**
- * This class defines the debug logger.
- */
-public class DirectoryDebugLogger extends DebugLogger
- implements ConfigurableComponent
-{
- private static final int DEFAULT_TIME_INTERVAL = 30000;
- private static final int DEFAULT_BUFFER_SIZE = 0;
- // The underlying JDK logger.
- private Logger debugLogger = null;
- private DirectoryFileHandler fileHandler = null;
-
- // The hash map that will be used to define specific log severities for the
- // various categories.
- private HashMap<DebugLogCategory,HashSet<DebugLogSeverity>> definedSeverities;
-
- // The set of default log severities that will be used if no custom severities
- // have been defined for the associated category.
- private HashSet<DebugLogSeverity> defaultSeverities;
-
- // The DN of the config entry this component is associated with.
- private DN configDN;
-
- /**
- * Initializes this debug logger based on the information in the provided
- * configuration entry.
- *
- * @param configEntry The configuration entry that contains the information
- * to use to initialize this debug logger.
- *
- * @throws ConfigException If an unrecoverable problem arises in the
- * process of performing the initialization.
- */
-
- public void initializeDebugLogger(ConfigEntry configEntry)
- throws ConfigException
- {
- configDN = configEntry.getDN();
- defaultSeverities = new HashSet<DebugLogSeverity>();
-
- HashSet<String> allowedValues = new HashSet<String> ();
- for(DebugLogSeverity sev : DebugLogSeverity.values())
- {
- allowedValues.add(sev.toString().toLowerCase());
- }
-
- List<String> defSev = getSeverities(configEntry,
- ATTR_LOGGER_DEFAULT_SEVERITY,
- allowedValues);
-
- if(defSev.isEmpty())
- {
- defaultSeverities.add(DebugLogSeverity.ERROR);
- defaultSeverities.add(DebugLogSeverity.WARNING);
- } else
- {
- for(String defStr : defSev)
- {
- DebugLogSeverity debugSeverity = DebugLogSeverity.getByName(defStr);
- if(debugSeverity != null)
- {
- defaultSeverities.add(debugSeverity);
- } else
- {
- System.err.println("Ignoring invalid severity name:" + defStr);
- }
- }
- }
-
-
- definedSeverities =
- new HashMap<DebugLogCategory,HashSet<DebugLogSeverity>>();
-
- HashSet<String> allowedSeverityValues = new HashSet<String> ();
- for(DebugLogCategory cat : DebugLogCategory.values())
- {
- for(DebugLogSeverity sev : DebugLogSeverity.values())
- {
- String val = cat.toString().toLowerCase() + "=" +
- sev.toString().toLowerCase();
- allowedSeverityValues.add(val);
- }
- }
-
- List<String> overrideSeverities = getSeverities(configEntry,
- ATTR_LOGGER_OVERRIDE_SEVERITY,
- allowedSeverityValues);
-
- for(String overrideSeverity: overrideSeverities)
- {
- if(overrideSeverity != null)
- {
- int equalPos = overrideSeverity.indexOf('=');
- if (equalPos < 0)
- {
- System.err.println("Invalid override of severity level. Ignoring...");
- } else
- {
- String categoryName = overrideSeverity.substring(0, equalPos);
- DebugLogCategory category = DebugLogCategory.getByName(categoryName);
- if (category == null)
- {
- System.err.println("Invalid debug log category. Ignoring ...");
- } else
- {
- HashSet<DebugLogSeverity> severities =
- new HashSet<DebugLogSeverity>();
- StringTokenizer sevTokenizer =
- new StringTokenizer(overrideSeverity.substring(equalPos+1), ",");
- while (sevTokenizer.hasMoreElements())
- {
- String severityName = sevTokenizer.nextToken();
- DebugLogSeverity severity =
- DebugLogSeverity.getByName(severityName);
- if (severity == null)
- {
- System.err.println("Invalid debug log severity. Ignoring ...");
- } else
- {
- severities.add(severity);
- }
- }
- definedSeverities.put(category, severities);
- }
- }
- }
- }
-
- StringConfigAttribute logFileStub =
- new StringConfigAttribute(ATTR_LOGGER_FILE,
- getMessage(MSGID_CONFIG_LOGGER_DESCRIPTION_CLASS_NAME),
- true, false, true);
-
- StringConfigAttribute logFileNameAttr = (StringConfigAttribute)
- configEntry.getConfigAttribute(logFileStub);
-
- if(logFileNameAttr == null)
- {
- int msgID = MSGID_CONFIG_LOGGER_NO_FILE_NAME;
- String message = getMessage(msgID, configEntry.getDN().toString());
- throw new ConfigException(msgID, message);
- }
-
- debugLogger =
- Logger.getLogger("org.opends.server.loggers.DirectoryDebugLogger");
- debugLogger.setLevel(Level.ALL);
-
- File logFile = new File(logFileNameAttr.activeValue());
- if(!logFile.isAbsolute())
- {
- logFile = new File(DirectoryServer.getServerRoot() + File.separator +
- logFileNameAttr.activeValue());
- }
-
- try
- {
- int bufferSize = RotationConfigUtil.getIntegerAttribute(configEntry,
- ATTR_LOGGER_BUFFER_SIZE, MSGID_LOGGER_BUFFER_SIZE);
- if(bufferSize == -1)
- {
- bufferSize = DEFAULT_BUFFER_SIZE;
- }
-
- fileHandler = new DirectoryFileHandler(configEntry,
- logFile.getAbsolutePath(),
- bufferSize);
- fileHandler.setFormatter(new DirectoryFileFormatter(false));
- debugLogger.addHandler(fileHandler);
-
- int threadTimeInterval = RotationConfigUtil.getIntegerAttribute(
- configEntry, ATTR_LOGGER_THREAD_INTERVAL,
- MSGID_LOGGER_THREAD_INTERVAL);
- if(threadTimeInterval == -1)
- {
- threadTimeInterval = DEFAULT_TIME_INTERVAL;
- }
-
- LoggerThread lt = new LoggerThread("DebugLogger Thread",
- threadTimeInterval, fileHandler, null, null);
- lt.start();
- } catch(IOException ioe)
- {
- int msgID = MSGID_LOG_DEBUG_CANNOT_ADD_FILE_HANDLER;
- String message = getMessage(msgID, String.valueOf(ioe));
- throw new ConfigException(msgID, message, ioe);
- }
- }
-
-
-
- /**
- * Closes this debug logger and releases any resources it might have held.
- */
- public void closeDebugLogger()
- {
- // FIXME -- Take any appropriate action here.
- fileHandler.close();
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified raw
- * data was read.
- *
- * @param className The fully-qualified name of the Java class in which
- * the data was read.
- * @param methodName The name of the method in which the data was read.
- * @param buffer The byte buffer containing the data that has been
- * read.
- * The byte buffer must be in the same state when this
- * method returns as when it was entered.
- */
- public void debugBytesRead(String className, String methodName,
- ByteBuffer buffer)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.DATA_READ);
-
- if(severities == null)
- {
- severities = defaultSeverities;
- }
-
- if(severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder sb = new StringBuilder();
- sb.append("Bytes Read:").
- append("classname=").append(className).
- append(" methodname=").append(methodName).
- append(" bytebuffer=").
- append(ServerConstants.EOL);
- StaticUtils.byteArrayToHexPlusAscii(sb, buffer, 4);
-
- debugLogger.log(DirectoryLogLevel.COMMUNICATION, sb.toString());
- }
- }
-
-
-
- /**
- * Writes a msg to the debug logger indicating that the specified raw data
- * was written.
- *
- * @param className The fully-qualified name of the class in which the
- * data was written.
- * @param methodName The name of the method in which the data was written.
- * @param buffer The byte buffer containing the data that has been
- * written. The byte buffer must be in the same state
- * when this method returns as when it was entered.
- */
- public void debugBytesWritten(String className, String methodName,
- ByteBuffer buffer)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.DATA_WRITE);
-
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder sb = new StringBuilder();
- sb.append("Bytes Written:").
- append("classname=").append(className).
- append(" methodname=").append(methodName).
- append(" bytebuffer=").
- append(ServerConstants.EOL);
- StaticUtils.byteArrayToHexPlusAscii(sb, buffer, 4);
-
- debugLogger.log(DirectoryLogLevel.COMMUNICATION, sb.toString());
- }
- }
-
-
- /**
- * Writes a message to the debug logger indicating that the constructor for
- * the specified class has been invoked.
- *
- * @param className The fully-qualified name of the Java class whose
- * constructor has been invoked.
- * @param args The set of arguments provided for the constructor.
- */
- public void debugConstructor(String className, String... args)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.CONSTRUCTOR);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.INFO))
- {
- if (args.length == 0)
- {
- debugLogger.log(DirectoryLogLevel.INFO, "CONSTRUCTOR " + className);
- }
- else
- {
- StringBuilder sb = new StringBuilder();
- sb.append(args[0]);
- for(int i = 1; i < args.length; i++)
- {
- sb.append(",").append(args[i]);
- }
- debugLogger.log(DirectoryLogLevel.INFO,
- "CONSTRUCTOR " + className +
- " (" + sb.toString() + ")");
- }
- }
-
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified method
- * has been entered.
- *
- * @param className The fully-qualified name of the Java class in which the
- * specified method resides.
- * @param methodName The name of the method that has been entered.
- * @param args The set of arguments provided to the method.
- */
- public void debugEnter(String className, String methodName, String... args)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.METHOD_ENTER);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.INFO))
- {
- if (args.length == 0)
- {
- debugLogger.log(DirectoryLogLevel.INFO,
- "Entered method:" + className + ":" + methodName);
- }
- else
- {
- StringBuilder sb = new StringBuilder();
- sb.append(args[0]);
- for(int i = 1; i < args.length; i++)
- {
- sb.append(",").append(args[i]);
- }
- debugLogger.log(DirectoryLogLevel.INFO,
- "Entered method:" + className + ":" + methodName
- + ":" + sb.toString());
- }
- }
- }
-
-
- /**
- * Writes a generic message to the debug logger using the provided
- * information.
- *
- * @param category The category associated with this debug message.
- * @param severity The severity associated with this debug message.
- * @param className The fully-qualified name of the Java class in which the
- * debug message was generated.
- * @param methodName The name of the method in which the debug message was
- * generated.
- * @param message The actual contents of the debug message.
- */
- public void debugMessage(DebugLogCategory category,
- DebugLogSeverity severity,
- String className, String methodName,
- String message)
- {
-
- HashSet<DebugLogSeverity> severities = definedSeverities.get(category);
- if(severities == null)
- {
- severities = defaultSeverities;
- }
-
- if(severities.contains(severity))
- {
- // FIXME - lookup the level based on the severity.
- debugLogger.log(DirectoryLogLevel.INFO,
- "classname:" + className + " methodname:" + methodName
- + ":" + message);
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger containing information from the
- * provided exception that was thrown.
- *
- * @param className The fully-qualified name of the Java class in which the
- * exception was thrown.
- * @param methodName The name of the method in which the exception was
- * thrown.
- * @param exception The exception that was thrown.
- */
- public void debugException(String className, String methodName,
- Throwable exception)
- {
-
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.EXCEPTION);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.ERROR))
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append("classname=").append(className).
- append(" methodname=").append(methodName).append("\n").
- append( StaticUtils.stackTraceToString(exception));
-
- debugLogger.log(DirectoryLogLevel.ERROR, buffer.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been read.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was read.
- * @param methodName The name of the method in which the protocol
- * element was read.
- * @param protocolElement The protocol element that was read.
- */
- public void debugProtocolElementRead(String className, String methodName,
- ProtocolElement protocolElement)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.PROTOCOL_READ);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append("classname=").append(className).
- append(" methodname=").append(methodName);
- protocolElement.toString(buffer, 4);
- debugLogger.log(DirectoryLogLevel.COMMUNICATION, buffer.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been written.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was written.
- * @param methodName The name of the method in which the protocol
- * element was written.
- * @param protocolElement The protocol element that was written.
- */
- public void debugProtocolElementWritten(String className, String methodName,
- ProtocolElement protocolElement)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.PROTOCOL_WRITE);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder buffer = new StringBuilder();
- buffer.append("classname=").append(className).
- append(" methodname=").append(methodName);
- protocolElement.toString(buffer, 4);
- debugLogger.log(DirectoryLogLevel.COMMUNICATION, buffer.toString());
- }
- }
-
-
- /**
- * Retrieves the hash code for this access logger.
- *
- * @return The hash code for this access logger.
- */
- public int hashCode()
- {
- return debugLogger.hashCode();
- }
-
-
- /**
- * Retrieves the DN of the configuration entry with which this component is
- * associated.
- *
- * @return The DN of the configuration entry with which this component is
- * associated.
- */
- public DN getConfigurableComponentEntryDN()
- {
- return configDN;
- }
-
-
-
- /**
- * Retrieves the set of configuration attributes that are associated with this
- * configurable component.
- *
- * @return The set of configuration attributes that are associated with this
- * configurable component.
- */
- public List<ConfigAttribute> getConfigurationAttributes()
- {
- // NYI
- return null;
- }
-
-
-
- /**
- * Indicates whether the provided object is equal to this access logger.
- *
- * @param obj The object for which to make the determination.
- *
- * @return <CODE>true</CODE> if the provided object is determined to be equal
- * to this access logger, or <CODE>false</CODE> if not.
- */
- public boolean equals(Object obj)
- {
- if(this == obj)
- {
- return true;
- }
-
- if((obj == null) || (obj.getClass() != this.getClass()))
- {
- return false;
- }
- return debugLogger.equals(obj);
- }
-
- /**
- * Indicates whether the configuration entry that will result from a proposed
- * modification is acceptable to this change listener.
- *
- * @param configEntry The configuration entry that will result from
- * the requested update.
- * @param unacceptableReasons A buffer to which this method can append a
- * human-readable message explaining why the
- * proposed change is not acceptable.
- *
- * @return <CODE>true</CODE> if the proposed entry contains an acceptable
- * configuration, or <CODE>false</CODE> if it does not.
- */
- public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
- List<String> unacceptableReasons)
- {
- try
- {
- StringConfigAttribute logFileStub =
- new StringConfigAttribute(ATTR_LOGGER_FILE,
- getMessage(MSGID_CONFIG_LOGGER_DESCRIPTION_CLASS_NAME),
- true, false, true);
- StringConfigAttribute logFileNameAttr = (StringConfigAttribute)
- configEntry.getConfigAttribute(logFileStub);
-
- if(logFileNameAttr == null)
- {
- int msgID = MSGID_CONFIG_LOGGER_NO_FILE_NAME;
- String message = getMessage(msgID, configEntry.getDN().toString());
- unacceptableReasons.add(message);
- return false;
- }
- } catch (ConfigException ce)
- {
- int msgID = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
- String message = getMessage(msgID, this.getClass().getName(),
- configEntry.getDN().toString(),
- String.valueOf(ce));
- unacceptableReasons.add(message);
- return false;
- }
-
- return true;
- }
-
-
-
- /**
- * Attempts to apply a new configuration to this Directory Server component
- * based on the provided changed entry.
- *
- * @param configEntry The configuration entry that containing the
- * updated configuration for this component.
- * @param detailedResults Indicates whether to provide detailed information
- * about any changes applied.
- *
- * @return Information about the result of processing the configuration
- * change.
- */
- public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
- boolean detailedResults)
- {
- fileHandler.close();
- try
- {
- initializeDebugLogger(configEntry);
- } catch(ConfigException ce)
- {
- return new ConfigChangeResult(DirectoryServer.getServerErrorResultCode(),
- false);
- }
- return new ConfigChangeResult(ResultCode.SUCCESS, false);
- }
-
- /**
- * Return the severities based on the attribute name from the specified
- * config entry.
- *
- * @param configEntry The configuration entry that containing the updated
- * configuration for this component.
- * @param attrName The attribute name for which to return the severity
- * values.
- * @param allowedValues The possible set of severity values that may be
- * used.
- *
- * @return The list of values for the severity attribute.
- */
-
- private List<String> getSeverities(ConfigEntry configEntry,
- String attrName, Set<String> allowedValues)
- {
- ArrayList<String> values = new ArrayList<String>();
- MultiChoiceConfigAttribute severityStub =
- new MultiChoiceConfigAttribute(attrName,
- getMessage(MSGID_CONFIG_LOGGER_DESCRIPTION_CLASS_NAME),
- false, true, true, allowedValues);
-
- MultiChoiceConfigAttribute severityAttr = null;
- try
- {
- severityAttr = (MultiChoiceConfigAttribute)
- configEntry.getConfigAttribute(severityStub);
- } catch(ConfigException ce)
- {
- ce.printStackTrace();
- // FIXME - handle exception
- System.err.println("Cannot retrieve the config value for:" + attrName);
- return values;
- }
-
- if(severityAttr == null)
- {
- return values;
- }
-
- return severityAttr.activeValues();
- }
-
-
-}
-
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryErrorLogger.java b/opends/src/server/org/opends/server/loggers/DirectoryErrorLogger.java
index 996e89d..e780174 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryErrorLogger.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryErrorLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryFileFormatter.java b/opends/src/server/org/opends/server/loggers/DirectoryFileFormatter.java
index 1455c73..e974e40 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryFileFormatter.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryFileFormatter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryFileHandler.java b/opends/src/server/org/opends/server/loggers/DirectoryFileHandler.java
index d3865d9..7422a78 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryFileHandler.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryFileHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/DirectoryLogLevel.java b/opends/src/server/org/opends/server/loggers/DirectoryLogLevel.java
index d81291a..178572e 100644
--- a/opends/src/server/org/opends/server/loggers/DirectoryLogLevel.java
+++ b/opends/src/server/org/opends/server/loggers/DirectoryLogLevel.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -116,48 +116,6 @@
"STARTUP", CoreMessages.MSGID_ERROR_SEVERITY_STARTUP_DEBUG);
-
- /**
- * The log level that will be used for verbose messages.
- */
- public static final Level VERBOSE = new DirectoryLogLevel(
- "VERBOSE", CoreMessages.MSGID_DEBUG_SEVERITY_VERBOSE);
-
-
-
- /**
- * The log level that will be used for informational messages.
- */
- public static final Level INFO = new DirectoryLogLevel(
- "INFO", CoreMessages.MSGID_DEBUG_SEVERITY_INFO);
-
-
-
- /**
- * The log level that will be used for warning messages.
- */
- public static final Level WARNING = new DirectoryLogLevel(
- "WARNING", CoreMessages.MSGID_DEBUG_SEVERITY_WARNING);
-
-
-
- /**
- * The log level that will be used for error messages.
- */
- public static final Level ERROR = new DirectoryLogLevel(
- "ERROR", CoreMessages.MSGID_DEBUG_SEVERITY_ERROR);
-
-
-
- /**
- * The log level that will be used for messages related to client
- * communication.
- */
- public static final Level COMMUNICATION = new DirectoryLogLevel(
- "COMMUNICATION", CoreMessages.MSGID_DEBUG_SEVERITY_COMMUNICATION);
-
-
-
/**
* Constructor for the DirectoryLogLevel class.
*
diff --git a/opends/src/server/org/opends/server/loggers/EncryptAction.java b/opends/src/server/org/opends/server/loggers/EncryptAction.java
index 9cb3714..c6caa04 100644
--- a/opends/src/server/org/opends/server/loggers/EncryptAction.java
+++ b/opends/src/server/org/opends/server/loggers/EncryptAction.java
@@ -22,25 +22,18 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import java.io.File;
-import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a post rotation action that encrypts
* the log file.
*/
public class EncryptAction implements PostRotationAction
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.loggers.EncryptAction";
private File originalFile;
private String newFile;
diff --git a/opends/src/server/org/opends/server/loggers/Error.java b/opends/src/server/org/opends/server/loggers/Error.java
index 171c7ef..dcb247e 100644
--- a/opends/src/server/org/opends/server/loggers/Error.java
+++ b/opends/src/server/org/opends/server/loggers/Error.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/FileComparator.java b/opends/src/server/org/opends/server/loggers/FileComparator.java
index 272fc1b..793b1f4 100644
--- a/opends/src/server/org/opends/server/loggers/FileComparator.java
+++ b/opends/src/server/org/opends/server/loggers/FileComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/FileNamingPolicy.java b/opends/src/server/org/opends/server/loggers/FileNamingPolicy.java
new file mode 100644
index 0000000..d13cd4e
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/FileNamingPolicy.java
@@ -0,0 +1,50 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import java.io.File;
+
+/**
+ * A FileNamingPolicy is used by a MultiFileWriter to generate the
+ * sequence of file names to use when writing.
+ */
+public interface FileNamingPolicy
+{
+ /**
+ * Initializes the policy and returns the current name to use.
+ *
+ * @return the initial file.
+ */
+ public File getInitialName();
+
+ /**
+ * Gets the next name to use.
+ *
+ * @return the next file.
+ */
+ public File getNextName();
+}
diff --git a/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java b/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
index 6908ae3..f03f7cb 100644
--- a/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/FileNumberRetentionPolicy.java
@@ -22,23 +22,19 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import java.io.File;
import java.util.Arrays;
-import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a retention policy based on the number of files.
* Files will be cleaned up based on the number of files on disk.
*/
public class FileNumberRetentionPolicy implements RetentionPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.FileNumberRetentionPolicy";
private int numFiles = 0;
private File directory = null;
@@ -53,8 +49,7 @@
*/
public FileNumberRetentionPolicy(String dir, String prefix, int numFiles)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dir),
- String.valueOf(prefix), String.valueOf(numFiles));
+
this.numFiles = numFiles;
this.directory = new File(dir);
this.prefix = prefix;
@@ -68,11 +63,11 @@
*/
public int deleteFiles()
{
- assert debugEnter(CLASS_NAME, "deleteFiles");
+
int count = 0;
File[] selectedFiles = directory.listFiles(new LogFileFilter(prefix));
- if(selectedFiles.length <= numFiles)
+ if (selectedFiles.length <= numFiles)
{
return 0;
}
@@ -80,7 +75,7 @@
// Sort files based on last modified time.
Arrays.sort(selectedFiles, new FileComparator());
- for(int j = numFiles; j < selectedFiles.length; j++)
+ for (int j = numFiles; j < selectedFiles.length; j++)
{
// System.out.println("Deleting log file:" + selectedFiles[j]);
selectedFiles[j].delete();
diff --git a/opends/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java b/opends/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java
index 4dc3d21..0ca8b42 100644
--- a/opends/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/FixedTimeRotationPolicy.java
@@ -22,18 +22,17 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import java.util.Calendar;
import java.util.GregorianCalendar;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.util.TimeThread;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
/**
* This class implements a rotation policy based on fixed
@@ -41,8 +40,6 @@
*/
public class FixedTimeRotationPolicy implements RotationPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.FixedTimeRotationPolicy";
private static final long NEXT_DAY = 24 * 3600 * 1000;
@@ -58,7 +55,6 @@
public FixedTimeRotationPolicy(int[] timeOfDays)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(timeOfDays));
Calendar cal = new GregorianCalendar();
cal.set( Calendar.MILLISECOND, 0 );
@@ -91,18 +87,21 @@
*/
public boolean rotateFile()
{
- assert debugEnter(CLASS_NAME, "rotateFile");
long currTime = TimeThread.getTime();
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME, "rotateFile",
- "Rotation at fixed time:" + currTime +
- " nextRotationTime:" + nextRotationTime);
+ if (debugEnabled())
+ {
+ debugInfo("Rotation at fixed time: %d nextRotationTime: %d",
+ currTime, nextRotationTime);
+ }
if(currTime > nextRotationTime)
{
nextRotationTime = getNextRotationTime(currTime, nextRotationTime);
- //System.out.println("Setting next rotation time to:" + nextRotationTime);
+ if (debugEnabled())
+ {
+ debugInfo("Setting next rotation to : %d", nextRotationTime);
+ }
return true;
}
return false;
diff --git a/opends/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java b/opends/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java
index 3a8f74d..7488391 100644
--- a/opends/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/FreeDiskSpaceRetentionPolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -30,7 +30,9 @@
import java.lang.reflect.Method;
import java.util.Arrays;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This class implements a retention policy based on the free disk
@@ -39,8 +41,6 @@
*/
public class FreeDiskSpaceRetentionPolicy implements RetentionPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.FreeDiskSpaceRetentionPolicy";
private long freeDiskSpace = 0;
private File directory = null;
@@ -56,9 +56,7 @@
public FreeDiskSpaceRetentionPolicy(String dir, String prefix,
long freeDiskSpace)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dir),
- String.valueOf(prefix),
- String.valueOf(freeDiskSpace));
+
this.directory = new File(dir);
this.freeDiskSpace = freeDiskSpace;
this.prefix = prefix;
@@ -72,23 +70,27 @@
*/
public int deleteFiles()
{
- assert debugEnter(CLASS_NAME, "deleteFiles");
+
int count = 0;
long freeSpace = 0;
try
{
// Use reflection to see use the getFreeSpace method if available.
// this method is only available on Java 6.
- Method meth = java.io.File.class.getMethod("getFreeSpace", new Class[0]);
+ Method meth = File.class.getMethod("getFreeSpace", new Class[0]);
Object value = meth.invoke(this.directory);
- freeSpace = ((Long)value).longValue();
- } catch(Exception e)
+ freeSpace = ((Long) value).longValue();
+ }
+ catch (Exception e)
{
- assert debugException(CLASS_NAME, "deleteFiles", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return 0;
}
- if(freeSpace > freeDiskSpace)
+ if (freeSpace > freeDiskSpace)
{
// No cleaning needed.
return 0;
@@ -101,12 +103,12 @@
Arrays.sort(selectedFiles, new FileComparator());
long freedSpace = 0;
- for(int j = selectedFiles.length - 1; j < 1; j--)
+ for (int j = selectedFiles.length - 1; j < 1; j--)
{
freedSpace += selectedFiles[j].length();
// System.out.println("Deleting log file:" + selectedFiles[j]);
selectedFiles[j].delete();
- if(freedSpace >= freeSpaceNeeded)
+ if (freedSpace >= freeSpaceNeeded)
{
break;
}
diff --git a/opends/src/server/org/opends/server/loggers/GZIPAction.java b/opends/src/server/org/opends/server/loggers/GZIPAction.java
index fc3237b..372c432 100644
--- a/opends/src/server/org/opends/server/loggers/GZIPAction.java
+++ b/opends/src/server/org/opends/server/loggers/GZIPAction.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -32,7 +32,9 @@
import java.io.IOException;
import java.util.zip.GZIPOutputStream;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This class implements a post rotation action that compresses
@@ -40,11 +42,6 @@
*/
public class GZIPAction implements PostRotationAction
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.loggers.GZIPAction";
private File originalFile;
private File newFile;
@@ -119,26 +116,37 @@
return true;
} catch(IOException ioe)
{
- assert debugException(CLASS_NAME, "execute", ioe);
- if(inputStreamOpen)
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
+ if (inputStreamOpen)
{
try
{
fis.close();
- } catch(Exception fe)
+ }
+ catch (Exception fe)
{
- assert debugException(CLASS_NAME, "execute", fe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, fe);
+ }
// Cannot do much. Ignore.
}
}
- if(outputStreamOpen)
+ if (outputStreamOpen)
{
try
{
gzip.close();
- } catch(Exception ge)
+ }
+ catch (Exception ge)
{
- assert debugException(CLASS_NAME, "execute", ge);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ge);
+ }
// Cannot do much. Ignore.
}
}
diff --git a/opends/src/server/org/opends/server/loggers/InitializationErrorManager.java b/opends/src/server/org/opends/server/loggers/InitializationErrorManager.java
index b7695e7..52461a0 100644
--- a/opends/src/server/org/opends/server/loggers/InitializationErrorManager.java
+++ b/opends/src/server/org/opends/server/loggers/InitializationErrorManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/LogCategory.java b/opends/src/server/org/opends/server/loggers/LogCategory.java
new file mode 100644
index 0000000..09884fd
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/LogCategory.java
@@ -0,0 +1,71 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+/**
+ * The category class defines a set of standard logging types that
+ * can be used to control logging output.
+ */
+public abstract class LogCategory
+{
+ /**
+ * The non-localized name of the type.
+ */
+ private final String name;
+
+ /**
+ * Create a named type.
+ * <p>
+ * Note that this constructor is "protected" to allow subclassing.
+ *
+ * @param name the name of the Level, for example "SEVERE".
+ */
+ protected LogCategory(String name) {
+ if (name == null) {
+ throw new NullPointerException();
+ }
+ this.name = name;
+ }
+
+ /**
+ * Return the non-localized string name of the Level.
+ *
+ * @return non-localized name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Retrieves the string reprentation of this log category.
+ *
+ * @return the non-localized name of the Level, for example "INFO".
+ */
+ public final String toString() {
+ return name;
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/LogErrorHandler.java b/opends/src/server/org/opends/server/loggers/LogErrorHandler.java
new file mode 100644
index 0000000..f54b849
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/LogErrorHandler.java
@@ -0,0 +1,45 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+/**
+ * A LoggingErrorHandler is used for notification of exceptions which
+ * occur during the publishing of a record.
+ *
+ * The advantage of using a handler is that we can handle exceptions
+ * asynchronously (useful when dealing with an AsynchronousPublisher).
+ */
+public interface LogErrorHandler
+{
+ /**
+ * Handle an exception which occurred during the publishing
+ * of a log record.
+ * @param record - the record which was being published.
+ * @param ex - the exception which occurred.
+ */
+ public void handleError(LogRecord record, Throwable ex);
+}
diff --git a/opends/src/server/org/opends/server/loggers/LogFileFilter.java b/opends/src/server/org/opends/server/loggers/LogFileFilter.java
index 70d604a..4c8de2e 100644
--- a/opends/src/server/org/opends/server/loggers/LogFileFilter.java
+++ b/opends/src/server/org/opends/server/loggers/LogFileFilter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/LogLevel.java b/opends/src/server/org/opends/server/loggers/LogLevel.java
new file mode 100644
index 0000000..44c214b
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/LogLevel.java
@@ -0,0 +1,222 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+
+package org.opends.server.loggers;
+
+import static org.opends.server.util.ServerConstants.LOG_SEVERITY_DISABLED;
+import static org.opends.server.util.ServerConstants.LOG_SEVERITY_ALL;
+
+import java.util.*;
+
+
+/**
+ * The Level class defines a set of standard logging levels that
+ * can be used to control logging output. The logging Level objects
+ * are ordered and are specified by ordered integers. Enabling logging
+ * at a given level also enables logging at all higher levels.
+ */
+public class LogLevel
+{
+ private static ArrayList<LogLevel> known = new ArrayList<LogLevel>();
+
+ /**
+ * OFF is a special level that can be used to turn off logging.
+ * This level is initialized to <CODE>Integer.MAX_VALUE</CODE>.
+ */
+ public static final LogLevel DISABLED = new LogLevel(
+ LOG_SEVERITY_DISABLED,Integer.MAX_VALUE);
+
+
+
+ /**
+ * ALL indicates that all messages should be logged.
+ * This level is initialized to <CODE>Integer.MIN_VALUE</CODE>.
+ */
+ public static final LogLevel ALL = new LogLevel(
+ LOG_SEVERITY_ALL, Integer.MIN_VALUE);
+
+
+
+ /**
+ * The non-localized name of the level.
+ */
+ private final String name;
+
+ /**
+ * The integer value of the level.
+ */
+ private final int value;
+
+
+ /**
+ * Create a named Level with a given integer value.
+ * <p>
+ * Note that this constructor is "protected" to allow subclassing.
+ *
+ * @param name the name of the Level, for example "SEVERE".
+ * @param value an integer value for the level.
+ */
+ protected LogLevel(String name, int value) {
+ if (name == null) {
+ throw new NullPointerException();
+ }
+ this.name = name;
+ this.value = value;
+
+ known.add(this);
+ }
+
+ /**
+ * Return the non-localized string name of the Level.
+ *
+ * @return non-localized name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Retrieve the string reprentation of this log level.
+ *
+ * @return the non-localized name of the Level, for example "INFO".
+ */
+ public final String toString() {
+ return name;
+ }
+
+ /**
+ * Get the integer value for this level. This integer value
+ * can be used for efficient ordering comparisons between
+ * Level objects.
+ * @return the integer value for this level.
+ */
+ public final int intValue() {
+ return value;
+ }
+
+ /**
+ * Parse a level name string into a Level.
+ * <p>
+ * The argument string may consist of either a level name
+ * or an integer value.
+ * <p>
+ * For example:
+ * <ul>
+ * <li> "SEVERE"
+ * <li> "1000"
+ * </ul>
+ * @param name string to be parsed
+ * @throws IllegalArgumentException if the value is not valid.
+ * Valid values are integers between <CODE>Integer.MIN_VALUE</CODE>
+ * and <CODE>Integer.MAX_VALUE</CODE>, and all known level names.
+ * Known names are the levels defined by this class (i.e. <CODE>FINE</CODE>,
+ * <CODE>FINER</CODE>, <CODE>FINEST</CODE>), or created by this class with
+ * appropriate package access, or new levels defined or created
+ * by subclasses.
+ *
+ * @return The parsed value. Passing an integer that corresponds to a
+ * known name (eg 700) will return the associated name
+ * (eg <CODE>CONFIG</CODE>). Passing an integer that does not (eg 1)
+ * will return a new level name initialized to that value.
+ */
+ public static synchronized LogLevel parse(String name)
+ throws IllegalArgumentException {
+ // Check that name is not null.
+ name.length();
+
+ // Look for a known Level with the given non-localized name.
+ for (int i = 0; i < known.size(); i++) {
+ LogLevel l = (LogLevel) known.get(i);
+ if (name.equalsIgnoreCase(l.name)) {
+ return l;
+ }
+ }
+
+ // Now, check if the given name is an integer. If so,
+ // first look for a Level with the given value and then
+ // if necessary create one.
+ try {
+ int x = Integer.parseInt(name);
+ for (int i = 0; i < known.size(); i++) {
+ LogLevel l = (LogLevel) known.get(i);
+ if (l.value == x) {
+ return l;
+ }
+ }
+ // Create a new Level.
+ return new LogLevel(name, x);
+ } catch (NumberFormatException ex) {
+ // Not an integer.
+ // Drop through.
+ }
+
+ // OK, we've tried everything and failed
+ throw new IllegalArgumentException("Bad level \"" + name + "\"");
+ }
+
+ /**
+ * Compare two objects for value equality.
+ *
+ * @param ox the LogLevel object to test.
+ * @return true if and only if the two objects have the same level value.
+ */
+ public boolean equals(Object ox) {
+ try {
+ LogLevel lx = (LogLevel)ox;
+ return (lx.value == this.value);
+ } catch (Exception ex) {
+ return false;
+ }
+ }
+
+ /**
+ * Retrives the hashcode for this log level. It is just the integer value.
+ *
+ * @return the hashCode for this log level.
+ */
+ public int hashCode()
+ {
+ return this.value;
+ }
+
+ /**
+ * Returns the string representations of all the levels. All strings will
+ * be in lower case.
+ * @return The string representations of the levels in lower case.
+ */
+ public static HashSet<String> getLevelStrings()
+ {
+ HashSet<String> strings = new HashSet<String>();
+
+ for (int i = 0; i < known.size(); i++)
+ {
+ strings.add(known.get(i).name.toLowerCase());
+ }
+
+ return strings;
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/LogRecord.java b/opends/src/server/org/opends/server/loggers/LogRecord.java
new file mode 100644
index 0000000..3e3f18e
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/LogRecord.java
@@ -0,0 +1,153 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+/**
+ * A LogRecord is reponsible for passing log messages from the individual
+ * Loggers to the LogPublishers.
+ */
+public class LogRecord
+{
+ /**
+ * Non-localized raw message text.
+ */
+ private String message;
+
+ /**
+ * The logger that generated the record.
+ */
+ private Logger logger;
+
+ /**
+ * The object that generated the record.
+ */
+ private Object caller;
+
+ /**
+ * Construct a LogRecord with the given message value.
+ *
+ * All other properties will be initialized to "null".
+ *
+ * @param msg the raw non-localized logging message (may be null).
+ */
+ public LogRecord(String msg)
+ {
+ this(null, null, msg);
+ }
+
+ /**
+ * Construct a LogRecord with the given source logger
+ * and message values.
+ *
+ * @param logger the source logger (may be null).
+ * @param msg the raw non-localized logging message.
+ */
+ public LogRecord(Logger logger, String msg)
+ {
+ this(null, logger, msg);
+ }
+
+ /**
+ * Construct a LogRecord with the given source object, source logger
+ * and message values.
+ *
+ * All other properties will be initialized to "null".
+ *
+ * @param caller the source object (may be null).
+ * @param logger the source logger (may be null).
+ * @param msg the raw non-localized logging message (may be null).
+ */
+ public LogRecord(Object caller, Logger logger, String msg)
+ {
+ this.caller = caller;
+ this.logger = logger;
+ this.message = msg;
+ }
+
+ /**
+ * Get the source Logger.
+ *
+ * @return source logger (may be null).
+ */
+ public Logger getLogger()
+ {
+ return logger;
+ }
+
+ /**
+ * Set the source Logger.
+ *
+ * @param logger logger object that generated the record.
+ */
+ public void setLogger(Logger logger)
+ {
+ this.logger = logger;
+ }
+
+ /**
+ * Get the "raw" log message, before localization or formatting.
+ * <p>
+ * May be null, which is equivalent to the empty string "".
+ * with the localized value.
+ *
+ * @return the raw message string
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Set the "raw" log message, before localization or formatting.
+ *
+ * @param message the raw message string (may be null).
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ /**
+ * Get the source caller.
+ * <p>
+ * Source caller is the object that generated this log record
+ *
+ * @return the source caller
+ */
+ public Object getCaller() {
+ return caller;
+ }
+
+ /**
+ * Set the source caller.
+ * <p>
+ * Source caller is the object that generated this log record
+ *
+ * @param caller source caller
+ */
+ public void setCaller(Object caller) {
+ this.caller = caller;
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/Logger.java b/opends/src/server/org/opends/server/loggers/Logger.java
new file mode 100644
index 0000000..47c5426
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/Logger.java
@@ -0,0 +1,180 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import org.opends.server.api.LogPublisher;
+
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * A Logger is the entry point into a message distribution
+ * system. The Logger receives messages from an external source, optionally
+ * filters out undesired messages using a RecordFilter, and
+ * sends them to a LogPublisher for further distribution.
+ * Any logging exceptions encountered will be sent to a
+ * LoggingErrorHandler.
+ */
+public abstract class Logger
+{
+ /**
+ * The logging error handler.
+ */
+ protected LogErrorHandler handler;
+
+ /**
+ * The set of publishers.
+ */
+ protected CopyOnWriteArrayList<LogPublisher> publishers;
+
+ /**
+ * A mutex that will be used to provide threadsafe access to methods
+ * changing the set of defined publishers.
+ */
+ protected ReentrantLock publisherMutex;
+
+ /**
+ * Construct a new logger object.
+ *
+ * @param handler the error handler to use when an error occurs.
+ */
+ protected Logger(LogErrorHandler handler)
+ {
+ this.publishers = new CopyOnWriteArrayList<LogPublisher>();
+ this.publisherMutex = new ReentrantLock();
+
+ this.handler = handler;
+ }
+
+ /**
+ * Publish a record to all the registered publishers.
+ *
+ * @param record The log record to publish.
+ */
+ protected void publishRecord(LogRecord record)
+ {
+ for(LogPublisher p : publishers)
+ {
+ p.publish(record, handler);
+ }
+ }
+
+ /**
+ * Adds a new publisher to which log records should be sent.
+ *
+ * @param publisher The publisher to which records should be sent.
+ */
+ protected void addPublisher(LogPublisher publisher)
+ {
+ publisherMutex.lock();
+
+ try
+ {
+ for (LogPublisher p : publishers)
+ {
+ if (p.equals(publisher))
+ {
+ return;
+ }
+ }
+
+ publishers.add(publisher);
+ }
+ catch (Exception e)
+ {
+ // This should never happen.
+ e.printStackTrace();
+ }
+ finally
+ {
+ publisherMutex.unlock();
+ }
+ }
+
+ /**
+ * Removes the provided publisher so records will no longer be sent to it.
+ *
+ * @param publisher The publisher to remove.
+ */
+ protected void removePublisher(LogPublisher publisher)
+ {
+ publisherMutex.lock();
+
+ try
+ {
+ publishers.remove(publisher);
+ }
+ catch (Exception e)
+ {
+ // This should never happen.
+ e.printStackTrace();
+ }
+ finally
+ {
+ publisherMutex.unlock();
+ }
+ }
+
+ /**
+ * Removes all publishers so records are not sent anywhere.
+ *
+ * @param closePublishers whether to close the publishers when removing them.
+ */
+ protected void removeAllPublishers(boolean closePublishers)
+ {
+ publisherMutex.lock();
+
+ try
+ {
+ if(closePublishers)
+ {
+ LogPublisher[] pubs = new LogPublisher[publishers.size()];
+ publishers.toArray(pubs);
+
+ publishers.clear();
+
+ for(LogPublisher pub : pubs)
+ {
+ pub.shutdown();
+ }
+ }
+ else
+ {
+ publishers.clear();
+ }
+ }
+ catch(Exception e)
+ {
+ // This should never happen.
+ e.printStackTrace();
+ }
+ finally
+ {
+ publisherMutex.unlock();
+ }
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/LoggerAlarmHandler.java b/opends/src/server/org/opends/server/loggers/LoggerAlarmHandler.java
index 7315f24..8910caa 100644
--- a/opends/src/server/org/opends/server/loggers/LoggerAlarmHandler.java
+++ b/opends/src/server/org/opends/server/loggers/LoggerAlarmHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/LoggerThread.java b/opends/src/server/org/opends/server/loggers/LoggerThread.java
index 30d035d..6583658 100644
--- a/opends/src/server/org/opends/server/loggers/LoggerThread.java
+++ b/opends/src/server/org/opends/server/loggers/LoggerThread.java
@@ -32,7 +32,9 @@
import org.opends.server.api.ServerShutdownListener;
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This class defines a thread that will be used for performing asynchronous
@@ -42,9 +44,6 @@
implements ServerShutdownListener
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.LoggerThread";
-
private CopyOnWriteArrayList<RotationPolicy> rotationPolicies;
private CopyOnWriteArrayList<RetentionPolicy> retentionPolicies;
private LoggerAlarmHandler handler;
@@ -88,41 +87,44 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
+
this.loggerThread = Thread.currentThread();
- while(! stopRequested)
+ while (!stopRequested)
{
try
{
sleep(time);
}
- catch(InterruptedException e)
+ catch (InterruptedException e)
{
// We expect this to happen.
}
- catch(Exception e)
+ catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
handler.flush();
- if(rotationPolicies != null)
+ if (rotationPolicies != null)
{
- for(RotationPolicy rotationPolicy : rotationPolicies)
+ for (RotationPolicy rotationPolicy : rotationPolicies)
{
- if(rotationPolicy.rotateFile())
+ if (rotationPolicy.rotateFile())
{
handler.rollover();
}
}
}
- if(retentionPolicies != null)
+ if (retentionPolicies != null)
{
- for(RetentionPolicy retentionPolicy : retentionPolicies)
+ for (RetentionPolicy retentionPolicy : retentionPolicies)
{
int numFilesDeleted = retentionPolicy.deleteFiles();
System.out.println(numFilesDeleted + " files deleted");
@@ -140,7 +142,7 @@
*/
public String getShutdownListenerName()
{
- assert debugEnter(CLASS_NAME, "getShutdownListenerName");
+
return "Logger Thread " + getName();
}
@@ -156,8 +158,7 @@
*/
public void processServerShutdown(String reason)
{
- assert debugEnter(CLASS_NAME, "processServerShutdown",
- String.valueOf(reason));
+
stopRequested = true;
@@ -170,7 +171,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processServerShutdown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/loggers/MeteredStream.java b/opends/src/server/org/opends/server/loggers/MeteredStream.java
index f591c33..37d8dbf 100644
--- a/opends/src/server/org/opends/server/loggers/MeteredStream.java
+++ b/opends/src/server/org/opends/server/loggers/MeteredStream.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java b/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java
new file mode 100644
index 0000000..1e254cd
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/MultifileTextWriter.java
@@ -0,0 +1,437 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import org.opends.server.api.DirectoryThread;
+import org.opends.server.api.ServerShutdownListener;
+import org.opends.server.core.DirectoryServer;
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.config.ConfigAttribute;
+import org.opends.server.types.DirectoryException;
+import org.opends.server.types.InvokableMethod;
+import org.opends.server.types.ResultCode;
+
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.messages.ConfigMessages.*;
+import static org.opends.server.messages.MessageHandler.getMessage;
+
+import java.io.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.ArrayList;
+
+/**
+ * A MultiFileTextWriter is a specialized TextWriter which supports publishing
+ * log records to a set of files. MultiFileWriters write to one file in the
+ * set at a time, switching files as is dictated by a specified rotation
+ * and retention policies.
+ *
+ * When a switch is required, the writer closes the current file and opens a
+ * new one named in accordance with a specified FileNamingPolicy.
+ */
+public class MultifileTextWriter extends TextWriter
+ implements ServerShutdownListener
+{
+ private static final String UTF8_ENCODING= "UTF-8";
+ private static final int BUFFER_SIZE= 65536;
+
+ private CopyOnWriteArrayList<RotationPolicy> rotationPolicies;
+ private CopyOnWriteArrayList<RetentionPolicy> retentionPolicies;
+ private FileNamingPolicy namingPolicy;
+ //TODO: Implement actions.
+ private ArrayList<ActionType> actions;
+
+ private String name;
+ private String encoding;
+ private int bufferSize;
+ private boolean autoFlush;
+ private boolean append;
+ private int interval;
+ private boolean stopRequested;
+
+ private Thread rotaterThread;
+
+ /**
+ * Get the writer for the initial log file and initialize the
+ * rotation policy.
+ * @param naming - the file naming policy in use
+ * @param encoding - the encoding to use when writing log records.
+ * @param autoFlush - indicates whether the file should be flushed
+ * after every record written.
+ * @param append - indicates whether to append to the existing file or to
+ * overwrite it.
+ * @param bufferSize - the buffer size to use for the writer.
+ * @return a PrintWriter for the initial log file
+ * @throws IOException if the initial log file could not be opened
+ */
+ private static PrintWriter getInitialWriter(FileNamingPolicy naming,
+ String encoding,
+ boolean autoFlush,
+ boolean append,
+ int bufferSize)
+ throws IOException
+ {
+ File file = naming.getInitialName();
+ return constructWriter(file, encoding, autoFlush, append, bufferSize);
+ }
+
+ /**
+ * Construct a PrintWriter for a file.
+ * @param file - the file to open for writing
+ * @param encoding - the encoding to use when writing log records.
+ * @param autoFlush - indicates whether the file should be flushed
+ * after every record written.
+ * @param append - indicates whether the file should be appended to or
+ * truncated.
+ * @param bufferSize - the buffer size to use for the writer.
+ * @return a PrintWriter for the specified file.
+ * @throws IOException if the PrintWriter could not be constructed
+ * or if the file already exists and it was indicated this should be
+ * an error.
+ */
+ private static PrintWriter constructWriter(File file, String encoding,
+ boolean autoFlush, boolean append,
+ int bufferSize)
+ throws IOException
+ {
+ FileOutputStream fos= new FileOutputStream(file, append);
+ OutputStreamWriter osw= new OutputStreamWriter(fos, encoding);
+ BufferedWriter bw = null;
+ if(bufferSize <= 0)
+ {
+ bw= new BufferedWriter(osw);
+ }
+ else
+ {
+ bw= new BufferedWriter(osw, bufferSize);
+ }
+ return new PrintWriter(bw, autoFlush);
+ }
+
+ /**
+ * Creates a new instance of MultiFileTextWriter with the supplied policies.
+ *
+ * @param name the name of the log rotation thread.
+ * @param namingPolicy the file naming policy to use to name rotated log
+ * files.
+ * @throws IOException if an error occurs while creating the log file.
+ */
+ public MultifileTextWriter(String name, FileNamingPolicy namingPolicy)
+ throws IOException
+ {
+ this(name, 5000, namingPolicy, UTF8_ENCODING,
+ true, true, BUFFER_SIZE, null, null);
+ }
+
+ /**
+ * Creates a new instance of MultiFileTextWriter with the supplied policies.
+ *
+ * @param name the name of the log rotation thread.
+ * @param interval the interval to check whether the logs need to be rotated.
+ * @param namingPolicy the file naming policy to use to name rotated log.
+ * files.
+ * @param encoding the encoding to use to write the log files.
+ * @param autoFlush whether to flush the writer on every println.
+ * @param append whether to append to an existing log file.
+ * @param bufferSize the bufferSize to use for the writer.
+ * @param rotationPolicies the rotation policy to use for log rotation.
+ * @param retentionPolicies the retention policy to use for log rotation.
+ * @throws IOException if an error occurs while creating the log file.
+ */
+ public MultifileTextWriter(String name, int interval,
+ FileNamingPolicy namingPolicy, String encoding,
+ boolean autoFlush, boolean append, int bufferSize,
+ CopyOnWriteArrayList<RotationPolicy> rotationPolicies,
+ CopyOnWriteArrayList<RetentionPolicy> retentionPolicies)
+ throws IOException
+ {
+ super(getInitialWriter(namingPolicy, encoding,
+ autoFlush, append, bufferSize), true);
+ this.name = name;
+ this.interval = interval;
+ this.namingPolicy = namingPolicy;
+ this.rotationPolicies = rotationPolicies;
+ this.retentionPolicies = retentionPolicies;
+
+ this.encoding = encoding;
+ this.autoFlush = autoFlush;
+ this.append = append;
+ this.bufferSize = bufferSize;
+
+ this.stopRequested = false;
+
+ // We will lazily launch the rotaterThread
+ // to ensure initialization safety.
+
+ DirectoryServer.registerShutdownListener(this);
+ }
+
+ /**
+ * A rotater thread is responsible for checking if the log files need to be
+ * rotated based on the policies. It will do so if necessary.
+ */
+ private class RotaterThread extends DirectoryThread
+ {
+ /**
+ * Create a new rotater thread.
+ */
+ public RotaterThread()
+ {
+ super(name);
+ }
+
+ /**
+ * the run method of the rotaterThread. It wakes up periodically and checks
+ * whether the file needs to be rotated based on the rotation policy.
+ */
+ public void run()
+ {
+ while(!isShuttingDown())
+ {
+ try
+ {
+ sleep(interval);
+ }
+ catch(InterruptedException e)
+ {
+ // We expect this to happen.
+ }
+ catch(Exception e)
+ {
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ }
+
+ if(rotationPolicies != null)
+ {
+ for(RotationPolicy rotationPolicy : rotationPolicies)
+ {
+ if(rotationPolicy.rotateFile())
+ {
+ try
+ {
+ rotate();
+ }
+ catch (IOException ioe)
+ {
+ //TODO: Comment this after AOP logging is complete.
+ //int msgID = MSGID_CONFIG_LOGGER_ROTATE_FAILED;
+ //Error.logError(ErrorLogCategory.CORE_SERVER,
+ // ErrorLogSeverity.SEVERE_ERROR, msgID, ioe);
+ }
+ }
+ }
+ }
+
+ if(retentionPolicies != null)
+ {
+ for(RetentionPolicy retentionPolicy : retentionPolicies)
+ {
+ int numFilesDeleted = retentionPolicy.deleteFiles();
+ if (debugEnabled())
+ {
+ debugVerbose("%d files deleted by rentention policy",
+ numFilesDeleted);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Retrieves the human-readable name for this shutdown listener.
+ *
+ * @return The human-readable name for this shutdown listener.
+ */
+ public String getShutdownListenerName()
+ {
+ return "MultifileTextWriter Thread " + name;
+ }
+
+ /**
+ * Indicates that the Directory Server has received a request to stop running
+ * and that this shutdown listener should take any action necessary to prepare
+ * for it.
+ *
+ * @param reason The human-readable reason for the shutdown.
+ */
+ public void processServerShutdown(String reason)
+ {
+ startShutDown();
+
+ // Wait for rotater to terminate
+ while (rotaterThread != null && rotaterThread.isAlive()) {
+ try {
+ rotaterThread.join();
+ }
+ catch (InterruptedException ex) {
+ // Ignore; we gotta wait..
+ }
+ }
+
+ writer.flush();
+ writer.close();
+ writer = null;
+ }
+
+ /**
+ * Queries whether the publisher is in shutdown mode.
+ *
+ * @return if the publish is in shutdown mode.
+ */
+ private synchronized boolean isShuttingDown()
+ {
+ return stopRequested;
+ }
+
+ /**
+ * Tell the writer to start shutting down.
+ */
+ private synchronized void startShutDown()
+ {
+ stopRequested = true;
+ }
+
+ /**
+ * Shutdown the text writer.
+ */
+ public void shutdown()
+ {
+ processServerShutdown(null);
+
+ DirectoryServer.deregisterShutdownListener(this);
+ }
+
+
+ /**
+ * Write a log record string to the file.
+ *
+ * @param record the log record to write.
+ */
+ public synchronized void writeRecord(String record)
+ {
+ // Launch writer rotaterThread if not running
+ if (rotaterThread == null) {
+ rotaterThread = new RotaterThread();
+ rotaterThread.start();
+ }
+
+ writer.println(record);
+ }
+
+ /**
+ * Tries to rotate the log files. If the new log file alreadly exists, it
+ * tries to rename the file. On failure, all subsequent log write requests
+ * will throw exceptions.
+ *
+ * @throws IOException if an error occurs while rotation the log files.
+ */
+ public void rotate() throws IOException
+ {
+ writer.flush();
+ writer.close();
+ writer = null;
+
+ File currentFile = namingPolicy.getInitialName();
+ File newFile = namingPolicy.getNextName();
+ currentFile.renameTo(newFile);
+
+ writer = constructWriter(currentFile, encoding,
+ autoFlush, append, bufferSize);
+
+ //RotationActionThread rotThread =
+ // new RotationActionThread(newFile, actions, configEntry);
+ //rotThread.start();
+ }
+
+ /**
+ * Invokes the specified method with the provided arguments.
+ *
+ * @param methodName The name of the method to invoke.
+ * @param arguments The set of configuration attributes holding the
+ * arguments to use for the method.
+ *
+ * @return The return value for the method, or <CODE>null</CODE> if it did
+ * not return a value.
+ *
+ * @throws org.opends.server.types.DirectoryException
+ * If there was no such method, or if an error occurred while attempting
+ * to invoke it.
+ */
+ public Object invokeMethod(String methodName, ConfigAttribute[] arguments)
+ throws DirectoryException
+ {
+ if(!methodName.equals("rotateNow"))
+ {
+ int msgID = MSGID_CONFIG_JMX_NO_METHOD;
+ throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
+ getMessage(msgID), msgID);
+ }
+
+ try
+ {
+ rotate();
+ }
+ catch(Exception e)
+ {
+ //TODO: Comment when AOP logging framework is complete.
+ //int msgID = MSGID_CONFIG_LOGGER_ROTATE_FAILED;
+ //throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM,
+ // getMessage(msgID, e), msgID);
+ }
+
+ return null;
+ }
+
+ /**
+ * Retrieves a list of the methods that may be invoked for this component.
+ *
+ * @return A list of the methods that may be invoked for this component.
+ */
+ public InvokableMethod[] getOperationSignatures()
+ {
+ InvokableMethod[] methods = new InvokableMethod[1];
+ methods[0] = new InvokableMethod("rotateNow",
+ "Rotate the log file immediately",
+ null, "void", true, true);
+ return methods;
+ }
+
+ /**
+ * This method sets the actions that need to be executed after rotation.
+ *
+ * @param actions An array of actions that need to be executed on rotation.
+ */
+ public void setPostRotationActions(ArrayList<ActionType> actions)
+ {
+ this.actions = actions;
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/PostRotationAction.java b/opends/src/server/org/opends/server/loggers/PostRotationAction.java
index 8a1619c..067d5b2 100644
--- a/opends/src/server/org/opends/server/loggers/PostRotationAction.java
+++ b/opends/src/server/org/opends/server/loggers/PostRotationAction.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/RetentionPolicy.java b/opends/src/server/org/opends/server/loggers/RetentionPolicy.java
index d2fa820..1662ad7 100644
--- a/opends/src/server/org/opends/server/loggers/RetentionPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/RetentionPolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/RotationActionThread.java b/opends/src/server/org/opends/server/loggers/RotationActionThread.java
index 11f99f3..90e46b7 100644
--- a/opends/src/server/org/opends/server/loggers/RotationActionThread.java
+++ b/opends/src/server/org/opends/server/loggers/RotationActionThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -31,7 +31,9 @@
import org.opends.server.api.DirectoryThread;
import org.opends.server.config.ConfigEntry;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This thread is spawned off at the time of file rotation to
@@ -41,9 +43,6 @@
public class RotationActionThread extends DirectoryThread
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.RotationActionThread";
-
private ArrayList<ActionType> actions;
private String filename;
private ConfigEntry configEntry;
@@ -115,7 +114,10 @@
}
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
diff --git a/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java b/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java
index a101c50..6cd185a 100644
--- a/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java
+++ b/opends/src/server/org/opends/server/loggers/RotationConfigUtil.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -42,14 +42,15 @@
import org.opends.server.config.StringConfigAttribute;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.LoggerMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.loggers.Error.*;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
/**
@@ -58,8 +59,6 @@
*/
public class RotationConfigUtil
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.RotationConfigUtil";
/**
@@ -78,8 +77,6 @@
getRotationPolicies(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getRotationPolicies",
- String.valueOf(configEntry));
HashSet<String> allowedValues = new HashSet<String>();
allowedValues.add("size");
@@ -210,8 +207,6 @@
getRetentionPolicies(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getRetentionPolicies",
- String.valueOf(configEntry));
StringConfigAttribute logFileStub =
new StringConfigAttribute(ATTR_LOGGER_FILE,
@@ -348,8 +343,7 @@
getPostRotationActions(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getPostRotationActions",
- String.valueOf(configEntry));
+
ArrayList<ActionType> actions = new ArrayList<ActionType>();
StringConfigAttribute rotationActionStub =
@@ -425,7 +419,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getCertificateAlias", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return null;
}
@@ -450,8 +447,7 @@
public static int getIntegerAttribute(ConfigEntry configEntry,
String attrName, int msgID) throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getIntegerAttribute",
- String.valueOf(configEntry), attrName);
+
int value = -1;
IntegerConfigAttribute attrStub =
diff --git a/opends/src/server/org/opends/server/loggers/RotationPolicy.java b/opends/src/server/org/opends/server/loggers/RotationPolicy.java
index 813423e..2ef27c8 100644
--- a/opends/src/server/org/opends/server/loggers/RotationPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/RotationPolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/SignatureAction.java b/opends/src/server/org/opends/server/loggers/SignatureAction.java
index f64398f..dafc47c 100644
--- a/opends/src/server/org/opends/server/loggers/SignatureAction.java
+++ b/opends/src/server/org/opends/server/loggers/SignatureAction.java
@@ -40,19 +40,12 @@
//import org.opends.server.core.DirectoryServer;
-//import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a post rotation action that signs
* the file.
*/
public class SignatureAction implements PostRotationAction
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.loggers.SignatureAction";
private static final String delimiter = "---------";
private File originalFile;
diff --git a/opends/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java b/opends/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java
index 55c1832..fb85c18 100644
--- a/opends/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/SizeBasedRetentionPolicy.java
@@ -22,23 +22,19 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import java.io.File;
import java.util.Arrays;
-import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a retention policy based on the amount of
* space taken by the log files.
*/
public class SizeBasedRetentionPolicy implements RetentionPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.SizeBasedRetentionPolicy";
private long size = 0;
private File directory = null;
@@ -53,8 +49,7 @@
*/
public SizeBasedRetentionPolicy(String dir, String prefix, long size)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dir),
- String.valueOf(prefix), String.valueOf(size));
+
this.size = size;
this.directory = new File(dir);
this.prefix = prefix;
@@ -68,16 +63,16 @@
*/
public int deleteFiles()
{
- assert debugEnter(CLASS_NAME, "deleteFiles");
+
int count = 0;
File[] selectedFiles = directory.listFiles(new LogFileFilter(prefix));
long totalLength = 0;
- for(int i = 0; i < selectedFiles.length; i++)
+ for (int i = 0; i < selectedFiles.length; i++)
{
totalLength += selectedFiles[i].length();
}
- if(totalLength <= size)
+ if (totalLength <= size)
{
return 0;
}
@@ -88,12 +83,12 @@
Arrays.sort(selectedFiles, new FileComparator());
long freedSpace = 0;
- for(int j = selectedFiles.length - 1; j < 1; j--)
+ for (int j = selectedFiles.length - 1; j < 1; j--)
{
freedSpace += selectedFiles[j].length();
// System.out.println("Deleting log file:" + selectedFiles[j]);
selectedFiles[j].delete();
- if(freedSpace >= freeSpaceNeeded)
+ if (freedSpace >= freeSpaceNeeded)
{
break;
}
diff --git a/opends/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java b/opends/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java
index 419e4a1..a8591c2 100644
--- a/opends/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/SizeBasedRotationPolicy.java
@@ -22,14 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
/**
* This class implements a rotation policy based on the size of the
@@ -38,9 +37,6 @@
public class SizeBasedRotationPolicy implements RotationPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.SizeBasedRotationPolicy";
-
private long sizeLimit;
private DirectoryFileHandler fileHandler;
@@ -51,7 +47,7 @@
*/
public SizeBasedRotationPolicy(long size)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(size));
+
sizeLimit = size;
}
@@ -83,12 +79,13 @@
*/
public boolean rotateFile()
{
- assert debugEnter(CLASS_NAME, "rotateFile");
- if(fileHandler.getFileSize() >= sizeLimit)
+
+ if (fileHandler.getFileSize() >= sizeLimit)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME, "rotateFile",
- "File Length:" + fileHandler.getFileSize());
+ if (debugEnabled())
+ {
+ debugInfo("File Length: %d", fileHandler.getFileSize());
+ }
return true;
}
return false;
diff --git a/opends/src/server/org/opends/server/loggers/StartupDebugLogger.java b/opends/src/server/org/opends/server/loggers/StartupDebugLogger.java
deleted file mode 100644
index 6887663..0000000
--- a/opends/src/server/org/opends/server/loggers/StartupDebugLogger.java
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.loggers;
-
-
-
-import java.io.PrintWriter;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.StringTokenizer;
-
-import org.opends.server.api.DebugLogger;
-import org.opends.server.api.ProtocolElement;
-import org.opends.server.config.ConfigEntry;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-import org.opends.server.util.TimeThread;
-
-import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-
-
-
-/**
- * This class defines a Directory Server debug logger that will be used only
- * during startup. It makes it possible for informational, warning, and error
- * messages to be generated during startup and made available to the user for
- * things that happen before the configuration can be parsed and all of the
- * actual debug loggers instantiated and registered. This debug logger will be
- * taken out of service once the startup is complete.
- * <BR><BR>
- * By default, errors and warnings will be logged. This can be modified on a
- * per-category basis using a "DS_DEBUG_LEVEL" environment variable that should
- * be a semicolon-delimited list in which each element in that list should
- * contain the name of the category, an equal sign, and a comma-delimited list
- * of the severity levels to use for that category.
- */
-public class StartupDebugLogger
- extends DebugLogger
-{
- /**
- * The name of the environment variable that may be used to alter the kinds of
- * messages that get logged with this startup debug logger.
- */
- public static final String ENV_VARIABLE_DEBUG_LOG_LEVEL = "DS_DEBUG_LEVEL";
-
-
-
- // The hash map that will be used to define specific log severities for the
- // various categories.
- private HashMap<DebugLogCategory,HashSet<DebugLogSeverity>> definedSeverities;
-
- // The set of default log severities that will be used if no custom severities
- // have been defined for the associated category.
- private HashSet<DebugLogSeverity> defaultSeverities;
-
- // The writer that will be used to actually write the messages.
- private PrintWriter writer;
-
-
-
- /**
- * Creates a new instance of this startup debug logger. It does not actually
- * do anything, since all initialization is performed in the
- * <CODE>initializeDebugLogger</CODE> method.
- */
- public StartupDebugLogger()
- {
- super();
- }
-
-
-
- /**
- * Initializes this debug logger based on the information in the provided
- * configuration entry.
- *
- * @param configEntry The configuration entry that contains the information
- * to use to initialize this debug logger.
- */
- public void initializeDebugLogger(ConfigEntry configEntry)
- {
- writer = new PrintWriter(System.err, true);
-
- defaultSeverities = new HashSet<DebugLogSeverity>();
- defaultSeverities.add(DebugLogSeverity.ERROR);
- defaultSeverities.add(DebugLogSeverity.WARNING);
-
- definedSeverities =
- new HashMap<DebugLogCategory,HashSet<DebugLogSeverity>>();
-
-
- String logLevelInfo = System.getenv(ENV_VARIABLE_DEBUG_LOG_LEVEL);
- if (logLevelInfo != null)
- {
- StringTokenizer tokenizer = new StringTokenizer(logLevelInfo, ";");
- while (tokenizer.hasMoreTokens())
- {
- String token = tokenizer.nextToken();
- int equalPos = token.indexOf('=');
- if (equalPos < 0)
- {
- writer.println("StartupDebugLogger: Token \"" + token +
- "\" read from environment variable " +
- ENV_VARIABLE_DEBUG_LOG_LEVEL + " does not contain " +
- "an equal sign to separate the category from the " +
- "severity list. It will be ignored");
- continue;
- }
-
- String categoryName = token.substring(0, equalPos);
- DebugLogCategory category = DebugLogCategory.getByName(categoryName);
- if (category == null)
- {
- writer.println("StartupDebugLogger: Unknown debug log category \"" +
- categoryName + "\" read from environment variable " +
- ENV_VARIABLE_DEBUG_LOG_LEVEL + " will be ignored.");
- continue;
- }
-
- HashSet<DebugLogSeverity> severities = new HashSet<DebugLogSeverity>();
- StringTokenizer sevTokenizer =
- new StringTokenizer(token.substring(equalPos+1), ",");
- while (sevTokenizer.hasMoreElements())
- {
- String severityName = sevTokenizer.nextToken();
- DebugLogSeverity severity = DebugLogSeverity.getByName(severityName);
- if (severity == null)
- {
- writer.println("StartupDebugLogger: Unknown debug log severity " +
- "\"" + severityName + "\" read from environment " +
- "variable " + ENV_VARIABLE_DEBUG_LOG_LEVEL +
- " will be ignored.");
- continue;
- }
- else
- {
- severities.add(severity);
- }
- }
-
- definedSeverities.put(category, severities);
- }
- }
- }
-
-
-
- /**
- * Closes this debug logger and releases any resources it might have held.
- */
- public void closeDebugLogger()
- {
- // No action is required, and this logger will remain usable.
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified raw data
- * was read.
- *
- * @param className The fully-qualified name of the Java class in which the
- * data was read.
- * @param methodName The name of the method in which the data was read.
- * @param buffer The byte buffer containing the data that has been read.
- * The byte buffer must be in the same state when this
- * method returns as when it was entered.
- */
- public void debugBytesRead(String className, String methodName,
- ByteBuffer buffer)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.DATA_READ);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_DATA_READ + ", data:" + EOL);
-
- byteArrayToHexPlusAscii(msg, buffer, 5);
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified raw data
- * was written.
- *
- * @param className The fully-qualified name of the Java class in which the
- * data was written.
- * @param methodName The name of the method in which the data was written.
- * @param buffer The byte buffer containing the data that has been
- * written. The byte buffer must be in the same state
- * when this method returns as when it was entered.
- */
- public void debugBytesWritten(String className, String methodName,
- ByteBuffer buffer)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.DATA_WRITE);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_DATA_WRITE + ", data:" + EOL);
-
- byteArrayToHexPlusAscii(msg, buffer, 5);
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the constructor for
- * the specified class has been invoked.
- *
- * @param className The fully-qualified name of the Java class whose
- * constructor has been invoked.
- * @param args The set of arguments provided for the constructor.
- */
- public void debugConstructor(String className, String... args)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.CONSTRUCTOR);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.INFO))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_CONSTRUCTOR + " - ");
- msg.append(className);
- msg.append("(");
-
- switch (args.length)
- {
- case 0:
- // No action required;
- break;
- case 1:
- msg.append(args[0]);
- break;
- default:
- msg.append(args[0]);
-
- for (int i=1; i < args.length; i++)
- {
- msg.append(",");
- msg.append(args[i]);
- }
- break;
- }
-
- msg.append(")");
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the specified method
- * has been entered.
- *
- * @param className The fully-qualified name of the Java class in which the
- * specified method resides.
- * @param methodName The name of the method that has been entered.
- * @param args The set of arguments provided to the method.
- */
- public void debugEnter(String className, String methodName, String... args)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.METHOD_ENTER);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.INFO))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_ENTER + " - ");
- msg.append(className);
- msg.append(".");
- msg.append(methodName);
- msg.append("(");
-
- switch (args.length)
- {
- case 0:
- // No action required;
- break;
- case 1:
- msg.append(args[0]);
- break;
- default:
- msg.append(args[0]);
-
- for (int i=1; i < args.length; i++)
- {
- msg.append(",");
- msg.append(args[i]);
- }
- break;
- }
-
- msg.append(")");
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Writes a generic message to the debug logger using the provided
- * information.
- *
- * @param category The category associated with this debug message.
- * @param severity The severity associated with this debug message.
- * @param className The fully-qualified name of the Java class in which the
- * debug message was generated.
- * @param methodName The name of the method in which the debug message was
- * generated.
- * @param message The actual contents of the debug message.
- */
- public void debugMessage(DebugLogCategory category, DebugLogSeverity severity,
- String className, String methodName, String message)
- {
- HashSet<DebugLogSeverity> severities = definedSeverities.get(category);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(severity))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=");
- msg.append(category.getCategoryName());
- msg.append(", severity=");
- msg.append(severity.getSeverityName());
- msg.append(", class=");
- msg.append(className);
- msg.append(", method=");
- msg.append(methodName);
- msg.append(", msg=\"");
- msg.append(message);
- msg.append("\"");
-
- writer.println(msg);
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger containing information from the
- * provided exception that was thrown.
- *
- * @param className The fully-qualified name of the Java class in which the
- * exception was thrown.
- * @param methodName The name of the method in which the exception was
- * thrown.
- * @param exception The exception that was thrown.
- */
- public void debugException(String className, String methodName,
- Throwable exception)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.EXCEPTION);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.ERROR))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_EXCEPTION + ", class=");
- msg.append(className);
- msg.append(", method=");
- msg.append(methodName);
- msg.append(", trace:" + EOL);
-
- stackTraceToString(msg, exception);
-
- writer.println(msg);
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been read.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was read.
- * @param methodName The name of the method in which the protocol
- * element was read.
- * @param protocolElement The protocol element that was read.
- */
- public void debugProtocolElementRead(String className, String methodName,
- ProtocolElement protocolElement)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.PROTOCOL_READ);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_PROTOCOL_READ +
- ", element:" + EOL);
-
- protocolElement.toString(msg, 5);
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Writes a message to the debug logger indicating that the provided protocol
- * element has been written.
- *
- * @param className The fully-qualified name of the Java class in
- * which the protocol element was written.
- * @param methodName The name of the method in which the protocol
- * element was written.
- * @param protocolElement The protocol element that was written.
- */
- public void debugProtocolElementWritten(String className, String methodName,
- ProtocolElement protocolElement)
- {
- HashSet<DebugLogSeverity> severities =
- definedSeverities.get(DebugLogCategory.PROTOCOL_WRITE);
- if (severities == null)
- {
- severities = defaultSeverities;
- }
-
- if (severities.contains(DebugLogSeverity.COMMUNICATION))
- {
- StringBuilder msg = new StringBuilder();
-
- msg.append('[');
- msg.append(TimeThread.getLocalTime());
- msg.append("] category=" + DEBUG_CATEGORY_PROTOCOL_WRITE+
- ", element:" + EOL);
-
- protocolElement.toString(msg, 5);
-
- writer.println(msg.toString());
- }
- }
-
-
-
- /**
- * Indicates whether the provided object is equal to this debug logger.
- *
- * @param o The object for which to make the determination.
- *
- * @return <CODE>true</CODE> if the provided object is determined to be equal
- * to this debug logger, or <CODE>false</CODE> if not.
- */
- public boolean equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if ((o == null) || (! (o instanceof StartupDebugLogger)))
- {
- return false;
- }
-
- return true;
- }
-
-
-
- /**
- * Retrieves the hash code for this debug logger.
- *
- * @return The hash code for this debug logger.
- */
- public int hashCode()
- {
- // Just make one up, since there should never be a need to have more than
- // one instance of this debug logger.
- return 12345;
- }
-}
-
diff --git a/opends/src/server/org/opends/server/loggers/StartupErrorLogger.java b/opends/src/server/org/opends/server/loggers/StartupErrorLogger.java
index 751ad85..73fa59e 100644
--- a/opends/src/server/org/opends/server/loggers/StartupErrorLogger.java
+++ b/opends/src/server/org/opends/server/loggers/StartupErrorLogger.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
diff --git a/opends/src/server/org/opends/server/loggers/TextLogFormatter.java b/opends/src/server/org/opends/server/loggers/TextLogFormatter.java
new file mode 100644
index 0000000..5a9a08e
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/TextLogFormatter.java
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+/**
+ * A TextFormatter is used by a TextLogPublisher to convert log records into
+ * text for publishing.
+ */
+public interface TextLogFormatter
+{
+ /**
+ * Convert a log record to text.
+ * @param record - the record to convert
+ * @return a String containing the text representation of the
+ * record.
+ */
+ public String format(LogRecord record);
+}
diff --git a/opends/src/server/org/opends/server/loggers/TextLogPublisher.java b/opends/src/server/org/opends/server/loggers/TextLogPublisher.java
new file mode 100644
index 0000000..954a097
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/TextLogPublisher.java
@@ -0,0 +1,81 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import org.opends.server.api.LogPublisher;
+
+/**
+ * A TextLogPublisher publishes log records to a character-based output device,
+ * such as the console or a file.
+ */
+public class TextLogPublisher implements LogPublisher
+{
+ private TextWriter writer;
+ private TextLogFormatter formatter;
+
+ /**
+ * Create a new TextLogPublisher using the specified destination
+ * and format.
+ *
+ * @param writer - the destination for text output
+ * @param formatter - the formatting to use to convert records to text
+ */
+ public TextLogPublisher(TextWriter writer, TextLogFormatter formatter)
+ {
+ this.writer= writer;
+ this.formatter= formatter;
+ }
+
+ /**
+ * Publish the log record.
+ *
+ * @param record the log record to publish.
+ * @param handler the error handler to use if an error occurs.
+ */
+ public void publish(LogRecord record, LogErrorHandler handler)
+ {
+ try
+ {
+ writer.writeRecord(formatter.format(record));
+ }
+ catch(Throwable t)
+ {
+ if(handler != null)
+ {
+ handler.handleError(record, t);
+ }
+ }
+ }
+
+ /**
+ * Shutdown the publisher.
+ */
+ public void shutdown()
+ {
+ writer.shutdown();
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/TextWriter.java b/opends/src/server/org/opends/server/loggers/TextWriter.java
new file mode 100644
index 0000000..1d67826
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/TextWriter.java
@@ -0,0 +1,113 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import java.io.PrintWriter;
+
+/**
+ * A TextWriter provides a character-based stream used by a
+ * TextLogPublisher as a target for outputting log records.
+ * Separating this from a LogPublisher implementation allows
+ * better sharing of targets such as the console, since a
+ * TextWriter imposes no format.
+ */
+public class TextWriter
+{
+ /**
+ * A TextWriter which writes to standard out.
+ */
+ public static TextWriter STDOUT=
+ new TextWriter(new PrintWriter(System.out, true), false);
+ /**
+ * A TextWriter which writes to standard error.
+ */
+ public static TextWriter STDERR=
+ new TextWriter(new PrintWriter(System.err, true), false);
+
+ /** The underlying output stream. */
+ protected PrintWriter writer;
+
+ /** Indicates whether we should close the stream on shutdown. */
+ private boolean closable;
+
+ /**
+ * Create a new TextWriter for a specified writer.
+ * On shutdown, the writer will be closed.
+ *
+ * @param writer - a character stream used for output.
+ */
+ public TextWriter(PrintWriter writer)
+ {
+ this(writer, true);
+ }
+
+ /**
+ * Create a new TextWriter for a specified writer.
+ * On shutdown, the writer will be closed if requested.
+ *
+ * @param writer - a character stream used for output.
+ * @param closeOnShutdown - indicates whether the provided.
+ * stream should be closed when shutdown is invoked.
+ */
+ public TextWriter(PrintWriter writer, boolean closeOnShutdown)
+ {
+ this.writer = writer;
+ closable = closeOnShutdown;
+ }
+
+ /**
+ * Writes a text record to the output stream.
+ *
+ * @param record - the record to write.
+ */
+ public void writeRecord(String record)
+ {
+ writer.println(record);
+ }
+
+ /**
+ * Flushes any buffered contents of the output stream.
+ */
+ public void flush()
+ {
+ writer.flush();
+ }
+
+ /**
+ * Releases any resources held by the writer.
+ * Unless <b>closeOnShutdown</b> was <b>false</b> when the writer
+ * was constructed, the wrapped output stream will also be
+ * closed.
+ */
+ public void shutdown()
+ {
+ // Close only if we were told to
+ if (closable) {
+ writer.close();
+ }
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java b/opends/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java
index 2fff659..436f2e3 100644
--- a/opends/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java
+++ b/opends/src/server/org/opends/server/loggers/TimeLimitRotationPolicy.java
@@ -22,22 +22,18 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
import org.opends.server.util.TimeThread;
-import static org.opends.server.loggers.Debug.*;
-
/**
* This class implements a fixed time based rotation policy.
* Rotation will happen N seconds since the last rotation.
*/
public class TimeLimitRotationPolicy implements RotationPolicy
{
- private static final String CLASS_NAME =
- "org.opends.server.loggers.TimeLimitRotationPolicy";
private long timeInterval = 0;
private long lastModifiedTime = 0;
@@ -49,7 +45,7 @@
*/
public TimeLimitRotationPolicy(long time)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(time));
+
timeInterval = time;
lastModifiedTime = TimeThread.getTime();
}
@@ -63,14 +59,15 @@
*/
public boolean rotateFile()
{
- assert debugEnter(CLASS_NAME, "rotateFile");
+
long currTime = TimeThread.getTime();
- if(currTime - lastModifiedTime > timeInterval)
+ if (currTime - lastModifiedTime > timeInterval)
{
do
{
lastModifiedTime += timeInterval;
- } while (lastModifiedTime < currTime);
+ }
+ while (lastModifiedTime < currTime);
// lastModifiedTime = currTime;
return true;
diff --git a/opends/src/server/org/opends/server/loggers/TimeStampNaming.java b/opends/src/server/org/opends/server/loggers/TimeStampNaming.java
new file mode 100644
index 0000000..e389e97
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/TimeStampNaming.java
@@ -0,0 +1,69 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers;
+
+import org.opends.server.util.TimeThread;
+
+import java.io.File;
+
+/**
+ * A file name policy that names files suffixed by the time it was created.
+ */
+public class TimeStampNaming implements FileNamingPolicy
+{
+ File file;
+
+ /**
+ * Create a new instance of the TimeStampNaming policy. Files will be created
+ * with the names in the prefix.utctime format.
+ *
+ * @param file the file to use as the naming prefix.
+ */
+ public TimeStampNaming(File file)
+ {
+ this.file = file;
+ }
+ /**
+ * Initializes the policy and returns the current name to use.
+ *
+ * @return the initial file.
+ */
+ public File getInitialName()
+ {
+ return file;
+ }
+
+ /**
+ * Gets the next name to use.
+ *
+ * @return the next file.
+ */
+ public File getNextName()
+ {
+ return new File(file + "." + TimeThread.getUTCTime());
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/ZIPAction.java b/opends/src/server/org/opends/server/loggers/ZIPAction.java
index 6f91e03..0549dbd 100644
--- a/opends/src/server/org/opends/server/loggers/ZIPAction.java
+++ b/opends/src/server/org/opends/server/loggers/ZIPAction.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.loggers;
@@ -33,7 +33,9 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
* This class implements a post rotation action that compresses
@@ -41,11 +43,6 @@
*/
public class ZIPAction implements PostRotationAction
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.loggers.ZIPAction";
private File originalFile;
private File newFile;
@@ -123,26 +120,37 @@
return true;
} catch(IOException ioe)
{
- assert debugException(CLASS_NAME, "execute", ioe);
- if(inputStreamOpen)
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ioe);
+ }
+ if (inputStreamOpen)
{
try
{
fis.close();
- } catch(Exception fe)
+ }
+ catch (Exception fe)
{
- assert debugException(CLASS_NAME, "execute", fe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, fe);
+ }
// Cannot do much. Ignore.
}
}
- if(outputStreamOpen)
+ if (outputStreamOpen)
{
try
{
zip.close();
- } catch(Exception ze)
+ }
+ catch (Exception ze)
{
- assert debugException(CLASS_NAME, "execute", ze);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ze);
+ }
// Cannot do much. Ignore.
}
}
diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugErrorHandler.java b/opends/src/server/org/opends/server/loggers/debug/DebugErrorHandler.java
new file mode 100644
index 0000000..08d1b3a
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugErrorHandler.java
@@ -0,0 +1,65 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+import org.opends.server.loggers.LogErrorHandler;
+import org.opends.server.loggers.LogRecord;
+
+/**
+ * Error handler for tracing. Tracing will be disabled
+ * if too many errors occur.
+ */
+public class DebugErrorHandler implements LogErrorHandler
+{
+ private static final int ERROR_THRESHOLD= 10;
+
+ private int _loggingErrors= 0;
+
+ /**
+ * Error handler for tracing. Tracing will be disabled
+ * if too many errors occur.
+ *
+ * @param record the log record that caused the error to occur.
+ * @param ex the exception thrown.
+ */
+ public synchronized void handleError(LogRecord record, Throwable ex)
+ {
+ _loggingErrors++;
+
+ DebugLogFormatter formatter = new DebugLogFormatter();
+ System.err.println("Error publishing record: " +
+ formatter.format(record) + ex);
+
+ // If we've had too many write errors, just turn off
+ // tracing to prevent an overflow of messages.
+ if (_loggingErrors >= ERROR_THRESHOLD) {
+ System.err.println("TOO MANY ERRORS FROM DEBUG LOGGER. SHUTTING DOWN");
+
+ DebugLogger.enabled(false);
+ }
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugLogFormatter.java b/opends/src/server/org/opends/server/loggers/debug/DebugLogFormatter.java
new file mode 100644
index 0000000..ada56ed
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugLogFormatter.java
@@ -0,0 +1,103 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+import org.opends.server.loggers.TextLogFormatter;
+import org.opends.server.loggers.LogRecord;
+
+import java.util.Locale;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+/**
+ * TraceFormatter defines the output format of trace messages.
+ */
+public class DebugLogFormatter implements TextLogFormatter
+{
+
+ private DateFormat _timestamper;
+
+ /**
+ * Construct a new DebugLogFormatter.
+ */
+ public DebugLogFormatter()
+ {
+ _timestamper= new SimpleDateFormat("yyyyMMdd HH:mm:ss.SSS", Locale.US);
+ }
+
+ /**
+ * Format the log record. Only DebugLogRecords will be formated correctly.
+ *
+ * @param record the record to format.
+ * @return the recrod formated to a string.
+ */
+ public String format(LogRecord record)
+ {
+ StringBuffer buf = new StringBuffer();
+ if(record != null && record instanceof DebugLogRecord)
+ {
+ DebugLogRecord dlr = (DebugLogRecord)record;
+
+ // Emit the timestamp.
+ buf.append(_timestamper.format(dlr.getTimestamp()));
+ buf.append(" ");
+
+ // Emit the debug level.
+ buf.append(dlr.getLevel());
+ buf.append(" ");
+
+ // Emit thread info.
+ buf.append(dlr.getThreadName());
+ buf.append("(");
+ buf.append(dlr.getThreadID());
+ buf.append(") ");
+
+ // Emit debug category.
+ buf.append(dlr.getCategory());
+ buf.append(" ");
+
+ // Emit method info.
+ buf.append(dlr.getSignature());
+ buf.append(" @ ");
+ buf.append(dlr.getSourceLocation());
+ buf.append(" ");
+
+ // Emit message.
+ buf.append(dlr.getMessage());
+
+ // Emit Stack Trace.
+ if(dlr.getStackTrace() != null)
+ {
+ buf.append("\nStack Trace\n");
+ buf.append(dlr.getStackTrace());
+ }
+
+ }
+
+ return buf.toString();
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java b/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java
new file mode 100644
index 0000000..4bd8d4f
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugLogRecord.java
@@ -0,0 +1,390 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+import org.opends.server.loggers.LogRecord;
+import org.opends.server.loggers.LogCategory;
+import org.opends.server.loggers.LogLevel;
+import org.opends.server.loggers.Logger;
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.types.DebugLogCategory;
+
+import java.util.Date;
+
+/**
+ * A DebugLogRecord is reponsible for passing tracing log messages from the
+ * individual Loggers to the LogPublishers.
+ */
+public class DebugLogRecord extends LogRecord
+{
+ private static long globalSequenceNumber;
+
+ /**
+ * The category of this record.
+ */
+ private LogCategory category;
+
+ /**
+ * The level of this record.
+ */
+ private LogLevel level;
+
+ /**
+ * Sequence number.
+ */
+ private long sequenceNumber;
+
+ /**
+ * Thread name for thread that issued logging call.
+ */
+ private String threadName;
+
+ /**
+ * Thread ID for thread that issued logging call.
+ */
+ private long threadID;
+
+ /**
+ * Event time in milliseconds since 1970.
+ */
+ private Date timestamp;
+
+ /**
+ * The signature signature.
+ */
+ private String signature;
+
+ /**
+ * The arguments objects.
+ */
+ private Object[] arguments;
+
+ /**
+ * The source location.
+ */
+ private String sourceLocation;
+
+ /**
+ * The stack trace.
+ */
+ private String stackTrace;
+
+ /**
+ * Construct a DebugLogRecord with the given values(s).
+ * <p>
+ * The sequence property will be initialized with a new unique value.
+ * These sequence values are allocated in increasing order within a VM.
+ * <p>
+ * The timestamp property will be initialized to the current time.
+ * <p>
+ * The thread ID property will be initialized with a unique ID for
+ * the current thread.
+ * <p>
+ * All other properties will be initialized to "null".
+ *
+ * @param category the category of this logging message.
+ * @param level the level of this logging message.
+ * @param msg the raw non-localized logging message (may be null).
+ */
+ public DebugLogRecord(DebugLogCategory category,
+ DebugLogLevel level,
+ String msg)
+ {
+ super(msg);
+ this.category = category;
+ this.level = level;
+ }
+
+ /**
+ * Construct a DebugLogRecord with the given values(s).
+ * <p>
+ * The sequence property will be initialized with a new unique value.
+ * These sequence values are allocated in increasing order within a VM.
+ * <p>
+ * The timestamp property will be initialized to the current time.
+ * <p>
+ * The thread ID property will be initialized with a unique ID for
+ * the current thread.
+ * <p>
+ * All other properties will be initialized to "null".
+ *
+ * @param category the category of this logging message.
+ * @param level the level of this logging message.
+ * @param logger the source logger (may be null).
+ * @param msg the raw non-localized logging message (may be null).
+ */
+ public DebugLogRecord(DebugLogCategory category,
+ DebugLogLevel level,
+ Logger logger,
+ String msg)
+ {
+ super(logger, msg);
+ this.category = category;
+ this.level = level;
+ }
+
+ /**
+ * Construct a DebugLogRecord with the given values(s).
+ * <p>
+ * The sequence property will be initialized with a new unique value.
+ * These sequence values are allocated in increasing order within a VM.
+ * <p>
+ * The timestamp property will be initialized to the current time.
+ * <p>
+ * The thread ID property will be initialized with a unique ID for
+ * the current thread.
+ * <p>
+ * All other properties will be initialized to "null".
+ *
+ * @param category the category of this logging message.
+ * @param level the level of this logging message.
+ * @param caller the source object (may be null).
+ * @param logger the source logger (may be null).
+ * @param msg the raw non-localized logging message (may be null).
+ */
+ public DebugLogRecord(LogCategory category,
+ LogLevel level,
+ Object caller,
+ Logger logger,
+ String msg)
+ {
+ super(caller, logger, msg);
+ this.category = category;
+ this.level = level;
+
+ // Assign a thread ID, name, and a unique sequence number.
+ Thread thread= Thread.currentThread();
+ threadID = thread.getId();
+ threadName = thread.getName();
+ sequenceNumber = globalSequenceNumber++;
+ timestamp = new Date();
+ }
+
+ /**
+ * Get an identifier for the thread where the message originated.
+ * <p>
+ * This is a thread identifier within the Java VM and may or
+ * may not map to any operating system ID.
+ *
+ * @return thread ID
+ */
+ public long getThreadID() {
+ return threadID;
+ }
+
+ /**
+ * Set an identifier for the thread where the message originated.
+ * @param threadID the thread ID
+ */
+ public void setThreadID(long threadID) {
+ this.threadID = threadID;
+ }
+
+ /**
+ * Get event time in milliseconds since 1970.
+ *
+ * @return event time in timestamp since 1970
+ */
+ public Date getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Set event time.
+ *
+ * @param timestamp event time in timestamp since 1970
+ */
+ public void setTimestamp(Date timestamp) {
+ this.timestamp = timestamp;
+ }
+
+ /**
+ * Get the category of this message.
+ *
+ * @return the log category.
+ */
+ public LogCategory getCategory()
+ {
+ return category;
+ }
+
+ /**
+ * Set the category of this message.
+ *
+ * @param category the log category to set.
+ */
+ public void setCategory(LogCategory category)
+ {
+ this.category = category;
+ }
+
+ /**
+ * Get the level of this message.
+ *
+ * @return the log level.
+ */
+ public LogLevel getLevel()
+ {
+ return level;
+ }
+
+ /**
+ * Set the level of this message.
+ *
+ * @param level the log level to set.
+ */
+ public void setLevel(LogLevel level)
+ {
+ this.level = level;
+ }
+
+ /**
+ * Get the thread name that generated this message.
+ *
+ * @return the thread name.
+ */
+ public String getThreadName()
+ {
+ return threadName;
+ }
+
+ /**
+ * Set the thread name that genreated this message.
+ *
+ * @param threadName the thread name to set.
+ */
+ public void setThreadName(String threadName)
+ {
+ this.threadName = threadName;
+ }
+
+ /**
+ * Get the method signature of this message.
+ *
+ * @return the method signature.
+ */
+ public String getSignature()
+ {
+ return signature;
+ }
+
+ /**
+ * Set the method signature of this message.
+ *
+ * @param signature the method signature to set.
+ */
+ public void setSignature(String signature)
+ {
+ this.signature = signature;
+ }
+
+ /**
+ * Get the arguments of this message. Usually the paramter values of a method.
+ *
+ * @return the arguments.
+ */
+ public Object[] getArguments()
+ {
+ return arguments;
+ }
+
+ /**
+ * Set the arguments of this message.
+ *
+ * @param arguments the arguments to set.
+ */
+ public void setArguments(Object[] arguments)
+ {
+ this.arguments = arguments;
+ }
+
+ /**
+ * Get the source location where this message is generated in the format
+ * filename:linenumber.
+ *
+ * @return the source location.
+ */
+ public String getSourceLocation()
+ {
+ return sourceLocation;
+ }
+
+ /**
+ * Set the source location where this message is generated.
+ *
+ * @param sourceLocation the source location string to set.
+ */
+ public void setSourceLocation(String sourceLocation)
+ {
+ this.sourceLocation = sourceLocation;
+ }
+
+ /**
+ * Get the strack trace at the point this message is generated.
+ *
+ * @return the stack trace string.
+ */
+ public String getStackTrace()
+ {
+ return stackTrace;
+ }
+
+ /**
+ * Set the stack trace at the point this message is generated.
+ *
+ * @param stackTrace the stack trace string to set.
+ */
+ public void setStackTrace(String stackTrace)
+ {
+ this.stackTrace = stackTrace;
+ }
+
+ /**
+ * Get the sequence number.
+ * <p>
+ * Sequence numbers are normally assigned in the LogRecord
+ * constructor, which assigns unique sequence numbers to
+ * each new LogRecord in increasing order.
+ *
+ * @return the sequence number
+ */
+ public long getSequenceNumber() {
+ return sequenceNumber;
+ }
+
+ /**
+ * Set the sequence number.
+ * <p>
+ * Sequence numbers are normally assigned in the LogRecord constructor,
+ * so it should not normally be necessary to use this signature.
+ *
+ * @param seq sequence number
+ */
+ public void setSequenceNumber(long seq) {
+ sequenceNumber = seq;
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugLogger.java b/opends/src/server/org/opends/server/loggers/debug/DebugLogger.java
new file mode 100644
index 0000000..d4b0e4a
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugLogger.java
@@ -0,0 +1,339 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+import org.opends.server.api.ProtocolElement;
+import org.opends.server.api.LogPublisher;
+import org.opends.server.loggers.Logger;
+import org.opends.server.loggers.LogLevel;
+import org.opends.server.loggers.LogRecord;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.nio.ByteBuffer;
+
+import com.sleepycat.je.OperationStatus;
+import com.sleepycat.je.Database;
+import com.sleepycat.je.Transaction;
+import com.sleepycat.je.DatabaseEntry;
+
+/**
+ * A logger for debug and trace logging. DebugLogger provides a debugging
+ * management access point. It is used to configure the Tracers, as well as
+ * to register a per-class tracer.
+ *
+ * Various stub debug methods are provided to log different types of debug
+ * messages. However, these methods do not contain any actual implementation.
+ * Tracer aspects are later weaved to catch alls to these stub methods and
+ * do the work of logging the message.
+ *
+ * DebugLogger is self-initializing.
+ */
+public class DebugLogger extends Logger
+{
+ /**
+ * Whether the debug logger is enabled or disabled.
+ */
+ static boolean enabled = false;
+ private static DebugLogger logger = null;
+
+ private Map<String, Tracer> classTracers;
+ private TraceConfiguration config;
+
+ private DebugLogger()
+ {
+ super(new DebugErrorHandler());
+
+ classTracers = new HashMap<String, Tracer>();
+ config = new TraceConfiguration();
+ }
+
+ /**
+ * Publish a record to all the registered publishers.
+ *
+ * @param record The log record to publish.
+ */
+ protected void publishRecord(LogRecord record)
+ {
+ for(LogPublisher p : publishers)
+ {
+ p.publish(record, handler);
+ }
+ }
+
+ /**
+ * Obtain the trace logger singleton.
+ * @return the trace logger singleton.
+ */
+ public static synchronized DebugLogger getLogger()
+ {
+ if (logger == null) {
+ logger= new DebugLogger();
+ }
+
+ return logger;
+ }
+
+ /**
+ * Enable or disable the debug logger.
+ *
+ * @param enable if the debug logger should be enabled.
+ */
+ public static void enabled(boolean enable)
+ {
+ enabled = enable;
+ }
+
+ /**
+ * Obtain the status of this logger singleton.
+ *
+ * @return the status of this logger.
+ */
+ public static boolean debugEnabled()
+ {
+ return enabled;
+ }
+
+ /**
+ * Register a trace logger for the specified class.
+ * @param className - the class for which to register the tracer under.
+ * @param tracer - the tracer object to register.
+ */
+ public synchronized void registerTracer(String className,
+ Tracer tracer)
+ {
+ Tracer traceLogger = classTracers.get(className);
+ if (traceLogger == null) {
+ classTracers.put(className, tracer);
+ }
+ else
+ {
+ //TODO: handle dup case!
+ }
+ }
+
+ /**
+ * Retrives the current tracing configuration of the debug logger.
+ *
+ * @return the current tracing configuration of the debug logger.
+ */
+ protected TraceConfiguration getConfiguration()
+ {
+ return config;
+ }
+
+ /**
+ * Update the tracing configuration of the debug logger with the specified
+ * trace configuration.
+ *
+ * @param config the new configuration to apply.
+ */
+ public void updateConfiguration(TraceConfiguration config)
+ {
+ this.config = config;
+
+ for(Tracer tracer : classTracers.values())
+ {
+ tracer.updateSettings();
+ }
+ }
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the INFO level.
+ * Implementation provided by AspectJ.
+ *
+ * @param msg the message to be logged.
+ */
+ public static void debugVerbose(String msg) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the INFO level.
+ * Implementation provided by AspectJ.
+ *
+ * @param msg the message to be logged.
+ */
+ public static void debugInfo(String msg) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the WARNING
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg the message to be logged.
+ */
+ public static void debugWarning(String msg) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the ERROR
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg the message to be logged.
+ */
+ public static void debugError(String msg) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the INFO
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg The message to be formatted and logged.
+ * @param msgArgs The set of arguments to use to replace tokens in the
+ * format string before it is returned.
+ */
+ public static void debugVerbose(String msg, Object... msgArgs) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the INFO
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg The message to be formatted and logged.
+ * @param msgArgs The set of arguments to use to replace tokens in the
+ * format string before it is returned.
+ */
+ public static void debugInfo(String msg, Object... msgArgs) {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the WARNING
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg The message to be formatted and logged.
+ * @param msgArgs The set of arguments to use to replace tokens in the
+ * format string before it is returned.
+ */
+ public static void debugWarning(String msg, Object... msgArgs)
+ {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method at the ERROR
+ * level. Implementation provided by AspectJ.
+ *
+ * @param msg The message to be formatted and logged.
+ * @param msgArgs The set of arguments to use to replace tokens in the
+ * format string before it is returned.
+ */
+ public static void debugError(String msg, Object... msgArgs)
+ {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param msg The message to be logged.
+ */
+ public static void debugMessage(LogLevel level, String msg)
+ {}
+
+
+ /**
+ * Stub method for logging an arbitrary event in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param msg The message to be formatted and logged.
+ * @param msgArgs The set of arguments to use to replace tokens in the
+ * format string before it is returned.
+ */
+ public static void debugMessage(LogLevel level, String msg,
+ Object... msgArgs) {}
+
+
+ /**
+ * Stub method for logging a cought exception in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param t The exception cought.
+ */
+ public static void debugCought(LogLevel level, Throwable t)
+ {}
+
+ /**
+ * Stub method for logging a thrown exception in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param t The exception being thrown.
+ */
+ public static void debugThrown(LogLevel level, Throwable t)
+ {}
+
+
+ /**
+ * Stub method for logging an JE database access in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param status The JE return status code of the operation.
+ * @param database The JE database handle operated on.
+ * @param txn The JE transaction handle used in the operation.
+ * @param key The database key operated on.
+ * @param data The database value read or written.
+ */
+ public static void debugJEAccess(LogLevel level,
+ OperationStatus status,
+ Database database,
+ Transaction txn,
+ DatabaseEntry key, DatabaseEntry data) {}
+
+ /**
+ * Stub method for logging raw data in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param bytes The data to dump.
+ */
+ public static void debugData(LogLevel level, byte[] bytes) {}
+
+ /**
+ * Stub method for logging raw data in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param buffer The data to dump.
+ */
+ public static void debugData(LogLevel level, ByteBuffer buffer) {}
+
+ /**
+ * Stub method for logging a protocol element in a method.
+ * Implementation provided by AspectJ.
+ *
+ * @param level The level of the message being logged.
+ * @param element The protocol element to dump.
+ */
+ public static void debugProtocolElement(LogLevel level,
+ ProtocolElement element) {}
+
+
+
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/DebugStackTraceFormatter.java b/opends/src/server/org/opends/server/loggers/debug/DebugStackTraceFormatter.java
new file mode 100644
index 0000000..7bcf002
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/DebugStackTraceFormatter.java
@@ -0,0 +1,178 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+/**
+ * A DebugStackTraceFormatter converts an exception's stack trace into
+ * a String appropriate for tracing, optionally performing filtering
+ * of stack frames.
+ */
+public class DebugStackTraceFormatter
+{
+ /**
+ * The stack depth value to indicate the entire stack should be printed.
+ */
+ public static final int COMPLETE_STACK= Integer.MAX_VALUE;
+ /**
+ * A nested frame filter that removes debug and trailing no OpenDS frames.
+ */
+ public static final FrameFilter SMART_FRAME_FILTER = new SmartFrameFilter();
+
+ /**
+ * A FrameFilter provides stack frame filtering used during formatting.
+ */
+ public interface FrameFilter {
+
+ /**
+ * Filters out all undesired stack frames from the given Throwable's
+ * stack trace.
+ * @param t - the Throwable for which a stack trace is being generated.
+ * @return an array of StackTraceElements to be used in formatting.
+ */
+ public StackTraceElement[] getFilteredStackTrace(Throwable t);
+ }
+
+ /**
+ * A basic FrameFilter that filters out frames from the debug logging and
+ * non OpenDS classes.
+ */
+ private static class SmartFrameFilter implements FrameFilter {
+
+ private boolean isFrameForPackage(StackTraceElement frame,
+ String packageName)
+ {
+ boolean isContained= false;
+
+ if (frame != null) {
+ String className= frame.getClassName();
+ isContained= className != null && className.startsWith(packageName);
+ }
+ return isContained;
+ }
+
+ /**
+ * Return the stack trace of an exception with debug and trailing non
+ * OpenDS frames filtered out.
+ *
+ * @param t the throwable to filter.
+ * @return the filtered stack trace.
+ */
+ public StackTraceElement[] getFilteredStackTrace(Throwable t)
+ {
+ StackTraceElement[] frames= t.getStackTrace();
+ StackTraceElement[] trimmedStack= null;
+ if (frames != null && frames.length > 0) {
+ int firstFrame= 0;
+
+ // Skip leading frames debug logging classes
+ while (firstFrame < frames.length &&
+ isFrameForPackage(frames[firstFrame],
+ "org.opends.server.loggers")) {
+ firstFrame++;
+ }
+
+ // Skip trailing frames not in OpenDS classes
+ int lastFrame= frames.length - 1;
+ while (lastFrame > firstFrame &&
+ !isFrameForPackage(frames[lastFrame], "org.opends")) {
+ lastFrame--;
+ }
+
+ trimmedStack= new StackTraceElement[lastFrame - firstFrame + 1];
+ for (int i= firstFrame; i <= lastFrame; i++) {
+ trimmedStack[i - firstFrame]= frames[i];
+ }
+ }
+
+ return trimmedStack;
+ }
+ }
+
+ /**
+ * Generate a String representation of the entire stack trace of the
+ * given Throwable.
+ * @param t - the Throwable for which to generate the stack trace.
+ * @return the stack trace.
+ */
+ public static String formatStackTrace(Throwable t)
+ {
+ return formatStackTrace(t, null, COMPLETE_STACK, true);
+ }
+
+ /**
+ * Generate a String representation of the possibly filtered stack trace
+ * of the given Throwable.
+ * @param t - the Throwable for which to generate the stack trace.
+ * @param filter - a FrameFilter to use to exclude some stack frames from
+ * the trace. If null, no filtering is performed.
+ * @param maxDepth - the maximum number of stack frames to include in the
+ * trace.
+ * @param includeCause - also include the stack trace for the cause Throwable.
+ * @return the stack trace.
+ */
+ public static String formatStackTrace(Throwable t, FrameFilter filter,
+ int maxDepth, boolean includeCause)
+ {
+ StringBuffer buffer= new StringBuffer();
+
+ while(t != null)
+ {
+ StackTraceElement[] frames= filter != null ?
+ filter.getFilteredStackTrace(t) : t.getStackTrace();
+ if (frames != null) {
+ int frameLimit= Math.min(maxDepth, frames.length);
+ if (frameLimit > 0) {
+
+
+ for (int i= 0; i < frameLimit; i++) {
+ buffer.append(frames[i]);
+ buffer.append(" / ");
+ }
+
+ if(frameLimit < frames.length)
+ {
+ buffer.append("...(");
+ buffer.append(frames.length - frameLimit);
+ buffer.append(" more)");
+ }
+ }
+ }
+
+ if(includeCause && t.getCause() != null)
+ {
+ t = t.getCause();
+ buffer.append("; caused by ");
+ }
+ else
+ {
+ t = null;
+ }
+ }
+
+ return buffer.toString();
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/TraceConfiguration.java b/opends/src/server/org/opends/server/loggers/debug/TraceConfiguration.java
new file mode 100644
index 0000000..0120e6e
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/TraceConfiguration.java
@@ -0,0 +1,165 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.loggers.debug;
+
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.HashMap;
+import java.util.Collections;
+
+/**
+ * A LoggingConfiguration for the debug logging system.
+ */
+public class TraceConfiguration
+{
+ private static final String GLOBAL= "_global";
+
+ private Map<String, TraceSettings> classTraceSettings;
+ private Map<String, Map<String, TraceSettings>> methodTraceSettings;
+
+
+ /**
+ * Construct a default configuration where all settings are disabled.
+ */
+ public TraceConfiguration()
+ {
+ classTraceSettings = null;
+ methodTraceSettings = null;
+ }
+
+ /**
+ * Gets the method trace levels for a specified class.
+ * @param className - a fully qualified class name to get method trace
+ * levels for
+ * @return an unmodifiable map of trace levels keyed by method name. If
+ * no method level tracing is configured for the scope, <b>null</b> is
+ * returned.
+ */
+ public Map<String, TraceSettings> getMethodSettings(String className)
+ {
+ Map<String, TraceSettings> levels = null;
+
+ if (DebugLogger.enabled && methodTraceSettings != null) {
+ // Method levels are always at leaves in the
+ // hierarchy, so don't bother searching up.
+ Map<String, TraceSettings> value= methodTraceSettings.get(className);
+ if (value != null ) {
+ levels= value;
+ }
+ }
+ return levels != null ? Collections.unmodifiableMap(levels) : null;
+ }
+
+ /**
+ * Get the trace settings for a specified class.
+ * @param className - a fully qualified class name to get the
+ * trace level for
+ * @return the current trace settings for the class.
+ */
+ public TraceSettings getTraceSettings(String className)
+ {
+ TraceSettings settings = TraceSettings.DISABLED;
+
+ // If we're not enabled, trace level is DISABLED.
+ if (DebugLogger.enabled && classTraceSettings != null) {
+ // Find most specific trace setting which covers this
+ // fully qualified class name
+ // Search up the hierarchy for a match.
+ String searchName= className;
+ Object value= null;
+ value= classTraceSettings.get(searchName);
+ while (value == null && searchName != null) {
+ int clipPoint= searchName.lastIndexOf('$');
+ if (clipPoint == -1) clipPoint= searchName.lastIndexOf('.');
+ if (clipPoint != -1) {
+ searchName= searchName.substring(0, clipPoint);
+ value= classTraceSettings.get(searchName);
+ }
+ else {
+ searchName= null;
+ }
+ }
+
+ // Use global settings, if nothing more specific was found.
+ if (value == null) value= classTraceSettings.get(GLOBAL);
+
+ if (value != null) {
+ settings= (TraceSettings)value;
+ }
+ }
+ return settings;
+ }
+
+ /**
+ * Adds a trace settings to the current set for a specified scope.
+ * @param scope - the scope to set trace settings for; this is a fully
+ * qualified class name.
+ * @param settings - the trace settings for the scope
+ */
+ public void addTraceSettings(String scope, TraceSettings settings)
+ {
+ if (scope == null) {
+ setClassSettings(GLOBAL, settings);
+ }
+ else {
+ int methodPt= scope.lastIndexOf('#');
+ if (methodPt != -1) {
+ String methodName= scope.substring(methodPt+1);
+ scope= scope.substring(0, methodPt);
+ setMethodSettings(scope, methodName, settings);
+ }
+ else {
+ setClassSettings(scope, settings);
+ }
+ }
+ }
+
+ private synchronized void setClassSettings(String className,
+ TraceSettings settings)
+ {
+ if(classTraceSettings == null) classTraceSettings =
+ new HashMap<String, TraceSettings>();
+
+ classTraceSettings.put(className, settings);
+ }
+
+ private synchronized void setMethodSettings(String className,
+ String methodName,
+ TraceSettings settings)
+ {
+ if (methodTraceSettings == null) methodTraceSettings =
+ new HashMap<String, Map<String, TraceSettings>>();
+ Map<String, TraceSettings> methodLevels=
+ methodTraceSettings.get(className);
+ if (methodLevels == null) {
+ methodLevels= new TreeMap<String, TraceSettings>();
+ methodTraceSettings.put(className, methodLevels);
+ }
+
+ methodLevels.put(methodName, settings);
+ }
+}
diff --git a/opends/src/server/org/opends/server/loggers/debug/TraceSettings.java b/opends/src/server/org/opends/server/loggers/debug/TraceSettings.java
new file mode 100644
index 0000000..b9446ae
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/TraceSettings.java
@@ -0,0 +1,118 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+
+package org.opends.server.loggers.debug;
+
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.loggers.LogLevel;
+import org.opends.server.loggers.LogCategory;
+
+import java.util.Set;
+
+/**
+ * This class encapsulates the trace settings in effect at a given traceing
+ * scope.
+ */
+public class TraceSettings
+{
+ /** A TraceSettings object representing a fully disabled trace state. */
+ static final TraceSettings DISABLED =
+ new TraceSettings(DebugLogLevel.DISABLED);
+
+ final LogLevel level;
+ final Set<LogCategory> includeCategories;
+
+ final boolean noArgs;
+ final boolean noRetVal;
+ final int stackDepth;
+ final boolean includeCause;
+
+ /**
+ * Construct new trace settings at the specified log level.
+ *
+ * @param level the log level for this setting.
+ */
+ public TraceSettings(LogLevel level)
+ {
+ this(level, null, false, false, 0, false);
+
+ }
+
+ /**
+ * Construct new trace settings at the specified log level and including
+ * the categories.
+ *
+ * @param level the log level for this setting.
+ * @param includeCategories the categories to include in this setting.
+ */
+ public TraceSettings(LogLevel level, Set<LogCategory> includeCategories)
+ {
+ this(level, includeCategories, false, false, 0, false);
+
+ }
+
+ /**
+ * Construct new trace settings at the specified log level and including
+ * the categories. Optionally turn off arguments and return value in entry
+ * and exit messages.
+ *
+ * @param level the log level for this setting.
+ * @param includeCategories the categories to include in this setting.
+ * @param noArgs whether to include arguments in the log messages.
+ * @param noRetVal whether to include return values in the log messages.
+ */
+ public TraceSettings(LogLevel level, Set<LogCategory> includeCategories,
+ boolean noArgs, boolean noRetVal)
+ {
+ this(level, includeCategories, noArgs, noRetVal, 0, false);
+ }
+
+ /**
+ * Construct new trace settings at the specified log level and including
+ * the categories. Optionally turn off arguments, return value in entry
+ * and exit messages, and specifying the depth of stack traces and whether
+ * to include the cause of exceptions.
+ *
+ * @param level the log level for this setting.
+ * @param includeCategories the categories to include in this setting.
+ * @param noArgs whether to include arguments in the log messages.
+ * @param noRetVal whether to include return values in the log messages.
+ * @param stackDepth the stack depth to display in log messages.
+ * @param includeCause whether to include the cause of exceptions.
+ */
+ public TraceSettings(LogLevel level, Set<LogCategory> includeCategories,
+ boolean noArgs, boolean noRetVal, int stackDepth,
+ boolean includeCause)
+ {
+ this.level = level;
+ this.includeCategories = includeCategories;
+ this.noArgs = noArgs;
+ this.noRetVal = noRetVal;
+ this.stackDepth = stackDepth;
+ this.includeCause = includeCause;
+ }
+}
\ No newline at end of file
diff --git a/opends/src/server/org/opends/server/loggers/debug/Tracer.java b/opends/src/server/org/opends/server/loggers/debug/Tracer.java
new file mode 100644
index 0000000..7afed30
--- /dev/null
+++ b/opends/src/server/org/opends/server/loggers/debug/Tracer.java
@@ -0,0 +1,1029 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2007 Sun Microsystems, Inc.
+ */
+
+package org.opends.server.loggers.debug;
+
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.annotation.*;
+import org.aspectj.lang.reflect.SourceLocation;
+
+import java.util.Map;
+import java.nio.ByteBuffer;
+
+import static org.opends.server.messages.MessageHandler.getMessage;
+import org.opends.server.util.ServerConstants;
+import org.opends.server.util.StaticUtils;
+import org.opends.server.api.ProtocolElement;
+import org.opends.server.loggers.*;
+import org.opends.server.types.DebugLogCategory;
+import org.opends.server.types.DebugLogLevel;
+import com.sleepycat.je.*;
+
+/**
+ * An aspect for source-code tracing at the method level.
+ *
+ * One Tracer aspect instance exists for each Java class using tracing.
+ * Tracer must be registered with the DebugLogger.
+ *
+ * Logging is always done at a level basis, with debug log messages
+ * exceeding the trace threshold being traced, others being discarded.
+ */
+@Aspect("pertypewithin(*)")
+public class Tracer
+{
+ /**
+ * Pointcut for matching static context events.
+ */
+ @Pointcut("!this(Object)")
+ private void staticContext()
+ {
+ }
+
+ /**
+ * Pointcut for matching non static context events.
+ * @param obj The object being operated on.
+ */
+ @Pointcut("this(obj)")
+ private void nonStaticContext(Object obj)
+ {
+ }
+
+ /**
+ * Pointcut for matching all toString() methods.
+ */
+ @Pointcut("execution(String *..toString())")
+ private void toStringMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching all getMessage() methods.
+ */
+ @Pointcut("execution(String org.opends.server." +
+ "messages.MessageHandler.getMessage(..))")
+ private void getMessageMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugMessage() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugMessage(..))")
+ private void logMessageMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugVerbose() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugVerbose(..))")
+ private void logVerboseMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugInfo() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugInfo(..))")
+ private void logInfoMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugWarning() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugWarning(..))")
+ private void logWarningMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugError() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugError(..))")
+ private void logErrorMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugThrown() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugThrown(..))")
+ private void logThrownMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugCought() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugCought(..))")
+ private void logCoughtMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugJEAccess() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugJEAccess(..))")
+ private void logJEAccessMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugData() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugData(..))")
+ private void logDataMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching debugProtocolElement() methods.
+ */
+ @Pointcut("call(public static void org.opends.server." +
+ "loggers.debug.DebugLogger.debugProtocolElement(..))")
+ private void logProtocolElementMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching all debug logging methods.
+ */
+ @Pointcut("logMessageMethod() || logVerboseMethod() || logInfoMethod() || " +
+ "logWarningMethod() || logErrorMethod() || logCoughtMethod() || " +
+ "logJEAccessMethod() || logDataMethod() || logProtocolElementMethod()")
+ private void logMethods()
+ {
+ }
+
+ /**
+ * Pointcut to exclude all pointcuts which should not be adviced by the
+ * debug logger.
+ */
+ @Pointcut("within(Tracer+) || within(org.opends.server.loggers.debug..*) " +
+ "|| toStringMethod() " +
+ "|| getMessageMethod() || logMethods()")
+ private void excluded()
+ {
+ }
+
+ /**
+ * Pointcut for matching the execution of all public methods.
+ */
+ @Pointcut("execution(public * *(..)) && !excluded()")
+ void tracedMethod()
+ {
+ }
+
+ /**
+ * Pointcut for matching the execution of all constructors.
+ */
+ @Pointcut("execution(public new(..)) && !excluded()")
+ void tracedConstructor()
+ {
+ }
+
+ /**
+ * Pointcut for matching only if tracing is enabled.
+ *
+ * @return if debug logging is enabled.
+ */
+ @Pointcut("if() && tracingScope()")
+ public static boolean shouldTrace()
+ {
+ return DebugLogger.enabled;
+ }
+
+ /**
+ * Pointcut for matching only within the scope of the server packages.
+ */
+ @Pointcut("within(org.opends.server..*)")
+ protected void tracingScope()
+ {
+ }
+
+ //The default level to log constructor exectuions.
+ private static final LogLevel DEFAULT_CONSTRUCTOR_LEVEL =
+ DebugLogLevel.VERBOSE;
+ //The default level to log method entry and exit pointcuts.
+ private static final LogLevel DEFAULT_ENTRY_EXIT_LEVEL =
+ DebugLogLevel.VERBOSE;
+
+ // The class this tracer traces.
+ private String className;
+
+ //The current settings for this tracer.
+ private TraceSettings settings;
+ private Map<String, TraceSettings> methodSettings;
+
+ // The DebugLogger this tracer is genereated by.
+ private DebugLogger logger;
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisJoinPointStaticPart the JoinPoint reflection object.
+ */
+ @Before("staticinitialization(*) && tracingScope()")
+ public void initializeTracer(JoinPoint.StaticPart thisJoinPointStaticPart)
+ {
+ className = thisJoinPointStaticPart.getSignature().getDeclaringTypeName();
+ logger = DebugLogger.getLogger();
+ logger.registerTracer(className, this);
+ updateSettings();
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisJoinPoint the JoinPoint reflection object.
+ */
+ @Before("shouldTrace() && tracedConstructor()")
+ public void traceConstructor(JoinPoint thisJoinPoint)
+ {
+ LogCategory category = DebugLogCategory.CONSTRUCTOR;
+ LogLevel level = DEFAULT_CONSTRUCTOR_LEVEL;
+ Signature signature = thisJoinPoint.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >= getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisJoinPoint.getSourceLocation();
+ Object[] args = thisJoinPoint.getArgs();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ null, args, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisJoinPoint the JoinPoint reflection object.
+ * @param obj the object this method operations on.
+ */
+ @Before("shouldTrace() && tracedMethod() && nonStaticContext(obj)")
+ public void traceNonStaticMethodEntry(JoinPoint thisJoinPoint, Object obj)
+ {
+ LogCategory category = DebugLogCategory.ENTER;
+ LogLevel level = DEFAULT_ENTRY_EXIT_LEVEL;
+ Signature signature = thisJoinPoint.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >= getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisJoinPoint.getSourceLocation();
+ Object[] args = thisJoinPoint.getArgs();
+ publish(category, level, signature.toLongString(), sl.toString(), obj,
+ null, args, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisJoinPoint the JoinPoint reflection object.
+ */
+ @Before("shouldTrace() && tracedMethod() && staticContext()")
+ public void traceStaticMethodEntry(JoinPoint thisJoinPoint)
+ {
+ LogCategory category = DebugLogCategory.ENTER;
+ LogLevel level = DEFAULT_ENTRY_EXIT_LEVEL;
+ Signature signature = thisJoinPoint.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >= getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisJoinPoint.getSourceLocation();
+ Object[] args = thisJoinPoint.getArgs();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ null, args, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisJoinPointStaticPart the JoinPoint reflection object.
+ * @param ret the return value of the method.
+ */
+ @AfterReturning(pointcut = "shouldTrace() && tracedMethod()",
+ returning = "ret")
+ public void traceReturn(JoinPoint.StaticPart thisJoinPointStaticPart,
+ Object ret)
+ {
+ LogCategory category = DebugLogCategory.EXIT;
+ LogLevel level = DEFAULT_ENTRY_EXIT_LEVEL;
+ Signature signature = thisJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ null, new Object[]{ret}, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ */
+ @Around("shouldTrace() && logVerboseMethod() && args(msg)")
+ public void traceVerbose(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart, String msg)
+ {
+ LogLevel level = DebugLogLevel.VERBOSE;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ * @param msgArgs arguments to place into the format string.
+ */
+ @Around("shouldTrace() && logVerboseMethod() && args(msg, msgArgs)")
+ public void traceVerbose(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ String msg, Object[] msgArgs)
+ {
+ LogLevel level = DebugLogLevel.VERBOSE;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, msgArgs, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ */
+ @Around("shouldTrace() && logInfoMethod() && args(msg)")
+ public void traceInfo(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart, String msg)
+ {
+ LogLevel level = DebugLogLevel.INFO;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ * @param msgArgs arguments to place into the format string.
+ */
+ @Around("shouldTrace() && logInfoMethod() && args(msg, msgArgs)")
+ public void traceInfo(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ String msg, Object[] msgArgs)
+ {
+ LogLevel level = DebugLogLevel.INFO;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, msgArgs, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ */
+ @Around("shouldTrace() && logWarningMethod() && args(msg)")
+ public void traceWarning(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart, String msg)
+
+ {
+ LogLevel level = DebugLogLevel.WARNING;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ * @param msgArgs arguments to place into the format string.
+ */
+ @Around("shouldTrace() && logWarningMethod() && args(msg, msgArgs)")
+ public void traceWarning(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ String msg, Object[] msgArgs)
+ {
+ LogLevel level = DebugLogLevel.WARNING;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, msgArgs, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ */
+ @Around("shouldTrace() && logErrorMethod() && args(msg)")
+ public void traceError(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart, String msg)
+
+ {
+ LogLevel level = DebugLogLevel.ERROR;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param msg message to format and log.
+ * @param msgArgs arguments to place into the format string.
+ */
+ @Around("shouldTrace() && logErrorMethod() && args(msg, msgArgs)")
+ public void traceError(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ String msg, Object[] msgArgs)
+ {
+ LogLevel level = DebugLogLevel.ERROR;
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(),
+ sl.toString(), null, msg, msgArgs, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param msg message to format and log.
+ */
+ @Around("shouldTrace() && logMessageMethod() && args(level, msg)")
+ public void traceMessage(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, String msg)
+ {
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(),
+ null, msg, null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param msg message to format and log.
+ * @param msgArgs arguments to place into the format string.
+ */
+ @Around("shouldTrace() && logMessageMethod() && args(level, msg, msgArgs)")
+ public void traceMessage(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, String msg, Object... msgArgs)
+ {
+ LogCategory category = DebugLogCategory.MESSAGE;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(),
+ null, msg, msgArgs, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param ex the exception thrown.
+ */
+ @Around("shouldTrace() && logThrownMethod() && args(level, ex)")
+ public void traceThrown(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, Throwable ex)
+ {
+ LogCategory category = DebugLogCategory.THROWN;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(),
+ null, null , new Object[]{ex}, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param ex the exception cought.
+ */
+ @Around("shouldTrace() && logCoughtMethod() && args(level, ex)")
+ public void traceCought(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, Throwable ex)
+ {
+ LogCategory category = DebugLogCategory.COUGHT;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(),
+ null, null , new Object[]{ex}, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param status status of the JE operation.
+ * @param database the database handle.
+ * @param txn transaction handle (may be null).
+ * @param key the key to dump.
+ * @param data the data to dump.
+ */
+ @Around("shouldTrace() && logJEAccessMethod() && args(level, status, " +
+ "database, txn, key, data)")
+ public void traceJEAccess(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, OperationStatus status,
+ Database database, Transaction txn,
+ DatabaseEntry key, DatabaseEntry data)
+ {
+ LogCategory category = DebugLogCategory.DATABASE_ACCESS;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+
+ // Build the string that is common to category DATABASE_ACCESS.
+ StringBuilder builder = new StringBuilder();
+ builder.append(" (");
+ builder.append(status.toString());
+ builder.append(")");
+ builder.append(" db=");
+ try
+ {
+ builder.append(database.getDatabaseName());
+ }
+ catch(DatabaseException de)
+ {
+ builder.append(de.toString());
+ }
+ if (txn != null)
+ {
+ builder.append(" txnid=");
+ try
+ {
+ builder.append(txn.getId());
+ }
+ catch(DatabaseException de)
+ {
+ builder.append(de.toString());
+ }
+ }
+ else
+ {
+ builder.append(" txnid=none");
+ }
+
+ // If the operation was successful we log the same common information
+ // plus the key and data under category DATABASE_READ or DATABASE_WRITE
+ if (status == OperationStatus.SUCCESS)
+ {
+ builder.append(ServerConstants.EOL);
+ builder.append(" key:");
+ builder.append(ServerConstants.EOL);
+ StaticUtils.byteArrayToHexPlusAscii(builder, key.getData(), 4);
+ if (data != null)
+ {
+ builder.append("data(len=");
+ builder.append(data.getSize());
+ builder.append("):");
+ builder.append(ServerConstants.EOL);
+ StaticUtils.byteArrayToHexPlusAscii(builder, data.getData(), 4);
+ }
+ }
+
+
+ SourceLocation sl = thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ builder.toString(), null, settings);
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param data the data to dump.
+ */
+ @Around("shouldTrace() && logDataMethod() && args(level, data)")
+ public void traceData(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, byte[] data)
+ {
+ LogCategory category = DebugLogCategory.DATA;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ if(data != null)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(ServerConstants.EOL);
+ builder.append("data(len=");
+ builder.append(data.length);
+ builder.append("):");
+ builder.append(ServerConstants.EOL);
+ StaticUtils.byteArrayToHexPlusAscii(builder, data, 4);
+ SourceLocation sl =
+ thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ builder.toString(), null, settings);
+ }
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param element the protocol element to dump.
+ */
+ @Around("shouldTrace() && logProtocolElementMethod() && args(level, element)")
+ public void traceProtocolElement(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, ProtocolElement element)
+ {
+ LogCategory category = DebugLogCategory.PROTOCOL;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ if(element != null)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(ServerConstants.EOL);
+ element.toString(builder, 4);
+ SourceLocation sl =
+ thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ builder.toString(), null, settings);
+ }
+ }
+ }
+
+ /**
+ * AspectJ Implementation.
+ *
+ * @param thisEnclosingJoinPointStaticPart the JoinPoint reflection object.
+ * @param level the level of the log message.
+ * @param buffer the data to dump.
+ */
+ @Around("shouldTrace() && logDataMethod() && args(level, buffer)")
+ public void traceData(JoinPoint.EnclosingStaticPart
+ thisEnclosingJoinPointStaticPart,
+ LogLevel level, ByteBuffer buffer)
+ {
+ LogCategory category = DebugLogCategory.DATA;
+ Signature signature = thisEnclosingJoinPointStaticPart.getSignature();
+ TraceSettings settings = getSettings(signature.getName());
+ if (level.intValue() >=
+ getEffectiveLevel(settings, category).intValue())
+ {
+ if(buffer != null)
+ {
+ byte[] data = buffer.array();
+ StringBuilder builder = new StringBuilder();
+ builder.append(ServerConstants.EOL);
+ builder.append("data(len=");
+ builder.append(data.length);
+ builder.append("):");
+ builder.append(ServerConstants.EOL);
+ StaticUtils.byteArrayToHexPlusAscii(builder, data, 4);
+ SourceLocation sl =
+ thisEnclosingJoinPointStaticPart.getSourceLocation();
+ publish(category, level, signature.toLongString(), sl.toString(), null,
+ builder.toString(), null, settings);
+ }
+ }
+ }
+
+ // Publishes a record, optionally performing some "special" work:
+ // - injecting a stack trace into the message
+ // - format the message with argument values
+ private void publish(LogCategory category, LogLevel level,
+ String method, String srcLocation, Object srcObject,
+ String msg, Object[] msgArgs, TraceSettings settings)
+ {
+ int stackDepth = 0;
+
+ if(DebugLogCategory.ENTER.equals(category))
+ {
+ if (settings.noArgs)
+ {
+ msgArgs = null;
+ }
+ else if(msg == null)
+ {
+ msg = buildDefaultEntryMessage(msgArgs.length);
+ }
+
+ stackDepth = settings.stackDepth;
+ }
+ if(DebugLogCategory.EXIT.equals(category))
+ {
+ if (settings.noRetVal)
+ {
+ msgArgs = null;
+ }
+ else if(msg == null)
+ {
+ msg = "returned={%s}";
+ }
+ }
+ if(DebugLogCategory.THROWN.equals(category))
+ {
+ if (msg == null)
+ {
+ msg = "threw={%s}";
+ }
+ stackDepth = settings.stackDepth;
+ }
+
+ if (msg != null && msgArgs != null)
+ {
+ msg = String.format(msg, msgArgs);
+ }
+
+
+ DebugLogRecord record = new DebugLogRecord(category, level, srcObject,
+ logger, msg);
+ record.setSignature(method);
+ record.setSourceLocation(srcLocation);
+
+ // Inject a stack trace if requested
+ if (stackDepth > 0) {
+
+ //Generate a dummy exception to get stack trace if necessary
+ Throwable t;
+ if(!DebugLogCategory.THROWN.equals(category) || msgArgs == null
+ || msgArgs[0] == null)
+ {
+ t= new NullPointerException();
+ }
+ else
+ {
+ t = (Throwable)msgArgs[0];
+ }
+
+ String stack=
+ DebugStackTraceFormatter.formatStackTrace(t,
+ DebugStackTraceFormatter.SMART_FRAME_FILTER,
+ stackDepth, settings.includeCause);
+ if (stack != null) record.setStackTrace(stack);
+ }
+
+ logger.publishRecord(record);
+ }
+
+ // Publishes a record with a message ID
+ private void publish(LogCategory category, LogLevel level,
+ String method, String srcLocation, Object srcObject,
+ int msgID, Object[] msgArgs, TraceSettings settings)
+ {
+ String msg = getMessage(msgID);
+
+ publish(category, level, method, srcLocation, srcObject, msg,
+ msgArgs, settings);
+ }
+
+ /**
+ * Get the current trace settings in effect for the specified method.
+ *
+ * @param method - the method to get trace settings for
+ * @return the current trace settings in effect
+ */
+ protected TraceSettings getSettings(String method)
+ {
+ TraceSettings settings = this.settings;
+
+ if (methodSettings != null)
+ {
+ TraceSettings mSettings = methodSettings.get(method);
+
+ if (mSettings == null)
+ {
+ // Try looking for an undecorated method name
+ int idx = method.indexOf('(');
+ if (idx != -1)
+ {
+ mSettings = methodSettings.get(method.substring(0, idx));
+ }
+ }
+
+ if (mSettings != null) settings = mSettings;
+ }
+
+ return settings;
+ }
+
+ /**
+ * Retrieve the current log level given the trace settings and log category.
+ *
+ * @param settings the trace settings to test from.
+ * @param category the log category to test.
+ * @return the effective log level.
+ */
+ protected LogLevel getEffectiveLevel(TraceSettings settings,
+ LogCategory category)
+ {
+ LogLevel level = settings.level;
+
+ if(settings.includeCategories != null &&
+ !settings.includeCategories.contains(category))
+ {
+ level = DebugLogLevel.DISABLED;
+ }
+
+ return level;
+ }
+
+ private static String buildDefaultEntryMessage(int argCount)
+ {
+ StringBuffer format = new StringBuffer();
+ for (int i = 0; i < argCount; i++)
+ {
+ if (i != 0) format.append(", ");
+ format.append("arg");
+ format.append(i + 1);
+ format.append("={");
+ format.append("%s");
+ format.append("}");
+ }
+
+ return format.toString();
+ }
+
+ /**
+ * Update the settings for this tracer.
+ */
+ protected void updateSettings()
+ {
+ synchronized (this)
+ {
+ this.settings =
+ logger.getConfiguration().getTraceSettings(className);
+ this.methodSettings =
+ logger.getConfiguration().getMethodSettings(className);
+ }
+ }
+
+ /**
+ * Indicates whether a method is traced at the specified level.
+ *
+ * @param level - the trace level to test.
+ * @param category - the category to test.
+ * @param method - the method to test.
+ * @return <b>true</b> if the logger would trace a message for the
+ * method at the level, <b>false</b> otherwise.
+ */
+ public boolean isLogging(LogLevel level, LogCategory category, String method)
+ {
+ return level.intValue() >= getLevel(method, category).intValue();
+ }
+
+ /**
+ * Get the current trace level for the specified method.
+ *
+ * @param method the method to get the trace level for.
+ * @param category the category to get the trace level for.
+ * @return the current trace level for the method.
+ */
+ protected LogLevel getLevel(String method, LogCategory category)
+ {
+ TraceSettings settings = getSettings(method);
+ return getEffectiveLevel(settings, category);
+ }
+
+}
\ No newline at end of file
diff --git a/opends/src/server/org/opends/server/loggers/package-info.java b/opends/src/server/org/opends/server/loggers/package-info.java
index 3555cdd..90557b4 100644
--- a/opends/src/server/org/opends/server/loggers/package-info.java
+++ b/opends/src/server/org/opends/server/loggers/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/messages/CoreMessages.java b/opends/src/server/org/opends/server/messages/CoreMessages.java
index e3980ad..cb19542 100644
--- a/opends/src/server/org/opends/server/messages/CoreMessages.java
+++ b/opends/src/server/org/opends/server/messages/CoreMessages.java
@@ -197,195 +197,6 @@
/**
- * The message ID for the string that will be used for debug messages related
- * to access control processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_ACCESS_CONTROL =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 18;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to backend processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_BACKEND =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 19;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to configuration processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_CONFIG =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 20;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to connection handling.
- */
- public static final int MSGID_DEBUG_CATEGORY_CONNECTION_HANDLING =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 21;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to constructor invocation.
- */
- public static final int MSGID_DEBUG_CATEGORY_CONSTRUCTOR =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 22;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to core server processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_CORE_SERVER =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 23;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to raw data read from a client.
- */
- public static final int MSGID_DEBUG_CATEGORY_DATA_READ =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 24;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to raw data written to a client.
- */
- public static final int MSGID_DEBUG_CATEGORY_DATA_WRITE =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 25;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to an exception that has been caught.
- */
- public static final int MSGID_DEBUG_CATEGORY_EXCEPTION =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 26;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to extended operation processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_EXTENDED_OPERATION =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 27;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to method invocation.
- */
- public static final int MSGID_DEBUG_CATEGORY_ENTER =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 28;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to plugin processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_PLUGIN =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 29;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to a protocol element read from a client.
- */
- public static final int MSGID_DEBUG_CATEGORY_PROTOCOL_READ =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 30;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to a protocol element written to a client.
- */
- public static final int MSGID_DEBUG_CATEGORY_PROTOCOL_WRITE =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 31;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to processing a SASL bind.
- */
- public static final int MSGID_DEBUG_CATEGORY_SASL_MECHANISM =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 32;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to synchronization processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_SYNCHRONIZATION =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 33;
-
-
-
- /**
- * The message ID for the string that will be used for the verbose debug
- * severity.
- */
- public static final int MSGID_DEBUG_SEVERITY_VERBOSE =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 34;
-
-
-
- /**
- * The message ID for the string that will be used for the informational debug
- * severity.
- */
- public static final int MSGID_DEBUG_SEVERITY_INFO =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 35;
-
-
-
- /**
- * The message ID for the string that will be used for the warning debug
- * severity.
- */
- public static final int MSGID_DEBUG_SEVERITY_WARNING =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 36;
-
-
-
- /**
- * The message ID for the string that will be used for the error debug
- * severity.
- */
- public static final int MSGID_DEBUG_SEVERITY_ERROR =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 37;
-
-
-
- /**
- * The message ID for the string that will be used for the debug severity
- * level that deals with client/server communication.
- */
- public static final int MSGID_DEBUG_SEVERITY_COMMUNICATION =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 38;
-
-
-
- /**
* The message ID for the string that will be used for the error log category
* for messages related to access control processing.
*/
@@ -501,24 +312,6 @@
CATEGORY_MASK_CORE | SEVERITY_MASK_INFORMATIONAL | 51;
-
- /**
- * The message ID for the string that will be used for debug messages
- * generated during the Directory Server shutdown process.
- */
- public static final int MSGID_DEBUG_CATEGORY_SHUTDOWN =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 52;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages
- * generated during the Directory Server startup process.
- */
- public static final int MSGID_DEBUG_CATEGORY_STARTUP =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 53;
-
-
/**
* The message ID for the string that will be used for the error message
* severity for fatal error messages.
@@ -1252,15 +1045,6 @@
/**
- * The message ID for the string that will be used for debug messages related
- * to processing with schema elements.
- */
- public static final int MSGID_DEBUG_CATEGORY_SCHEMA =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 128;
-
-
-
- /**
* The message ID for the string that will be used if an error occurs while
* attempting to bootstrap an attribute matching rule. This takes two
* arguments, which are the class name of the matching rule class and a string
@@ -1329,15 +1113,6 @@
/**
- * The message ID for the string that will be used for debug messages related
- * to processing in server extensions.
- */
- public static final int MSGID_DEBUG_CATEGORY_EXTENSIONS =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 136;
-
-
-
- /**
* The message ID for the string that will be used for error messages related
* to processing in server extensions.
*/
@@ -1788,33 +1563,6 @@
/**
- * The message ID for the string that will be used for debug messages related
- * to raw data read from the database.
- */
- public static final int MSGID_DEBUG_CATEGORY_DATABASE_READ =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 177;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to raw data written to the database.
- */
- public static final int MSGID_DEBUG_CATEGORY_DATABASE_WRITE =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 178;
-
-
-
- /**
- * The message ID for the string that will be used for debug messages related
- * to access to the database.
- */
- public static final int MSGID_DEBUG_CATEGORY_DATABASE_ACCESS =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 179;
-
-
-
- /**
* The message ID for the message that will be used if an attempt is made to
* register a backend with a suffix that is already in use. This takes two
* arguments, which are the DN of the suffix that is being registered, and the
@@ -5282,15 +5030,6 @@
/**
- * The message ID for the string that will be used for debug messages related
- * to password policy processing.
- */
- public static final int MSGID_DEBUG_CATEGORY_PASSWORD_POLICY =
- CATEGORY_MASK_CORE | SEVERITY_MASK_DEBUG | 503;
-
-
-
- /**
* The message ID for the message that will be used if an error occurs while
* attempting to decode a password policy subentry value as a DN. This takes
* three arguments, which are the password policy subentry value, the DN of
@@ -6295,53 +6034,6 @@
registerMessage(MSGID_DISCONNECT_DUE_TO_SERVER_ERROR, "Server Error");
- registerMessage(MSGID_DEBUG_CATEGORY_ACCESS_CONTROL,
- DEBUG_CATEGORY_ACCESS_CONTROL);
- registerMessage(MSGID_DEBUG_CATEGORY_BACKEND, DEBUG_CATEGORY_BACKEND);
- registerMessage(MSGID_DEBUG_CATEGORY_CONFIG, DEBUG_CATEGORY_CONFIG);
- registerMessage(MSGID_DEBUG_CATEGORY_CONNECTION_HANDLING,
- DEBUG_CATEGORY_CONNECTION_HANDLING);
- registerMessage(MSGID_DEBUG_CATEGORY_CONSTRUCTOR,
- DEBUG_CATEGORY_CONSTRUCTOR);
- registerMessage(MSGID_DEBUG_CATEGORY_CORE_SERVER,
- DEBUG_CATEGORY_CORE_SERVER);
- registerMessage(MSGID_DEBUG_CATEGORY_DATA_READ, DEBUG_CATEGORY_DATA_READ);
- registerMessage(MSGID_DEBUG_CATEGORY_DATA_WRITE, DEBUG_CATEGORY_DATA_WRITE);
- registerMessage(MSGID_DEBUG_CATEGORY_EXCEPTION, DEBUG_CATEGORY_EXCEPTION);
- registerMessage(MSGID_DEBUG_CATEGORY_EXTENDED_OPERATION,
- DEBUG_CATEGORY_EXTENDED_OPERATION);
- registerMessage(MSGID_DEBUG_CATEGORY_EXTENSIONS, DEBUG_CATEGORY_EXTENSIONS);
- registerMessage(MSGID_DEBUG_CATEGORY_ENTER, DEBUG_CATEGORY_ENTER);
- registerMessage(MSGID_DEBUG_CATEGORY_PASSWORD_POLICY,
- DEBUG_CATEGORY_PASSWORD_POLICY);
- registerMessage(MSGID_DEBUG_CATEGORY_PLUGIN, DEBUG_CATEGORY_PLUGIN);
- registerMessage(MSGID_DEBUG_CATEGORY_PROTOCOL_READ,
- DEBUG_CATEGORY_PROTOCOL_READ);
- registerMessage(MSGID_DEBUG_CATEGORY_PROTOCOL_WRITE,
- DEBUG_CATEGORY_PROTOCOL_WRITE);
- registerMessage(MSGID_DEBUG_CATEGORY_SASL_MECHANISM,
- DEBUG_CATEGORY_SASL_MECHANISM);
- registerMessage(MSGID_DEBUG_CATEGORY_SCHEMA, DEBUG_CATEGORY_SCHEMA);
- registerMessage(MSGID_DEBUG_CATEGORY_SHUTDOWN, DEBUG_CATEGORY_SHUTDOWN);
- registerMessage(MSGID_DEBUG_CATEGORY_STARTUP, DEBUG_CATEGORY_STARTUP);
- registerMessage(MSGID_DEBUG_CATEGORY_SYNCHRONIZATION,
- DEBUG_CATEGORY_SYNCHRONIZATION);
- registerMessage(MSGID_DEBUG_CATEGORY_DATABASE_READ,
- DEBUG_CATEGORY_DATABASE_READ);
- registerMessage(MSGID_DEBUG_CATEGORY_DATABASE_WRITE,
- DEBUG_CATEGORY_DATABASE_WRITE);
- registerMessage(MSGID_DEBUG_CATEGORY_DATABASE_ACCESS,
- DEBUG_CATEGORY_DATABASE_ACCESS);
-
-
- registerMessage(MSGID_DEBUG_SEVERITY_VERBOSE, DEBUG_SEVERITY_VERBOSE);
- registerMessage(MSGID_DEBUG_SEVERITY_INFO, DEBUG_SEVERITY_INFO);
- registerMessage(MSGID_DEBUG_SEVERITY_WARNING, DEBUG_SEVERITY_WARNING);
- registerMessage(MSGID_DEBUG_SEVERITY_ERROR, DEBUG_SEVERITY_ERROR);
- registerMessage(MSGID_DEBUG_SEVERITY_COMMUNICATION,
- DEBUG_SEVERITY_COMMUNICATION);
-
-
registerMessage(MSGID_ERROR_CATEGORY_ACCESS_CONTROL,
ERROR_CATEGORY_ACCESS_CONTROL);
registerMessage(MSGID_ERROR_CATEGORY_BACKEND, ERROR_CATEGORY_BACKEND);
diff --git a/opends/src/server/org/opends/server/messages/JebMessages.java b/opends/src/server/org/opends/server/messages/JebMessages.java
index f7892f7..e4af14a 100644
--- a/opends/src/server/org/opends/server/messages/JebMessages.java
+++ b/opends/src/server/org/opends/server/messages/JebMessages.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.messages;
diff --git a/opends/src/server/org/opends/server/messages/LoggerMessages.java b/opends/src/server/org/opends/server/messages/LoggerMessages.java
index 3ed2393..3452885 100644
--- a/opends/src/server/org/opends/server/messages/LoggerMessages.java
+++ b/opends/src/server/org/opends/server/messages/LoggerMessages.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.messages;
diff --git a/opends/src/server/org/opends/server/messages/MessageHandler.java b/opends/src/server/org/opends/server/messages/MessageHandler.java
index 87ed6a8..be3bc5a 100644
--- a/opends/src/server/org/opends/server/messages/MessageHandler.java
+++ b/opends/src/server/org/opends/server/messages/MessageHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.messages;
diff --git a/opends/src/server/org/opends/server/messages/PluginMessages.java b/opends/src/server/org/opends/server/messages/PluginMessages.java
index 5b5ce6a..1c8c791 100644
--- a/opends/src/server/org/opends/server/messages/PluginMessages.java
+++ b/opends/src/server/org/opends/server/messages/PluginMessages.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.messages;
diff --git a/opends/src/server/org/opends/server/messages/UtilityMessages.java b/opends/src/server/org/opends/server/messages/UtilityMessages.java
index d6be681..89bede4 100644
--- a/opends/src/server/org/opends/server/messages/UtilityMessages.java
+++ b/opends/src/server/org/opends/server/messages/UtilityMessages.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.messages;
diff --git a/opends/src/server/org/opends/server/messages/package-info.java b/opends/src/server/org/opends/server/messages/package-info.java
index f95e0b1..a2a1d52 100644
--- a/opends/src/server/org/opends/server/messages/package-info.java
+++ b/opends/src/server/org/opends/server/messages/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/monitors/BackendMonitor.java b/opends/src/server/org/opends/server/monitors/BackendMonitor.java
index 4eb7e8a..a1516cb 100644
--- a/opends/src/server/org/opends/server/monitors/BackendMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/BackendMonitor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
@@ -44,7 +44,6 @@
import org.opends.server.types.DN;
import org.opends.server.types.ObjectClass;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
@@ -57,11 +56,6 @@
public class BackendMonitor
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.BackendMonitor";
@@ -99,7 +93,6 @@
{
super(backend.getBackendID() + " Backend");
- assert debugConstructor(CLASS_NAME, String.valueOf(backend));
this.backend = backend;
}
@@ -111,8 +104,6 @@
*/
public void initializeMonitorProvider(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
monitorName = backend.getBackendID() + " Backend";
@@ -142,7 +133,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return monitorName;
}
@@ -158,7 +148,6 @@
*/
public ObjectClass getMonitorObjectClass()
{
- assert debugEnter(CLASS_NAME, "getMonitorObjectClass");
return DirectoryConfig.getObjectClass(OC_MONITOR_BACKEND, true);
}
@@ -170,7 +159,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// We don't need do anything on a periodic basis.
return 0;
@@ -183,7 +171,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// No implementaiton is required.
}
@@ -195,7 +182,6 @@
*/
public List<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
LinkedList<Attribute> attrs = new LinkedList<Attribute>();
diff --git a/opends/src/server/org/opends/server/monitors/ConnectionHandlerMonitor.java b/opends/src/server/org/opends/server/monitors/ConnectionHandlerMonitor.java
index 0e3f70c..014ac73 100644
--- a/opends/src/server/org/opends/server/monitors/ConnectionHandlerMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/ConnectionHandlerMonitor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
@@ -44,7 +44,6 @@
import org.opends.server.types.HostPort;
import org.opends.server.types.ObjectClass;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
@@ -57,11 +56,6 @@
public class ConnectionHandlerMonitor
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.ConnectionHandlerMonitor";
@@ -98,7 +92,6 @@
{
super(connectionHandler.getConnectionHandlerName());
- assert debugConstructor(CLASS_NAME, String.valueOf(connectionHandler));
this.connectionHandler = connectionHandler;
}
@@ -110,8 +103,6 @@
*/
public void initializeMonitorProvider(ConfigEntry configEntry)
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
monitorName = connectionHandler.getConnectionHandlerName();
@@ -139,7 +130,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return monitorName;
}
@@ -155,7 +145,6 @@
*/
public ObjectClass getMonitorObjectClass()
{
- assert debugEnter(CLASS_NAME, "getMonitorObjectClass");
return DirectoryConfig.getObjectClass(OC_MONITOR_CONNHANDLER, true);
}
@@ -167,7 +156,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// We don't need do anything on a periodic basis.
return 0;
@@ -180,7 +168,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// No implementaiton is required.
}
@@ -192,7 +179,6 @@
*/
public List<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
LinkedList<Attribute> attrs = new LinkedList<Attribute>();
diff --git a/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java b/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
index 64d0af2..41f7711 100644
--- a/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/DatabaseEnvironmentMonitor.java
@@ -22,11 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.api.AttributeSyntax;
import org.opends.server.api.MonitorProvider;
@@ -58,11 +60,6 @@
*/
public class DatabaseEnvironmentMonitor extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.DatabaseEnvironmentMonitor";
/**
@@ -85,7 +82,6 @@
{
super(name + " Monitor Provider");
- assert debugConstructor(CLASS_NAME);
this.name = name;
this.environment = environment;
@@ -200,7 +196,10 @@
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "addAttributesForStatsObject", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -229,7 +228,10 @@
transactionStats = environment.getTransactionStats(statsConfig);
} catch (DatabaseException e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return null;
}
diff --git a/opends/src/server/org/opends/server/monitors/StackTraceMonitorProvider.java b/opends/src/server/org/opends/server/monitors/StackTraceMonitorProvider.java
index f834f60..475bec7 100644
--- a/opends/src/server/org/opends/server/monitors/StackTraceMonitorProvider.java
+++ b/opends/src/server/org/opends/server/monitors/StackTraceMonitorProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
@@ -43,8 +43,6 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +54,6 @@
public class StackTraceMonitorProvider
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.StackTraceMonitorProvider";
@@ -93,8 +86,6 @@
public void initializeMonitorProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -109,7 +100,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return "JVM Stack Trace";
}
@@ -127,7 +117,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// This monitor does not need to run periodically.
return 0;
@@ -144,7 +133,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// This monitor does not need to run periodically.
return;
@@ -162,7 +150,6 @@
*/
public ArrayList<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
Map<Thread,StackTraceElement[]> threadStacks = Thread.getAllStackTraces();
diff --git a/opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java b/opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java
index 8de182a..e418880 100644
--- a/opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java
+++ b/opends/src/server/org/opends/server/monitors/SystemInfoMonitorProvider.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
@@ -42,7 +42,9 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
@@ -54,11 +56,6 @@
public class SystemInfoMonitorProvider
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.SystemInfoMonitorProvider";
@@ -91,8 +88,6 @@
public void initializeMonitorProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -107,7 +102,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return "System Information";
}
@@ -125,7 +119,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// This monitor does not need to run periodically.
return 0;
@@ -142,7 +135,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// This monitor does not need to run periodically.
return;
@@ -160,7 +152,6 @@
*/
public ArrayList<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
ArrayList<Attribute> attrs = new ArrayList<Attribute>(12);
@@ -191,7 +182,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -222,8 +216,6 @@
*/
private Attribute createAttribute(String name, String value)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(value));
AttributeType attrType = DirectoryServer.getDefaultAttributeType(name);
@@ -237,7 +229,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
values.add(new AttributeValue(encodedValue, encodedValue));
}
diff --git a/opends/src/server/org/opends/server/monitors/TraditionalWorkQueueMonitor.java b/opends/src/server/org/opends/server/monitors/TraditionalWorkQueueMonitor.java
index 89fa8ab..a4977c7 100644
--- a/opends/src/server/org/opends/server/monitors/TraditionalWorkQueueMonitor.java
+++ b/opends/src/server/org/opends/server/monitors/TraditionalWorkQueueMonitor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.monitors;
@@ -43,7 +43,6 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
@@ -54,11 +53,6 @@
public class TraditionalWorkQueueMonitor
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.WorkQueueMonitor";
@@ -128,7 +122,6 @@
{
super("Work Queue Monitor Provider");
- assert debugConstructor(CLASS_NAME);
this.workQueue = workQueue;
}
@@ -152,8 +145,6 @@
public void initializeMonitorProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
maxBacklog = 0;
totalBacklog = 0;
@@ -170,7 +161,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return "Work Queue";
}
@@ -188,7 +178,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// We will poll the work queue every 10 seconds.
@@ -206,7 +195,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
int backlog = workQueue.size();
totalBacklog += backlog;
@@ -230,7 +218,6 @@
*/
public ArrayList<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
int backlog = workQueue.size();
totalBacklog += backlog;
diff --git a/opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java b/opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java
index b372e86..60da8f4 100644
--- a/opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java
+++ b/opends/src/server/org/opends/server/monitors/VersionMonitorProvider.java
@@ -42,7 +42,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.util.DynamicConstants;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
@@ -53,11 +55,6 @@
public class VersionMonitorProvider
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.monitors.VersionMonitorProvider";
@@ -90,8 +87,6 @@
public void initializeMonitorProvider(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -106,7 +101,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return "Version";
}
@@ -124,7 +118,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// This monitor does not need to run periodically.
return 0;
@@ -141,7 +134,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// This monitor does not need to run periodically.
return;
@@ -159,7 +151,6 @@
*/
public ArrayList<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
ArrayList<Attribute> attrs = new ArrayList<Attribute>(8);
@@ -196,8 +187,6 @@
*/
private Attribute createAttribute(String name, String value)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(value));
AttributeType attrType = DirectoryServer.getDefaultAttributeType(name);
@@ -211,7 +200,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
values.add(new AttributeValue(encodedValue, encodedValue));
}
diff --git a/opends/src/server/org/opends/server/monitors/package-info.java b/opends/src/server/org/opends/server/monitors/package-info.java
index 7d93c36..84aed44 100644
--- a/opends/src/server/org/opends/server/monitors/package-info.java
+++ b/opends/src/server/org/opends/server/monitors/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java b/opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
index dffb210..451d8e5 100644
--- a/opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
@@ -52,7 +52,6 @@
import org.opends.server.types.LDIFImportConfig;
import org.opends.server.types.operation.PreOperationAddOperation;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -71,11 +70,6 @@
public final class EntryUUIDPlugin
extends DirectoryServerPlugin
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.EntryUUIDPlugin";
@@ -101,7 +95,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Get the entryUUID attribute type. This needs to be done in the
@@ -136,9 +129,6 @@
ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializePlugin",
- String.valueOf(pluginTypes),
- String.valueOf(configEntry));
// Make sure that the plugin has been enabled for the appropriate types.
@@ -169,8 +159,6 @@
public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "doLDIFImport",
- String.valueOf(importConfig), String.valueOf(entry));
// See if the entry being imported already contains an entryUUID attribute.
@@ -211,8 +199,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(addOperation));
// See if the entry being added already contains an entryUUID attribute.
diff --git a/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java b/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
index 92e1b9e..e7d7754 100644
--- a/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins;
@@ -36,13 +36,13 @@
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
import org.opends.server.types.AttributeType;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.DirectoryConfig;
import org.opends.server.types.ObjectClass;
import org.opends.server.types.operation.PreParseSearchOperation;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugWarning;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -59,8 +59,6 @@
public final class LDAPADListPlugin
extends DirectoryServerPlugin
{
- private static final String CLASS_NAME =
- "org.opends.server.plugins.LDAPADListPlugin";
@@ -74,7 +72,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -87,8 +84,6 @@
ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializePlugin",
- String.valueOf(pluginTypes), String.valueOf(configEntry));
// The set of plugin types must contain only the pre-parse search element.
@@ -127,8 +122,6 @@
public final PreParsePluginResult
doPreParse(PreParseSearchOperation searchOperation)
{
- assert debugEnter(CLASS_NAME, "doPreParseSearch",
- String.valueOf(searchOperation));
// Iterate through the requested attributes to see if any of them start with
@@ -156,15 +149,17 @@
ObjectClass oc = DirectoryConfig.getObjectClass(lowerName, false);
if (oc == null)
{
- debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.WARNING,
- CLASS_NAME, "doPreParse",
- "Cannot replace unknown objectclass " + lowerName);
+ if (debugEnabled())
+ {
+ debugWarning("Cannot replace unknown objectclass %s", lowerName);
+ }
}
else
{
- debugMessage(DebugLogCategory.PLUGIN, DebugLogSeverity.INFO,
- CLASS_NAME, "doPreParse",
- "Replacing objectclass " + lowerName);
+ if (debugEnabled())
+ {
+ debugInfo("Replacing objectclass %s", lowerName);
+ }
for (AttributeType at : oc.getRequiredAttributeChain())
{
diff --git a/opends/src/server/org/opends/server/plugins/LastModPlugin.java b/opends/src/server/org/opends/server/plugins/LastModPlugin.java
index aad5ab9..f8f6f14 100644
--- a/opends/src/server/org/opends/server/plugins/LastModPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/LastModPlugin.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins;
@@ -51,7 +51,9 @@
import org.opends.server.types.operation.PreOperationModifyDNOperation;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
import static org.opends.server.util.TimeThread.*;
@@ -67,11 +69,6 @@
public final class LastModPlugin
extends DirectoryServerPlugin
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.LastModPlugin";
@@ -99,7 +96,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Get the attribute types for the attributes that we will use. This needs
@@ -125,9 +121,6 @@
ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializePlugin",
- String.valueOf(pluginTypes),
- String.valueOf(configEntry));
// Make sure that the plugin has been enabled for the appropriate types.
@@ -159,8 +152,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationAddOperation addOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(addOperation));
// Create the attribute list for the creatorsName attribute, if appropriate.
@@ -212,8 +203,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationModifyOperation modifyOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyOperation));
// Create the modifiersName attribute.
@@ -241,7 +230,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "doPreOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// This should never happen.
modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode());
@@ -265,7 +257,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "doPreOperation", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// This should never happen.
modifyOperation.setResultCode(DirectoryConfig.getServerErrorResultCode());
@@ -287,8 +282,6 @@
public final PreOperationPluginResult
doPreOperation(PreOperationModifyDNOperation modifyDNOperation)
{
- assert debugEnter(CLASS_NAME, "doPreOperation",
- String.valueOf(modifyDNOperation));
// Create the modifiersName attribute.
diff --git a/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java b/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
index 318a3c7..2483b9e 100644
--- a/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -55,7 +55,9 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.LDIFImportConfig;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
@@ -71,11 +73,6 @@
public final class PasswordPolicyImportPlugin
extends DirectoryServerPlugin
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.PasswordPolicyImportPlugin";
@@ -99,7 +96,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// Get the password policies from the Directory Server configuration. This
@@ -183,9 +179,6 @@
ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializePlugin",
- String.valueOf(pluginTypes),
- String.valueOf(configEntry));
// Make sure that the plugin has been enabled for the appropriate types.
@@ -215,8 +208,6 @@
public final LDIFPluginResult doLDIFImport(LDIFImportConfig importConfig,
Entry entry)
{
- assert debugEnter(CLASS_NAME, "doLDIFImport",
- String.valueOf(importConfig), String.valueOf(entry));
// Create a list that we will use to hold new encoded values.
@@ -258,7 +249,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "doLDIFImport", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD;
String message = getMessage(msgID, t.getNameOrOID(),
@@ -316,7 +310,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "doLDIFImport", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PWPIMPORT_ERROR_ENCODING_PASSWORD;
String message = getMessage(msgID, t.getNameOrOID(),
diff --git a/opends/src/server/org/opends/server/plugins/package-info.java b/opends/src/server/org/opends/server/plugins/package-info.java
index 0170e1d..ca9fd73 100644
--- a/opends/src/server/org/opends/server/plugins/package-info.java
+++ b/opends/src/server/org/opends/server/plugins/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java b/opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java
index f06a873..8936797 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfileStack.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins.profiler;
@@ -33,8 +33,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
@@ -43,11 +44,6 @@
*/
public class ProfileStack
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.profiler.ProfileStack";
@@ -89,7 +85,6 @@
*/
public ProfileStack(StackTraceElement[] stackElements)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(stackElements));
numFrames = stackElements.length;
classNames = new String[numFrames];
@@ -128,9 +123,6 @@
private ProfileStack(String[] classNames, String[] methodNames,
int[] lineNumbers)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(classNames),
- String.valueOf(methodNames),
- String.valueOf(lineNumbers));
this.numFrames = classNames.length;
this.classNames = classNames;
@@ -147,7 +139,6 @@
*/
public int getNumFrames()
{
- assert debugEnter(CLASS_NAME, "getDepth");
return numFrames;
}
@@ -161,7 +152,6 @@
*/
public String[] getClassNames()
{
- assert debugEnter(CLASS_NAME, "getClassNames");
return classNames;
}
@@ -178,7 +168,6 @@
*/
public String getClassName(int depth)
{
- assert debugEnter(CLASS_NAME, "getClassName", String.valueOf(depth));
return classNames[depth];
}
@@ -192,7 +181,6 @@
*/
public String[] getMethodNames()
{
- assert debugEnter(CLASS_NAME, "getMethodNames");
return methodNames;
}
@@ -209,7 +197,6 @@
*/
public String getMethodName(int depth)
{
- assert debugEnter(CLASS_NAME, "getMethodName", String.valueOf(depth));
return methodNames[depth];
}
@@ -223,7 +210,6 @@
*/
public int[] getLineNumbers()
{
- assert debugEnter(CLASS_NAME, "getLineNumbers");
return lineNumbers;
}
@@ -240,7 +226,6 @@
*/
public int getLineNumber(int depth)
{
- assert debugEnter(CLASS_NAME, "getLineNumber", String.valueOf(depth));
return lineNumbers[depth];
}
@@ -256,7 +241,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
if (numFrames == 0)
{
@@ -282,7 +266,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
@@ -317,7 +300,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -333,7 +319,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(3*numFrames);
for (int i=0; i < numFrames; i++)
@@ -359,7 +344,6 @@
*/
public static ProfileStack decode(ASN1Element stackElement)
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(stackElement));
try
{
@@ -384,7 +368,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return null;
}
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java b/opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java
index 2892932..ef47b69 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfileStackFrame.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins.profiler;
@@ -31,8 +31,9 @@
import java.util.Arrays;
import java.util.HashMap;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
@@ -45,11 +46,6 @@
public class ProfileStackFrame
implements Comparable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.profiler.ProfilerThread";
@@ -78,8 +74,6 @@
*/
public ProfileStackFrame(String className, String methodName)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(className),
- String.valueOf(methodName));
this.className = className;
this.methodName = methodName;
@@ -97,7 +91,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return className;
}
@@ -111,7 +104,6 @@
*/
public String getMethodName()
{
- assert debugEnter(CLASS_NAME, "getMethodName");
return methodName;
}
@@ -127,7 +119,6 @@
*/
public String getHTMLSafeMethodName()
{
- assert debugEnter(CLASS_NAME, "getHTMLSafeMethodName");
int length = methodName.length();
StringBuilder buffer = new StringBuilder(length + 6);
@@ -163,7 +154,6 @@
*/
public HashMap<Integer,Long> getLineNumbers()
{
- assert debugEnter(CLASS_NAME, "getLineNumbers");
return lineNumbers;
}
@@ -180,9 +170,6 @@
*/
public void updateLineNumberCount(int lineNumber, long numOccurrences)
{
- assert debugEnter(CLASS_NAME, "updateLineNumberCount",
- String.valueOf(lineNumber),
- String.valueOf(numOccurrences));
Long existingCount = lineNumbers.get(lineNumber);
if (existingCount == null)
@@ -206,7 +193,6 @@
*/
public long getTotalCount()
{
- assert debugEnter(CLASS_NAME, "getTotalCount");
long totalCount = 0;
@@ -230,7 +216,6 @@
*/
public ProfileStackFrame[] getSubordinateFrames()
{
- assert debugEnter(CLASS_NAME, "getSubordinateFrames");
ProfileStackFrame[] subFrames = new ProfileStackFrame[0];
subFrames = subordinateFrames.values().toArray(subFrames);
@@ -250,7 +235,6 @@
*/
public boolean hasSubFrames()
{
- assert debugEnter(CLASS_NAME, "hasSubFrames");
return (! subordinateFrames.isEmpty());
}
@@ -271,7 +255,6 @@
public void recurseSubFrames(ProfileStack stack, int depth, long count,
HashMap<String,HashMap<ProfileStack,Long>> stacksByMethod)
{
- assert debugEnter(CLASS_NAME, "recurseSubFrames");
if (depth < 0)
{
@@ -316,7 +299,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return (className.hashCode() + methodName.hashCode());
}
@@ -335,7 +317,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
@@ -353,7 +334,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -380,7 +364,6 @@
public int compareTo(Object o)
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "compareTo", String.valueOf(o));
ProfileStackFrame f;
try
@@ -422,7 +405,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
buffer.append(getTotalCount());
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfileViewer.java b/opends/src/server/org/opends/server/plugins/profiler/ProfileViewer.java
index f848f82..39b6c51 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfileViewer.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfileViewer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins.profiler;
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java b/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
index ce44c41..d20973a 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins.profiler;
@@ -57,7 +57,9 @@
import org.opends.server.util.TimeThread;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.PluginMessages.*;
@@ -79,11 +81,6 @@
extends DirectoryServerPlugin
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.profiler.ProfilerPlugin";
@@ -169,7 +166,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -182,8 +178,6 @@
ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializePlugin",
- String.valueOf(pluginTypes), String.valueOf(configEntry));
// Initialize the set of profiler actions.
@@ -244,7 +238,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePlugin", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_PROFILE_DIR;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -275,7 +272,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePlugin", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_AUTOSTART;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -306,7 +306,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePlugin", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_INTERVAL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -329,7 +332,6 @@
@Override()
public final void finalizePlugin()
{
- assert debugEnter(CLASS_NAME, "finalizePlugin");
// If the profiler thread is still active, then cause it to dump the
@@ -348,7 +350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizePlugin", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_PLUGIN_PROFILER_CANNOT_WRITE_PROFILE_DATA;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -372,7 +377,6 @@
@Override()
public final StartupPluginResult doStartup()
{
- assert debugEnter(CLASS_NAME, "doStartup");
// If the profiler should be started automatically, then do so now.
if (autoStart)
@@ -391,7 +395,6 @@
*/
public final DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -403,7 +406,6 @@
*/
public final List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -458,8 +460,6 @@
public final boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.lang.List<String>");
// See if there is an acceptable value for the sample interval.
@@ -476,7 +476,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_INTERVAL;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -511,7 +514,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_PROFILE_DIR;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -534,7 +540,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_AUTOSTART;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -556,7 +565,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_DETERMINE_ACTION;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -577,9 +589,6 @@
public final ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -617,7 +626,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_UPDATE_INTERVAL;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -667,7 +679,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_UPDATE_DIRECTORY;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -763,7 +778,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_WRITE_PROFILE_DATA;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -825,7 +843,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializePlugin", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_PLUGIN_PROFILER_CANNOT_PERFORM_ACTION;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java b/opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java
index aa08b23..e590508 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfilerThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.plugins.profiler;
@@ -40,7 +40,9 @@
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.protocols.asn1.ASN1Writer;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
@@ -53,11 +55,6 @@
public class ProfilerThread
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.plugins.profiler.ProfilerThread";
@@ -95,7 +92,6 @@
{
super("Directory Server Profiler Thread");
- assert debugConstructor(CLASS_NAME, String.valueOf(sampleInterval));
this.sampleInterval = sampleInterval;
@@ -115,7 +111,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
captureThread = currentThread();
captureStartTime = System.currentTimeMillis();
@@ -179,7 +174,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -197,7 +195,6 @@
*/
public void stopProfiling()
{
- assert debugEnter(CLASS_NAME, "stopProfiling");
stopProfiling = true;
@@ -210,7 +207,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stopProfiling", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -228,8 +228,6 @@
public void writeCaptureData(String filename)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeCaptureData",
- String.valueOf(filename));
// Open the capture file for writing. We'll use an ASN.1 writer to write
diff --git a/opends/src/server/org/opends/server/plugins/profiler/package-info.java b/opends/src/server/org/opends/server/plugins/profiler/package-info.java
index 146ad6b..342f186 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/package-info.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Boolean.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Boolean.java
index 5cae6ae..b000267 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Boolean.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Boolean.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -44,11 +43,6 @@
public class ASN1Boolean
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Boolean";
@@ -78,7 +72,6 @@
{
super(UNIVERSAL_BOOLEAN_TYPE, encodeValue(booleanValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(booleanValue));
this.booleanValue = booleanValue;
}
@@ -95,8 +88,6 @@
{
super(type, encodeValue(booleanValue));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(booleanValue));
this.booleanValue = booleanValue;
}
@@ -114,8 +105,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(booleanValue));
this.booleanValue = booleanValue;
}
@@ -129,7 +118,6 @@
*/
public boolean booleanValue()
{
- assert debugEnter(CLASS_NAME, "booleanValue");
return booleanValue;
}
@@ -143,7 +131,6 @@
*/
public void setValue(boolean booleanValue)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(booleanValue));
this.booleanValue = booleanValue;
setValueInternal(encodeValue(booleanValue));
@@ -162,7 +149,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -173,7 +159,7 @@
if (value.length != 1)
{
- int msgID = MSGID_ASN1_BOOLEAN_SET_VALUE_INVALID_LENGTH;
+ int msgID = MSGID_ASN1_BOOLEAN_SET_VALUE_INVALID_LENGTH;
String message = getMessage(msgID, value.length);
throw new ASN1Exception(msgID, message);
}
@@ -197,7 +183,6 @@
public static ASN1Boolean decodeAsBoolean(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsBoolean", String.valueOf(element));
if (element == null)
{
@@ -234,8 +219,6 @@
public static ASN1Boolean decodeAsBoolean(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsBoolean",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 Boolean element.
@@ -320,7 +303,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Boolean(type=");
buffer.append(byteToHex(getType()));
@@ -342,8 +324,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
index 58141a8..5482d55 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Constants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java
index 4ef2fb3..4d0d00c 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Element.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
@@ -35,7 +35,6 @@
import org.opends.server.api.ProtocolElement;
import org.opends.server.types.ByteString;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -52,11 +51,6 @@
public class ASN1Element
implements ProtocolElement, Serializable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Element";
@@ -85,7 +79,6 @@
*/
public ASN1Element(byte type)
{
- assert debugConstructor(CLASS_NAME, byteToHex(type));
this.type = type;
this.value = NO_VALUE;
@@ -101,7 +94,6 @@
*/
public ASN1Element(byte type, byte[] value)
{
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value));
this.type = type;
@@ -124,7 +116,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return type;
}
@@ -138,7 +129,6 @@
*/
public void setType(byte type)
{
- assert debugEnter(CLASS_NAME, "setType", byteToHex(type));
this.type = type;
}
@@ -153,7 +143,6 @@
*/
public boolean isUniversal()
{
- assert debugEnter(CLASS_NAME, "isUniversal");
return ((type & TYPE_MASK_ALL_BUT_CLASS) == TYPE_MASK_UNIVERSAL);
}
@@ -168,7 +157,6 @@
*/
public boolean isApplicationSpecific()
{
- assert debugEnter(CLASS_NAME, "isApplicationSpecific");
return ((type & TYPE_MASK_ALL_BUT_CLASS) == TYPE_MASK_APPLICATION);
}
@@ -183,7 +171,6 @@
*/
public boolean isContextSpecific()
{
- assert debugEnter(CLASS_NAME, "isContextSpecific");
return ((type & TYPE_MASK_ALL_BUT_CLASS) == TYPE_MASK_CONTEXT);
}
@@ -198,7 +185,6 @@
*/
public boolean isPrivate()
{
- assert debugEnter(CLASS_NAME, "isPrivate");
return ((type & TYPE_MASK_ALL_BUT_CLASS) == TYPE_MASK_PRIVATE);
}
@@ -213,7 +199,6 @@
*/
public boolean isPrimitive()
{
- assert debugEnter(CLASS_NAME, "isPrimitive");
return ((type & TYPE_MASK_ALL_BUT_PC) == TYPE_MASK_PRIMITIVE);
}
@@ -228,7 +213,6 @@
*/
public boolean isConstructed()
{
- assert debugEnter(CLASS_NAME, "isConstructed");
return ((type & TYPE_MASK_ALL_BUT_PC) == TYPE_MASK_CONSTRUCTED);
}
@@ -242,7 +226,6 @@
*/
public byte[] value()
{
- assert debugEnter(CLASS_NAME, "value");
return value;
}
@@ -260,7 +243,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -284,7 +266,6 @@
*/
protected final void setValueInternal(byte[] value)
{
- assert debugEnter(CLASS_NAME, "setValueInternal", bytesToHex(value));
this.value = value;
}
@@ -300,7 +281,6 @@
*/
public static byte[] encodeLength(int length)
{
- assert debugEnter(CLASS_NAME, "encodeLength", String.valueOf(length));
if (length < 128)
{
@@ -356,7 +336,6 @@
*/
public byte[] encode()
{
- assert debugEnter(CLASS_NAME, "encode");
if (value.length == 0)
{
@@ -400,7 +379,6 @@
*/
public static byte[] encodeValue(boolean booleanValue)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(booleanValue));
return (booleanValue ? BOOLEAN_VALUE_TRUE : BOOLEAN_VALUE_FALSE);
}
@@ -418,7 +396,6 @@
*/
public static byte[] encodeValue(int intValue)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(intValue));
if ((intValue & 0x0000007F) == intValue)
{
@@ -469,7 +446,6 @@
*/
public static byte[] encodeLongValue(long longValue)
{
- assert debugEnter(CLASS_NAME, "encodeLongValue", String.valueOf(longValue));
if ((longValue & 0x000000000000007FL) == longValue)
{
@@ -570,7 +546,6 @@
*/
public static byte[] encodeValue(ArrayList<ASN1Element> elements)
{
- assert debugEnter(CLASS_NAME, "encodeValue", String.valueOf(elements));
if (elements == null)
{
@@ -613,7 +588,6 @@
public static ASN1Element decode(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decode", bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
@@ -701,8 +675,6 @@
int length)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decode", bytesToHex(encodedElement),
- String.valueOf(startPos), String.valueOf(length));
// First make sure that the array is not null and long enough to contain
@@ -782,7 +754,6 @@
public ASN1Boolean decodeAsBoolean()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsBoolean");
return ASN1Boolean.decodeAsBoolean(this);
}
@@ -800,7 +771,6 @@
public ASN1Enumerated decodeAsEnumerated()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsEnumerated");
return ASN1Enumerated.decodeAsEnumerated(this);
}
@@ -818,7 +788,6 @@
public ASN1Integer decodeAsInteger()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsInteger");
return ASN1Integer.decodeAsInteger(this);
}
@@ -836,7 +805,6 @@
public ASN1Long decodeAsLong()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsLong");
return ASN1Long.decodeAsLong(this);
}
@@ -854,7 +822,6 @@
public ASN1Null decodeAsNull()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsNull");
return ASN1Null.decodeAsNull(this);
}
@@ -872,7 +839,6 @@
public ASN1OctetString decodeAsOctetString()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsOctetString");
return ASN1OctetString.decodeAsOctetString(this);
}
@@ -890,7 +856,6 @@
public ASN1Sequence decodeAsSequence()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSequence");
return ASN1Sequence.decodeAsSequence(this);
}
@@ -908,7 +873,6 @@
public ASN1Set decodeAsSet()
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSet");
return ASN1Set.decodeAsSet(this);
}
@@ -929,8 +893,6 @@
public static ArrayList<ASN1Element> decodeElements(byte[] encodedElements)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeElements",
- bytesToHex(encodedElements));
// Make sure that the element array is not null.
@@ -1014,7 +976,6 @@
*/
public String getProtocolElementName()
{
- assert debugEnter(CLASS_NAME, "getProtocolElementName");
return "ASN.1";
}
@@ -1033,7 +994,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -1063,8 +1023,6 @@
*/
public boolean equalsIgnoreType(ASN1Element element)
{
- assert debugEnter(CLASS_NAME, "equalsIgnoreType",
- String.valueOf(element));
return Arrays.equals(value, element.value);
}
@@ -1083,8 +1041,6 @@
*/
public boolean equalsIgnoreType(ByteString byteString)
{
- assert debugEnter(CLASS_NAME, "equalsIgnoreType",
- String.valueOf(byteString));
return Arrays.equals(value, byteString.value());
}
@@ -1102,7 +1058,6 @@
*/
public boolean equalsElement(ASN1Element e)
{
- assert debugEnter(CLASS_NAME, "equalsElement", String.valueOf(e));
if (this == e)
{
@@ -1127,7 +1082,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int hashCode = type;
int length = Math.min(20, value.length);
@@ -1148,7 +1102,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -1165,7 +1118,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Element(type=");
buffer.append(byteToHex(type));
@@ -1187,8 +1139,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Enumerated.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Enumerated.java
index c75bdf0..6529920 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Enumerated.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Enumerated.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -44,11 +43,6 @@
public class ASN1Enumerated
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Enumerated";
@@ -78,7 +72,6 @@
{
super(UNIVERSAL_ENUMERATED_TYPE, encodeValue(intValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(intValue));
this.intValue = intValue;
}
@@ -95,8 +88,6 @@
{
super(type, encodeValue(intValue));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(intValue));
this.intValue = intValue;
}
@@ -114,8 +105,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(intValue));
this.intValue = intValue;
}
@@ -129,7 +118,6 @@
*/
public int intValue()
{
- assert debugEnter(CLASS_NAME, "intValue");
return intValue;
}
@@ -143,7 +131,6 @@
*/
public void setValue(int intValue)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(intValue));
this.intValue = intValue;
setValueInternal(encodeValue(intValue));
@@ -162,7 +149,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -202,8 +188,6 @@
public static ASN1Enumerated decodeAsEnumerated(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsEnumerated",
- String.valueOf(element));
if (element == null)
{
@@ -245,8 +229,6 @@
public static ASN1Enumerated decodeAsEnumerated(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsEnumerated",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 enumerated element.
@@ -338,7 +320,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Enumerated(type=");
buffer.append(byteToHex(getType()));
@@ -360,8 +341,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Exception.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Exception.java
index 79e7c65..25888c2 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Exception.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Exception.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
@@ -39,11 +38,6 @@
public class ASN1Exception
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Exception";
@@ -74,7 +68,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
this.messageID = messageID;
}
@@ -93,8 +86,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
this.messageID = messageID;
}
@@ -108,7 +99,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Integer.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Integer.java
index 842e57f..a473358 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Integer.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Integer.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -44,11 +43,6 @@
public class ASN1Integer
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Integer";
@@ -78,7 +72,6 @@
{
super(UNIVERSAL_INTEGER_TYPE, encodeValue(intValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(intValue));
this.intValue = intValue;
}
@@ -95,8 +88,6 @@
{
super(type, encodeValue(intValue));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(intValue));
this.intValue = intValue;
}
@@ -114,8 +105,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(intValue));
this.intValue = intValue;
}
@@ -129,7 +118,6 @@
*/
public int intValue()
{
- assert debugEnter(CLASS_NAME, "intValue");
return intValue;
}
@@ -143,7 +131,6 @@
*/
public void setValue(int intValue)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(intValue));
this.intValue = intValue;
setValueInternal(encodeValue(intValue));
@@ -162,7 +149,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -202,7 +188,6 @@
public static ASN1Integer decodeAsInteger(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsInteger", String.valueOf(element));
if (element == null)
{
@@ -244,8 +229,6 @@
public static ASN1Integer decodeAsInteger(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsInteger",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 integer element.
@@ -337,7 +320,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Integer(type=");
buffer.append(byteToHex(getType()));
@@ -359,8 +341,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Long.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Long.java
index 1770f2d..5310de7 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Long.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Long.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -57,11 +56,6 @@
public class ASN1Long
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Long";
@@ -91,7 +85,6 @@
{
super(UNIVERSAL_INTEGER_TYPE, encodeLongValue(longValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(longValue));
this.longValue = longValue;
}
@@ -108,8 +101,6 @@
{
super(type, encodeLongValue(longValue));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(longValue));
this.longValue = longValue;
}
@@ -127,8 +118,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(longValue));
this.longValue = longValue;
}
@@ -142,7 +131,6 @@
*/
public long longValue()
{
- assert debugEnter(CLASS_NAME, "longValue");
return longValue;
}
@@ -156,7 +144,6 @@
*/
public void setValue(long longValue)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(longValue));
this.longValue = longValue;
setValueInternal(encodeLongValue(longValue));
@@ -175,7 +162,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -215,7 +201,6 @@
public static ASN1Long decodeAsLong(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsLong", String.valueOf(element));
if (element == null)
{
@@ -256,8 +241,6 @@
public static ASN1Long decodeAsLong(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsLong",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 long element.
@@ -349,7 +332,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Long(type=");
buffer.append(byteToHex(getType()));
@@ -371,8 +353,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Null.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Null.java
index 0936942..936179a 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Null.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Null.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -44,11 +43,6 @@
public class ASN1Null
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Null";
@@ -69,7 +63,6 @@
{
super(UNIVERSAL_NULL_TYPE);
- assert debugConstructor(CLASS_NAME);
}
@@ -83,7 +76,6 @@
{
super(type);
- assert debugConstructor(CLASS_NAME, byteToHex(type));
}
@@ -98,7 +90,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if ((value != null) && (value.length != 0))
{
@@ -123,7 +114,6 @@
public static ASN1Null decodeAsNull(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsNull", String.valueOf(element));
if (element == null)
{
@@ -158,8 +148,6 @@
public static ASN1Null decodeAsNull(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsNull",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 null element.
@@ -242,7 +230,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Null(type=");
buffer.append(byteToHex(getType()));
@@ -262,8 +249,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java
index c977a77..bdc1499 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1OctetString.java
@@ -22,15 +22,17 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
import org.opends.server.types.ByteString;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -55,11 +57,6 @@
extends ASN1Element
implements ByteString
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1OctetString";
@@ -87,7 +84,6 @@
{
super(UNIVERSAL_OCTET_STRING_TYPE);
- assert debugConstructor(CLASS_NAME);
}
@@ -102,7 +98,6 @@
{
super(type);
- assert debugConstructor(CLASS_NAME, byteToHex(type));
}
@@ -117,7 +112,6 @@
{
super(UNIVERSAL_OCTET_STRING_TYPE, value);
- assert debugConstructor(CLASS_NAME, bytesToHex(value));
this.stringValue = null;
}
@@ -135,7 +129,6 @@
{
super(UNIVERSAL_OCTET_STRING_TYPE, getBytes(stringValue));
- assert debugConstructor(CLASS_NAME, String.valueOf(stringValue));
this.stringValue = stringValue;
}
@@ -153,7 +146,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value));
this.stringValue = null;
}
@@ -172,8 +164,6 @@
{
super(type, getBytes(stringValue));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(stringValue));
this.stringValue = stringValue;
}
@@ -191,7 +181,6 @@
*/
public String stringValue()
{
- assert debugEnter(CLASS_NAME, "stringValue");
if (stringValue == null)
{
@@ -217,7 +206,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stringValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
stringValue = new String(value());
}
@@ -237,7 +229,6 @@
*/
public void stringValue(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "stringValue", "java.lang.StringBuilder");
if (stringValue != null)
{
@@ -263,9 +254,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "stringValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- s = new String(value, i, (length-i));
+ s = new String(value, i, (length - i));
}
buffer.append(s);
@@ -283,7 +277,6 @@
*/
public void setValue(String stringValue)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(stringValue));
if (stringValue == null)
{
@@ -306,7 +299,6 @@
*/
public void setValue(byte[] value)
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -335,8 +327,6 @@
public static ASN1OctetString decodeAsOctetString(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsOctetString",
- String.valueOf(element));
if (element == null)
{
@@ -364,8 +354,6 @@
public static ASN1OctetString decodeAsOctetString(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsOctetString",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 element.
@@ -440,7 +428,6 @@
*/
public ASN1OctetString duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
byte[] value = value();
int length = value.length;
@@ -461,7 +448,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append(stringValue());
}
@@ -479,8 +465,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
@@ -516,7 +500,6 @@
*/
public ASN1OctetString toASN1OctetString()
{
- assert debugEnter(CLASS_NAME, "toASN1OctetString");
return this;
}
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
index 8cde586..7d825cd 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Reader.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
@@ -32,7 +32,9 @@
import java.io.IOException;
import java.net.Socket;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
@@ -44,11 +46,6 @@
*/
public class ASN1Reader
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Reader";
@@ -75,7 +72,6 @@
public ASN1Reader(Socket socket)
throws IOException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(socket));
this.socket = socket;
inputStream = socket.getInputStream();
@@ -94,7 +90,6 @@
*/
public ASN1Reader(InputStream inputStream)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(inputStream));
this.inputStream = inputStream;
socket = null;
@@ -112,7 +107,6 @@
*/
public int getMaxElementSize()
{
- assert debugEnter(CLASS_NAME, "getMaxElementSize");
return maxElementSize;
}
@@ -128,8 +122,6 @@
*/
public void setMaxElementSize(int maxElementSize)
{
- assert debugEnter(CLASS_NAME, "setMaxElementSize",
- String.valueOf(maxElementSize));
this.maxElementSize = maxElementSize;
}
@@ -152,7 +144,6 @@
public int getIOTimeout()
throws IOException
{
- assert debugEnter(CLASS_NAME, "getIOTimeout");
if (socket == null)
{
@@ -182,7 +173,6 @@
public void setIOTimeout(int ioTimeout)
throws IOException
{
- assert debugEnter(CLASS_NAME, "setIOTimeout", String.valueOf(ioTimeout));
if (socket == null)
{
@@ -298,7 +288,6 @@
*/
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
try
{
@@ -306,7 +295,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
if (socket != null)
@@ -317,7 +309,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Sequence.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Sequence.java
index 8f783a6..e1096dd 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Sequence.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Sequence.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
@@ -31,7 +31,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -47,11 +46,6 @@
public class ASN1Sequence
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Sequence";
@@ -78,7 +72,6 @@
{
super(UNIVERSAL_SEQUENCE_TYPE);
- assert debugConstructor(CLASS_NAME);
this.elements = new ArrayList<ASN1Element>();
}
@@ -94,7 +87,6 @@
{
super(type);
- assert debugConstructor(CLASS_NAME, byteToHex(type));
this.elements = new ArrayList<ASN1Element>();
}
@@ -111,7 +103,6 @@
{
super(UNIVERSAL_SEQUENCE_TYPE, encodeValue(elements));
- assert debugConstructor(CLASS_NAME, String.valueOf(elements));
if (elements == null)
{
@@ -136,8 +127,6 @@
{
super(type, encodeValue(elements));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(elements));
if (elements == null)
{
@@ -163,8 +152,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(elements));
if (elements == null)
{
@@ -186,7 +173,6 @@
*/
public ArrayList<ASN1Element> elements()
{
- assert debugEnter(CLASS_NAME, "elements");
return elements;
}
@@ -200,7 +186,6 @@
*/
public void setElements(ArrayList<ASN1Element> elements)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(elements));
if (elements == null)
{
@@ -227,7 +212,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -255,7 +239,6 @@
public static ASN1Sequence decodeAsSequence(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSequence", String.valueOf(element));
if (element == null)
{
@@ -285,8 +268,6 @@
public static ASN1Sequence decodeAsSequence(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSequence",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 sequence element.
@@ -371,8 +352,6 @@
public static ASN1Sequence decodeAsSequence(byte type, byte[] encodedValue)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSequence", byteToHex(type),
- bytesToHex(encodedValue));
ArrayList<ASN1Element> elements = decodeElements(encodedValue);
return new ASN1Sequence(type, encodedValue, elements);
@@ -388,7 +367,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Sequence(type=");
buffer.append(byteToHex(getType()));
@@ -423,8 +401,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Set.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Set.java
index c36ca03..77099e9 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Set.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Set.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
@@ -31,7 +31,6 @@
import java.util.ArrayList;
import java.util.Iterator;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -47,11 +46,6 @@
public class ASN1Set
extends ASN1Element
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Set";
@@ -78,7 +72,6 @@
{
super(UNIVERSAL_SET_TYPE);
- assert debugConstructor(CLASS_NAME);
this.elements = new ArrayList<ASN1Element>();
}
@@ -94,7 +87,6 @@
{
super(type);
- assert debugConstructor(CLASS_NAME, byteToHex(type));
this.elements = new ArrayList<ASN1Element>();
}
@@ -111,7 +103,6 @@
{
super(UNIVERSAL_SET_TYPE, encodeValue(elements));
- assert debugConstructor(CLASS_NAME, String.valueOf(elements));
if (elements == null)
{
@@ -136,8 +127,6 @@
{
super(type, encodeValue(elements));
- assert debugConstructor(CLASS_NAME, byteToHex(type),
- String.valueOf(elements));
if (elements == null)
{
@@ -163,8 +152,6 @@
{
super(type, value);
- assert debugConstructor(CLASS_NAME, byteToHex(type), bytesToHex(value),
- String.valueOf(elements));
if (elements == null)
{
@@ -186,7 +173,6 @@
*/
public ArrayList<ASN1Element> elements()
{
- assert debugEnter(CLASS_NAME, "elements");
return elements;
}
@@ -200,7 +186,6 @@
*/
public void setElements(ArrayList<ASN1Element> elements)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(elements));
if (elements == null)
{
@@ -227,7 +212,6 @@
public void setValue(byte[] value)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "setValue", bytesToHex(value));
if (value == null)
{
@@ -255,7 +239,6 @@
public static ASN1Set decodeAsSet(ASN1Element element)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSet", String.valueOf(element));
if (element == null)
{
@@ -284,8 +267,6 @@
public static ASN1Set decodeAsSet(byte[] encodedElement)
throws ASN1Exception
{
- assert debugEnter(CLASS_NAME, "decodeAsSet",
- bytesToHex(encodedElement));
// First make sure that the array is not null and long enough to contain
// a valid ASN.1 set element.
@@ -363,7 +344,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ASN1Set(type=");
buffer.append(byteToHex(getType()));
@@ -398,8 +378,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java b/opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java
index 3381ef6..0e63257 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/ASN1Writer.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.asn1;
@@ -32,8 +32,9 @@
import java.io.OutputStream;
import java.net.Socket;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
@@ -42,11 +43,6 @@
*/
public class ASN1Writer
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.asn1.ASN1Writer";
@@ -70,7 +66,6 @@
public ASN1Writer(Socket socket)
throws IOException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(socket));
this.socket = socket;
outputStream = socket.getOutputStream();
@@ -86,7 +81,6 @@
*/
public ASN1Writer(OutputStream outputStream)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(outputStream));
this.outputStream = outputStream;
socket = null;
@@ -108,7 +102,6 @@
public int writeElement(ASN1Element element)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeElement", String.valueOf(element));
byte[] elementBytes = element.encode();
outputStream.write(elementBytes);
@@ -130,7 +123,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -142,7 +138,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/protocols/asn1/package-info.java b/opends/src/server/org/opends/server/protocols/asn1/package-info.java
index 719c0ff..580291b 100644
--- a/opends/src/server/org/opends/server/protocols/asn1/package-info.java
+++ b/opends/src/server/org/opends/server/protocols/asn1/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
index 025d8f4..cdb3725 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalClientConnection.java
@@ -83,9 +83,12 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
-import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -99,12 +102,6 @@
public class InternalClientConnection
extends ClientConnection
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.internal." +
- "InternalClientConnection";
// The message ID counter to use for internal connections.
@@ -153,7 +150,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
// This connection will be authenticated as a root user so that no
// access control will be enforced.
@@ -217,7 +213,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "<init>", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
logError(ErrorLogCategory.CONNECTION_HANDLING,
ErrorLogSeverity.SEVERE_ERROR,
@@ -235,7 +234,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -252,7 +254,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(authInfo));
this.authenticationInfo = authInfo;
super.setAuthenticationInfo(authInfo);
@@ -270,7 +271,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -285,7 +289,6 @@
*/
public static InternalClientConnection getRootConnection()
{
- assert debugEnter(CLASS_NAME, "getRootConnection");
return rootConnection;
}
@@ -301,7 +304,6 @@
*/
public static long nextOperationID()
{
- assert debugEnter(CLASS_NAME, "nextOperationID");
long opID = nextOperationID.getAndIncrement();
if (opID < 0)
@@ -334,7 +336,6 @@
*/
public static int nextMessageID()
{
- assert debugEnter(CLASS_NAME, "nextMessageID");
int msgID = nextMessageID.getAndIncrement();
if (msgID < 0)
@@ -367,7 +368,6 @@
*/
public long getConnectionID()
{
- assert debugEnter(CLASS_NAME, "getConnectionID");
return connectionID;
}
@@ -383,7 +383,6 @@
*/
public ConnectionHandler getConnectionHandler()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandler");
return InternalConnectionHandler.getInstance();
}
@@ -399,7 +398,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return "internal";
}
@@ -413,7 +411,6 @@
*/
public String getClientAddress()
{
- assert debugEnter(CLASS_NAME, "getClientAddress");
return "internal";
}
@@ -429,7 +426,6 @@
*/
public String getServerAddress()
{
- assert debugEnter(CLASS_NAME, "getServerAddress");
return "internal";
}
@@ -447,7 +443,6 @@
*/
public InetAddress getRemoteAddress()
{
- assert debugEnter(CLASS_NAME, "getRemoteAddress");
return null;
}
@@ -465,7 +460,6 @@
*/
public InetAddress getLocalAddress()
{
- assert debugEnter(CLASS_NAME, "getLocalAddress");
return null;
}
@@ -486,7 +480,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
// Internal connections will generally be considered secure, but
// they may be declared insecure if they are accessed through some
@@ -507,7 +500,6 @@
*/
public ConnectionSecurityProvider getConnectionSecurityProvider()
{
- assert debugEnter(CLASS_NAME, "getConnectionSecurityProvider");
return securityProvider;
}
@@ -525,8 +517,6 @@
public void setConnectionSecurityProvider(ConnectionSecurityProvider
securityProvider)
{
- assert debugEnter(CLASS_NAME, "setConnectionSecurityProvider",
- String.valueOf(securityProvider));
this.securityProvider = securityProvider;
}
@@ -543,7 +533,6 @@
*/
public String getSecurityMechanism()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanism");
return securityProvider.getSecurityMechanismName();
}
@@ -571,7 +560,6 @@
*/
public boolean processDataRead(ByteBuffer buffer)
{
- assert debugEnter(CLASS_NAME, "processDataRead");
// This method will not do anything with the data because there is
// no actual "connection" from which information can be read, nor
@@ -589,8 +577,6 @@
*/
public void sendResponse(Operation operation)
{
- assert debugEnter(CLASS_NAME, "sendResponse",
- String.valueOf(operation));
// There will not be any response sent by this method, since there
// is not an actual connection.
@@ -607,7 +593,6 @@
*/
public AuthenticationInfo getAuthenticationInfo()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationInfo");
return authenticationInfo;
}
@@ -627,8 +612,6 @@
public void setAuthenticationInfo(AuthenticationInfo
authenticationInfo)
{
- assert debugEnter(CLASS_NAME, "setAuthenticationInfo",
- String.valueOf(authenticationInfo));
// No implementation required.
}
@@ -642,7 +625,6 @@
*/
public void setUnauthenticated()
{
- assert debugEnter(CLASS_NAME, "setUnauthenticated");
// No implementation required.
}
@@ -663,9 +645,6 @@
public AddOperation processAdd(ByteString rawEntryDN,
List<LDAPAttribute> rawAttributes)
{
- assert debugEnter(CLASS_NAME, "processAdd",
- String.valueOf(rawEntryDN),
- String.valueOf(rawAttributes));
AddOperation addOperation =
new AddOperation(this, nextOperationID(), nextMessageID(),
@@ -702,11 +681,6 @@
Map<AttributeType,List<Attribute>>
operationalAttributes)
{
- assert debugEnter(CLASS_NAME, "processAdd",
- String.valueOf(entryDN),
- String.valueOf(objectClasses),
- String.valueOf(userAttributes),
- String.valueOf(operationalAttributes));
AddOperation addOperation =
new AddOperation(this, nextOperationID(), nextMessageID(),
@@ -736,8 +710,6 @@
public BindOperation processSimpleBind(ByteString rawBindDN,
ByteString password)
{
- assert debugEnter(CLASS_NAME, "processSimpleBind",
- String.valueOf(rawBindDN), "ByteString");
BindOperation bindOperation =
new BindOperation(this, nextOperationID(), nextMessageID(),
@@ -766,8 +738,6 @@
public BindOperation processSimpleBind(DN bindDN,
ByteString password)
{
- assert debugEnter(CLASS_NAME, "processSimpleBind",
- String.valueOf(bindDN), "ByteString");
BindOperation bindOperation =
new BindOperation(this, nextOperationID(), nextMessageID(),
@@ -798,10 +768,6 @@
String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(rawBindDN),
- String.valueOf(saslMechanism),
- "ASN1OctetString");
BindOperation bindOperation =
new BindOperation(this, nextOperationID(), nextMessageID(),
@@ -832,8 +798,6 @@
String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugEnter(CLASS_NAME, "processSASLBind",
- String.valueOf(bindDN), "ByteString");
BindOperation bindOperation =
new BindOperation(this, nextOperationID(), nextMessageID(),
@@ -865,10 +829,6 @@
String attributeType,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "processCompare",
- String.valueOf(rawEntryDN),
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
CompareOperation compareOperation =
new CompareOperation(this, nextOperationID(),
@@ -901,10 +861,6 @@
AttributeType attributeType,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "processCompare",
- String.valueOf(entryDN),
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
CompareOperation compareOperation =
new CompareOperation(this, nextOperationID(),
@@ -931,8 +887,6 @@
*/
public DeleteOperation processDelete(ByteString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "processDelete",
- String.valueOf(rawEntryDN));
DeleteOperation deleteOperation =
new DeleteOperation(this, nextOperationID(), nextMessageID(),
@@ -957,8 +911,6 @@
*/
public DeleteOperation processDelete(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "processDelete",
- String.valueOf(entryDN));
DeleteOperation deleteOperation =
new DeleteOperation(this, nextOperationID(), nextMessageID(),
@@ -987,9 +939,6 @@
public ExtendedOperation processExtendedOperation(String requestOID,
ASN1OctetString requestValue)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(requestOID),
- String.valueOf(requestValue));
ExtendedOperation extendedOperation =
new ExtendedOperation(this, nextOperationID(),
@@ -1020,9 +969,6 @@
public ModifyOperation processModify(ByteString rawEntryDN,
List<LDAPModification> rawModifications)
{
- assert debugEnter(CLASS_NAME, "processModify",
- String.valueOf(rawEntryDN),
- String.valueOf(rawModifications));
ModifyOperation modifyOperation =
new ModifyOperation(this, nextOperationID(), nextMessageID(),
@@ -1051,9 +997,6 @@
public ModifyOperation processModify(DN entryDN,
List<Modification> modifications)
{
- assert debugEnter(CLASS_NAME, "processModify",
- String.valueOf(entryDN),
- String.valueOf(modifications));
ModifyOperation modifyOperation =
new ModifyOperation(this, nextOperationID(), nextMessageID(),
@@ -1084,10 +1027,6 @@
ByteString rawNewRDN,
boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(rawEntryDN),
- String.valueOf(rawNewRDN),
- String.valueOf(deleteOldRDN));
return processModifyDN(rawEntryDN, rawNewRDN, deleteOldRDN, null);
}
@@ -1115,11 +1054,6 @@
boolean deleteOldRDN,
ByteString rawNewSuperior)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(rawEntryDN),
- String.valueOf(rawNewRDN),
- String.valueOf(deleteOldRDN),
- String.valueOf(rawNewSuperior));
ModifyDNOperation modifyDNOperation =
new ModifyDNOperation(this, nextOperationID(),
@@ -1151,10 +1085,6 @@
public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN,
boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(entryDN),
- String.valueOf(newRDN),
- String.valueOf(deleteOldRDN));
return processModifyDN(entryDN, newRDN, deleteOldRDN, null);
}
@@ -1181,10 +1111,6 @@
boolean deleteOldRDN,
DN newSuperior)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(entryDN), String.valueOf(newRDN),
- String.valueOf(deleteOldRDN),
- String.valueOf(newSuperior));
ModifyDNOperation modifyDNOperation =
new ModifyDNOperation(this, nextOperationID(),
@@ -1218,9 +1144,6 @@
SearchScope scope,
LDAPFilter filter)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- String.valueOf(rawBaseDN),
- String.valueOf(scope), String.valueOf(filter));
return processSearch(rawBaseDN, scope,
DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0,
@@ -1257,18 +1180,6 @@
boolean typesOnly, LDAPFilter filter,
LinkedHashSet<String> attributes)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(),
@@ -1316,19 +1227,6 @@
LinkedHashSet<String> attributes,
InternalSearchListener searchListener)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes),
- String.valueOf(searchListener)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(),
@@ -1364,9 +1262,6 @@
SearchScope scope,
SearchFilter filter)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- String.valueOf(baseDN),
- String.valueOf(scope), String.valueOf(filter));
return processSearch(baseDN, scope,
DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0,
@@ -1402,18 +1297,6 @@
boolean typesOnly, SearchFilter filter,
LinkedHashSet<String> attributes)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(baseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(),
@@ -1460,19 +1343,6 @@
LinkedHashSet<String> attributes,
InternalSearchListener searchListener)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(baseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes),
- String.valueOf(searchListener)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(),
@@ -1500,9 +1370,6 @@
public void sendSearchEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "sendSearchEntry",
- String.valueOf(searchOperation),
- String.valueOf(searchEntry));
((InternalSearchOperation) searchOperation).
addSearchEntry(searchEntry);
@@ -1526,9 +1393,6 @@
public boolean sendSearchReference(SearchOperation searchOperation,
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "sendSearchReference",
- String.valueOf(searchOperation),
- String.valueOf(searchReference));
((InternalSearchOperation)
@@ -1551,8 +1415,6 @@
protected boolean sendIntermediateResponseMessage(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "sendIntermediateResponseMessage",
- String.valueOf(intermediateResponse));
// FIXME -- Do we need to support internal intermediate responses?
@@ -1586,11 +1448,6 @@
boolean sendNotification, String message,
int messageID)
{
- assert debugEnter(CLASS_NAME, "disconnect",
- String.valueOf(disconnectReason),
- String.valueOf(sendNotification),
- String.valueOf(message),
- String.valueOf(messageID));
// No implementation is required since there is nothing to
// disconnect. Further, since there is no real disconnect, we can
@@ -1611,7 +1468,6 @@
*/
public boolean bindInProgress()
{
- assert debugEnter(CLASS_NAME, "bindInProgress");
// For internal operations, we don't care if there are any binds
// in progress.
@@ -1630,8 +1486,6 @@
*/
public void setBindInProgress(boolean bindInProgress)
{
- assert debugEnter(CLASS_NAME, "setBindInProgress",
- String.valueOf(bindInProgress));
// No implementation is required.
}
@@ -1647,7 +1501,6 @@
*/
public Collection<Operation> getOperationsInProgress()
{
- assert debugEnter(CLASS_NAME, "getOperationsInProgress");
return operationList;
}
@@ -1666,8 +1519,6 @@
*/
public Operation getOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "getOperationInProgress",
- String.valueOf(messageID));
// Internal operations will not be tracked.
return null;
@@ -1690,8 +1541,6 @@
*/
public boolean removeOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "removeOperationInProgress",
- String.valueOf(messageID));
// No implementation is required, since internal operations will
// not be tracked.
@@ -1713,9 +1562,6 @@
public CancelResult cancelOperation(int messageID,
CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelOperation",
- String.valueOf(messageID),
- String.valueOf(cancelRequest));
// Internal operations cannot be cancelled.
return CancelResult.CANNOT_CANCEL;
@@ -1731,8 +1577,6 @@
*/
public void cancelAllOperations(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperations",
- String.valueOf(cancelRequest));
// No implementation is required since internal operations cannot
// be cancelled.
@@ -1752,9 +1596,6 @@
public void cancelAllOperationsExcept(CancelRequest cancelRequest,
int messageID)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperationsExcept",
- String.valueOf(cancelRequest),
- String.valueOf(messageID));
// No implementation is required since internal operations cannot
// be cancelled.
@@ -1767,7 +1608,6 @@
*/
public String getMonitorSummary()
{
- assert debugEnter(CLASS_NAME, "getMonitorSummary");
StringBuilder buffer = new StringBuilder();
buffer.append("connID=\"");
@@ -1790,8 +1630,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("InternalClientConnection(connID=");
buffer.append(connectionID);
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java b/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
index 6a37060..0f2506b 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalConnectionHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.internal;
@@ -38,7 +38,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.HostPort;
-import static org.opends.server.loggers.Debug.*;
@@ -49,12 +48,6 @@
public class InternalConnectionHandler
extends ConnectionHandler
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.internal." +
- "InternalConnectionHandler";
@@ -83,7 +76,6 @@
{
super("Internal Connection Handler Thread");
- assert debugConstructor(CLASS_NAME);
// Since we can't guarantee that the initializeConnectionHandler
// method will always be called for this method, we'll do the
@@ -103,7 +95,6 @@
*/
public static InternalConnectionHandler getInstance()
{
- assert debugEnter(CLASS_NAME, "getInstance");
return handlerInstance;
}
@@ -129,8 +120,6 @@
public void initializeConnectionHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandler",
- String.valueOf(configEntry));
}
@@ -154,8 +143,6 @@
public void finalizeConnectionHandler(String finalizeReason,
boolean closeConnections)
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandler",
- String.valueOf(closeConnections));
// No implementation is required.
}
@@ -167,7 +154,6 @@
*/
public String getConnectionHandlerName()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
return "Internal Connection Handler";
}
@@ -179,7 +165,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return protocol;
}
@@ -191,7 +176,6 @@
*/
public Collection<HostPort> getListeners()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return listeners;
}
@@ -207,7 +191,6 @@
*/
public Collection<ClientConnection> getClientConnections()
{
- assert debugEnter(CLASS_NAME, "getClientConnections");
return connectionList;
}
@@ -220,7 +203,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
// No implementation is required since this connection handler
// won't actually accept connections.
@@ -236,7 +218,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
return "Internal Connection Handler";
}
@@ -252,8 +233,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("Internal Connection Handler");
}
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalSearchListener.java b/opends/src/server/org/opends/server/protocols/internal/InternalSearchListener.java
index d176eb0..0d0f25a 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalSearchListener.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalSearchListener.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.internal;
diff --git a/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java b/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
index f4dcab3..38182e6 100644
--- a/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
+++ b/opends/src/server/org/opends/server/protocols/internal/InternalSearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.internal;
@@ -44,7 +44,6 @@
import org.opends.server.types.SearchResultReference;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
@@ -58,11 +57,6 @@
public class InternalSearchOperation
extends SearchOperation
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.internal.InternalSearchOperation";
@@ -125,23 +119,6 @@
typesOnly, rawFilter, attributes);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(internalConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(rawFilter),
- String.valueOf(attributes),
- String.valueOf(searchListener)
- });
if (searchListener == null)
@@ -207,23 +184,6 @@
typesOnly, filter, attributes);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(internalConnection),
- String.valueOf(operationID),
- String.valueOf(messageID),
- String.valueOf(requestControls),
- String.valueOf(baseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes),
- String.valueOf(searchListener)
- });
if (searchListener == null)
@@ -254,7 +214,6 @@
*/
public LinkedList<SearchResultEntry> getSearchEntries()
{
- assert debugEnter(CLASS_NAME, "getSearchEntries");
return entryList;
}
@@ -271,8 +230,6 @@
*/
public void addSearchEntry(SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "addSearchEntry",
- String.valueOf(searchEntry));
if (searchListener == null)
{
@@ -296,7 +253,6 @@
*/
public LinkedList<SearchResultReference> getSearchReferences()
{
- assert debugEnter(CLASS_NAME, "getSearchReferences");
return referenceList;
}
@@ -314,8 +270,6 @@
public void addSearchReference(
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "addSearchReference",
- String.valueOf(searchReference));
if (searchListener == null)
{
diff --git a/opends/src/server/org/opends/server/protocols/internal/package-info.java b/opends/src/server/org/opends/server/protocols/internal/package-info.java
index 035c40e..6a6c21a 100644
--- a/opends/src/server/org/opends/server/protocols/internal/package-info.java
+++ b/opends/src/server/org/opends/server/protocols/internal/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/protocols/jmx/Credential.java b/opends/src/server/org/opends/server/protocols/jmx/Credential.java
index 41c2123..d95bf68 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/Credential.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/Credential.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
diff --git a/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java b/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java
index fe0972b..688ffae 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIClientSocketFactory.java
@@ -22,14 +22,14 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
-import static org.opends.server.loggers.Debug.debugMessage;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import java.io.IOException;
@@ -46,9 +46,6 @@
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-
/**
* A <code>DirectoryRMIClientSocketFactory</code> instance is used by the
* RMI runtime in order to obtain client sockets for RMI calls via SSL.
@@ -61,11 +58,6 @@
RMIClientSocketFactory, Serializable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.DirectoryRMIClientSocketFactory";
/**
* The serial version identifier required to satisfy the compiler because
@@ -116,7 +108,6 @@
*/
public DirectoryRMIClientSocketFactory(boolean wellknown)
{
- assert debugConstructor(CLASS_NAME);
this.needClientCertificate = wellknown;
// We don't force the initialization of the SSLSocketFactory
@@ -297,15 +288,12 @@
private synchronized SSLSocketFactory getSSLSocketFactory()
throws IOException
{
- assert debugEnter(CLASS_NAME, "getSSLSocketFactory");
if (sslSocketFactory == null)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "getSSLSocketFactory",
- "sslSocketFactory is null, get a new one");
+ if (debugEnabled())
+ {
+ debugVerbose("sslSocketFactory is null, get a new one");
+ }
// socket factory not yet initialized
// initialize the trust
@@ -318,7 +306,7 @@
// Env. If yes, use it for this SSL Connection
if ((connectionEnv != null)
&& (connectionEnv
- .containsKey(JmxConnectionHandler.TRUST_MANAGER_ARRAY_KEY)))
+ .containsKey(JmxConnectionHandler.TRUST_MANAGER_ARRAY_KEY)))
{
try
{
@@ -327,7 +315,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getSSLSocketFactory", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
tms = null;
}
@@ -340,7 +331,7 @@
+ JmxConnectionHandler.TRUST_MANAGER_ARRAY_KEY
+ "] in connection environment : "
+ connectionEnv
- .get(JmxConnectionHandler.TRUST_MANAGER_ARRAY_KEY));
+ .get(JmxConnectionHandler.TRUST_MANAGER_ARRAY_KEY));
}
}
@@ -354,7 +345,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getSSLSocketFactory", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new IOException("Unable to initialize SSL context : "
+ e.getMessage());
}
diff --git a/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java b/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java
index de4d3cc..9d2ed2c 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/DirectoryRMIServerSocketFactory.java
@@ -22,11 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
-import static org.opends.server.loggers.Debug.debugMessage;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
import java.io.IOException;
import java.net.InetAddress;
@@ -37,9 +38,6 @@
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
-
/**
* A <code>DirectoryRMIServerSocketFactory</code> instance is used by the RMI
* runtime in order to obtain server sockets for RMI calls via SSL.
@@ -62,11 +60,6 @@
*/
private final boolean needClientCertificate;
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.DirectoryRMIServerSocketFactory";
/**
* Constructs a new <code>DirectoryRMIServerSocketFactory</code> with the
@@ -125,13 +118,11 @@
public Socket accept() throws IOException
{
Socket socket = super.accept();
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "createServerSocket",
- "host/port:" + socket.getInetAddress().getHostName() + "/"
- + socket.getPort());
+ if (debugEnabled())
+ {
+ debugVerbose("host/port: %s/%d",
+ socket.getInetAddress().getHostName(), socket.getPort());
+ }
SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket(
socket,
socket.getInetAddress().getHostName(),
diff --git a/opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java b/opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
index 985f539..6531121 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/JmxClientConnection.java
@@ -42,9 +42,21 @@
import org.opends.server.protocols.ldap.*;
import org.opends.server.protocols.internal.InternalSearchOperation ;
import org.opends.server.protocols.internal.InternalSearchListener;
-import org.opends.server.types.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
+import org.opends.server.types.AuthenticationInfo;
+import org.opends.server.types.CancelRequest;
+import org.opends.server.types.CancelResult;
+import org.opends.server.types.Control;
+import org.opends.server.types.DN;
+import org.opends.server.types.DereferencePolicy;
+import org.opends.server.types.DisconnectReason;
+import org.opends.server.types.IntermediateResponse;
+import org.opends.server.types.SearchResultEntry;
+import org.opends.server.types.SearchResultReference;
+import org.opends.server.types.SearchScope;
import static org.opends.server.messages.ProtocolMessages.*;
@@ -56,11 +68,6 @@
public class JmxClientConnection
extends ClientConnection implements NotificationListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.JmxClientConnection";
// The message ID counter to use for jmx connections.
@@ -108,7 +115,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
nextMessageID = new AtomicInteger(1);
nextOperationID = new AtomicLong(0);
@@ -137,7 +143,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
//
@@ -199,7 +208,6 @@
*/
public long nextOperationID()
{
- assert debugEnter(CLASS_NAME, "nextOperationID");
long opID = nextOperationID.getAndIncrement();
if (opID < 0)
@@ -232,7 +240,6 @@
*/
public int nextMessageID()
{
- assert debugEnter(CLASS_NAME, "nextMessageID");
int msgID = nextMessageID.getAndIncrement();
if (msgID < 0)
@@ -263,7 +270,6 @@
*/
public long getConnectionID()
{
- assert debugEnter(CLASS_NAME, "getConnectionID");
return connectionID;
}
@@ -275,7 +281,6 @@
*/
public ConnectionHandler getConnectionHandler()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandler");
return jmxConnectionHandler;
}
@@ -289,7 +294,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return "jmx";
}
@@ -303,7 +307,6 @@
*/
public String getClientAddress()
{
- assert debugEnter(CLASS_NAME, "getClientAddress");
return "jmx";
}
@@ -319,7 +322,6 @@
*/
public String getServerAddress()
{
- assert debugEnter(CLASS_NAME, "getServerAddress");
return "jmx";
}
@@ -336,7 +338,6 @@
*/
public InetAddress getRemoteAddress()
{
- assert debugEnter(CLASS_NAME, "getRemoteAddress");
return null;
}
@@ -354,7 +355,6 @@
*/
public InetAddress getLocalAddress()
{
- assert debugEnter(CLASS_NAME, "getLocalAddress");
return null;
}
@@ -374,7 +374,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
return securityProvider.isSecure();
}
@@ -388,7 +387,6 @@
*/
public ConnectionSecurityProvider getConnectionSecurityProvider()
{
- assert debugEnter(CLASS_NAME, "getConnectionSecurityProvider");
return securityProvider;
}
@@ -404,8 +402,6 @@
public void setConnectionSecurityProvider(ConnectionSecurityProvider
securityProvider)
{
- assert debugEnter(CLASS_NAME, "setConnectionSecurityProvider",
- String.valueOf(securityProvider));
this.securityProvider = securityProvider;
}
@@ -422,7 +418,6 @@
*/
public String getSecurityMechanism()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanism");
return securityProvider.getSecurityMechanismName();
}
@@ -447,7 +442,6 @@
*/
public boolean processDataRead(ByteBuffer buffer)
{
- assert debugEnter(CLASS_NAME, "processDataRead");
// This method will not do anything with the data because there is no
// actual "connection" from which information can be read, nor any protocol
@@ -465,7 +459,6 @@
*/
public void sendResponse(Operation operation)
{
- assert debugEnter(CLASS_NAME, "sendResponse", String.valueOf(operation));
// There will not be any response sent by this method, since there is not an
// actual connection.
@@ -486,8 +479,6 @@
public AddOperation processAdd(ASN1OctetString rawEntryDN,
ArrayList<LDAPAttribute> rawAttributes)
{
- assert debugEnter(CLASS_NAME, "processAdd", String.valueOf(rawEntryDN),
- String.valueOf(rawAttributes));
AddOperation addOperation =
new AddOperation(this, nextOperationID(), nextMessageID(),
@@ -513,9 +504,6 @@
String attributeType,
ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "processCompare", String.valueOf(rawEntryDN),
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
CompareOperation compareOperation =
new CompareOperation(this, nextOperationID(), nextMessageID(),
@@ -538,8 +526,6 @@
*/
public DeleteOperation processDelete(ASN1OctetString rawEntryDN)
{
- assert debugEnter(CLASS_NAME, "processDelete",
- String.valueOf(rawEntryDN));
DeleteOperation deleteOperation =
new DeleteOperation(this, nextOperationID(), nextMessageID(),
@@ -564,9 +550,6 @@
public ExtendedOperation processExtendedOperation(String requestOID,
ASN1OctetString requestValue)
{
- assert debugEnter(CLASS_NAME, "processExtendedOperation",
- String.valueOf(requestOID),
- String.valueOf(requestValue));
ExtendedOperation extendedOperation =
new ExtendedOperation(this, nextOperationID(), nextMessageID(),
@@ -592,8 +575,6 @@
public ModifyOperation processModify(ASN1OctetString rawEntryDN,
ArrayList<LDAPModification> rawModifications)
{
- assert debugEnter(CLASS_NAME, "processModify", String.valueOf(rawEntryDN),
- String.valueOf(rawModifications));
ModifyOperation modifyOperation =
new ModifyOperation(this, nextOperationID(), nextMessageID(),
@@ -621,9 +602,6 @@
ASN1OctetString rawNewRDN,
boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, "processModifyDN",
- String.valueOf(rawEntryDN), String.valueOf(rawNewRDN),
- String.valueOf(deleteOldRDN));
return processModifyDN(rawEntryDN, rawNewRDN, deleteOldRDN, null);
}
@@ -649,9 +627,6 @@
boolean deleteOldRDN,
ASN1OctetString rawNewSuperior)
{
- assert debugEnter(CLASS_NAME, "processModifyDN", String.valueOf(rawEntryDN),
- String.valueOf(rawNewRDN), String.valueOf(deleteOldRDN),
- String.valueOf(rawNewSuperior));
ModifyDNOperation modifyDNOperation =
new ModifyDNOperation(this, nextOperationID(), nextMessageID(),
@@ -680,8 +655,6 @@
public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN,
SearchScope scope, LDAPFilter filter)
{
- assert debugEnter(CLASS_NAME, "processSearch", String.valueOf(rawBaseDN),
- String.valueOf(scope), String.valueOf(filter));
return processSearch(rawBaseDN, scope,
DereferencePolicy.NEVER_DEREF_ALIASES, 0, 0, false,
@@ -713,18 +686,6 @@
boolean typesOnly, LDAPFilter filter,
LinkedHashSet<String> attributes)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(), nextMessageID(),
@@ -763,19 +724,6 @@
LinkedHashSet<String> attributes,
InternalSearchListener searchListener)
{
- assert debugEnter(CLASS_NAME, "processSearch",
- new String[]
- {
- String.valueOf(rawBaseDN),
- String.valueOf(scope),
- String.valueOf(derefPolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes),
- String.valueOf(searchListener)
- });
InternalSearchOperation searchOperation =
new InternalSearchOperation(this, nextOperationID(), nextMessageID(),
@@ -802,9 +750,6 @@
public void sendSearchEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "sendSearchEntry",
- String.valueOf(searchOperation),
- String.valueOf(searchEntry));
((InternalSearchOperation) searchOperation).addSearchEntry(searchEntry);
}
@@ -827,9 +772,6 @@
public boolean sendSearchReference(SearchOperation searchOperation,
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "sendSearchReference",
- String.valueOf(searchOperation),
- String.valueOf(searchReference));
((InternalSearchOperation)
@@ -851,8 +793,6 @@
protected boolean sendIntermediateResponseMessage(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "sendIntermediateResponseMessage",
- String.valueOf(intermediateResponse));
// FIXME -- Do we need to support Jmx intermediate responses? If so,
@@ -884,10 +824,6 @@
boolean sendNotification, String message,
int messageID)
{
- assert debugEnter(CLASS_NAME, "disconnect",
- String.valueOf(disconnectReason),
- String.valueOf(sendNotification), String.valueOf(message),
- String.valueOf(messageID));
// we are already performing a disconnect
if (disconnectStarted)
@@ -909,7 +845,10 @@
catch (Exception e)
{
// TODO print a message ?
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
// Call postDisconnectPlugins
@@ -922,7 +861,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -938,7 +880,6 @@
*/
public boolean bindInProgress()
{
- assert debugEnter(CLASS_NAME, "bindInProgress");
// For Jmx operations, we don't care if there are any binds in
// progress.
@@ -957,8 +898,6 @@
*/
public void setBindInProgress(boolean bindInProgress)
{
- assert debugEnter(CLASS_NAME, "setBindInProgress",
- String.valueOf(bindInProgress));
// No implementation is required.
}
@@ -973,7 +912,6 @@
*/
public Collection<Operation> getOperationsInProgress()
{
- assert debugEnter(CLASS_NAME, "getOperationsInProgress");
return operationList;
}
@@ -990,8 +928,6 @@
*/
public Operation getOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "getOperationInProgress",
- String.valueOf(messageID));
// Jmx operations will not be tracked.
return null;
@@ -1012,8 +948,6 @@
*/
public boolean removeOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "removeOperationInProgress",
- String.valueOf(messageID));
// No implementation is required, since Jmx operations will not be
// tracked.
@@ -1035,9 +969,6 @@
public CancelResult cancelOperation(int messageID,
CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelOperation",
- String.valueOf(messageID),
- String.valueOf(cancelRequest));
// Jmx operations cannot be cancelled.
return CancelResult.CANNOT_CANCEL;
@@ -1053,8 +984,6 @@
*/
public void cancelAllOperations(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperations",
- String.valueOf(cancelRequest));
// No implementation is required since Jmx operations cannot be
// cancelled.
@@ -1074,9 +1003,6 @@
public void cancelAllOperationsExcept(CancelRequest cancelRequest,
int messageID)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperationsExcept",
- String.valueOf(cancelRequest),
- String.valueOf(messageID));
// No implementation is required since Jmx operations cannot be
// cancelled.
@@ -1089,7 +1015,6 @@
*/
public String getMonitorSummary()
{
- assert debugEnter(CLASS_NAME, "getMonitorSummary");
StringBuilder buffer = new StringBuilder();
buffer.append("connID=\"");
diff --git a/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java b/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
index 4240962..ac1ce87 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
@@ -27,9 +27,9 @@
package org.opends.server.protocols.jmx;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -74,7 +74,7 @@
extends ConnectionHandler implements ConfigurableComponent, AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.protocols.jmx.JMXConnectionHandler";
@@ -200,7 +200,6 @@
{
super("JMX Connection Handler Thread");
- assert debugConstructor(CLASS_NAME);
// No real implementation is required. Do all the work in the
// initializeConnectionHandler method.
@@ -223,8 +222,6 @@
public void initializeConnectionHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandler", String
- .valueOf(configEntry));
//
// If the initializeConnectionHandler method is called,
@@ -324,7 +321,6 @@
public void finalizeConnectionHandler(
String finalizeReason, boolean closeConnections)
{
- assert debugEnter(CLASS_NAME, "finalizeConnectionHandler");
// We should also close the RMI registry.
rmiConnector.finalizeConnectionHandler(closeConnections, true);
@@ -335,7 +331,6 @@
*/
public String getConnectionHandlerName()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
return connectionHandlerName;
}
@@ -345,7 +340,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return protocol;
}
@@ -355,7 +349,6 @@
*/
public Collection<HostPort> getListeners()
{
- assert debugEnter(CLASS_NAME, "getListeners");
return listeners;
}
@@ -369,7 +362,6 @@
*/
public Collection<ClientConnection> getClientConnections()
{
- assert debugEnter(CLASS_NAME, "getClientConnections");
return connectionList;
}
@@ -388,7 +380,6 @@
*/
public String getShutdownListenerName()
{
- assert debugEnter(CLASS_NAME, "getShutdownListenerName");
return handlerName;
}
@@ -403,7 +394,6 @@
*/
public void processServerShutdown(String reason)
{
- assert debugEnter(CLASS_NAME, "processServerShutdown");
// We should also close the RMI registry.
rmiConnector.finalizeConnectionHandler(true, true);
@@ -418,7 +408,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -432,7 +421,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
return configAttrs;
@@ -457,8 +445,6 @@
public boolean hasAcceptableConfiguration(
ConfigEntry configEntry, List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration", String
- .valueOf(configEntry), "java.util.List<String>");
boolean configValid = true;
@@ -540,7 +526,10 @@
catch (Exception e)
{
configValid = false;
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_SSL_CERT_NICKNAME;
unacceptableReasons.add(getMessage(
msgID,
@@ -573,8 +562,6 @@
public ConfigChangeResult applyNewConfiguration(
ConfigEntry configEntry, boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration", String
- .valueOf(configEntry), String.valueOf(detailedResults));
//
// Create variables to include in the response.
@@ -636,7 +623,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_SSL_CERT_NICKNAME;
messages.add(getMessage(
msgID,
@@ -686,7 +676,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_KEYMANAGER_DN;
messages.add(getMessage(
msgID,
@@ -829,7 +822,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append(handlerName);
}
@@ -843,7 +835,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return configEntryDN;
}
@@ -857,7 +848,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -874,7 +864,6 @@
*/
public LinkedHashMap<String, String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String, String> alerts = new LinkedHashMap<String, String>();
@@ -918,13 +907,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_CONFIG_CONNHANDLER_NO_ENABLED_ATTR;
String message = getMessage(
@@ -976,13 +971,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_LISTEN_PORT;
String message = getMessage(
@@ -1027,7 +1028,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_USE_SSL;
String message = getMessage(
@@ -1070,7 +1074,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_SSL_CERT_NICKNAME;
String message = getMessage(
@@ -1105,7 +1112,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_JMX_CONNHANDLER_CANNOT_DETERMINE_KEYMANAGER_DN;
String message = getMessage(
diff --git a/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxConnector.java b/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxConnector.java
index db5e71c..b1c28eb 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxConnector.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxConnector.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
diff --git a/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxPrincipal.java b/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxPrincipal.java
index 789ae2c..06fa7fc 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxPrincipal.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/OpendsJmxPrincipal.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
diff --git a/opends/src/server/org/opends/server/protocols/jmx/OpendsRMIJRMPServerImpl.java b/opends/src/server/org/opends/server/protocols/jmx/OpendsRMIJRMPServerImpl.java
index ffebd1d..431baf0 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/OpendsRMIJRMPServerImpl.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/OpendsRMIJRMPServerImpl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
diff --git a/opends/src/server/org/opends/server/protocols/jmx/OpendsRmiServerSocketFactory.java b/opends/src/server/org/opends/server/protocols/jmx/OpendsRmiServerSocketFactory.java
index 84dd218..05ce940 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/OpendsRmiServerSocketFactory.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/OpendsRmiServerSocketFactory.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.jmx;
diff --git a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
index 0013295..4823fdf 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/RmiAuthenticator.java
@@ -40,13 +40,14 @@
import org.opends.server.protocols.ldap.LDAPException;
import org.opends.server.protocols.ldap.LDAPResultCode;
import org.opends.server.types.Control;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.ResultCode;
import org.opends.server.types.DN;
import org.opends.server.types.AuthenticationInfo;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import org.opends.server.types.DebugLogLevel;
/**
* A <code>RMIAuthenticator</code> manages authentication for the secure
@@ -56,11 +57,6 @@
*/
public class RmiAuthenticator implements JMXAuthenticator
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.RmiAuthenticator";
/**
* The client authencation mode. <code>true</code> indicates that the
@@ -91,7 +87,6 @@
*/
public RmiAuthenticator(JmxConnectionHandler jmxConnectionHandler)
{
- assert debugConstructor(CLASS_NAME);
this.jmxConnectionHandler = jmxConnectionHandler;
}
@@ -120,7 +115,6 @@
*/
public Subject authenticate(Object credentials)
{
- assert debugEnter(CLASS_NAME, "RmiAuthenticator");
//
// If we are in the finalized phase, we should not accept
@@ -147,34 +141,28 @@
// client
if (authcID == null)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "User name is Null ");
+ if (debugEnabled())
+ {
+ debugVerbose("User name is Null");
+ }
SecurityException se = new SecurityException();
throw se;
}
if (password == null)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "User password is Null ");
+ if (debugEnabled())
+ {
+ debugVerbose("User password is Null ");
+ }
SecurityException se = new SecurityException();
throw se;
}
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "RmiAuthenticator",
- "UserName =" + authcID);
+ if (debugEnabled())
+ {
+ debugVerbose("UserName = %s", authcID);
+ }
//
// Declare the client connection
@@ -189,8 +177,10 @@
}
catch (Exception e)
{
- assert debugException(
- CLASS_NAME, "RmiAuthenticator", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
SecurityException se = new SecurityException();
se.initCause(e);
throw se;
@@ -277,12 +267,10 @@
bindOp.run();
if (bindOp.getResultCode() == ResultCode.SUCCESS)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "bind",
- "User is authenticated");
+ if (debugEnabled())
+ {
+ debugVerbose("User is authenticated");
+ }
authInfo = bindOp.getAuthenticationInfo();
jmxClientConnection.setAuthenticationInfo(authInfo);
diff --git a/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java b/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
index 2742394..59d660e 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
@@ -46,13 +46,15 @@
import org.opends.server.config.JMXMBean;
import org.opends.server.extensions.NullKeyManagerProvider;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugWarning;
+import static org.opends.server.loggers.debug.DebugLogger.debugError;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.util.SelectableCertificateKeyManager;
-import static org.opends.server.loggers.Debug.*;
-
/**
* The RMI connector class starts and stops the JMX RMI connector server.
* There are 2 different connector servers
@@ -76,11 +78,6 @@
*/
private MBeanServer mbs = null;
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.jmx.RmiConnector";
/**
* the client address to connect to the common registry. Note that a
@@ -146,7 +143,6 @@
public RmiConnector(MBeanServer mbs,
JmxConnectionHandler jmxConnectionHandler)
{
- assert debugConstructor(CLASS_NAME);
this.mbs = mbs;
this.jmxConnectionHandler = jmxConnectionHandler;
@@ -168,7 +164,6 @@
*/
public void initialize()
{
- assert debugEnter(CLASS_NAME, "initialize");
try
{
//
@@ -187,18 +182,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "start", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new RuntimeException("Error while starting the RMI module : "
+ e.getMessage());
}
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "start",
- "RMI module started");
+ if (debugEnabled())
+ {
+ debugVerbose("RMI module started");
+ }
}
/**
@@ -211,17 +207,14 @@
*/
private void startCommonRegistry() throws Exception
{
- assert debugEnter(CLASS_NAME, "startCommonRegistry");
int registryPort = jmxConnectionHandler.listenPort;
//
// create our local RMI registry if it does not exist already
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startCommonRegistry",
- "start or reach an RMI registry on port " + registryPort);
+ if (debugEnabled())
+ {
+ debugVerbose("start or reach an RMI registry on port %d", registryPort);
+ }
try
{
//
@@ -236,12 +229,10 @@
{
//
// is the registry already created ?
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.WARNING,
- CLASS_NAME,
- "startCommonRegistry",
- "cannot create the RMI registry -> already done ?");
+ if (debugEnabled())
+ {
+ debugWarning("cannot create the RMI registry -> already done ?");
+ }
try
{
//
@@ -255,30 +246,26 @@
}
catch (Exception e)
{
- //
- // no 'valid' registry found on the specified port
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.ERROR,
- CLASS_NAME,
- "startCommonRegistry",
- "exception thrown while pinging the RMI registry");
+ if (debugEnabled())
+ {
+ //
+ // no 'valid' registry found on the specified port
+ debugError("exception thrown while pinging the RMI registry");
- //
- // throw the original exception
- assert debugException(CLASS_NAME, "startCommonRegistry", re);
+ //
+ // throw the original exception
+ debugCought(DebugLogLevel.ERROR, re);
+ }
throw re;
}
//
// here the registry is ok even though
// it was not created by this call
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.WARNING,
- CLASS_NAME,
- "startCommonRegistry",
- "RMI was registry already started");
+ if (debugEnabled())
+ {
+ debugWarning("RMI was registry already started");
+ }
}
}
@@ -296,7 +283,6 @@
*/
private void startConnectorNoClientCertificate() throws Exception
{
- assert debugEnter(CLASS_NAME, "startConnectorNoClientCertificate");
try
{
@@ -311,12 +297,10 @@
DirectoryRMIServerSocketFactory rmiServerSockeyFactory = null;
if (jmxConnectionHandler.useSSL)
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startConnectorNoClientCertificate",
- "SSL connection");
+ if (debugEnabled())
+ {
+ debugVerbose("SSL connection");
+ }
// ---------------------
// SERVER SIDE
@@ -371,22 +355,18 @@
}
else
{
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startConnectorNoClientCertificate",
- "UNSECURE CONNECTION");
+ if (debugEnabled())
+ {
+ debugVerbose("UNSECURE CONNECTION");
+ }
}
//
// specify the rmi JMX authenticator to be used
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startConnectorNoClientCertificate",
- "Add RmiAuthenticator into JMX map");
+ if (debugEnabled())
+ {
+ debugVerbose("Add RmiAuthenticator into JMX map");
+ }
rmiAuthenticator = new RmiAuthenticator(jmxConnectionHandler);
env.put(JMXConnectorServer.AUTHENTICATOR, rmiAuthenticator);
@@ -401,15 +381,13 @@
//
// Create and start the connector
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startConnectorNoClientCertificate",
- "Create and start the JMX RMI connector");
+ if (debugEnabled())
+ {
+ debugVerbose("Create and start the JMX RMI connector");
+ }
OpendsRMIJRMPServerImpl opendsRmiConnectorServer =
- new OpendsRMIJRMPServerImpl(
- 0, rmiClientSockeyFactory, rmiServerSockeyFactory, env);
+ new OpendsRMIJRMPServerImpl(
+ 0, rmiClientSockeyFactory, rmiServerSockeyFactory, env);
jmxRmiConnectorNoClientCertificate = new RMIConnectorServer(url, env,
opendsRmiConnectorServer, mbs);
jmxRmiConnectorNoClientCertificate.start();
@@ -420,17 +398,18 @@
ObjectName name = new ObjectName(jmxRmiConnectorNoClientCertificateName);
mbs.registerMBean(jmxRmiConnectorNoClientCertificate, name);
- assert debugMessage(
- DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.VERBOSE,
- CLASS_NAME,
- "startConnectorNoClientCertificate",
- "JMX RMI connector Started");
+ if (debugEnabled())
+ {
+ debugVerbose("JMX RMI connector Started");
+ }
}
catch (Exception e)
{
- debugException(CLASS_NAME, "startConnectorNoClientCertificate", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw e;
}
@@ -499,7 +478,10 @@
catch (Exception e)
{
// TODO Log an error message
- assert debugException(CLASS_NAME, "finalizeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
if (stopRegistry)
@@ -513,7 +495,10 @@
catch (IOException e)
{
// TODO Log an error message
- assert debugException(CLASS_NAME, "finalizeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
registry = null;
}
diff --git a/opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java
index 02f023c..93398bc 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/AbandonRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -30,7 +30,9 @@
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1Integer;
-import static org.opends.server.loggers.Debug.*;
+import org.opends.server.types.DebugLogLevel;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -47,11 +49,6 @@
public class AbandonRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.AbandonRequestProtocolOp";
@@ -68,7 +65,6 @@
*/
public AbandonRequestProtocolOp(int idToAbandon)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(idToAbandon));
this.idToAbandon = idToAbandon;
}
@@ -82,7 +78,6 @@
*/
public int getIDToAbandon()
{
- assert debugEnter(CLASS_NAME, "getIDToAbandon");
return idToAbandon;
}
@@ -96,8 +91,6 @@
*/
public void setIDToAbandon(int idToAbandon)
{
- assert debugEnter(CLASS_NAME, "setIDToAbandon",
- String.valueOf(idToAbandon));
this.idToAbandon = idToAbandon;
}
@@ -111,7 +104,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_ABANDON_REQUEST;
}
@@ -125,7 +117,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Abandon Request";
}
@@ -140,7 +131,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
return new ASN1Integer(OP_TYPE_ABANDON_REQUEST, idToAbandon);
}
@@ -161,8 +151,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeAbandonRequest",
- String.valueOf(element));
int idToAbandon;
try
@@ -171,7 +159,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAbandonRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_ABANDON_REQUEST_DECODE_ID;
String message = getMessage(msgID, String.valueOf(e));
@@ -191,7 +182,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AbandonRequest(idToAbandon=");
buffer.append(idToAbandon);
@@ -210,8 +200,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
index c23dfdc..c002d36 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/AddRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,7 +37,9 @@
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.util.Base64;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -46,7 +48,6 @@
import static org.opends.server.util.StaticUtils.*;
-
/**
* This class defines the structures and methods for an LDAP add request
* protocol op, which is used to add a new entry to the Directory Server.
@@ -54,11 +55,6 @@
public class AddRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.AddRequestProtocolOp";
@@ -78,7 +74,6 @@
*/
public AddRequestProtocolOp(ASN1OctetString dn)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
this.dn = dn;
this.attributes = new ArrayList<LDAPAttribute>();
@@ -96,8 +91,6 @@
public AddRequestProtocolOp(ASN1OctetString dn,
ArrayList<LDAPAttribute> attributes)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(attributes));
this.dn = dn;
@@ -120,7 +113,6 @@
*/
public ASN1OctetString getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -134,7 +126,6 @@
*/
public void setDN(ASN1OctetString dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -149,7 +140,6 @@
*/
public List<LDAPAttribute> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -163,7 +153,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_ADD_REQUEST;
}
@@ -177,7 +166,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Add Request";
}
@@ -192,7 +180,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(dn);
@@ -225,7 +212,6 @@
public static AddRequestProtocolOp decodeAddRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeAddRequest", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -234,9 +220,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -258,9 +247,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -280,9 +272,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_ATTRS;
+ int msgID = MSGID_LDAP_ADD_REQUEST_DECODE_ATTRS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -301,7 +296,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AddRequest(dn=");
dn.toString(buffer);
@@ -334,8 +328,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
@@ -371,8 +363,6 @@
*/
public void toLDIF(StringBuilder buffer, int wrapColumn)
{
- assert debugEnter(CLASS_NAME, "toLDIF", "java.lang.StringBuilder",
- String.valueOf(wrapColumn));
// Add the DN to the buffer.
diff --git a/opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
index b8de147..f3fb8a2 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/AddResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class AddResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.AddResponseProtocolOp";
@@ -84,7 +81,6 @@
*/
public AddResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public AddResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public AddResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_ADD_RESPONSE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Add Response";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -339,7 +317,6 @@
public static AddResponseProtocolOp decodeAddResponse(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeAddResponse", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -348,9 +325,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -372,9 +352,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -395,9 +378,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -414,9 +400,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -442,9 +431,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeAddResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -465,7 +457,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("AddResponse(resultCode=");
buffer.append(resultCode);
@@ -513,8 +504,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java
index 129217d..571d8e8 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/BindRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -35,8 +35,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.AuthenticationType;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -52,11 +54,6 @@
public class BindRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.BindRequestProtocolOp";
@@ -91,9 +88,6 @@
public BindRequestProtocolOp(ASN1OctetString dn, int protocolVersion,
ASN1OctetString simplePassword)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(protocolVersion),
- String.valueOf(simplePassword));
this.dn = dn;
this.protocolVersion = protocolVersion;
@@ -117,9 +111,6 @@
public BindRequestProtocolOp(ASN1OctetString dn, String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(saslMechanism),
- String.valueOf(saslCredentials));
this.dn = dn;
this.saslMechanism = saslMechanism;
@@ -149,16 +140,6 @@
String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(dn),
- String.valueOf(protocolVersion),
- String.valueOf(authenticationType),
- String.valueOf(simplePassword),
- String.valueOf(saslMechanism),
- String.valueOf(saslCredentials)
- });
this.dn = dn;
this.protocolVersion = protocolVersion;
@@ -177,7 +158,6 @@
*/
public ASN1OctetString getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -191,7 +171,6 @@
*/
public void setDN(ASN1OctetString dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -205,7 +184,6 @@
*/
public int getProtocolVersion()
{
- assert debugEnter(CLASS_NAME, "getProtocolVersion");
return protocolVersion;
}
@@ -219,8 +197,6 @@
*/
public void setProtocolVersion(int protocolVersion)
{
- assert debugEnter(CLASS_NAME, "setProtocolVersion",
- String.valueOf(protocolVersion));
this.protocolVersion = protocolVersion;
}
@@ -234,7 +210,6 @@
*/
public AuthenticationType getAuthenticationType()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationType");
return authenticationType;
}
@@ -248,8 +223,6 @@
*/
public void setAuthenticationType(AuthenticationType authenticationType)
{
- assert debugEnter(CLASS_NAME, "setAuthenticationType",
- String.valueOf(authenticationType));
this.authenticationType = authenticationType;
}
@@ -264,7 +237,6 @@
*/
public ASN1OctetString getSimplePassword()
{
- assert debugEnter(CLASS_NAME, "getSimplePassword");
return simplePassword;
}
@@ -280,8 +252,6 @@
*/
public void setSimplePassword(ASN1OctetString simplePassword)
{
- assert debugEnter(CLASS_NAME, "setSimplePassword",
- String.valueOf(simplePassword));
this.simplePassword = simplePassword;
authenticationType = AuthenticationType.SIMPLE;
@@ -299,7 +269,6 @@
*/
public String getSASLMechanism()
{
- assert debugEnter(CLASS_NAME, "getSASLMechanism");
return saslMechanism;
}
@@ -314,7 +283,6 @@
*/
public ASN1OctetString getSASLCredentials()
{
- assert debugEnter(CLASS_NAME, "getSASLCredentials");
return saslCredentials;
}
@@ -331,9 +299,6 @@
public void setSASLAuthenticationInfo(String saslMechanism,
ASN1OctetString saslCredentials)
{
- assert debugEnter(CLASS_NAME, "setSASLAuthenticationInfo",
- String.valueOf(saslMechanism),
- String.valueOf(saslCredentials));
this.saslMechanism = saslMechanism;
this.saslCredentials = saslCredentials;
@@ -351,7 +316,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_BIND_REQUEST;
}
@@ -365,7 +329,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Bind Request";
}
@@ -380,7 +343,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(3);
@@ -422,7 +384,6 @@
public static BindRequestProtocolOp decodeBindRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeBindRequest", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -431,9 +392,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -455,9 +419,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_VERSION;
+ int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_VERSION;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -470,9 +437,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -535,9 +505,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_CREDENTIALS;
+ int msgID = MSGID_LDAP_BIND_REQUEST_DECODE_CREDENTIALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -557,7 +530,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("BindRequest(version=");
buffer.append(protocolVersion);
@@ -600,8 +572,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
index 720563c..2bd80f4 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/BindResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class BindResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.BindResponseProtocolOp";
@@ -87,7 +84,6 @@
*/
public BindResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -108,8 +104,6 @@
*/
public BindResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -132,9 +126,6 @@
public BindResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -160,9 +151,6 @@
DN matchedDN, List<String> referralURLs,
ASN1OctetString serverSASLCredentials)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -180,7 +168,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -194,7 +181,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -209,7 +195,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -223,8 +208,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -239,7 +222,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -253,7 +235,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -268,7 +249,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -282,8 +262,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -298,7 +276,6 @@
*/
public ASN1OctetString getServerSASLCredentials()
{
- assert debugEnter(CLASS_NAME, "getServerSASLCredentials");
return serverSASLCredentials;
}
@@ -313,7 +290,6 @@
*/
public void setServerSASLCredentials(ASN1OctetString serverSASLCredentials)
{
- assert debugEnter(CLASS_NAME, "setServerSASLCredentials");
this.serverSASLCredentials = serverSASLCredentials;
}
@@ -327,7 +303,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_BIND_RESPONSE;
}
@@ -341,7 +316,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Bind Response";
}
@@ -356,7 +330,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(5);
elements.add(new ASN1Enumerated(resultCode));
@@ -409,8 +382,6 @@
public static BindResponseProtocolOp decodeBindResponse(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeBindResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -419,9 +390,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -443,9 +417,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -466,9 +443,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -485,9 +465,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -517,9 +500,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -534,7 +520,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_BIND_RESULT_DECODE_SERVER_SASL_CREDENTIALS;
String message = getMessage(msgID, String.valueOf(e));
@@ -562,9 +551,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -575,7 +567,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeBindResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_BIND_RESULT_DECODE_SERVER_SASL_CREDENTIALS;
String message = getMessage(msgID, String.valueOf(e));
@@ -604,7 +599,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("BindResponse(resultCode=");
buffer.append(resultCode);
@@ -658,8 +652,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java
index cc4f6d5..018bf2b 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/CompareRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -34,7 +34,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -42,7 +44,6 @@
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the structures and methods for an LDAP compare request
* protocol op, which is used to determine whether a particular entry contains
@@ -51,11 +52,6 @@
public class CompareRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.CompareRequestProtocolOp";
@@ -80,9 +76,6 @@
public CompareRequestProtocolOp(ASN1OctetString dn, String attributeType,
ASN1OctetString assertionValue)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
this.dn = dn;
this.attributeType = attributeType;
@@ -98,7 +91,6 @@
*/
public ASN1OctetString getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -112,7 +104,6 @@
*/
public void setDN(ASN1OctetString dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -126,7 +117,6 @@
*/
public String getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -140,8 +130,6 @@
*/
public void setAttributeType(String attributeType)
{
- assert debugEnter(CLASS_NAME, "setAttributeType",
- String.valueOf(attributeType));
this.attributeType = attributeType;
}
@@ -155,7 +143,6 @@
*/
public ASN1OctetString getAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getAssertionValue");
return assertionValue;
}
@@ -169,8 +156,6 @@
*/
public void setAssertionValue(ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "setAssertionValue",
- String.valueOf(assertionValue));
this.assertionValue = assertionValue;
}
@@ -184,7 +169,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_COMPARE_REQUEST;
}
@@ -198,7 +182,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Compare Request";
}
@@ -213,7 +196,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(dn);
@@ -242,8 +224,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeCompareRequest",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -252,9 +232,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -276,9 +259,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -291,9 +277,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_AVA;
+ int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_AVA;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -315,9 +304,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_TYPE;
+ int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_TYPE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -330,9 +322,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_VALUE;
+ int msgID = MSGID_LDAP_COMPARE_REQUEST_DECODE_VALUE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -351,7 +346,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("CompareRequest(dn=");
dn.toString(buffer);
@@ -374,8 +368,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
index 8846a60..685672a 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/CompareResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class CompareResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.CompareResponseProtocolOp";
@@ -84,7 +81,6 @@
*/
public CompareResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public CompareResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public CompareResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_COMPARE_RESPONSE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Compare Response";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -340,8 +318,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeCompareResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -350,9 +326,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -374,9 +353,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -397,9 +379,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -416,9 +401,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -444,9 +432,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompareResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -467,7 +458,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("CompareResponse(resultCode=");
buffer.append(resultCode);
@@ -515,8 +505,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java
index 586966a..93729a6 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/DeleteRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -31,7 +31,9 @@
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -39,7 +41,6 @@
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the structures and methods for an LDAP delete request
* protocol op, which is used to remove an entry from the Directory Server.
@@ -47,11 +48,6 @@
public class DeleteRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.DeleteRequestProtocolOp";
@@ -67,7 +63,6 @@
*/
public DeleteRequestProtocolOp(ASN1OctetString dn)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
this.dn = dn;
}
@@ -81,7 +76,6 @@
*/
public ASN1OctetString getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -95,7 +89,6 @@
*/
public void setDN(ASN1OctetString dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -109,7 +102,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_DELETE_REQUEST;
}
@@ -123,7 +115,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Delete Request";
}
@@ -138,7 +129,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
dn.setType(OP_TYPE_DELETE_REQUEST);
return dn;
@@ -159,8 +149,6 @@
public static DeleteRequestProtocolOp decodeDeleteRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeDeleteRequest",
- String.valueOf(element));
try
{
@@ -168,9 +156,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_DELETE_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_DELETE_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -186,7 +177,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("DeleteRequest(dn=");
dn.toString(buffer);
@@ -205,8 +195,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
index 8ffa9ca..f563b01 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/DeleteResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class DeleteResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.DeleteResponseProtocolOp";
@@ -84,7 +81,6 @@
*/
public DeleteResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public DeleteResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public DeleteResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_DELETE_RESPONSE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Delete Response";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -340,8 +318,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeDeleteResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -350,9 +326,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -374,9 +353,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -397,9 +379,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -416,9 +401,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -444,9 +432,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeDeleteResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -467,7 +458,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("DeleteResponse(resultCode=");
buffer.append(resultCode);
@@ -515,8 +505,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java
index 8a7615a..52aba81 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ExtendedRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -34,7 +34,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -42,7 +44,6 @@
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the structures and methods for an LDAP extended request
* protocol op, which is used to request some special type of processing defined
@@ -51,11 +52,6 @@
public class ExtendedRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ExtendedRequestProtocolOp";
@@ -75,7 +71,6 @@
*/
public ExtendedRequestProtocolOp(String oid)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid));
this.oid = oid;
this.value = null;
@@ -92,8 +87,6 @@
*/
public ExtendedRequestProtocolOp(String oid, ASN1OctetString value)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(value));
this.oid = oid;
this.value = value;
@@ -108,7 +101,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -122,7 +114,6 @@
*/
public void setOID(String oid)
{
- assert debugEnter(CLASS_NAME, "setOID", String.valueOf(oid));
this.oid = oid;
}
@@ -137,7 +128,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -151,7 +141,6 @@
*/
public void setValue(ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "setValue");
this.value = value;
}
@@ -165,7 +154,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_EXTENDED_REQUEST;
}
@@ -179,7 +167,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Extended Request";
}
@@ -194,7 +181,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(new ASN1OctetString(TYPE_EXTENDED_REQUEST_OID, oid));
@@ -225,8 +211,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeExtendedRequest",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -235,9 +219,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -259,9 +246,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_OID;
+ int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_OID;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -276,9 +266,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_VALUE;
+ int msgID = MSGID_LDAP_EXTENDED_REQUEST_DECODE_VALUE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -302,7 +295,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ExtendedRequest(oid=");
buffer.append(oid);
@@ -328,8 +320,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
index 8b740e4..18e06c4 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ExtendedResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class ExtendedResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ExtendedResponseProtocolOp";
@@ -90,7 +87,6 @@
*/
public ExtendedResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -112,8 +108,6 @@
*/
public ExtendedResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -137,9 +131,6 @@
public ExtendedResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -166,9 +157,6 @@
DN matchedDN, List<String> referralURLs,
String oid, ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -187,7 +175,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -201,7 +188,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -216,7 +202,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -230,8 +215,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -246,7 +229,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -260,7 +242,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -275,7 +256,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -289,8 +269,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -305,7 +283,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -319,7 +296,6 @@
*/
public void setOID(String oid)
{
- assert debugEnter(CLASS_NAME, "setOID", String.valueOf(oid));
this.oid = oid;
}
@@ -334,7 +310,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -348,7 +323,6 @@
*/
public void setValue(ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
this.value = value;
}
@@ -362,7 +336,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_EXTENDED_RESPONSE;
}
@@ -376,7 +349,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Extended Response";
}
@@ -391,7 +363,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(6);
elements.add(new ASN1Enumerated(resultCode));
@@ -450,8 +421,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeExtendedResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -460,9 +429,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -484,9 +456,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -507,9 +482,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -526,9 +504,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -556,9 +537,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -571,9 +555,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_OID;
+ int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_OID;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -586,9 +573,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeExtendedResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_VALUE;
+ int msgID = MSGID_LDAP_EXTENDED_RESULT_DECODE_VALUE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -616,7 +606,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ExtendedResponse(resultCode=");
buffer.append(resultCode);
@@ -676,8 +665,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java
index cff6c55..a1743a1 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/IntermediateResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -35,7 +35,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -53,11 +55,6 @@
public class IntermediateResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.IntermediateResponseProtocolOp";
@@ -77,7 +74,6 @@
*/
public IntermediateResponseProtocolOp(String oid)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid));
this.oid = oid;
this.value = null;
@@ -94,8 +90,6 @@
*/
public IntermediateResponseProtocolOp(String oid, ASN1OctetString value)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(value));
this.oid = oid;
this.value = value;
@@ -111,7 +105,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -125,7 +118,6 @@
*/
public void setOID(String oid)
{
- assert debugEnter(CLASS_NAME, "setOID", String.valueOf(oid));
this.oid = oid;
}
@@ -140,7 +132,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -154,7 +145,6 @@
*/
public void setValue(ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "setValue");
this.value = value;
}
@@ -168,7 +158,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_INTERMEDIATE_RESPONSE;
}
@@ -182,7 +171,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Intermediate Response";
}
@@ -197,7 +185,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
@@ -233,8 +220,6 @@
decodeIntermediateResponse(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeIntermediateResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -243,9 +228,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeIntermediateResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -276,7 +264,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeIntermediateResponse", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID;
String message = getMessage(msgID, ae.getMessage());
@@ -290,7 +281,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeIntermediateResponse", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_VALUE;
String message = getMessage(msgID, ae.getMessage());
@@ -311,7 +305,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeIntermediateResponse", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID;
String message = getMessage(msgID, ae.getMessage());
@@ -324,7 +321,10 @@
}
catch (ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "decodeIntermediateResponse", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
int msgID = MSGID_LDAP_INTERMEDIATE_RESPONSE_CANNOT_DECODE_OID;
String message = getMessage(msgID, ae.getMessage());
@@ -346,7 +346,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("IntermediateResponse(oid=");
buffer.append(String.valueOf(oid));
@@ -372,8 +371,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
index 2ea3357..0025615 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPAttribute.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -40,11 +40,12 @@
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
-import static org.opends.server.protocols.ldap.LDAPConstants.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -59,11 +60,6 @@
*/
public class LDAPAttribute
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPAttribute";
@@ -82,7 +78,6 @@
*/
public LDAPAttribute(String attributeType)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType));
this.attributeType = attributeType;
@@ -99,7 +94,6 @@
*/
public LDAPAttribute(String attributeType, ArrayList<ASN1OctetString> values)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType));
this.attributeType = attributeType;
@@ -122,7 +116,6 @@
*/
public LDAPAttribute(Attribute attribute)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attribute));
StringBuilder attrName = new StringBuilder(attribute.getName());
for (String o : attribute.getOptions())
@@ -156,7 +149,6 @@
*/
public String getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -170,8 +162,6 @@
*/
public void setAttributeType(String attributeType)
{
- assert debugEnter(CLASS_NAME, "setAttributeType",
- String.valueOf(attributeType));
this.attributeType = attributeType;
}
@@ -186,7 +176,6 @@
*/
public ArrayList<ASN1OctetString> getValues()
{
- assert debugEnter(CLASS_NAME, "getValues");
return values;
}
@@ -200,7 +189,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(new ASN1OctetString(attributeType));
@@ -239,7 +227,6 @@
public static LDAPAttribute decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -248,7 +235,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_ATTRIBUTE_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -272,7 +262,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_ATTRIBUTE_DECODE_TYPE;
String message = getMessage(msgID, String.valueOf(e));
@@ -293,7 +286,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_ATTRIBUTE_DECODE_VALUES;
String message = getMessage(msgID, String.valueOf(e));
@@ -318,7 +314,6 @@
public Attribute toAttribute()
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "toAttribute");
String baseName;
String lowerBaseName;
@@ -387,7 +382,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -403,7 +397,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPAttribute(type=");
buffer.append(attributeType);
@@ -435,8 +428,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
index 4cd3342..ced3010 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPClientConnection.java
@@ -76,7 +76,11 @@
import org.opends.server.types.SearchResultReference;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugData;
+import static org.opends.server.loggers.debug.DebugLogger.debugProtocolElement;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
@@ -94,11 +98,6 @@
extends ClientConnection
implements TLSCapableConnection
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPClientConnection";
@@ -215,8 +214,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(connectionHandler),
- String.valueOf(clientChannel));
this.connectionHandler = connectionHandler;
this.clientChannel = clientChannel;
@@ -275,7 +272,6 @@
*/
public long getConnectionID()
{
- assert debugEnter(CLASS_NAME, "getConnectionID");
return connectionID;
}
@@ -289,7 +285,6 @@
*/
public ConnectionHandler getConnectionHandler()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandler");
return connectionHandler;
}
@@ -305,7 +300,6 @@
*/
public LDAPRequestHandler getRequestHandler()
{
- assert debugEnter(CLASS_NAME, "getRequestHandler");
return requestHandler;
}
@@ -321,8 +315,6 @@
*/
public void setRequestHandler(LDAPRequestHandler requestHandler)
{
- assert debugEnter(CLASS_NAME, "setRequestHandler",
- String.valueOf(requestHandler));
this.requestHandler = requestHandler;
}
@@ -338,7 +330,6 @@
*/
public SocketChannel getSocketChannel()
{
- assert debugEnter(CLASS_NAME, "getSocketChannel");
return clientChannel;
}
@@ -354,7 +345,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return protocol;
}
@@ -368,7 +358,6 @@
*/
public String getClientAddress()
{
- assert debugEnter(CLASS_NAME, "getClientAddress");
return clientAddress;
}
@@ -382,7 +371,6 @@
*/
public int getClientPort()
{
- assert debugEnter(CLASS_NAME, "getClientPort");
return clientPort;
}
@@ -410,7 +398,6 @@
*/
public String getServerAddress()
{
- assert debugEnter(CLASS_NAME, "getServerAddress");
return serverAddress;
}
@@ -424,7 +411,6 @@
*/
public int getServerPort()
{
- assert debugEnter(CLASS_NAME, "getServerPort");
return serverPort;
}
@@ -453,7 +439,6 @@
*/
public InetAddress getRemoteAddress()
{
- assert debugEnter(CLASS_NAME, "getRemoteAddress");
return clientChannel.socket().getInetAddress();
}
@@ -471,7 +456,6 @@
*/
public InetAddress getLocalAddress()
{
- assert debugEnter(CLASS_NAME, "getLocalAddress");
return clientChannel.socket().getLocalAddress();
}
@@ -491,7 +475,6 @@
*/
public boolean isSecure()
{
- assert debugEnter(CLASS_NAME, "isSecure");
return securityProvider.isSecure();
}
@@ -505,7 +488,6 @@
*/
public ConnectionSecurityProvider getConnectionSecurityProvider()
{
- assert debugEnter(CLASS_NAME, "getConnectionSecurityProvider");
return securityProvider;
}
@@ -521,8 +503,6 @@
public void setConnectionSecurityProvider(ConnectionSecurityProvider
securityProvider)
{
- assert debugEnter(CLASS_NAME, "setConnectionSecurityProvider",
- String.valueOf(securityProvider));
this.securityProvider = securityProvider;
@@ -548,7 +528,6 @@
*/
public String getSecurityMechanism()
{
- assert debugEnter(CLASS_NAME, "getSecurityMechanism");
return securityProvider.getSecurityMechanismName();
}
@@ -562,7 +541,6 @@
*/
public long nextOperationID()
{
- assert debugEnter(CLASS_NAME, "nextOperationID");
return nextOperationID.getAndIncrement();
}
@@ -577,7 +555,6 @@
*/
public void sendResponse(Operation operation)
{
- assert debugEnter(CLASS_NAME, "sendResponse", String.valueOf(operation));
LDAPMessage message = operationToResponseLDAPMessage(operation);
if (message != null)
@@ -600,8 +577,6 @@
*/
private LDAPMessage operationToResponseLDAPMessage(Operation operation)
{
- assert debugEnter(CLASS_NAME, "operationToResponseLDAPMessage",
- String.valueOf(operation));
ResultCode resultCode = operation.getResultCode();
if (resultCode == null)
@@ -759,9 +734,6 @@
public void sendSearchEntry(SearchOperation searchOperation,
SearchResultEntry searchEntry)
{
- assert debugEnter(CLASS_NAME, "sendSearchEntry",
- String.valueOf(searchOperation),
- String.valueOf(searchEntry));
SearchResultEntryProtocolOp protocolOp =
new SearchResultEntryProtocolOp(searchEntry);
@@ -804,9 +776,6 @@
public boolean sendSearchReference(SearchOperation searchOperation,
SearchResultReference searchReference)
{
- assert debugEnter(CLASS_NAME, "sendSearchReference",
- String.valueOf(searchOperation),
- String.valueOf(searchReference));
// Make sure this is not an LDAPv2 client. If it is, then they can't see
@@ -862,8 +831,6 @@
protected boolean sendIntermediateResponseMessage(
IntermediateResponse intermediateResponse)
{
- assert debugEnter(CLASS_NAME, "sendIntermediateResponseMessage",
- String.valueOf(intermediateResponse));
IntermediateResponseProtocolOp protocolOp =
new IntermediateResponseProtocolOp(intermediateResponse.getOID(),
@@ -902,7 +869,6 @@
private void sendLDAPMessage(ConnectionSecurityProvider secProvider,
LDAPMessage message)
{
- assert debugEnter(CLASS_NAME, "sendLDAPMessage", String.valueOf(message));
ASN1Element messageElement = message.encode();
@@ -923,23 +889,26 @@
return;
}
- assert debugProtocolElementWritten(CLASS_NAME, "sendLDAPMessage",
- message);
- assert debugProtocolElementWritten(CLASS_NAME, "sendLDAPMessage",
- messageElement);
+ debugProtocolElement(DebugLogLevel.VERBOSE, message);
+ debugProtocolElement(DebugLogLevel.VERBOSE, messageElement);
messageBuffer.rewind();
- assert debugBytesWritten(CLASS_NAME, "sendLDAPMessage",
- messageBuffer);
+ if (debugEnabled())
+ {
+ debugData(DebugLogLevel.VERBOSE, messageBuffer);
+ }
if (keepStats)
{
statTracker.updateMessageWritten(message, bytesWritten);
}
}
- catch (Exception e)
+ catch (@Deprecated Exception e)
{
- assert debugException(CLASS_NAME, "sendLDAPMessage", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We were unable to send the message due to some other internal
// problem. Disconnect from the client and return.
@@ -950,7 +919,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "sendLDAPMessage", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Log a message or something
disconnect(DisconnectReason.SERVER_ERROR, true, -1, String.valueOf(e),
@@ -986,10 +958,6 @@
boolean sendNotification, String message,
int messageID)
{
- assert debugEnter(CLASS_NAME, "disconnect",
- String.valueOf(disconnectReason),
- String.valueOf(sendNotification), String.valueOf(message),
- String.valueOf(messageID));
// If we are already in the middle of a disconnect, then don't do anything.
@@ -1024,7 +992,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -1110,7 +1081,10 @@
{
// In general, we don't care about any exception that might be thrown
// here.
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -1121,7 +1095,10 @@
{
// In general, we don't care about any exception that might be thrown
// here.
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -1148,7 +1125,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "disconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1162,7 +1142,6 @@
*/
public Collection<Operation> getOperationsInProgress()
{
- assert debugEnter(CLASS_NAME, "getOperationsInProgress");
return operationsInProgress.values();
}
@@ -1179,8 +1158,6 @@
*/
public Operation getOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "getOperationInProgress",
- String.valueOf(messageID));
return operationsInProgress.get(messageID);
}
@@ -1201,8 +1178,6 @@
public void addOperationInProgress(Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addOperationInProgress",
- String.valueOf(operation));
int messageID = operation.getMessageID();
@@ -1244,7 +1219,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "addOperationInProgress", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
operationsInProgress.remove(messageID);
@@ -1252,7 +1230,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "addOperationInProgress", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_CLIENT_CANNOT_ENQUEUE;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -1280,8 +1261,6 @@
*/
public boolean removeOperationInProgress(int messageID)
{
- assert debugEnter(CLASS_NAME, "removeOperationInProgress",
- String.valueOf(messageID));
Operation operation = operationsInProgress.remove(messageID);
return (operation != null);
@@ -1302,8 +1281,6 @@
public CancelResult cancelOperation(int messageID,
CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelOperation",
- String.valueOf(messageID), String.valueOf(cancelRequest));
Operation op = operationsInProgress.get(messageID);
if (op == null)
@@ -1349,8 +1326,6 @@
*/
public void cancelAllOperations(CancelRequest cancelRequest)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperations",
- String.valueOf(cancelRequest));
// Make sure that no one can add any new operations.
@@ -1370,7 +1345,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancelAllOperations", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1384,7 +1362,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancelAllOperations", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -1406,8 +1387,6 @@
public void cancelAllOperationsExcept(CancelRequest cancelRequest,
int messageID)
{
- assert debugEnter(CLASS_NAME, "cancelAllOperationsExcept",
- String.valueOf(cancelRequest), String.valueOf(messageID));
// Make sure that no one can add any new operations.
@@ -1435,7 +1414,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancelAllOperationsExcept", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1450,7 +1432,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cancelAllOperationsExcept", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -1485,8 +1470,10 @@
*/
public boolean processDataRead(ByteBuffer buffer)
{
- assert debugEnter(CLASS_NAME, "processDataRead", String.valueOf(buffer));
- assert debugBytesRead(CLASS_NAME, "processDataRead", buffer);
+ if (debugEnabled())
+ {
+ debugData(DebugLogLevel.VERBOSE, buffer);
+ }
int bytesAvailable = buffer.limit() - buffer.position();
@@ -1677,12 +1664,14 @@
{
requestSequence = ASN1Sequence.decodeAsSequence(elementType,
elementValue);
- assert debugProtocolElementRead(CLASS_NAME, "processDataRead",
- requestSequence);
+ debugProtocolElement(DebugLogLevel.VERBOSE, requestSequence);
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processDataRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
disconnect(DisconnectReason.PROTOCOL_ERROR, true,
MSGID_LDAP_CLIENT_DECODE_ASN1_FAILED,
@@ -1694,12 +1683,14 @@
try
{
requestMessage = LDAPMessage.decode(requestSequence);
- assert debugProtocolElementRead(CLASS_NAME, "processDataRead",
- requestMessage);
+ debugProtocolElement(DebugLogLevel.VERBOSE, requestMessage);
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processDataRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
disconnect(DisconnectReason.PROTOCOL_ERROR, true,
MSGID_LDAP_CLIENT_DECODE_LDAP_MESSAGE_FAILED,
@@ -1763,8 +1754,6 @@
*/
private boolean processLDAPMessage(LDAPMessage message)
{
- assert debugEnter(CLASS_NAME, "processLDAPMessage",
- String.valueOf(message));
if (keepStats)
@@ -1832,11 +1821,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processLDAPMessage", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_DISCONNECT_DUE_TO_PROCESSING_FAILURE;
String msg = getMessage(msgID, message.getProtocolOpName(),
- message.getMessageID(),String.valueOf(e));
+ message.getMessageID(), String.valueOf(e));
disconnect(DisconnectReason.SERVER_ERROR, true, msg, msgID);
return false;
}
@@ -1860,8 +1852,6 @@
private boolean processAbandonRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processAbandonRequest",
- String.valueOf(message));
AbandonRequestProtocolOp protocolOp = message.getAbandonRequestProtocolOp();
@@ -1896,8 +1886,6 @@
private boolean processAddRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processAddRequest",
- String.valueOf(message));
// Create the add operation and add it into the work queue.
@@ -1913,7 +1901,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processAddRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
AddResponseProtocolOp responseOp =
new AddResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -1944,8 +1935,6 @@
private boolean processBindRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processBindRequest",
- String.valueOf(message));
BindRequestProtocolOp protocolOp = message.getBindRequestProtocolOp();
@@ -2001,7 +1990,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processBindRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
BindResponseProtocolOp responseOp =
new BindResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2042,8 +2034,6 @@
private boolean processCompareRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processCompareRequest",
- String.valueOf(message));
CompareRequestProtocolOp protocolOp = message.getCompareRequestProtocolOp();
@@ -2061,7 +2051,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processCompareRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
CompareResponseProtocolOp responseOp =
new CompareResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2094,8 +2087,6 @@
private boolean processDeleteRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processDeleteRequest",
- String.valueOf(message));
DeleteRequestProtocolOp protocolOp = message.getDeleteRequestProtocolOp();
@@ -2112,7 +2103,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processDeleteRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
DeleteResponseProtocolOp responseOp =
new DeleteResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2144,8 +2138,6 @@
private boolean processExtendedRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processExtendedRequest",
- String.valueOf(message));
// See if this is an LDAPv2 client. If it is, then they should not be
@@ -2183,7 +2175,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processExtendedRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
ExtendedResponseProtocolOp responseOp =
new ExtendedResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2216,8 +2211,6 @@
private boolean processModifyRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processModifyRequest",
- String.valueOf(message));
ModifyRequestProtocolOp protocolOp = message.getModifyRequestProtocolOp();
@@ -2234,7 +2227,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processModifyRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
ModifyResponseProtocolOp responseOp =
new ModifyResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2266,8 +2262,6 @@
private boolean processModifyDNRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processModifyDNRequest",
- String.valueOf(message));
ModifyDNRequestProtocolOp protocolOp =
@@ -2287,7 +2281,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processModifyDNRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
ModifyDNResponseProtocolOp responseOp =
new ModifyDNResponseProtocolOp(de.getResultCode().getIntValue(),
@@ -2320,8 +2317,6 @@
private boolean processSearchRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processSearchRequest",
- String.valueOf(message));
SearchRequestProtocolOp protocolOp = message.getSearchRequestProtocolOp();
@@ -2343,7 +2338,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "processSearchRequest", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
SearchResultDoneProtocolOp responseOp =
new SearchResultDoneProtocolOp(de.getResultCode().getIntValue(),
@@ -2376,8 +2374,6 @@
private boolean processUnbindRequest(LDAPMessage message,
ArrayList<Control> controls)
{
- assert debugEnter(CLASS_NAME, "processUnbindRequest",
- String.valueOf(message));
UnbindOperation unbindOp =
@@ -2398,7 +2394,6 @@
*/
public String getMonitorSummary()
{
- assert debugEnter(CLASS_NAME, "getMonitorSummary");
StringBuilder buffer = new StringBuilder();
buffer.append("connID=\"");
@@ -2450,7 +2445,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAP client connection from ");
buffer.append(clientAddress);
@@ -2479,8 +2473,6 @@
*/
public boolean tlsProtectionAvailable(StringBuilder unavailableReason)
{
- assert debugEnter(CLASS_NAME, "tlsProtectionAvailable",
- "java.lang.StringBuilder");
// Make sure that this client connection does not already have some other
@@ -2524,7 +2516,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "tlsProtectionAvailable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
tlsSecurityProvider = null;
@@ -2555,7 +2550,6 @@
public void enableTLSConnectionSecurityProvider()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "enableTLSConnectionSecurityProvider");
if (tlsSecurityProvider == null)
{
@@ -2587,7 +2581,6 @@
public void disableTLSConnectionSecurityProvider()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "disableTLSConnectionSecurityProvider");
int msgID = MSGID_LDAP_TLS_CLOSURE_NOT_ALLOWED;
String message = getMessage(msgID);
@@ -2615,8 +2608,6 @@
public void sendClearResponse(Operation operation)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "sendClearResponse",
- String.valueOf(operation));
if (clearSecurityProvider == null)
{
@@ -2637,7 +2628,6 @@
*/
public DN getKeyManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getKeyManagerProviderDN");
return connectionHandler.getKeyManagerProviderDN();
}
@@ -2649,7 +2639,6 @@
*/
public DN getTrustManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getTrustManagerProviderDN");
return connectionHandler.getTrustManagerProviderDN();
}
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
index dd0c2ef..06e4ac7 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -79,7 +79,9 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.Access.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
@@ -103,7 +105,7 @@
implements ConfigurableComponent, AlertGenerator
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.protocols.ldap.LDAPConnectionHandler";
@@ -265,7 +267,6 @@
{
super("LDAP Connection Handler Thread");
- assert debugConstructor(CLASS_NAME);
// No real implementation is required. Do all the work in the
// initializeConnectionHandler method.
@@ -289,8 +290,6 @@
public void initializeConnectionHandler(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeConnectionHandler",
- String.valueOf(configEntry));
enabled = true;
@@ -323,8 +322,10 @@
}
catch (UnknownHostException uhe)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler",
- uhe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, uhe);
+ }
msgID = MSGID_LDAP_CONNHANDLER_UNKNOWN_LISTEN_ADDRESS;
String message = getMessage(msgID, s,
@@ -336,13 +337,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_LISTEN_ADDRESS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -372,13 +379,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_LISTEN_PORT;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -409,7 +422,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_BACKLOG;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -441,8 +457,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler",
- ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
String message = getMessage(msgID, maskStrings.get(i),
@@ -456,7 +474,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOWED_CLIENTS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -488,8 +509,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler",
- ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
String message = getMessage(msgID, maskStrings.get(i),
@@ -503,7 +526,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_DENIED_CLIENTS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -535,7 +561,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_LDAPV2;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -567,7 +596,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_KEEP_STATS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -599,7 +631,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_NUM_REQUEST_HANDLERS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -630,7 +665,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SEND_REJECTION_NOTICE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -661,7 +699,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_KEEPALIVE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -692,7 +733,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_NODELAY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -723,7 +767,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_REUSE_ADDRESS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -756,7 +803,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_MAX_REQUEST_SIZE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -786,7 +836,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_SSL;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -830,7 +883,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_STARTTLS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -874,13 +930,19 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw ce;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CLIENT_AUTH_POLICY;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -911,7 +973,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CERT_NICKNAME;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -938,7 +1003,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_PROTOCOLS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -965,7 +1033,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CIPHERS;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1004,7 +1075,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_KEYMANAGER_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1043,7 +1117,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_TRUSTMANAGER_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -1081,7 +1158,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_OPEN_SELECTOR_FAILED;
String message = getMessage(msgID, configEntryDN,
@@ -1155,7 +1235,6 @@
public void finalizeConnectionHandler(String finalizeReason,
boolean closeConnections)
{
- assert debugEnter(CLASS_NAME, "finalizeConnectionHandler");
shutdownRequested = true;
@@ -1167,7 +1246,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "finalizeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -1194,7 +1276,6 @@
*/
public String getConnectionHandlerName()
{
- assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
return handlerName;
}
@@ -1206,7 +1287,6 @@
*/
public String getProtocol()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return protocol;
}
@@ -1218,7 +1298,6 @@
*/
public Collection<HostPort> getListeners()
{
- assert debugEnter(CLASS_NAME, "getProtocol");
return listeners;
}
@@ -1234,7 +1313,6 @@
*/
public Collection<ClientConnection> getClientConnections()
{
- assert debugEnter(CLASS_NAME, "getClientConnections");
LinkedList<ClientConnection> connectionList =
new LinkedList<ClientConnection>();
@@ -1257,7 +1335,6 @@
*/
public int getListenPort()
{
- assert debugEnter(CLASS_NAME, "getListenPort");
return listenPort;
}
@@ -1270,7 +1347,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
connHandlerThread = Thread.currentThread();
setName(handlerName);
@@ -1329,7 +1405,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONNECTION_HANDLING,
ErrorLogSeverity.SEVERE_ERROR,
@@ -1466,7 +1545,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_LDAP_CONNHANDLER_UNABLE_TO_REGISTER_CLIENT;
@@ -1506,7 +1588,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.CONNECTION_HANDLING,
ErrorLogSeverity.SEVERE_WARNING,
@@ -1534,7 +1619,10 @@
try
{
cleanUpSelector();
- } catch (Exception e2) {}
+ }
+ catch (Exception e2)
+ {
+ }
}
else
{
@@ -1545,7 +1633,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is very bad because we failed outside the loop. The only
// thing we can do here is log a message, send an alert, and disable the
@@ -1579,7 +1670,6 @@
*/
private void cleanUpSelector()
{
- assert debugEnter(CLASS_NAME, "cleanUpSelector");
try
{
@@ -1594,7 +1684,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cleanUpSelector", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -1603,13 +1696,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cleanUpSelector", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "cleanUpSelector", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -1623,7 +1722,6 @@
*/
public boolean keepStats()
{
- assert debugEnter(CLASS_NAME, "keepStats");
return keepStats;
}
@@ -1638,7 +1736,6 @@
*/
public void setKeepStats(boolean keepStats)
{
- assert debugEnter(CLASS_NAME, "setKeepStats", String.valueOf(keepStats));
this.keepStats = keepStats;
}
@@ -1652,7 +1749,6 @@
*/
public LDAPStatistics getStatTracker()
{
- assert debugEnter(CLASS_NAME, "getStatTracker");
return statTracker;
}
@@ -1668,7 +1764,6 @@
*/
public boolean allowLDAPv2()
{
- assert debugEnter(CLASS_NAME, "allowLDAPv2");
return allowLDAPv2;
}
@@ -1684,7 +1779,6 @@
*/
public boolean allowStartTLS()
{
- assert debugEnter(CLASS_NAME, "allowStartTLS");
return allowStartTLS;
}
@@ -1700,7 +1794,6 @@
*/
public boolean useSSL()
{
- assert debugEnter(CLASS_NAME, "useSSL");
return useSSL;
}
@@ -1714,7 +1807,6 @@
*/
public SSLClientAuthPolicy getSSLClientAuthPolicy()
{
- assert debugEnter(CLASS_NAME, "getSSLClientAuthPolicy");
return sslClientAuthPolicy;
}
@@ -1730,7 +1822,6 @@
*/
public String[] getEnabledSSLProtocols()
{
- assert debugEnter(CLASS_NAME, "getEnabledSSLProtocols");
return enabledSSLProtocols;
}
@@ -1746,7 +1837,6 @@
*/
public String[] getEnabledSSLCipherSuites()
{
- assert debugEnter(CLASS_NAME, "getEnabledSSLCipherSuites");
return enabledSSLCipherSuites;
}
@@ -1765,7 +1855,6 @@
*/
public DN getKeyManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getKeyManagerProviderDN");
return keyManagerProviderDN;
}
@@ -1784,7 +1873,6 @@
*/
public DN getTrustManagerProviderDN()
{
- assert debugEnter(CLASS_NAME, "getTrustManagerProviderDN");
return trustManagerProviderDN;
}
@@ -1814,7 +1902,6 @@
*/
public int getMaxRequestSize()
{
- assert debugEnter(CLASS_NAME, "getMaxRequestSize");
return maxRequestSize;
}
@@ -1828,7 +1915,6 @@
*/
public String getShutdownListenerName()
{
- assert debugEnter(CLASS_NAME, "getShutdownListenerName");
return handlerName;
}
@@ -1844,7 +1930,6 @@
*/
public void processServerShutdown(String reason)
{
- assert debugEnter(CLASS_NAME, "processServerShutdown");
shutdownRequested = true;
@@ -1871,7 +1956,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -1887,7 +1971,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> configAttrs = new LinkedList<ConfigAttribute>();
@@ -2085,8 +2168,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configValid = true;
@@ -2116,8 +2197,10 @@
}
catch (UnknownHostException uhe)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration",
- uhe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, uhe);
+ }
msgID = MSGID_LDAP_CONNHANDLER_UNKNOWN_LISTEN_ADDRESS;
unacceptableReasons.add(getMessage(msgID, s,
@@ -2129,7 +2212,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_LISTEN_ADDRESS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2158,7 +2244,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_LISTEN_PORT;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2180,7 +2269,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_BACKLOG;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2209,7 +2301,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
unacceptableReasons.add(getMessage(msgID, s, ATTR_ALLOWED_CLIENT,
@@ -2222,7 +2317,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOWED_CLIENTS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2251,7 +2349,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
unacceptableReasons.add(getMessage(msgID, s, ATTR_DENIED_CLIENT,
@@ -2264,7 +2365,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_DENIED_CLIENTS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2286,7 +2390,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_LDAPV2;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2308,7 +2415,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_KEEP_STATS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2331,7 +2441,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_NUM_REQUEST_HANDLERS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2353,7 +2466,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SEND_REJECTION_NOTICE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2375,7 +2491,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_KEEPALIVE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2397,7 +2516,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_NODELAY;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2419,7 +2541,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_REUSE_ADDRESS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2443,7 +2568,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_MAX_REQUEST_SIZE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2473,7 +2601,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_SSL;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2517,7 +2648,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_STARTTLS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2561,7 +2695,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CLIENT_AUTH_POLICY;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2583,7 +2720,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CERT_NICKNAME;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2607,7 +2747,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_PROTOCOLS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2631,7 +2774,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CIPHERS;
unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2666,7 +2812,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_KEYMANAGER_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -2702,7 +2851,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_TRUSTMANAGER_DN;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -2736,9 +2888,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
// Create variables to include in the response.
@@ -2777,7 +2926,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
messages.add(getMessage(msgID, s, ATTR_ALLOWED_CLIENT,
@@ -2793,7 +2945,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOWED_CLIENTS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2857,7 +3012,10 @@
}
catch (ConfigException ce)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
msgID = MSGID_LDAP_CONNHANDLER_INVALID_ADDRESS_MASK;
messages.add(getMessage(msgID, s, ATTR_DENIED_CLIENT,
@@ -2873,7 +3031,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_DENIED_CLIENTS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2936,7 +3097,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_LDAPV2;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -2972,7 +3136,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_KEEP_STATS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3012,7 +3179,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SEND_REJECTION_NOTICE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3048,7 +3218,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_KEEPALIVE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3084,7 +3257,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_USE_TCP_NODELAY;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3126,7 +3302,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_MAX_REQUEST_SIZE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3167,7 +3346,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_ALLOW_STARTTLS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3208,7 +3390,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_PROTOCOLS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3246,7 +3431,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "applyNewConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_LDAP_CONNHANDLER_CANNOT_DETERMINE_SSL_CIPHERS;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
@@ -3290,7 +3478,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -3333,7 +3524,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeConnectionHandler", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (resultCode == ResultCode.SUCCESS)
{
@@ -3583,7 +3777,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append(handlerName);
}
@@ -3599,7 +3792,6 @@
*/
public DN getComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getComponentEntryDN");
return configEntryDN;
}
@@ -3615,7 +3807,6 @@
*/
public String getClassName()
{
- assert debugEnter(CLASS_NAME, "getClassName");
return CLASS_NAME;
}
@@ -3634,7 +3825,6 @@
*/
public LinkedHashMap<String,String> getAlerts()
{
- assert debugEnter(CLASS_NAME, "getAlerts");
LinkedHashMap<String,String> alerts = new LinkedHashMap<String,String>();
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPConstants.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPConstants.java
index 9d4576c..9a8dace 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPConstants.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPConstants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java
index 1b65986..cf8d9e9 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPControl.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -35,8 +35,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.Control;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.asn1.ASN1Constants.*;
@@ -52,12 +54,6 @@
*/
public class LDAPControl
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPControl";
-
// The control wrapped by this LDAP control.
@@ -72,7 +68,6 @@
*/
public LDAPControl(Control control)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(control));
this.control = control;
}
@@ -87,7 +82,6 @@
*/
public LDAPControl(String oid)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid));
control = new Control(oid, false);
}
@@ -104,8 +98,6 @@
*/
public LDAPControl(String oid, boolean isCritical)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
control = new Control(oid, isCritical);
}
@@ -122,8 +114,6 @@
*/
public LDAPControl(String oid, boolean isCritical, ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical), String.valueOf(value));
control = new Control(oid, isCritical, value);
}
@@ -137,7 +127,6 @@
*/
public Control getControl()
{
- assert debugEnter(CLASS_NAME, "getControl");
return control;
}
@@ -151,7 +140,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(3);
elements.add(new ASN1OctetString(control.getOID()));
@@ -181,7 +169,6 @@
*/
public static ASN1Element encodeControls(ArrayList<LDAPControl> controls)
{
- assert debugEnter(CLASS_NAME, "encodeControls", String.valueOf(controls));
ArrayList<ASN1Element> elements =
new ArrayList<ASN1Element>(controls.size());
@@ -208,7 +195,6 @@
public static LDAPControl decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
if (element == null)
{
@@ -225,9 +211,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -249,9 +238,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_OID;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_OID;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -278,9 +270,12 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "decode", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_CRITICALITY;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_CRITICALITY;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e2);
}
@@ -294,9 +289,12 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "decode", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_VALUE;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_VALUE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e2);
}
@@ -318,9 +316,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_CRITICALITY;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_CRITICALITY;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -332,9 +333,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_CONTROL_DECODE_VALUE;
+ int msgID = MSGID_LDAP_CONTROL_DECODE_VALUE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -358,7 +362,6 @@
public static ArrayList<LDAPControl> decodeControls(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeControls", String.valueOf(element));
if (element == null)
{
@@ -400,7 +403,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return control.getOID();
}
@@ -415,7 +417,6 @@
*/
public boolean isCritical()
{
- assert debugEnter(CLASS_NAME, "isCritical");
return control.isCritical();
}
@@ -429,7 +430,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return control.getValue();
}
@@ -443,7 +443,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -460,7 +459,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPControl(oid=");
buffer.append(control.getOID());
@@ -488,8 +486,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPException.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPException.java
index 9990035..f6e6e4d 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPException.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPException.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
-import static org.opends.server.loggers.Debug.*;
@@ -39,11 +38,6 @@
public class LDAPException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPException";
@@ -78,8 +72,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(messageID), String.valueOf(message));
this.resultCode = resultCode;
this.messageID = messageID;
@@ -101,9 +93,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(messageID), String.valueOf(message),
- String.valueOf(cause));
this.resultCode = resultCode;
this.messageID = messageID;
@@ -118,7 +107,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -132,7 +120,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
index fb8ac4b..16f2db5 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPFilter.java
@@ -46,14 +46,15 @@
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ByteString;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.FilterType;
import org.opends.server.types.ResultCode;
import org.opends.server.types.SearchFilter;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugError;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -69,11 +70,6 @@
*/
public class LDAPFilter
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPFilter";
@@ -132,20 +128,6 @@
ASN1OctetString subFinalElement, String matchingRuleID,
boolean dnAttributes)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(filterType),
- String.valueOf(filterComponents),
- String.valueOf(notComponent),
- String.valueOf(attributeType),
- String.valueOf(assertionValue),
- String.valueOf(subInitialElement),
- String.valueOf(subAnyElements),
- String.valueOf(subFinalElement),
- String.valueOf(matchingRuleID),
- String.valueOf(dnAttributes)
- });
this.filterType = filterType;
this.filterComponents = filterComponents;
@@ -168,7 +150,6 @@
*/
public LDAPFilter(SearchFilter filter)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(filter));
this.filterType = filter.getFilterType();
@@ -320,8 +301,6 @@
public static LDAPFilter createANDFilter(ArrayList<LDAPFilter>
filterComponents)
{
- assert debugEnter(CLASS_NAME, "createANDFilter",
- String.valueOf(filterComponents));
return new LDAPFilter(FilterType.AND, filterComponents, null, null, null,
null, null, null, null, false);
@@ -339,8 +318,6 @@
public static LDAPFilter createORFilter(ArrayList<LDAPFilter>
filterComponents)
{
- assert debugEnter(CLASS_NAME, "createORFilter",
- String.valueOf(filterComponents));
return new LDAPFilter(FilterType.OR, filterComponents, null, null, null,
null, null, null, null, false);
@@ -357,8 +334,6 @@
*/
public static LDAPFilter createNOTFilter(LDAPFilter notComponent)
{
- assert debugEnter(CLASS_NAME, "createNOTFilter",
- String.valueOf(notComponent));
return new LDAPFilter(FilterType.NOT, null, notComponent, null, null, null,
null, null, null, false);
@@ -377,9 +352,6 @@
public static LDAPFilter createEqualityFilter(String attributeType,
ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "createEqualityFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new LDAPFilter(FilterType.EQUALITY, null, null, attributeType,
assertionValue, null, null, null, null, false);
@@ -403,11 +375,6 @@
ArrayList<ASN1OctetString> subAnyElements,
ASN1OctetString subFinalElement)
{
- assert debugEnter(CLASS_NAME, "createSubstringFilter",
- String.valueOf(attributeType),
- String.valueOf(subInitialElement),
- String.valueOf(subAnyElements),
- String.valueOf(subFinalElement));
return new LDAPFilter(FilterType.SUBSTRING, null, null, attributeType, null,
subInitialElement, subAnyElements, subFinalElement,
@@ -429,9 +396,6 @@
public static LDAPFilter createGreaterOrEqualFilter(String attributeType,
ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "createGreaterOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new LDAPFilter(FilterType.GREATER_OR_EQUAL, null, null,
attributeType, assertionValue, null, null, null, null,
@@ -451,9 +415,6 @@
public static LDAPFilter createLessOrEqualFilter(String attributeType,
ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "createLessOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new LDAPFilter(FilterType.LESS_OR_EQUAL, null, null, attributeType,
assertionValue, null, null, null, null, false);
@@ -470,8 +431,6 @@
*/
public static LDAPFilter createPresenceFilter(String attributeType)
{
- assert debugEnter(CLASS_NAME, "createPresenceFilter",
- String.valueOf(attributeType));
return new LDAPFilter(FilterType.PRESENT, null, null, attributeType, null,
null, null, null, null, false);
@@ -490,9 +449,6 @@
public static LDAPFilter createApproximateFilter(String attributeType,
ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "createApproximateFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new LDAPFilter(FilterType.APPROXIMATE_MATCH, null, null,
attributeType, assertionValue, null, null, null, null,
@@ -517,11 +473,6 @@
ASN1OctetString assertionValue,
boolean dnAttributes)
{
- assert debugEnter(CLASS_NAME, "createExtensibleFilter",
- String.valueOf(matchingRuleID),
- String.valueOf(attributeType),
- String.valueOf(assertionValue),
- String.valueOf(dnAttributes));
return new LDAPFilter(FilterType.EXTENSIBLE_MATCH, null, null,
attributeType, assertionValue, null, null, null,
@@ -544,7 +495,6 @@
public static LDAPFilter decode(String filterString)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(filterString));
if (filterString == null)
@@ -561,13 +511,19 @@
}
catch (LDAPException le)
{
- assert debugException(CLASS_NAME, "decode", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
throw le;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_UNCAUGHT_EXCEPTION;
String message = getMessage(msgID, filterString, String.valueOf(e));
@@ -596,9 +552,6 @@
int endPos)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "createFilterFromString",
- String.valueOf(filterString), String.valueOf(startPos),
- String.valueOf(endPos));
// Make sure that the length is sufficient for a valid search filter.
@@ -925,9 +878,6 @@
int startPos, int endPos)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeCompoundFilter",
- String.valueOf(filterType), String.valueOf(filterString),
- String.valueOf(startPos), String.valueOf(endPos));
// Create a list to hold the returned components.
@@ -1036,9 +986,6 @@
int endPos)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSubstringFilter",
- String.valueOf(filterString), String.valueOf(attrType),
- String.valueOf(equalPos), String.valueOf(endPos));
// Get a binary representation of the value.
@@ -1624,9 +1571,6 @@
int endPos)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeExtensibleMatchFilter",
- String.valueOf(filterString), String.valueOf(startPos),
- String.valueOf(equalPos), String.valueOf(endPos));
String attributeType = null;
@@ -1879,7 +1823,6 @@
*/
public FilterType getFilterType()
{
- assert debugEnter(CLASS_NAME, "getFilterType");
return filterType;
}
@@ -1895,7 +1838,6 @@
*/
public ArrayList<LDAPFilter> getFilterComponents()
{
- assert debugEnter(CLASS_NAME, "getFilterComponents");
return filterComponents;
}
@@ -1911,8 +1853,6 @@
*/
public void setFilterComponents(ArrayList<LDAPFilter> filterComponents)
{
- assert debugEnter(CLASS_NAME, "setFilterComponents",
- String.valueOf(filterComponents));
this.filterComponents = filterComponents;
}
@@ -1927,7 +1867,6 @@
*/
public LDAPFilter getNOTComponent()
{
- assert debugEnter(CLASS_NAME, "getNOTComponent");
return notComponent;
}
@@ -1942,8 +1881,6 @@
*/
public void setNOTComponent(LDAPFilter notComponent)
{
- assert debugEnter(CLASS_NAME, "setNOTComponent",
- String.valueOf(notComponent));
this.notComponent = notComponent;
}
@@ -1959,7 +1896,6 @@
*/
public String getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -1974,8 +1910,6 @@
*/
public void setAttributeType(String attributeType)
{
- assert debugEnter(CLASS_NAME, "setAttributeType",
- String.valueOf(attributeType));
this.attributeType = attributeType;
}
@@ -1992,7 +1926,6 @@
*/
public ASN1OctetString getAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getAssertionValue");
return assertionValue;
}
@@ -2007,8 +1940,6 @@
*/
public void setAssertionValue(ASN1OctetString assertionValue)
{
- assert debugEnter(CLASS_NAME, "setAssertionValue",
- String.valueOf(assertionValue));
this.assertionValue = assertionValue;
}
@@ -2025,7 +1956,6 @@
*/
public ASN1OctetString getSubInitialElement()
{
- assert debugEnter(CLASS_NAME, "getSubInitialElement");
return subInitialElement;
}
@@ -2041,8 +1971,6 @@
*/
public void setSubInitialElement(ASN1OctetString subInitialElement)
{
- assert debugEnter(CLASS_NAME, "setSubInitialElement",
- String.valueOf(subInitialElement));
this.subInitialElement = subInitialElement;
}
@@ -2059,7 +1987,6 @@
*/
public ArrayList<ASN1OctetString> getSubAnyElements()
{
- assert debugEnter(CLASS_NAME, "getSubAnyElements");
return subAnyElements;
}
@@ -2075,8 +2002,6 @@
*/
public void setSubAnyElements(ArrayList<ASN1OctetString> subAnyElements)
{
- assert debugEnter(CLASS_NAME, "setSubAnyElements",
- String.valueOf(subAnyElements));
this.subAnyElements = subAnyElements;
}
@@ -2093,7 +2018,6 @@
*/
public ASN1OctetString getSubFinalElement()
{
- assert debugEnter(CLASS_NAME, "getSubFinalElement");
return subFinalElement;
}
@@ -2108,8 +2032,6 @@
*/
public void setSubFinalElement(ASN1OctetString subFinalElement)
{
- assert debugEnter(CLASS_NAME, "setSubFinalElement",
- String.valueOf(subFinalElement));
this.subFinalElement = subFinalElement;
}
@@ -2126,7 +2048,6 @@
*/
public String getMatchingRuleID()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleID");
return matchingRuleID;
}
@@ -2142,8 +2063,6 @@
*/
public void setMatchingRuleID(String matchingRuleID)
{
- assert debugEnter(CLASS_NAME, "setMatchingRuleID",
- String.valueOf(matchingRuleID));
this.matchingRuleID = matchingRuleID;
}
@@ -2160,7 +2079,6 @@
*/
public boolean getDNAttributes()
{
- assert debugEnter(CLASS_NAME, "getDNAttributes");
return dnAttributes;
}
@@ -2176,8 +2094,6 @@
*/
public void setDNAttributes(boolean dnAttributes)
{
- assert debugEnter(CLASS_NAME, "setDNAttributes",
- String.valueOf(dnAttributes));
this.dnAttributes = dnAttributes;
}
@@ -2191,7 +2107,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
switch (filterType)
{
@@ -2269,9 +2184,10 @@
return new ASN1Sequence(filterType.getBERType(), elements);
default:
- assert debugMessage(DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.ERROR, CLASS_NAME, "encode",
- "Invalid search filter type: " + filterType);
+ if (debugEnabled())
+ {
+ debugError("Invalid search filter type: %s", filterType);
+ }
return null;
}
}
@@ -2291,7 +2207,6 @@
public static LDAPFilter decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
if (element == null)
{
@@ -2347,8 +2262,6 @@
private static LDAPFilter decodeCompoundFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeCompoundFilter",
- String.valueOf(element));
FilterType filterType;
@@ -2362,12 +2275,11 @@
break;
default:
// This should never happen.
- assert debugMessage(DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "decodeCompoundFilter",
- "Invalid filter type " +
- byteToHex(element.getType()) +
- " for a compound filter");
+ if (debugEnabled())
+ {
+ debugError("Invalid filter type %x for a compound filter",
+ element.getType());
+ }
filterType = null;
}
@@ -2379,7 +2291,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompoundFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_COMPOUND_SET;
String message = getMessage(msgID, String.valueOf(e));
@@ -2402,7 +2317,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeCompoundFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_COMPOUND_COMPONENTS;
String message = getMessage(msgID, String.valueOf(e));
@@ -2429,7 +2347,6 @@
private static LDAPFilter decodeNotFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeNotFilter", String.valueOf(element));
ASN1Element notFilterElement;
@@ -2439,7 +2356,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeNotFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_NOT_ELEMENT;
String message = getMessage(msgID, String.valueOf(e));
@@ -2458,7 +2378,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeNotFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_NOT_COMPONENT;
String message = getMessage(msgID, String.valueOf(e));
@@ -2487,8 +2410,6 @@
private static LDAPFilter decodeTypeAndValueFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeTypeAndValueFilter",
- String.valueOf(element));
FilterType filterType;
@@ -2508,12 +2429,11 @@
break;
default:
// This should never happen.
- assert debugMessage(DebugLogCategory.CONNECTION_HANDLING,
- DebugLogSeverity.ERROR, CLASS_NAME,
- "decodeTypeAndValueFilter",
- "Invalid filter type " +
- byteToHex(element.getType()) +
- " for a type-and-value filter");
+ if (debugEnabled())
+ {
+ debugError("Invalid filter type %x for a type-and-value filter",
+ element.getType());
+ }
filterType = null;
}
@@ -2525,7 +2445,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeTypeAndValueFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_TV_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2548,7 +2471,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeTypeAndValueFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_TV_TYPE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2563,7 +2489,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeTypeAndValueFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_TV_VALUE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2590,8 +2519,6 @@
private static LDAPFilter decodeSubstringFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSubstringFilter",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
@@ -2601,7 +2528,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_SUBSTRING_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2624,7 +2554,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_SUBSTRING_TYPE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2639,7 +2572,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_SUBSTRING_ELEMENTS;
String message = getMessage(msgID, String.valueOf(e));
@@ -2691,7 +2627,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_SUBSTRING_VALUES;
String message = getMessage(msgID, String.valueOf(e));
@@ -2719,8 +2658,6 @@
private static LDAPFilter decodePresenceFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodePresenceFilter",
- String.valueOf(element));
String attributeType;
@@ -2730,7 +2667,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodePresenceFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_PRESENCE_TYPE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2757,8 +2697,6 @@
private static LDAPFilter decodeExtensibleMatchFilter(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeExtensibleMatchFilter",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -2767,7 +2705,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_EXTENSIBLE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -2810,7 +2751,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSubstringFilter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_FILTER_DECODE_EXTENSIBLE_ELEMENTS;
String message = getMessage(msgID, String.valueOf(e));
@@ -2837,7 +2781,6 @@
public SearchFilter toSearchFilter()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "toSearchFilter");
ArrayList<SearchFilter> subComps;
@@ -2968,7 +2911,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -2985,7 +2927,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
switch (filterType)
{
@@ -3112,8 +3053,6 @@
public static void valueToFilterString(StringBuilder buffer,
ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "valueToFilterString",
- "java.lang.StringBuilder", String.valueOf(value));
if (value == null)
{
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java
index ec8e138..281550a 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -36,14 +36,15 @@
import org.opends.server.protocols.asn1.ASN1Integer;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the data structures and methods to use when interacting
* with an LDAP message, which is the basic envelope used to hold LDAP requests
@@ -52,11 +53,6 @@
public class LDAPMessage
implements ProtocolElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPMessage";
@@ -80,8 +76,6 @@
*/
public LDAPMessage(int messageID, ProtocolOp protocolOp)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(protocolOp));
this.messageID = messageID;
this.protocolOp = protocolOp;
@@ -102,9 +96,6 @@
public LDAPMessage(int messageID, ProtocolOp protocolOp,
ArrayList<LDAPControl> controls)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(protocolOp),
- String.valueOf(controls));
this.messageID = messageID;
this.protocolOp = protocolOp;
@@ -128,7 +119,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
@@ -142,7 +132,6 @@
*/
public void setMessageID(int messageID)
{
- assert debugEnter(CLASS_NAME, "setMessageID", String.valueOf(messageID));
this.messageID = messageID;
}
@@ -156,7 +145,6 @@
*/
public ProtocolOp getProtocolOp()
{
- assert debugEnter(CLASS_NAME, "getProtocolOp");
return protocolOp;
}
@@ -170,7 +158,6 @@
*/
public byte getProtocolOpType()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpType");
return protocolOp.getType();
}
@@ -184,7 +171,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return protocolOp.getProtocolOpName();
}
@@ -204,7 +190,6 @@
public AbandonRequestProtocolOp getAbandonRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getAbandonRequestProtocolOp");
return (AbandonRequestProtocolOp) protocolOp;
}
@@ -224,7 +209,6 @@
public AddRequestProtocolOp getAddRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getAddRequestProtocolOp");
return (AddRequestProtocolOp) protocolOp;
}
@@ -244,7 +228,6 @@
public AddResponseProtocolOp getAddResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getAddResponseProtocolOp");
return (AddResponseProtocolOp) protocolOp;
}
@@ -264,7 +247,6 @@
public BindRequestProtocolOp getBindRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getBindRequestProtocolOp");
return (BindRequestProtocolOp) protocolOp;
}
@@ -284,7 +266,6 @@
public BindResponseProtocolOp getBindResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getBindResponseProtocolOp");
return (BindResponseProtocolOp) protocolOp;
}
@@ -304,7 +285,6 @@
public CompareRequestProtocolOp getCompareRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getCompareRequestProtocolOp");
return (CompareRequestProtocolOp) protocolOp;
}
@@ -324,7 +304,6 @@
public CompareResponseProtocolOp getCompareResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getCompareResponseProtocolOp");
return (CompareResponseProtocolOp) protocolOp;
}
@@ -344,7 +323,6 @@
public DeleteRequestProtocolOp getDeleteRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getDeleteRequestProtocolOp");
return (DeleteRequestProtocolOp) protocolOp;
}
@@ -364,7 +342,6 @@
public DeleteResponseProtocolOp getDeleteResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getDeleteResponseProtocolOp");
return (DeleteResponseProtocolOp) protocolOp;
}
@@ -384,7 +361,6 @@
public ExtendedRequestProtocolOp getExtendedRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getExtendedRequestProtocolOp");
return (ExtendedRequestProtocolOp) protocolOp;
}
@@ -404,7 +380,6 @@
public ExtendedResponseProtocolOp getExtendedResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getExtendedResponseProtocolOp");
return (ExtendedResponseProtocolOp) protocolOp;
}
@@ -424,7 +399,6 @@
public ModifyRequestProtocolOp getModifyRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getModifyRequestProtocolOp");
return (ModifyRequestProtocolOp) protocolOp;
}
@@ -444,7 +418,6 @@
public ModifyResponseProtocolOp getModifyResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getModifyResponseProtocolOp");
return (ModifyResponseProtocolOp) protocolOp;
}
@@ -464,7 +437,6 @@
public ModifyDNRequestProtocolOp getModifyDNRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getModifyDNRequestProtocolOp");
return (ModifyDNRequestProtocolOp) protocolOp;
}
@@ -484,7 +456,6 @@
public ModifyDNResponseProtocolOp getModifyDNResponseProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getModifyDNResponseProtocolOp");
return (ModifyDNResponseProtocolOp) protocolOp;
}
@@ -504,7 +475,6 @@
public SearchRequestProtocolOp getSearchRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getSearchRequestProtocolOp");
return (SearchRequestProtocolOp) protocolOp;
}
@@ -524,7 +494,6 @@
public SearchResultDoneProtocolOp getSearchResultDoneProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getSearchResultDoneProtocolOp");
return (SearchResultDoneProtocolOp) protocolOp;
}
@@ -544,7 +513,6 @@
public SearchResultEntryProtocolOp getSearchResultEntryProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getSearchResultEntryProtocolOp");
return (SearchResultEntryProtocolOp) protocolOp;
}
@@ -564,7 +532,6 @@
public SearchResultReferenceProtocolOp getSearchResultReferenceProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getSearchResultReferenceProtocolOp");
return (SearchResultReferenceProtocolOp) protocolOp;
}
@@ -584,7 +551,6 @@
public UnbindRequestProtocolOp getUnbindRequestProtocolOp()
throws ClassCastException
{
- assert debugEnter(CLASS_NAME, "getUnbindRequestProtocolOp");
return (UnbindRequestProtocolOp) protocolOp;
}
@@ -598,7 +564,6 @@
*/
public void setProtocolOp(ProtocolOp protocolOp)
{
- assert debugEnter(CLASS_NAME, "setProtocolOp", String.valueOf(protocolOp));
this.protocolOp = protocolOp;
}
@@ -613,7 +578,6 @@
*/
public ArrayList<LDAPControl> getControls()
{
- assert debugEnter(CLASS_NAME, "getControls");
return controls;
}
@@ -627,7 +591,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> messageElements = new ArrayList<ASN1Element>(3);
messageElements.add(new ASN1Integer(messageID));
@@ -656,7 +619,6 @@
public static LDAPMessage decode(ASN1Sequence messageSequence)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(messageSequence));
if (messageSequence == null)
{
@@ -682,9 +644,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MESSAGE_DECODE_MESSAGE_ID;
+ int msgID = MSGID_LDAP_MESSAGE_DECODE_MESSAGE_ID;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -697,9 +662,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MESSAGE_DECODE_PROTOCOL_OP;
+ int msgID = MSGID_LDAP_MESSAGE_DECODE_PROTOCOL_OP;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -714,9 +682,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MESSAGE_DECODE_CONTROLS;
+ int msgID = MSGID_LDAP_MESSAGE_DECODE_CONTROLS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -739,7 +710,6 @@
*/
public String getProtocolElementName()
{
- assert debugEnter(CLASS_NAME, "getProtocolElementName");
return "LDAP";
}
@@ -753,7 +723,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -771,7 +740,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPMessage(msgID=");
buffer.append(messageID);
@@ -810,8 +778,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPModification.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPModification.java
index 7e19a0b..b77f529 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPModification.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPModification.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -36,7 +36,9 @@
import org.opends.server.types.Modification;
import org.opends.server.types.ModificationType;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -52,11 +54,6 @@
*/
public class LDAPModification
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPModification";
@@ -77,8 +74,6 @@
public LDAPModification(ModificationType modificationType,
LDAPAttribute attribute)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(modificationType),
- String.valueOf(attribute));
this.modificationType = modificationType;
this.attribute = attribute;
@@ -93,7 +88,6 @@
*/
public ModificationType getModificationType()
{
- assert debugEnter(CLASS_NAME, "getModificationType");
return modificationType;
}
@@ -107,8 +101,6 @@
*/
public void setModificationType(ModificationType modificationType)
{
- assert debugEnter(CLASS_NAME, "setModificationType",
- String.valueOf(modificationType));
this.modificationType = modificationType;
}
@@ -122,7 +114,6 @@
*/
public LDAPAttribute getAttribute()
{
- assert debugEnter(CLASS_NAME, "getAttribute");
return attribute;
}
@@ -136,7 +127,6 @@
*/
public void setAttribute(LDAPAttribute attribute)
{
- assert debugEnter(CLASS_NAME, "setAttribute", String.valueOf(attribute));
this.attribute = attribute;
}
@@ -150,7 +140,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(new ASN1Enumerated(modificationType.intValue()));
@@ -174,7 +163,6 @@
public static LDAPModification decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -183,9 +171,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFICATION_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_MODIFICATION_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -230,9 +221,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFICATION_DECODE_MOD_TYPE;
+ int msgID = MSGID_LDAP_MODIFICATION_DECODE_MOD_TYPE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -245,9 +239,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFICATION_DECODE_ATTR;
+ int msgID = MSGID_LDAP_MODIFICATION_DECODE_ATTR;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -282,7 +279,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -299,7 +295,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("LDAPModification(type=");
buffer.append(String.valueOf(modificationType));
@@ -320,8 +315,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
index 587a975..5bce624 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -44,7 +44,9 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
@@ -66,11 +68,6 @@
extends DirectoryThread
implements ServerShutdownListener
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPRequestHandler";
@@ -119,7 +116,6 @@
super("LDAP Request Handler " + requestHandlerID +
" for connection handler " + connectionHandler.toString());
- assert debugConstructor(CLASS_NAME, String.valueOf(connectionHandler));
this.connectionHandler = connectionHandler;
@@ -132,7 +128,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_REQHANDLER_OPEN_SELECTOR_FAILED;
String message = getMessage(msgID, handlerName, String.valueOf(e));
@@ -172,7 +171,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
// Operate in a loop until the server shuts down. Each time through the
@@ -187,7 +185,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Should we do something else with this?
}
@@ -220,7 +221,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// Some other error occurred while we were trying to read data
// from the client.
@@ -232,7 +236,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We got some other kind of error. If nothing else, cancel the
// key, but if the client connection is available then
@@ -253,7 +260,10 @@
}
catch (CancelledKeyException cke)
{
- assert debugException(CLASS_NAME, "run", cke);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, cke);
+ }
// This could happen if a connection was closed between the time
// that select returned and the time that we try to access the
@@ -262,7 +272,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should not happen, and it would have caused our reader
// thread to die. Log a severe error.
@@ -294,7 +307,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
c.disconnect(DisconnectReason.SERVER_ERROR, true,
MSGID_LDAP_REQHANDLER_CANNOT_REGISTER, handlerName,
@@ -318,8 +334,6 @@
*/
public boolean registerClient(LDAPClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "registerClient",
- String.valueOf(clientConnection));
// FIXME -- Need to check if the maximum client limit has been reached.
@@ -361,8 +375,6 @@
*/
public void deregisterClient(LDAPClientConnection clientConnection)
{
- assert debugEnter(CLASS_NAME, "deregisterClient",
- String.valueOf(clientConnection));
SelectionKey[] keyArray = selector.keys().toArray(new SelectionKey[0]);
for (SelectionKey key : keyArray)
@@ -376,7 +388,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "deregisterClient", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -385,7 +400,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "deregisterClient", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -398,7 +416,6 @@
*/
public void deregisterAllClients()
{
- assert debugEnter(CLASS_NAME, "deregisterAllClients");
SelectionKey[] keyArray = selector.keys().toArray(new SelectionKey[0]);
for (SelectionKey key : keyArray)
@@ -409,7 +426,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "deregisterAllClients", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
try
@@ -418,7 +438,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "deregisterAllClients", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -434,7 +457,6 @@
*/
public Collection<LDAPClientConnection> getClientConnections()
{
- assert debugEnter(CLASS_NAME, "getClientConnections");
SelectionKey[] keyArray = selector.keys().toArray(new SelectionKey[0]);
@@ -457,7 +479,6 @@
*/
public String getShutdownListenerName()
{
- assert debugEnter(CLASS_NAME, "getShutdownListenerName");
return handlerName;
}
@@ -472,7 +493,6 @@
*/
public void registerShutdownListener()
{
- assert debugEnter(CLASS_NAME, "registerShutdownListener");
DirectoryServer.registerShutdownListener(this);
}
@@ -488,8 +508,6 @@
*/
public void processServerShutdown(String reason)
{
- assert debugEnter(CLASS_NAME, "processServerShutdown",
- String.valueOf(reason));
shutdownRequested = true;
@@ -508,7 +526,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processServerShutdown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -522,7 +543,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processServerShutdown", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
index 6e9938c..c9a9720 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPResultCode.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
diff --git a/opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java b/opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java
index ca75988..71c5821 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/LDAPStatistics.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -40,8 +40,10 @@
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -73,11 +75,6 @@
public class LDAPStatistics
extends MonitorProvider
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.LDAPStatistics";
@@ -157,7 +154,6 @@
{
super("LDAP Statistics Monitor Provider");
- assert debugConstructor(CLASS_NAME, String.valueOf(parent));
this.instanceName = instanceName;
this.parent = parent;
@@ -214,7 +210,6 @@
public void initializeMonitorProvider(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeMonitorProvider");
// Throw an exception, because this monitor is not intended to be
// dynamically loaded from the configuration. Rather, it should be
@@ -235,7 +230,6 @@
*/
public String getMonitorInstanceName()
{
- assert debugEnter(CLASS_NAME, "getMonitorInstanceName");
return instanceName;
}
@@ -253,7 +247,6 @@
*/
public long getUpdateInterval()
{
- assert debugEnter(CLASS_NAME, "getUpdateInterval");
// This monitor should not run periodically.
@@ -271,7 +264,6 @@
*/
public void updateMonitorData()
{
- assert debugEnter(CLASS_NAME, "updateMonitorData");
// No implementation is required since this does not do periodic updates.
}
@@ -288,7 +280,6 @@
*/
public ArrayList<Attribute> getMonitorData()
{
- assert debugEnter(CLASS_NAME, "getMonitorData");
ArrayList<Attribute> attrs = new ArrayList<Attribute>(29);
@@ -377,7 +368,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attrs;
}
@@ -388,7 +382,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attrs;
}
@@ -399,7 +396,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attrs;
}
@@ -410,7 +410,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attrs;
}
@@ -421,7 +424,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getMonitorData", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attrs;
}
@@ -496,7 +502,6 @@
*/
public void clearStatistics()
{
- assert debugEnter(CLASS_NAME, "clearStatistics");
// Quickly grab the locks and store consistent copies of the information.
@@ -554,7 +559,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearStatistics", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -563,7 +571,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearStatistics", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -572,7 +583,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearStatistics", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -581,7 +595,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearStatistics", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -590,7 +607,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "clearStatistics", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -606,7 +626,6 @@
*/
public void updateConnect()
{
- assert debugEnter(CLASS_NAME, "updateConnect");
connectLock.lock();
@@ -616,7 +635,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateConnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -638,7 +660,6 @@
*/
public void updateDisconnect()
{
- assert debugEnter(CLASS_NAME, "updateDisconnect");
disconnectLock.lock();
@@ -648,7 +669,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateDisconnect", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -672,7 +696,6 @@
*/
public void updateBytesRead(int bytesRead)
{
- assert debugEnter(CLASS_NAME, "updateBytesRead", String.valueOf(bytesRead));
readLock.lock();
@@ -682,7 +705,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateBytesRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -706,8 +732,6 @@
*/
public void updateMessageRead(LDAPMessage message)
{
- assert debugEnter(CLASS_NAME, "updateMessageRead", String.valueOf(message),
- String.valueOf(bytesRead));
readLock.lock();
@@ -752,7 +776,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateMessagesRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -777,8 +804,6 @@
*/
public void updateMessageWritten(LDAPMessage message, int bytesWritten)
{
- assert debugEnter(CLASS_NAME, "updateMessageWritten",
- String.valueOf(message), String.valueOf(bytesWritten));
writeLock.lock();
@@ -837,7 +862,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateMessageWritten", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -859,7 +887,6 @@
*/
public void updateAbandonedOperation()
{
- assert debugEnter(CLASS_NAME, "updateAbandonedOperation");
abandonLock.lock();
@@ -869,7 +896,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "updateAbandonedOperation", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
finally
{
@@ -896,8 +926,6 @@
*/
private Attribute createAttribute(String name, String value)
{
- assert debugEnter(CLASS_NAME, "createAttribute", String.valueOf(name),
- String.valueOf(value));
AttributeType attrType = DirectoryServer.getDefaultAttributeType(name);
@@ -911,7 +939,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
values.add(new AttributeValue(encodedValue, encodedValue));
}
@@ -928,7 +959,6 @@
*/
public long getConnectionsEstablished()
{
- assert debugEnter(CLASS_NAME, "getConnectionsEstablished");
connectLock.lock();
@@ -951,7 +981,6 @@
*/
public long getConnectionsClosed()
{
- assert debugEnter(CLASS_NAME, "getConnectionsClosed");
disconnectLock.lock();
@@ -974,7 +1003,6 @@
*/
public long getBytesRead()
{
- assert debugEnter(CLASS_NAME, "getBytesRead");
readLock.lock();
@@ -997,7 +1025,6 @@
*/
public long getBytesWritten()
{
- assert debugEnter(CLASS_NAME, "getBytesWritten");
writeLock.lock();
@@ -1020,7 +1047,6 @@
*/
public long getMessagesRead()
{
- assert debugEnter(CLASS_NAME, "getMessagesRead");
readLock.lock();
@@ -1043,7 +1069,6 @@
*/
public long getMessagesWritten()
{
- assert debugEnter(CLASS_NAME, "getMessagesWritten");
writeLock.lock();
@@ -1066,7 +1091,6 @@
*/
public long getOperationsInitiated()
{
- assert debugEnter(CLASS_NAME, "getOperationsInitiated");
readLock.lock();
@@ -1091,7 +1115,6 @@
*/
public long getOperationsCompleted()
{
- assert debugEnter(CLASS_NAME, "getOperationsCompleted");
writeLock.lock();
@@ -1114,7 +1137,6 @@
*/
public long getOperationsAbandoned()
{
- assert debugEnter(CLASS_NAME, "getOperationsAbandoned");
abandonLock.lock();
@@ -1137,7 +1159,6 @@
*/
public long getAbandonRequests()
{
- assert debugEnter(CLASS_NAME, "getAbandonRequests");
readLock.lock();
@@ -1160,7 +1181,6 @@
*/
public long getAddRequests()
{
- assert debugEnter(CLASS_NAME, "getAddRequests");
readLock.lock();
@@ -1183,7 +1203,6 @@
*/
public long getAddResponses()
{
- assert debugEnter(CLASS_NAME, "getAddResponses");
writeLock.lock();
@@ -1206,7 +1225,6 @@
*/
public long getBindRequests()
{
- assert debugEnter(CLASS_NAME, "getBindRequests");
readLock.lock();
@@ -1229,7 +1247,6 @@
*/
public long getBindResponses()
{
- assert debugEnter(CLASS_NAME, "getBindResponses");
writeLock.lock();
@@ -1252,7 +1269,6 @@
*/
public long getCompareRequests()
{
- assert debugEnter(CLASS_NAME, "getCompareRequests");
readLock.lock();
@@ -1275,7 +1291,6 @@
*/
public long getCompareResponses()
{
- assert debugEnter(CLASS_NAME, "getCompareResponses");
writeLock.lock();
@@ -1298,7 +1313,6 @@
*/
public long getDeleteRequests()
{
- assert debugEnter(CLASS_NAME, "getDeleteRequests");
readLock.lock();
@@ -1321,7 +1335,6 @@
*/
public long getDeleteResponses()
{
- assert debugEnter(CLASS_NAME, "getDeleteResponses");
writeLock.lock();
@@ -1344,7 +1357,6 @@
*/
public long getExtendedRequests()
{
- assert debugEnter(CLASS_NAME, "getExtendedRequests");
readLock.lock();
@@ -1367,7 +1379,6 @@
*/
public long getExtendedResponses()
{
- assert debugEnter(CLASS_NAME, "getExtendedResponses");
writeLock.lock();
@@ -1390,7 +1401,6 @@
*/
public long getModifyRequests()
{
- assert debugEnter(CLASS_NAME, "getModifyRequests");
readLock.lock();
@@ -1413,7 +1423,6 @@
*/
public long getModifyResponses()
{
- assert debugEnter(CLASS_NAME, "getModifyResponses");
writeLock.lock();
@@ -1436,7 +1445,6 @@
*/
public long getModifyDNRequests()
{
- assert debugEnter(CLASS_NAME, "getModifyDNRequests");
readLock.lock();
@@ -1459,7 +1467,6 @@
*/
public long getModifyDNResponses()
{
- assert debugEnter(CLASS_NAME, "getModifyDNResponses");
writeLock.lock();
@@ -1482,7 +1489,6 @@
*/
public long getSearchRequests()
{
- assert debugEnter(CLASS_NAME, "getSearchRequests");
readLock.lock();
@@ -1505,7 +1511,6 @@
*/
public long getSearchResultEntries()
{
- assert debugEnter(CLASS_NAME, "getSearchResultEntries");
writeLock.lock();
@@ -1528,7 +1533,6 @@
*/
public long getSearchResultReferences()
{
- assert debugEnter(CLASS_NAME, "getSearchResultReferences");
writeLock.lock();
@@ -1551,7 +1555,6 @@
*/
public long getSearchResultsDone()
{
- assert debugEnter(CLASS_NAME, "getSearchResultsDone");
writeLock.lock();
@@ -1574,7 +1577,6 @@
*/
public long getUnbindRequests()
{
- assert debugEnter(CLASS_NAME, "getUnbindRequests");
readLock.lock();
@@ -1598,7 +1600,6 @@
*/
public LDAPStatistics getParent()
{
- assert debugEnter(CLASS_NAME, "getParent");
return parent;
}
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java
index 342fca5..340586d 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ModifyDNRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -35,7 +35,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -43,7 +45,6 @@
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the structures and methods for an LDAP modify DN request
* protocol op, which is used to move or rename an entry or subtree within the
@@ -52,11 +53,6 @@
public class ModifyDNRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ModifyDNRequestProtocolOp";
@@ -84,8 +80,6 @@
public ModifyDNRequestProtocolOp(ASN1OctetString entryDN,
ASN1OctetString newRDN, boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, String.valueOf(entryDN),
- String.valueOf(newRDN), String.valueOf(deleteOldRDN));
this.entryDN = entryDN;
this.newRDN = newRDN;
@@ -107,9 +101,6 @@
ASN1OctetString newRDN, boolean deleteOldRDN,
ASN1OctetString newSuperior)
{
- assert debugEnter(CLASS_NAME, String.valueOf(entryDN),
- String.valueOf(newRDN), String.valueOf(deleteOldRDN),
- String.valueOf(newSuperior));
this.entryDN = entryDN;
this.newRDN = newRDN;
@@ -126,7 +117,6 @@
*/
public ASN1OctetString getEntryDN()
{
- assert debugEnter(CLASS_NAME, "getEntryDN");
return entryDN;
}
@@ -140,7 +130,6 @@
*/
public void setEntryDN(ASN1OctetString entryDN)
{
- assert debugEnter(CLASS_NAME, "setEntryDN", String.valueOf(entryDN));
this.entryDN = entryDN;
}
@@ -154,7 +143,6 @@
*/
public ASN1OctetString getNewRDN()
{
- assert debugEnter(CLASS_NAME, "getNewRDN");
return newRDN;
}
@@ -168,7 +156,6 @@
*/
public void setNewRDN(ASN1OctetString newRDN)
{
- assert debugEnter(CLASS_NAME, "setNewRDN", String.valueOf(newRDN));
this.newRDN = newRDN;
}
@@ -183,7 +170,6 @@
*/
public boolean deleteOldRDN()
{
- assert debugEnter(CLASS_NAME, "deleteOldRDN");
return deleteOldRDN;
}
@@ -198,8 +184,6 @@
*/
public void setDeleteOldRDN(boolean deleteOldRDN)
{
- assert debugEnter(CLASS_NAME, "setDeleteOldRDN",
- String.valueOf(deleteOldRDN));
this.deleteOldRDN = deleteOldRDN;
}
@@ -214,7 +198,6 @@
*/
public ASN1OctetString getNewSuperior()
{
- assert debugEnter(CLASS_NAME, "getNewSuperior");
return newSuperior;
}
@@ -228,8 +211,6 @@
*/
public void setNewSuperior(ASN1OctetString newSuperior)
{
- assert debugEnter(CLASS_NAME, "setNewSuperior",
- String.valueOf(newSuperior));
this.newSuperior = newSuperior;
}
@@ -243,7 +224,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_MODIFY_DN_REQUEST;
}
@@ -257,7 +237,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Modify DN Request";
}
@@ -272,7 +251,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(entryDN);
@@ -305,8 +283,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeModifyDNRequest",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -315,9 +291,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -339,9 +318,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -354,9 +336,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_NEW_RDN;
+ int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_NEW_RDN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -369,9 +354,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_DELETE_OLD_RDN;
+ int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_DELETE_OLD_RDN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -386,9 +374,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_NEW_SUPERIOR;
+ int msgID = MSGID_LDAP_MODIFY_DN_REQUEST_DECODE_NEW_SUPERIOR;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -413,7 +404,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyDNRequest(dn=");
entryDN.toString(buffer);
@@ -443,8 +433,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
index aabc268..5584b26 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ModifyDNResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class ModifyDNResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ModifyDNResponseProtocolOp";
@@ -84,7 +81,6 @@
*/
public ModifyDNResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public ModifyDNResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public ModifyDNResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_MODIFY_DN_RESPONSE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Modify DN Response";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -340,8 +318,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeModifyDNResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -350,9 +326,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -374,9 +353,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -397,9 +379,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -416,9 +401,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -444,9 +432,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyDNResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -467,7 +458,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyDNResponse(resultCode=");
buffer.append(resultCode);
@@ -515,8 +505,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java
index 9541fb8..4829a15 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ModifyRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -35,7 +35,9 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -43,7 +45,6 @@
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines the structures and methods for an LDAP modify request
* protocol op, which is used to alter the contents of an entry in the Directory
@@ -52,11 +53,6 @@
public class ModifyRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ModifyRequestProtocolOp";
@@ -76,7 +72,6 @@
*/
public ModifyRequestProtocolOp(ASN1OctetString dn)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
this.dn = dn;
this.modifications = new ArrayList<LDAPModification>();
@@ -94,8 +89,6 @@
public ModifyRequestProtocolOp(ASN1OctetString dn,
ArrayList<LDAPModification> modifications)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(modifications));
this.dn = dn;
@@ -118,7 +111,6 @@
*/
public ASN1OctetString getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -132,7 +124,6 @@
*/
public void setDN(ASN1OctetString dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -147,7 +138,6 @@
*/
public ArrayList<LDAPModification> getModifications()
{
- assert debugEnter(CLASS_NAME, "getModifications");
return modifications;
}
@@ -161,7 +151,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_MODIFY_REQUEST;
}
@@ -175,7 +164,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Modify Request";
}
@@ -190,7 +178,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(dn);
@@ -224,8 +211,6 @@
public static ModifyRequestProtocolOp decodeModifyRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeModifyRequest",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -234,9 +219,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -258,9 +246,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_DN;
+ int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -280,9 +271,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_MODS;
+ int msgID = MSGID_LDAP_MODIFY_REQUEST_DECODE_MODS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -301,7 +295,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyRequest(dn=");
dn.toString(buffer);
@@ -334,8 +327,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
index 9d0a9d2..495db50 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ModifyResponseProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class ModifyResponseProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ModifyResponseProtocolOp";
@@ -84,7 +81,6 @@
*/
public ModifyResponseProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public ModifyResponseProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public ModifyResponseProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_MODIFY_RESPONSE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Modify Response";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -340,8 +318,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeModifyResponse",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -350,9 +326,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -361,7 +340,7 @@
int numElements = elements.size();
if ((numElements < 3) || (numElements > 4))
{
- int msgID = MSGID_LDAP_RESULT_DECODE_INVALID_ELEMENT_COUNT;
+ int msgID = MSGID_LDAP_RESULT_DECODE_INVALID_ELEMENT_COUNT;
String message = getMessage(msgID, numElements);
throw new LDAPException(PROTOCOL_ERROR, msgID, message);
}
@@ -374,9 +353,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -397,9 +379,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -416,9 +401,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -444,9 +432,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeModifyResponse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -467,7 +458,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("ModifyResponse(resultCode=");
buffer.append(resultCode);
@@ -515,8 +505,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/ProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/ProtocolOp.java
index b05e716..17c6c9e 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/ProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/ProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -30,7 +30,6 @@
import org.opends.server.protocols.asn1.ASN1Element;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -44,11 +43,6 @@
*/
public abstract class ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.ProtocolOp";
@@ -93,7 +87,6 @@
public static ProtocolOp decode(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(element));
if (element == null)
{
@@ -219,7 +212,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
diff --git a/opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
index c69eb4f..79b3590 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -40,8 +40,10 @@
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DereferencePolicy;
import org.opends.server.types.SearchScope;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -57,11 +59,6 @@
public class SearchRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.SearchRequestProtocolOp";
@@ -111,16 +108,6 @@
boolean typesOnly, LDAPFilter filter,
LinkedHashSet<String> attributes)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(baseDN),
- String.valueOf(scope),
- String.valueOf(dereferencePolicy),
- String.valueOf(sizeLimit),
- String.valueOf(timeLimit),
- String.valueOf(typesOnly),
- String.valueOf(filter),
- String.valueOf(attributes)
- );
this.baseDN = baseDN;
@@ -150,7 +137,6 @@
*/
public ASN1OctetString getBaseDN()
{
- assert debugEnter(CLASS_NAME, "getBaseDN");
return baseDN;
}
@@ -164,7 +150,6 @@
*/
public void setBaseDN(ASN1OctetString baseDN)
{
- assert debugEnter(CLASS_NAME, "setBaseDN", String.valueOf(baseDN));
this.baseDN = baseDN;
}
@@ -178,7 +163,6 @@
*/
public SearchScope getScope()
{
- assert debugEnter(CLASS_NAME, "getScope");
return scope;
}
@@ -192,7 +176,6 @@
*/
public void setScope(SearchScope scope)
{
- assert debugEnter(CLASS_NAME, "setScope", String.valueOf(scope));
this.scope = scope;
}
@@ -206,7 +189,6 @@
*/
public DereferencePolicy getDereferencePolicy()
{
- assert debugEnter(CLASS_NAME, "getDereferencePolicy");
return dereferencePolicy;
}
@@ -221,8 +203,6 @@
*/
public void setDereferencePolicy(DereferencePolicy dereferencePolicy)
{
- assert debugEnter(CLASS_NAME, "setDereferencePolicy",
- String.valueOf(dereferencePolicy));
this.dereferencePolicy = dereferencePolicy;
}
@@ -236,7 +216,6 @@
*/
public int getSizeLimit()
{
- assert debugEnter(CLASS_NAME, "getSizeLimit");
return sizeLimit;
}
@@ -250,7 +229,6 @@
*/
public void setSizeLimit(int sizeLimit)
{
- assert debugEnter(CLASS_NAME, "setSizeLimit", String.valueOf(sizeLimit));
this.sizeLimit = sizeLimit;
}
@@ -264,7 +242,6 @@
*/
public int getTimeLimit()
{
- assert debugEnter(CLASS_NAME, "getTimeLimit");
return timeLimit;
}
@@ -278,7 +255,6 @@
*/
public void setTimeLimit(int timeLimit)
{
- assert debugEnter(CLASS_NAME, "setTimeLimit", String.valueOf(timeLimit));
this.timeLimit = timeLimit;
}
@@ -292,7 +268,6 @@
*/
public boolean getTypesOnly()
{
- assert debugEnter(CLASS_NAME, "getTypesOnly");
return typesOnly;
}
@@ -306,7 +281,6 @@
*/
public void setTypesOnly(boolean typesOnly)
{
- assert debugEnter(CLASS_NAME, "setTypesOnly", String.valueOf(typesOnly));
this.typesOnly = typesOnly;
}
@@ -320,7 +294,6 @@
*/
public LDAPFilter getFilter()
{
- assert debugEnter(CLASS_NAME, "getFilter");
return filter;
}
@@ -334,7 +307,6 @@
*/
public void setFilter(LDAPFilter filter)
{
- assert debugEnter(CLASS_NAME, "setFilter", String.valueOf(filter));
this.filter = filter;
}
@@ -349,7 +321,6 @@
*/
public LinkedHashSet<String> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -364,7 +335,6 @@
*/
public void setAttributes(LinkedHashSet<String> attributes)
{
- assert debugEnter(CLASS_NAME, "setAttributes", String.valueOf(attributes));
if (attributes == null)
{
@@ -385,7 +355,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_SEARCH_REQUEST;
}
@@ -399,7 +368,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Search Request";
}
@@ -414,7 +382,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(8);
elements.add(baseDN);
@@ -452,8 +419,6 @@
public static SearchRequestProtocolOp decodeSearchRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSearchRequest",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -462,9 +427,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -486,9 +454,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_BASE;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_BASE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -524,9 +495,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SCOPE;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SCOPE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -562,9 +536,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_DEREF;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_DEREF;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -577,9 +554,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SIZE_LIMIT;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_SIZE_LIMIT;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -592,9 +572,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_TIME_LIMIT;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_TIME_LIMIT;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -607,9 +590,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_TYPES_ONLY;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_TYPES_ONLY;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -622,9 +608,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_FILTER;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_FILTER;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -643,9 +632,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_ATTRIBUTES;
+ int msgID = MSGID_LDAP_SEARCH_REQUEST_DECODE_ATTRIBUTES;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -666,7 +658,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("SearchRequest(baseDN=");
baseDN.toString(buffer);
@@ -711,8 +702,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
index b4d8cf9..8e96ad5 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -37,8 +37,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.DN;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -55,11 +57,6 @@
public class SearchResultDoneProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.SearchResultDoneProtocolOp";
@@ -84,7 +81,6 @@
*/
public SearchResultDoneProtocolOp(int resultCode)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode));
this.resultCode = resultCode;
@@ -104,8 +100,6 @@
*/
public SearchResultDoneProtocolOp(int resultCode, String errorMessage)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -127,9 +121,6 @@
public SearchResultDoneProtocolOp(int resultCode, String errorMessage,
DN matchedDN, List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage), String.valueOf(matchedDN),
- String.valueOf(referralURLs));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -146,7 +137,6 @@
*/
public int getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -160,7 +150,6 @@
*/
public void setResultCode(int resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode", String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -175,7 +164,6 @@
*/
public String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -189,8 +177,6 @@
*/
public void setErrorMessage(String errorMessage)
{
- assert debugEnter(CLASS_NAME, "setErrorMessage",
- String.valueOf(errorMessage));
this.errorMessage = errorMessage;
}
@@ -205,7 +191,6 @@
*/
public DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -219,7 +204,6 @@
*/
public void setMatchedDN(DN matchedDN)
{
- assert debugEnter(CLASS_NAME, "setMatchedDN", String.valueOf(matchedDN));
this.matchedDN = matchedDN;
}
@@ -234,7 +218,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -248,8 +231,6 @@
*/
public void setReferralURLs(List<String> referralURLs)
{
- assert debugEnter(CLASS_NAME, "setReferralURLs",
- String.valueOf(referralURLs));
this.referralURLs = referralURLs;
}
@@ -263,7 +244,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_SEARCH_RESULT_DONE;
}
@@ -277,7 +257,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Search Result Done";
}
@@ -292,7 +271,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(4);
elements.add(new ASN1Enumerated(resultCode));
@@ -347,8 +325,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSearchDone",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -357,9 +333,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchDone", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -381,9 +360,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchDone", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_RESULT_CODE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -404,9 +386,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchDone", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
+ int msgID = MSGID_LDAP_RESULT_DECODE_MATCHED_DN;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -423,9 +408,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchDone", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
+ int msgID = MSGID_LDAP_RESULT_DECODE_ERROR_MESSAGE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -451,9 +439,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchDone", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
+ int msgID = MSGID_LDAP_RESULT_DECODE_REFERRALS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -474,7 +465,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("SearchResultDone(resultCode=");
buffer.append(resultCode);
@@ -522,8 +512,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
index 837f713..6cc92ac 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/SearchResultEntryProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -48,7 +48,9 @@
import org.opends.server.types.SearchResultEntry;
import org.opends.server.util.Base64;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -66,11 +68,6 @@
public class SearchResultEntryProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.SearchResultEntryProtocolOp";
@@ -90,7 +87,6 @@
*/
public SearchResultEntryProtocolOp(DN dn)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
this.dn = dn;
this.attributes = new LinkedList<LDAPAttribute>();
@@ -108,8 +104,6 @@
public SearchResultEntryProtocolOp(DN dn,
LinkedList<LDAPAttribute> attributes)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(attributes));
this.dn = dn;
@@ -134,7 +128,6 @@
*/
public SearchResultEntryProtocolOp(SearchResultEntry searchEntry)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(searchEntry));
this.dn = searchEntry.getDN();
@@ -174,7 +167,6 @@
*/
public DN getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -188,7 +180,6 @@
*/
public void setDN(DN dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
this.dn = dn;
}
@@ -203,7 +194,6 @@
*/
public LinkedList<LDAPAttribute> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -217,7 +207,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_SEARCH_RESULT_ENTRY;
}
@@ -231,7 +220,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Search Result Entry";
}
@@ -246,7 +234,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements = new ArrayList<ASN1Element>(2);
elements.add(new ASN1OctetString(dn.toString()));
@@ -282,7 +269,6 @@
element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSearchEntry", String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -291,7 +277,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_SEARCH_ENTRY_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
@@ -315,7 +304,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_SEARCH_ENTRY_DECODE_DN;
String message = getMessage(msgID, String.valueOf(e));
@@ -337,7 +329,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_SEARCH_ENTRY_DECODE_ATTRS;
String message = getMessage(msgID, String.valueOf(e));
@@ -358,7 +353,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("SearchResultEntry(dn=");
dn.toString(buffer);
@@ -391,8 +385,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
@@ -428,8 +420,6 @@
*/
public void toLDIF(StringBuilder buffer, int wrapColumn)
{
- assert debugEnter(CLASS_NAME, "toLDIF", "java.lang.StringBuilder",
- String.valueOf(wrapColumn));
// Add the DN to the buffer.
@@ -556,7 +546,6 @@
public SearchResultEntry toSearchResultEntry()
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "toSearchResultEntry");
HashMap<ObjectClass,String> objectClasses =
new HashMap<ObjectClass,String>();
diff --git a/opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java
index 723e010..caedf00 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/SearchResultReferenceProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -36,8 +36,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.asn1.ASN1Sequence;
import org.opends.server.types.SearchResultReference;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -54,11 +56,6 @@
public class SearchResultReferenceProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.SearchResultReferenceProtocolOp";
@@ -75,7 +72,6 @@
*/
public SearchResultReferenceProtocolOp(List<String> referralURLs)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(referralURLs));
if (referralURLs == null)
{
@@ -98,7 +94,6 @@
*/
public SearchResultReferenceProtocolOp(SearchResultReference searchReference)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(searchReference));
referralURLs = searchReference.getReferralURLs();
if (referralURLs == null)
@@ -118,7 +113,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -132,7 +126,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_SEARCH_RESULT_REFERENCE;
}
@@ -146,7 +139,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Search Result Reference";
}
@@ -161,7 +153,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
ArrayList<ASN1Element> elements =
new ArrayList<ASN1Element>(referralURLs.size());
@@ -191,8 +182,6 @@
decodeSearchReference(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeSearchReference",
- String.valueOf(element));
ArrayList<ASN1Element> elements;
try
@@ -201,9 +190,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchReference", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REFERENCE_DECODE_SEQUENCE;
+ int msgID = MSGID_LDAP_SEARCH_REFERENCE_DECODE_SEQUENCE;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -219,9 +211,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeSearchReference", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_LDAP_SEARCH_REFERENCE_DECODE_URLS;
+ int msgID = MSGID_LDAP_SEARCH_REFERENCE_DECODE_URLS;
String message = getMessage(msgID, String.valueOf(e));
throw new LDAPException(PROTOCOL_ERROR, msgID, message, e);
}
@@ -240,7 +235,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("SearchReference(referralURLs={");
@@ -271,8 +265,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
diff --git a/opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java b/opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java
index 8be55a0..2e385d2 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/UnbindRequestProtocolOp.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.protocols.ldap;
@@ -30,7 +30,9 @@
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1Null;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ProtocolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -45,11 +47,6 @@
public class UnbindRequestProtocolOp
extends ProtocolOp
{
- /**
- * The fully-qualified name of this class to use for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.protocols.ldap.UnbindRequestProtocolOp";
@@ -58,7 +55,6 @@
*/
public UnbindRequestProtocolOp()
{
- assert debugConstructor(CLASS_NAME);
}
@@ -70,7 +66,6 @@
*/
public byte getType()
{
- assert debugEnter(CLASS_NAME, "getType");
return OP_TYPE_UNBIND_REQUEST;
}
@@ -84,7 +79,6 @@
*/
public String getProtocolOpName()
{
- assert debugEnter(CLASS_NAME, "getProtocolOpName");
return "Unbind Request";
}
@@ -99,7 +93,6 @@
*/
public ASN1Element encode()
{
- assert debugEnter(CLASS_NAME, "encode");
return new ASN1Null(OP_TYPE_UNBIND_REQUEST);
}
@@ -119,7 +112,6 @@
public static UnbindRequestProtocolOp decodeUnbindRequest(ASN1Element element)
throws LDAPException
{
- assert debugEnter(CLASS_NAME, "decodeUnbindRequest");
try
{
@@ -128,7 +120,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeUnbindRequest", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAP_UNBIND_DECODE;
String message = getMessage(msgID, String.valueOf(e));
@@ -146,7 +141,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder");
buffer.append("UnbindRequest()");
}
@@ -163,8 +157,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString", "java.lang.StringBuilder",
- String.valueOf(indent));
for (int i=0; i < indent; i++)
{
diff --git a/opends/src/server/org/opends/server/protocols/ldap/package-info.java b/opends/src/server/org/opends/server/protocols/ldap/package-info.java
index 3aae050..4d764a2 100644
--- a/opends/src/server/org/opends/server/protocols/ldap/package-info.java
+++ b/opends/src/server/org/opends/server/protocols/ldap/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/protocols/package-info.java b/opends/src/server/org/opends/server/protocols/package-info.java
index b264e7e..7431f8e 100644
--- a/opends/src/server/org/opends/server/protocols/package-info.java
+++ b/opends/src/server/org/opends/server/protocols/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java b/opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java
index bcf6315..05a5cfc 100644
--- a/opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java
+++ b/opends/src/server/org/opends/server/schema/AbsoluteSubtreeSpecificationSyntax.java
@@ -22,12 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -55,11 +56,6 @@
*/
public final class AbsoluteSubtreeSpecificationSyntax extends
AttributeSyntax {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- AbsoluteSubtreeSpecificationSyntax.class.getName();
// The default equality matching rule for this syntax.
private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -108,8 +104,6 @@
*/
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException {
- assert debugEnter(CLASS_NAME, "initializeSyntax", String
- .valueOf(configEntry));
defaultEqualityMatchingRule = DirectoryServer
.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -142,7 +136,6 @@
* @return The common name for this attribute syntax.
*/
public String getSyntaxName() {
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_ABSOLUTE_SUBTREE_SPECIFICATION_NAME;
}
@@ -153,7 +146,6 @@
* @return The OID for this attribute syntax.
*/
public String getOID() {
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_ABSOLUTE_SUBTREE_SPECIFICATION_OID;
}
@@ -164,7 +156,6 @@
* @return A description for this attribute syntax.
*/
public String getDescription() {
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_ABSOLUTE_SUBTREE_SPECIFICATION_DESCRIPTION;
}
@@ -179,7 +170,6 @@
* default.
*/
public EqualityMatchingRule getEqualityMatchingRule() {
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -194,7 +184,6 @@
* default.
*/
public OrderingMatchingRule getOrderingMatchingRule() {
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -209,7 +198,6 @@
* default.
*/
public SubstringMatchingRule getSubstringMatchingRule() {
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -224,7 +212,6 @@
* default.
*/
public ApproximateMatchingRule getApproximateMatchingRule() {
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -245,8 +232,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String
- .valueOf(value), "java.lang.StringBuilder");
// Use the subtree specification code to make this determination.
try {
@@ -254,7 +239,10 @@
return true;
} catch (DirectoryException e) {
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
invalidReason.append(e.getErrorMessage());
return false;
diff --git a/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java b/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
index 387baf6..2c6a4a6 100644
--- a/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
+++ b/opends/src/server/org/opends/server/schema/AttributeTypeSyntax.java
@@ -49,7 +49,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -66,11 +68,6 @@
public class AttributeTypeSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.AttributeTypeSyntax";
@@ -95,7 +92,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -106,8 +102,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -147,7 +141,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_ATTRIBUTE_TYPE_NAME;
}
@@ -159,7 +152,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_ATTRIBUTE_TYPE_OID;
}
@@ -171,7 +163,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_ATTRIBUTE_TYPE_DESCRIPTION;
}
@@ -183,7 +174,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -195,7 +185,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -207,7 +196,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -219,7 +207,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -233,8 +220,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeAttributeType method to determine if the value is
@@ -246,7 +231,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -283,7 +271,6 @@
boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeAttributeType", String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -976,8 +963,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1039,8 +1024,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1130,9 +1113,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1216,8 +1196,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1373,10 +1351,6 @@
List<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
index cc803d1..6bace79 100644
--- a/opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/AuthPasswordEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,9 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.schema.SchemaConstants.*;
@@ -54,11 +56,6 @@
public class AuthPasswordEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.AuthPasswordEqualityMatchingRule";
@@ -69,7 +66,7 @@
{
super();
- assert debugConstructor(CLASS_NAME);
+
}
@@ -91,8 +88,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -107,7 +102,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_AUTH_PASSWORD_NAME;
}
@@ -121,7 +115,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_AUTH_PASSWORD_OID;
}
@@ -136,7 +129,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return EMR_AUTH_PASSWORD_DESCRIPTION;
@@ -152,7 +144,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_AUTH_PASSWORD_OID;
}
@@ -173,7 +164,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
// We will not alter the value in any way, but we'll create a new value
@@ -199,8 +189,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
@@ -227,9 +215,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
// We must be able to decode the attribute value using the authentication
@@ -242,7 +227,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valuesMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return ConditionResult.FALSE;
}
@@ -291,8 +279,6 @@
*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// Because of the variable encoding that may be used, we have no way of
diff --git a/opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java
index 0a3b5ab..9b5e6a7 100644
--- a/opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/AuthPasswordExactEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -41,7 +41,9 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -54,11 +56,6 @@
public class AuthPasswordExactEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.AuthPasswordExactEqualityMatchingRule";
@@ -69,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -91,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -107,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_AUTH_PASSWORD_EXACT_NAME;
}
@@ -121,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_AUTH_PASSWORD_EXACT_OID;
}
@@ -136,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return EMR_AUTH_PASSWORD_EXACT_DESCRIPTION;
@@ -152,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_AUTH_PASSWORD_OID;
}
@@ -173,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
try
@@ -195,7 +184,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "normalizeValue", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
switch (DirectoryServer.getSyntaxEnforcementPolicy())
{
@@ -225,8 +217,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java b/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
index f0a59f7..27428fe 100644
--- a/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
+++ b/opends/src/server/org/opends/server/schema/AuthPasswordSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -59,11 +58,6 @@
public class AuthPasswordSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.AuthPasswordSyntax";
@@ -82,7 +76,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -100,8 +93,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_AUTH_PASSWORD_EXACT_OID);
@@ -122,7 +113,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_AUTH_PASSWORD_NAME;
}
@@ -136,7 +126,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_AUTH_PASSWORD_OID;
}
@@ -150,7 +139,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_AUTH_PASSWORD_DESCRIPTION;
}
@@ -167,7 +155,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -184,7 +171,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -202,7 +188,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
// There is no substring matching rule by default.
return null;
@@ -220,7 +205,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -243,8 +227,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
try
{
@@ -275,8 +257,6 @@
public static StringBuilder[] decodeAuthPassword(String authPasswordValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeAuthPassword",
- String.valueOf(authPasswordValue));
// Create placeholders for the values to return.
@@ -530,7 +510,6 @@
*/
public static boolean isEncoded(ByteString value)
{
- assert debugEnter(CLASS_NAME, "isEncoded", String.valueOf(value));
// FIXME -- Make this more efficient, and don't use exceptions for flow
diff --git a/opends/src/server/org/opends/server/schema/BinarySyntax.java b/opends/src/server/org/opends/server/schema/BinarySyntax.java
index bb7424f..25e100c 100644
--- a/opends/src/server/org/opends/server/schema/BinarySyntax.java
+++ b/opends/src/server/org/opends/server/schema/BinarySyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,9 +38,7 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
-import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import org.opends.server.types.ErrorLogCategory;
@@ -56,11 +54,6 @@
public class BinarySyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.BinarySyntax";
@@ -85,7 +78,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +95,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -143,7 +133,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_BINARY_NAME;
}
@@ -157,7 +146,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_BINARY_OID;
}
@@ -171,7 +159,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_BINARY_DESCRIPTION;
}
@@ -188,7 +175,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +191,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +207,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +223,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +245,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the binary syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java
index 6827d52..6ab01aa 100644
--- a/opends/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/BitStringEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class BitStringEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.BitStringEqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_BIT_STRING_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_BIT_STRING_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_BIT_STRING_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue().toUpperCase();
@@ -268,8 +254,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/BitStringSyntax.java b/opends/src/server/org/opends/server/schema/BitStringSyntax.java
index a6df861..15c53ab 100644
--- a/opends/src/server/org/opends/server/schema/BitStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/BitStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class BitStringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.BitStringSyntax";
@@ -80,7 +74,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -98,8 +91,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
@@ -121,7 +112,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_BIT_STRING_NAME;
}
@@ -135,7 +125,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_BIT_STRING_OID;
}
@@ -149,7 +138,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_BIT_STRING_DESCRIPTION;
}
@@ -166,7 +154,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -183,7 +170,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// Ordering matches are not allowed by default.
return null;
@@ -201,7 +187,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
// Substring matches are not allowed by default.
return null;
@@ -219,7 +204,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matches are not allowed by default.
return null;
@@ -242,8 +226,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String valueString = value.stringValue().toUpperCase();
diff --git a/opends/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java
index ff3d765..c4b68e2 100644
--- a/opends/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/BooleanEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class BooleanEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.BooleanEqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_BOOLEAN_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_BOOLEAN_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_BOOLEAN_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue().toUpperCase();
if (valueString.equals("TRUE") || valueString.equals("YES") ||
@@ -223,8 +209,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/BooleanSyntax.java b/opends/src/server/org/opends/server/schema/BooleanSyntax.java
index 7f739b7..d641048 100644
--- a/opends/src/server/org/opends/server/schema/BooleanSyntax.java
+++ b/opends/src/server/org/opends/server/schema/BooleanSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -45,7 +45,6 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -63,11 +62,6 @@
public class BooleanSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.BooleanSyntax";
@@ -104,7 +98,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -122,8 +115,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
@@ -145,7 +136,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_BOOLEAN_NAME;
}
@@ -159,7 +149,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_BOOLEAN_OID;
}
@@ -173,7 +162,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_BOOLEAN_DESCRIPTION;
}
@@ -190,7 +178,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -207,7 +194,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// Ordering matches are not allowed by default.
return null;
@@ -225,7 +211,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
// Substring matches are not allowed by default.
return null;
@@ -243,7 +228,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matches are not allowed by default.
return null;
@@ -266,8 +250,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String valueString = value.stringValue().toUpperCase();
@@ -301,7 +283,6 @@
*/
public static AttributeValue createBooleanValue(boolean b)
{
- assert debugEnter(CLASS_NAME, "createBooleanValue", String.valueOf(b));
if (b)
{
@@ -330,8 +311,6 @@
public static boolean decodeBooleanValue(ByteString normalizedValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeBooleanValue",
- String.valueOf(normalizedValue));
String valueString = normalizedValue.stringValue();
if (valueString.equals("TRUE"))
diff --git a/opends/src/server/org/opends/server/schema/CaseExactEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactEqualityMatchingRule.java
index bed38fb..4ee92e6 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -50,11 +49,6 @@
public class CaseExactEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseExactEqualityMatchingRule";
@@ -65,7 +59,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -87,8 +80,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -103,7 +94,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_CASE_EXACT_NAME;
}
@@ -117,7 +107,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_CASE_EXACT_OID;
}
@@ -132,7 +121,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -148,7 +136,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -169,7 +156,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
buffer.append(value.stringValue().trim());
@@ -220,8 +206,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java
index ffedb96..07be814 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactIA5EqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class CaseExactIA5EqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseExactIA5EqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_CASE_EXACT_IA5_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_CASE_EXACT_IA5_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_IA5_STRING_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
buffer.append(value.stringValue().trim());
@@ -259,8 +245,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java
index 566a7dc..353a66f 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactIA5SubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -60,11 +59,6 @@
public class CaseExactIA5SubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseExactIA5SubstringMatchingRule";
@@ -75,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -97,8 +90,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -113,7 +104,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_CASE_EXACT_IA5_NAME;
}
@@ -127,7 +117,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_CASE_EXACT_IA5_OID;
}
@@ -142,7 +131,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -158,7 +146,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -179,7 +166,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
buffer.append(value.stringValue().trim());
@@ -264,7 +250,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the process for normalizing a substring is the same as
// normalizing a full value with the exception that it may include an
@@ -359,9 +344,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java
index 87ffe18..9701150 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -36,7 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -51,11 +50,6 @@
public class CaseExactOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseExactOrderingMatchingRule";
@@ -76,7 +70,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -98,8 +91,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -114,7 +105,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_CASE_EXACT_NAME;
}
@@ -128,7 +118,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_CASE_EXACT_OID;
}
@@ -143,7 +132,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -159,7 +147,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -180,7 +167,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
buffer.append(value.stringValue().trim());
@@ -234,8 +220,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -257,8 +241,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
- String.valueOf(b2));
int minLength = Math.min(b1.length, b2.length);
diff --git a/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
index 323ac6d..d4084ef 100644
--- a/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseExactSubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -50,11 +49,6 @@
public class CaseExactSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseExactSubstringMatchingRule";
@@ -65,7 +59,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -87,8 +80,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -103,7 +94,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_CASE_EXACT_NAME;
}
@@ -117,7 +107,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_CASE_EXACT_OID;
}
@@ -132,7 +121,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -148,7 +136,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -169,7 +156,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
buffer.append(value.stringValue().trim());
@@ -222,7 +208,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the process for normalizing a substring is the same as
// normalizing a full value with the exception that it may include an
@@ -285,9 +270,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreEqualityMatchingRule.java
index 30d6d2c..5bcf020 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -36,7 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -49,11 +48,6 @@
public class CaseIgnoreEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreEqualityMatchingRule";
@@ -64,7 +58,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -86,8 +79,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -102,7 +93,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_CASE_IGNORE_NAME;
}
@@ -116,7 +106,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_CASE_IGNORE_OID;
}
@@ -131,7 +120,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -147,7 +135,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -168,7 +155,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
byte[] valueBytes = value.value();
int valueLength = valueBytes.length;
@@ -393,8 +379,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
byte[] b1 = value1.value();
byte[] b2 = value2.value();
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java
index 49cb7e7..e167d35 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreIA5EqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -58,11 +57,6 @@
public class CaseIgnoreIA5EqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreIA5EqualityMatchingRule";
@@ -73,7 +67,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -95,8 +88,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -111,7 +102,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_CASE_IGNORE_IA5_NAME;
}
@@ -125,7 +115,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_CASE_IGNORE_IA5_OID;
}
@@ -140,7 +129,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -156,7 +144,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_IA5_STRING_OID;
}
@@ -177,7 +164,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -260,8 +246,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java
index e7de3fa..a21f428 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreIA5SubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -58,11 +57,6 @@
public class CaseIgnoreIA5SubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreIA5SubstringMatchingRule";
@@ -73,7 +67,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -95,8 +88,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -111,7 +102,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_CASE_IGNORE_IA5_NAME;
}
@@ -125,7 +115,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_CASE_IGNORE_IA5_OID;
}
@@ -140,7 +129,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -156,7 +144,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -177,7 +164,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -262,7 +248,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the process for normalizing a substring is the same as
// normalizing a full value with the exception that it may include an
@@ -357,9 +342,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreListEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreListEqualityMatchingRule.java
index 8078358..0b95eea 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreListEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreListEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +50,6 @@
public class CaseIgnoreListEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreListEqualityMatchingRule";
@@ -66,7 +60,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -88,8 +81,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -104,7 +95,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_CASE_IGNORE_LIST_NAME;
}
@@ -118,7 +108,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_CASE_IGNORE_LIST_OID;
}
@@ -133,7 +122,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -149,7 +137,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_POSTAL_ADDRESS_OID;
}
@@ -170,7 +157,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -234,8 +220,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreListSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreListSubstringMatchingRule.java
index bfbb119..d2ecc29 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreListSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreListSubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +50,6 @@
public class CaseIgnoreListSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreListSubstringMatchingRule";
@@ -66,7 +60,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -88,8 +81,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -104,7 +95,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_CASE_IGNORE_LIST_NAME;
}
@@ -118,7 +108,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_CASE_IGNORE_LIST_OID;
}
@@ -133,7 +122,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -149,7 +137,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -170,7 +157,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -236,7 +222,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the process for normalizing a substring is the same as
// normalizing a full value with the exception that it may include an
@@ -299,9 +284,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java
index e3ce01f..57b3061 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -36,9 +36,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +48,6 @@
public class CaseIgnoreOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreOrderingMatchingRule";
@@ -76,7 +68,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -98,8 +89,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -114,7 +103,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_CASE_IGNORE_NAME;
}
@@ -128,7 +116,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_CASE_IGNORE_OID;
}
@@ -143,7 +130,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -159,7 +145,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -180,7 +165,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -234,8 +218,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(),value2.value());
}
@@ -257,8 +239,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
- String.valueOf(b2));
int minLength = Math.min(b1.length, b2.length);
diff --git a/opends/src/server/org/opends/server/schema/CaseIgnoreSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/CaseIgnoreSubstringMatchingRule.java
index 34d996d..010db79 100644
--- a/opends/src/server/org/opends/server/schema/CaseIgnoreSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/CaseIgnoreSubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +50,6 @@
public class CaseIgnoreSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CaseIgnoreSubstringMatchingRule";
@@ -66,7 +60,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -88,8 +81,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -104,7 +95,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_CASE_IGNORE_NAME;
}
@@ -118,7 +108,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_CASE_IGNORE_OID;
}
@@ -133,7 +122,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -149,7 +137,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -170,7 +157,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -223,7 +209,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the process for normalizing a substring is the same as
// normalizing a full value with the exception that it may include an
@@ -286,9 +271,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/CertificateListSyntax.java b/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
index 31c8405..a5f68cf 100644
--- a/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
+++ b/opends/src/server/org/opends/server/schema/CertificateListSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class CertificateListSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CertificateListSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_CERTLIST_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_CERTLIST_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_CERTLIST_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the certificate list syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java b/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
index 18a05af..dbc53fd 100644
--- a/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
+++ b/opends/src/server/org/opends/server/schema/CertificatePairSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class CertificatePairSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CertificatePairSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_CERTPAIR_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_CERTPAIR_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_CERTPAIR_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the certificate pair syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/CertificateSyntax.java b/opends/src/server/org/opends/server/schema/CertificateSyntax.java
index 149db85..1d9a9da 100644
--- a/opends/src/server/org/opends/server/schema/CertificateSyntax.java
+++ b/opends/src/server/org/opends/server/schema/CertificateSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class CertificateSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CertificateSyntax";
@@ -85,7 +79,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -143,7 +134,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_CERTIFICATE_NAME;
}
@@ -157,7 +147,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_CERTIFICATE_OID;
}
@@ -171,7 +160,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_CERTIFICATE_DESCRIPTION;
}
@@ -188,7 +176,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +192,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +208,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +224,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +246,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the certificate syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/CountryStringSyntax.java b/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
index a3753e3..0fb090c 100644
--- a/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/CountryStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -59,11 +58,6 @@
public class CountryStringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.CountryStringSyntax";
@@ -91,7 +85,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -109,8 +102,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
DirectoryServer.getApproximateMatchingRule(AMR_DOUBLE_METAPHONE_OID);
@@ -158,7 +149,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_COUNTRY_STRING_NAME;
}
@@ -172,7 +162,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_COUNTRY_STRING_OID;
}
@@ -186,7 +175,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_COUNTRY_STRING_DESCRIPTION;
}
@@ -203,7 +191,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -220,7 +207,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -237,7 +223,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -254,7 +239,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -276,8 +260,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String stringValue = toLowerCase(value.stringValue());
if (stringValue.length() != 2)
diff --git a/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java b/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
index d9f00ed..cb70305 100644
--- a/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
+++ b/opends/src/server/org/opends/server/schema/DITContentRuleSyntax.java
@@ -51,7 +51,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -67,11 +69,6 @@
public class DITContentRuleSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DITContentRuleSyntax";
@@ -96,7 +93,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -107,8 +103,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -148,7 +142,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_DIT_CONTENT_RULE_NAME;
}
@@ -160,7 +153,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_DIT_CONTENT_RULE_OID;
}
@@ -172,7 +164,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_DIT_CONTENT_RULE_DESCRIPTION;
}
@@ -184,7 +175,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -196,7 +186,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -208,7 +197,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -220,7 +208,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -234,8 +221,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeDITContentRule method to determine if the value is
@@ -247,7 +232,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -283,8 +271,6 @@
Schema schema, boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeDITContentRule",
- String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -1007,8 +993,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1070,8 +1054,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1161,9 +1143,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1247,8 +1226,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1406,10 +1383,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java b/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
index 24674f7..2028b77 100644
--- a/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
+++ b/opends/src/server/org/opends/server/schema/DITStructureRuleSyntax.java
@@ -49,7 +49,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -65,11 +67,6 @@
public class DITStructureRuleSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DITStructureRuleSyntax";
@@ -94,7 +91,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -105,8 +101,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -146,7 +140,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_DIT_STRUCTURE_RULE_NAME;
}
@@ -158,7 +151,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_DIT_STRUCTURE_RULE_OID;
}
@@ -170,7 +162,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_DIT_STRUCTURE_RULE_DESCRIPTION;
}
@@ -182,7 +173,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -194,7 +184,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -206,7 +195,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -218,7 +206,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -232,8 +219,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeDITStructureRule method to determine if the value is
@@ -245,7 +230,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -282,8 +270,6 @@
boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeDITStructureRule",
- String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -750,8 +736,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -813,8 +797,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -904,9 +886,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -990,8 +969,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1148,10 +1125,6 @@
List<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java b/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
index c8e2ca4..89a9295 100644
--- a/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
+++ b/opends/src/server/org/opends/server/schema/DeliveryMethodSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -43,7 +43,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -75,11 +74,6 @@
public class DeliveryMethodSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DeliveryMethodSyntax";
@@ -129,7 +123,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -147,8 +140,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
allowedValues = new HashSet<String>(ALLOWED_VALUES.length);
for (String s : ALLOWED_VALUES)
@@ -202,7 +193,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_DELIVERY_METHOD_NAME;
}
@@ -216,7 +206,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_DELIVERY_METHOD_OID;
}
@@ -230,7 +219,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_DELIVERY_METHOD_DESCRIPTION;
}
@@ -247,7 +235,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -264,7 +251,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -281,7 +267,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -298,7 +283,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -320,8 +304,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String stringValue = toLowerCase(value.stringValue());
StringTokenizer tokenizer = new StringTokenizer(stringValue, " $");
diff --git a/opends/src/server/org/opends/server/schema/DirectoryStringFirstComponentEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/DirectoryStringFirstComponentEqualityMatchingRule.java
index 0a64ba4..09cc76d 100644
--- a/opends/src/server/org/opends/server/schema/DirectoryStringFirstComponentEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/DirectoryStringFirstComponentEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -37,7 +37,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -56,11 +55,6 @@
public class DirectoryStringFirstComponentEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.schema." +
- "DirectoryStringFirstComponentEqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_DIRECTORY_STRING_FIRST_COMPONENT_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_DIRECTORY_STRING_FIRST_COMPONENT_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -227,8 +213,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// For this purpose, the first value will be considered the attribute value,
@@ -297,8 +281,6 @@
* @return The hash code generated for the provided attribute value.*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// In this case, we'll always return the same value because the matching
// isn't based on the entire value.
diff --git a/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java b/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
index 3e2b864..c251152 100644
--- a/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/DirectoryStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -54,7 +54,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -73,11 +75,6 @@
extends AttributeSyntax
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DirectoryStringSyntax";
@@ -130,7 +127,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -148,8 +144,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
@@ -216,7 +210,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "allowZeroLengthValues", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_DIRECTORYSTRING_CANNOT_DETERMINE_ZEROLENGTH;
String message = getMessage(msgID, ATTR_ALLOW_ZEROLENGTH_DIRECTORYSTRINGS,
@@ -237,7 +234,6 @@
*/
public void finalizeSyntax()
{
- assert debugEnter(CLASS_NAME, "finalizeSyntax");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -251,7 +247,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_DIRECTORY_STRING_NAME;
}
@@ -265,7 +260,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -279,7 +273,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_DIRECTORY_STRING_DESCRIPTION;
}
@@ -296,7 +289,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -313,7 +305,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -330,7 +321,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -347,7 +337,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -369,8 +358,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
if (allowZeroLengthValues || (value.value().length > 0))
{
@@ -398,7 +385,6 @@
*/
public boolean allowZeroLengthValues()
{
- assert debugEnter(CLASS_NAME, "allowZeroLengthValues");
return allowZeroLengthValues;
}
@@ -414,7 +400,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -430,7 +415,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> configAttrs = new LinkedList<ConfigAttribute>();
@@ -461,8 +445,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configValid = true;
@@ -480,7 +462,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
configValid = false;
@@ -515,9 +500,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -542,7 +524,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
resultCode = DirectoryServer.getServerErrorResultCode();
diff --git a/opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
index e4c7bb0..6edae19 100644
--- a/opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/DistinguishedNameEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -57,11 +59,6 @@
public class DistinguishedNameEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DistinguishedNameEqualityMatchingRule";
@@ -72,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +90,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +104,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_DN_NAME;
}
@@ -124,7 +117,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_DN_OID;
}
@@ -139,7 +131,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +146,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DN_OID;
}
@@ -176,7 +166,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
// Since the normalization for DNs is so complex, it will be handled
@@ -188,7 +177,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "normalizeValue", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
// See if we should try to proceed anyway with a bare-bones normalization.
if (DirectoryServer.getSyntaxEnforcementPolicy() ==
@@ -201,7 +193,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (DirectoryServer.getSyntaxEnforcementPolicy() ==
AcceptRejectWarn.REJECT)
@@ -234,8 +229,6 @@
*/
private ByteString bestEffortNormalize(String lowerString)
{
- assert debugEnter(CLASS_NAME, "bestEffortNormalize",
- String.valueOf(lowerString));
int length = lowerString.length();
StringBuilder buffer = new StringBuilder(length);
@@ -312,8 +305,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java b/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
index c20daae..ede194f 100644
--- a/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
+++ b/opends/src/server/org/opends/server/schema/DistinguishedNameSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -44,8 +44,10 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -60,12 +62,6 @@
public class DistinguishedNameSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DistinguishedNameSyntax";
-
// The default equality matching rule for this syntax.
@@ -103,7 +99,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -121,8 +116,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_DN_OID);
@@ -152,7 +145,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_DN_NAME;
}
@@ -166,7 +158,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_DN_OID;
}
@@ -180,7 +171,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_DN_DESCRIPTION;
}
@@ -197,7 +187,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -214,7 +203,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -232,7 +220,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -249,7 +236,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -272,8 +258,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Use the DN code to make this determination.
try
@@ -284,14 +268,20 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_DN_INVALID;
invalidReason.append(getMessage(msgID, value.stringValue(),
diff --git a/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java b/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
index 6b6449e..1fdb971 100644
--- a/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/DoubleMetaphoneApproximateMatchingRule.java
@@ -37,8 +37,10 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.schema.SchemaConstants.*;
@@ -65,11 +67,6 @@
public class DoubleMetaphoneApproximateMatchingRule
extends ApproximateMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.DoubleMetaphoneApproximateMatchingRule";
@@ -80,7 +77,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -102,8 +98,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -118,7 +112,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return AMR_DOUBLE_METAPHONE_NAME;
}
@@ -132,7 +125,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return AMR_DOUBLE_METAPHONE_OID;
}
@@ -147,7 +139,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return AMR_DOUBLE_METAPHONE_DESCRIPTION;
@@ -163,7 +154,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
// Approximate matching is really only appropriate for DirectoryString
// values.
@@ -186,7 +176,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int length = valueString.length();
@@ -1188,8 +1177,6 @@
*/
public boolean approximatelyMatch(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "approximatelyMatch",
- String.valueOf(value1), String.valueOf(value2));
// If the values have been normalized, then we just need to compare their
// byte arrays.
@@ -1215,9 +1202,6 @@
private boolean hasSubstring(String value, int start,
String substring)
{
- assert debugEnter(CLASS_NAME, "hasSubstring", String.valueOf(value),
- String.valueOf(start),
- String.valueOf(substring));
try
{
@@ -1247,7 +1231,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasSubstring", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -1265,7 +1252,6 @@
*/
private boolean isVowel(char c)
{
- assert debugEnter(CLASS_NAME, "isVowel", String.valueOf(c));
switch (c)
{
@@ -1294,7 +1280,6 @@
*/
private boolean isSlavoGermanic(String s)
{
- assert debugEnter(CLASS_NAME, "isSlavoGermanic", String.valueOf(s));
return (s.contains("W") || s.contains("K") || s.contains("CZ") ||
s.contains("WITZ"));
@@ -1313,7 +1298,6 @@
*/
private boolean isGermanic(String s)
{
- assert debugEnter(CLASS_NAME, "isGermanic", String.valueOf(s));
return (s.startsWith("VAN ") || s.startsWith("VON ") ||
s.startsWith("SCH"));
diff --git a/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java b/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
index 97667b2..8c84ec8 100644
--- a/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
+++ b/opends/src/server/org/opends/server/schema/EnhancedGuideSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class EnhancedGuideSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.EnhancedGuideSyntax";
@@ -86,7 +80,7 @@
{
super();
- assert debugConstructor(CLASS_NAME);
+
}
@@ -104,8 +98,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -144,7 +136,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_ENHANCED_GUIDE_NAME;
}
@@ -158,7 +149,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_ENHANCED_GUIDE_OID;
}
@@ -172,7 +162,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_ENHANCED_GUIDE_DESCRIPTION;
}
@@ -189,7 +178,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +194,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +210,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +226,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +248,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a lowercase string version of the provided value.
diff --git a/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java b/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
index a1aadd9..94459aa 100644
--- a/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
+++ b/opends/src/server/org/opends/server/schema/FaxNumberSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -69,11 +68,6 @@
public class FaxNumberSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.FaxNumberSyntax";
@@ -118,7 +112,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -136,8 +129,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -176,7 +167,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_FAXNUMBER_NAME;
}
@@ -190,7 +180,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_FAXNUMBER_OID;
}
@@ -204,7 +193,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_FAXNUMBER_DESCRIPTION;
}
@@ -221,7 +209,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -238,7 +225,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -255,7 +241,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -272,7 +257,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -295,8 +279,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a lowercase string representation of the value and find its length.
diff --git a/opends/src/server/org/opends/server/schema/FaxSyntax.java b/opends/src/server/org/opends/server/schema/FaxSyntax.java
index a1b3d40..9f21b5d 100644
--- a/opends/src/server/org/opends/server/schema/FaxSyntax.java
+++ b/opends/src/server/org/opends/server/schema/FaxSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class FaxSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.FaxSyntax";
@@ -85,7 +79,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -143,7 +134,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_FAX_NAME;
}
@@ -157,7 +147,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_FAX_OID;
}
@@ -171,7 +160,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_FAX_DESCRIPTION;
}
@@ -188,7 +176,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +192,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +208,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +224,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +246,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the fax syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java
index 7aa767c..c3affcc 100644
--- a/opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/GeneralizedTimeEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -48,7 +48,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -65,11 +67,6 @@
public class GeneralizedTimeEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.GeneralizedTimeEqualityMatchingRule";
@@ -120,7 +117,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -142,8 +138,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -158,7 +152,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_GENERALIZED_TIME_NAME;
}
@@ -172,7 +165,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_GENERALIZED_TIME_OID;
}
@@ -187,7 +179,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -203,7 +194,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_GENERALIZED_TIME_OID;
}
@@ -224,7 +214,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue().toUpperCase();
@@ -267,7 +256,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -299,7 +291,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -355,7 +350,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -380,7 +378,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -438,7 +439,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -549,19 +553,6 @@
int second, int millisecond)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "processValueEnd",
- new String[]
- {
- String.valueOf(valueString),
- String.valueOf(endPos),
- String.valueOf(year),
- String.valueOf(month),
- String.valueOf(day),
- String.valueOf(hour),
- String.valueOf(minute),
- String.valueOf(second),
- String.valueOf(millisecond)
- });
// First, check to see if we are at the end of the string. If so, then
@@ -593,7 +584,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -630,7 +624,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -673,7 +670,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -706,7 +706,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
String message = getMessage(msgID, valueString,
@@ -738,7 +741,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
String message = getMessage(msgID, valueString,
@@ -794,7 +800,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -839,7 +848,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
message = getMessage(msgID, valueString,
@@ -869,8 +881,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
index 73fd57a..363cd00 100644
--- a/opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/GeneralizedTimeOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -47,7 +47,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -64,11 +66,6 @@
public class GeneralizedTimeOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.GeneralizedTimeOrderingMatchingRule";
@@ -129,7 +126,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -151,8 +147,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -167,7 +161,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_GENERALIZED_TIME_NAME;
}
@@ -181,7 +174,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_GENERALIZED_TIME_OID;
}
@@ -196,7 +188,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -212,7 +203,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_GENERALIZED_TIME_OID;
}
@@ -233,7 +223,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue().toUpperCase();
@@ -276,7 +265,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -308,7 +300,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -364,7 +359,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -389,7 +387,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString,
@@ -447,7 +448,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -558,19 +562,6 @@
int second, int millisecond)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "processValueEnd",
- new String[]
- {
- String.valueOf(valueString),
- String.valueOf(endPos),
- String.valueOf(year),
- String.valueOf(month),
- String.valueOf(day),
- String.valueOf(hour),
- String.valueOf(minute),
- String.valueOf(second),
- String.valueOf(millisecond)
- });
// First, check to see if we are at the end of the string. If so, then
@@ -602,7 +593,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -639,7 +633,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -682,7 +679,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -715,7 +715,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
String message = getMessage(msgID, valueString,
@@ -747,7 +750,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_INVALID_OFFSET;
String message = getMessage(msgID, valueString,
@@ -803,7 +809,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
String message = getMessage(msgID, valueString,
@@ -848,7 +857,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processValueEnd", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_NORMALIZE_FAILURE;
message = getMessage(msgID, valueString,
@@ -881,8 +893,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -904,8 +914,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
- String.valueOf(b2));
int minLength = Math.min(b1.length, b2.length);
diff --git a/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java b/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
index d9e20cd..cece249 100644
--- a/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
+++ b/opends/src/server/org/opends/server/schema/GeneralizedTimeSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -49,7 +49,9 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -68,11 +70,6 @@
public class GeneralizedTimeSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.GeneralizedTimeSyntax";
@@ -128,7 +125,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -146,8 +142,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_GENERALIZED_TIME_OID);
@@ -186,7 +180,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_GENERALIZED_TIME_NAME;
}
@@ -200,7 +193,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_GENERALIZED_TIME_OID;
}
@@ -214,7 +206,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_GENERALIZED_TIME_DESCRIPTION;
}
@@ -231,7 +222,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -248,7 +238,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -265,7 +254,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -282,7 +270,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matching will not be allowed by default.
return null;
@@ -305,8 +292,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get the value as a string and verify that it is at least long enough for
@@ -906,8 +891,6 @@
private boolean hasValidOffset(String value, int startPos,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "hasValidOffset", String.valueOf(value),
- String.valueOf(startPos), "java.lang.StringBuilder");
int offsetLength = value.length() - startPos;
@@ -1034,7 +1017,6 @@
*/
public static String format(Date d)
{
- assert debugEnter(CLASS_NAME, "formatGeneralizedTime", String.valueOf(d));
dateFormatLock.lock();
@@ -1059,7 +1041,6 @@
*/
public static String format(long t)
{
- assert debugEnter(CLASS_NAME, "formatGeneralizedTime", String.valueOf(t));
dateFormatLock.lock();
@@ -1086,8 +1067,6 @@
*/
public static AttributeValue createGeneralizedTimeValue(long time)
{
- assert debugEnter(CLASS_NAME, "createGeneralizedTimeValue",
- String.valueOf(time));
String valueString;
@@ -1099,7 +1078,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createGeneralizedTimeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
valueString = null;
@@ -1130,8 +1112,6 @@
public static long decodeGeneralizedTimeValue(ByteString normalizedValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeGeneralizedTimeValue",
- String.valueOf(normalizedValue));
String valueString = normalizedValue.stringValue();
try
@@ -1154,9 +1134,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeGeneralizedTimeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
+ int msgID = MSGID_ATTR_SYNTAX_GENERALIZED_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString, String.valueOf(e));
throw new DirectoryException(ResultCode.INVALID_ATTRIBUTE_SYNTAX,
diff --git a/opends/src/server/org/opends/server/schema/GuideSyntax.java b/opends/src/server/org/opends/server/schema/GuideSyntax.java
index 58a8778..26b29d7 100644
--- a/opends/src/server/org/opends/server/schema/GuideSyntax.java
+++ b/opends/src/server/org/opends/server/schema/GuideSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class GuideSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.GuideSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_GUIDE_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_GUIDE_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_GUIDE_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a lowercase string version of the provided value.
@@ -319,8 +301,6 @@
public static boolean criteriaIsValid(String criteria, String valueStr,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "criteriaIsValid", String.valueOf(criteria),
- String.valueOf(valueStr), "java.lang.StringBuilder");
// See if the criteria starts with a '!'. If so, then just evaluate
diff --git a/opends/src/server/org/opends/server/schema/IA5StringSyntax.java b/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
index e90f5e1..27bce79 100644
--- a/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/IA5StringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class IA5StringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.IA5StringSyntax";
@@ -89,7 +83,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -107,8 +100,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
DirectoryServer.getApproximateMatchingRule(AMR_DOUBLE_METAPHONE_OID);
@@ -156,7 +147,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_IA5_STRING_NAME;
}
@@ -170,7 +160,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_IA5_STRING_OID;
}
@@ -184,7 +173,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_IA5_STRING_DESCRIPTION;
}
@@ -201,7 +189,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -218,7 +205,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -235,7 +221,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -252,7 +237,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -274,8 +258,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We will allow any value that does not contain any non-ASCII characters.
diff --git a/opends/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java
index caea98d..da5c38d 100644
--- a/opends/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/IntegerEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class IntegerEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.IntegerEqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_INTEGER_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_INTEGER_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_INTEGER_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
byte[] valueBytes = value.value();
@@ -402,8 +388,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
index 6f33fcb..1d3f8c1 100644
--- a/opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/IntegerFirstComponentEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,9 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -57,11 +59,6 @@
public class IntegerFirstComponentEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.IntegerFirstComponentEqualityMatchingRule";
@@ -72,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +90,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +104,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_INTEGER_FIRST_COMPONENT_NAME;
}
@@ -124,7 +117,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_INTEGER_FIRST_COMPONENT_OID;
}
@@ -139,7 +131,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +146,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_INTEGER_OID;
}
@@ -176,7 +166,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -227,8 +216,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
try
@@ -240,7 +227,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "areEqual", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -264,8 +254,6 @@
*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// In this case, we'll always return the same value because the matching
// isn't based on the entire value.
@@ -288,8 +276,6 @@
private static int extractIntValue(String valueString)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "extractIntValue",
- String.valueOf(valueString));
int valueLength = valueString.length();
@@ -304,7 +290,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "extractIntValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_EMR_INTFIRSTCOMP_NO_INITIAL_PARENTHESIS;
String message = getMessage(msgID, String.valueOf(valueString));
@@ -354,7 +343,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "extractIntValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_EMR_INTFIRSTCOMP_FIRST_COMPONENT_NOT_INT;
String message = getMessage(msgID, String.valueOf(valueString));
diff --git a/opends/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java
index 1d34278..87aba3c 100644
--- a/opends/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/IntegerOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class IntegerOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.IntegerOrderingMatchingRule";
@@ -81,7 +75,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -119,7 +110,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_INTEGER_NAME;
}
@@ -133,7 +123,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_INTEGER_OID;
}
@@ -148,7 +137,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -164,7 +152,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_INTEGER_OID;
}
@@ -185,7 +172,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
byte[] valueBytes = value.value();
@@ -414,8 +400,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -437,8 +421,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
- String.valueOf(b2));
int b1Length = b1.length;
int b2Length = b2.length;
diff --git a/opends/src/server/org/opends/server/schema/IntegerSyntax.java b/opends/src/server/org/opends/server/schema/IntegerSyntax.java
index 4d63004..2a2b8ce 100644
--- a/opends/src/server/org/opends/server/schema/IntegerSyntax.java
+++ b/opends/src/server/org/opends/server/schema/IntegerSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -44,7 +44,6 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -60,11 +59,6 @@
public class IntegerSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.IntegerSyntax";
@@ -117,7 +111,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -135,8 +128,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_INTEGER_OID);
@@ -175,7 +166,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_INTEGER_NAME;
}
@@ -189,7 +179,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_INTEGER_OID;
}
@@ -203,7 +192,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_INTEGER_DESCRIPTION;
}
@@ -220,7 +208,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -237,7 +224,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -254,7 +240,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -271,7 +256,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -294,8 +278,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String valueString = value.stringValue();
int length = valueString.length();
diff --git a/opends/src/server/org/opends/server/schema/JPEGSyntax.java b/opends/src/server/org/opends/server/schema/JPEGSyntax.java
index a7dd69c..3722700 100644
--- a/opends/src/server/org/opends/server/schema/JPEGSyntax.java
+++ b/opends/src/server/org/opends/server/schema/JPEGSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class JPEGSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.JPEGSyntax";
@@ -85,7 +79,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -143,7 +134,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_JPEG_NAME;
}
@@ -157,7 +147,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_JPEG_OID;
}
@@ -171,7 +160,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_JPEG_DESCRIPTION;
}
@@ -188,7 +176,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +192,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +208,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +224,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +246,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the JPEG syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/KeywordEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/KeywordEqualityMatchingRule.java
index 1bdc2c9..28c6048 100644
--- a/opends/src/server/org/opends/server/schema/KeywordEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/KeywordEqualityMatchingRule.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -42,11 +41,6 @@
public class KeywordEqualityMatchingRule
extends WordEqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.KeywordEqualityMatchingRule";
@@ -57,7 +51,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -70,7 +63,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_KEYWORD_NAME;
}
@@ -84,7 +76,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_KEYWORD_OID;
}
diff --git a/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java b/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
index c719c6e..477e040 100644
--- a/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
+++ b/opends/src/server/org/opends/server/schema/LDAPSyntaxDescriptionSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,8 +42,10 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -59,11 +61,6 @@
public class LDAPSyntaxDescriptionSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.LDAPSyntaxDescriptionSyntax";
@@ -88,7 +85,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -106,8 +102,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -146,7 +140,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_LDAP_SYNTAX_NAME;
}
@@ -160,7 +153,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_LDAP_SYNTAX_OID;
}
@@ -174,7 +166,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_LDAP_SYNTAX_DESCRIPTION;
}
@@ -191,7 +182,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -208,7 +198,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -225,7 +214,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -242,7 +230,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -265,8 +252,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get string representations of the provided value using the provided form
@@ -438,7 +423,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_ATTRSYNTAX_CANNOT_READ_DESC_TOKEN;
invalidReason.append(getMessage(msgID, valueStr, pos,
@@ -462,7 +450,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_ATTRSYNTAX_CANNOT_READ_DESC_VALUE;
invalidReason.append(getMessage(msgID, valueStr, pos,
@@ -475,7 +466,10 @@
try {
pos=parseExtension(valueStr, pos);
} catch (Exception e) {
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_ATTRSYNTAX_INVALID_EXTENSION;
invalidReason.append(getMessage(msgID,
stackTraceToSingleLineString(e)));
@@ -530,8 +524,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -593,8 +585,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
diff --git a/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java b/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
index add4988..56ec8a2 100644
--- a/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
+++ b/opends/src/server/org/opends/server/schema/MatchingRuleSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -45,7 +45,9 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -62,11 +64,6 @@
public class MatchingRuleSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.MatchingRuleSyntax";
@@ -91,7 +88,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -109,8 +105,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -149,7 +143,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_MATCHING_RULE_NAME;
}
@@ -163,7 +156,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_MATCHING_RULE_OID;
}
@@ -177,7 +169,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_MATCHING_RULE_DESCRIPTION;
}
@@ -194,7 +185,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -211,7 +201,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -228,7 +217,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -245,7 +233,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -268,8 +255,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get string representations of the provided value using the provided form
@@ -439,7 +424,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -477,7 +465,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -497,7 +488,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -531,7 +525,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -561,7 +558,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -584,7 +584,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -619,7 +622,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -665,8 +671,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -728,8 +732,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -819,9 +821,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -905,8 +904,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1063,10 +1060,6 @@
CopyOnWriteArrayList<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java b/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
index c28dd53..991041f 100644
--- a/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
+++ b/opends/src/server/org/opends/server/schema/MatchingRuleUseSyntax.java
@@ -50,7 +50,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -66,11 +68,6 @@
public class MatchingRuleUseSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.MatchingRuleUseSyntax";
@@ -95,7 +92,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -106,8 +102,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -147,7 +141,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_MATCHING_RULE_USE_NAME;
}
@@ -159,7 +152,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_MATCHING_RULE_USE_OID;
}
@@ -171,7 +163,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_MATCHING_RULE_USE_DESCRIPTION;
}
@@ -183,7 +174,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -195,7 +185,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -207,7 +196,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -219,7 +207,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -233,8 +220,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeMatchingRuleUse method to determine if the value is
@@ -246,7 +231,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -283,8 +271,6 @@
boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeMatchingRuleUse",
- String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -689,8 +675,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -752,8 +736,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -843,9 +825,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -929,8 +908,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1086,10 +1063,6 @@
List<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java b/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
index 450a1a7..0669856 100644
--- a/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
+++ b/opends/src/server/org/opends/server/schema/NameAndOptionalUIDSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -41,8 +41,10 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -58,11 +60,6 @@
public class NameAndOptionalUIDSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NameAndOptionalUIDSyntax";
@@ -84,7 +81,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -102,8 +98,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_UNIQUE_MEMBER_OID);
@@ -133,7 +127,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_NAME_AND_OPTIONAL_UID_NAME;
}
@@ -147,7 +140,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_NAME_AND_OPTIONAL_UID_OID;
}
@@ -161,7 +153,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_NAME_AND_OPTIONAL_UID_DESCRIPTION;
}
@@ -178,7 +169,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -195,7 +185,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -213,7 +202,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -230,7 +218,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -253,8 +240,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String valueString = value.stringValue().trim();
int valueLength = valueString.length();
@@ -281,7 +266,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize the DN for some reason. The value cannot be
// acceptable.
diff --git a/opends/src/server/org/opends/server/schema/NameFormSyntax.java b/opends/src/server/org/opends/server/schema/NameFormSyntax.java
index 8330e18..db48105 100644
--- a/opends/src/server/org/opends/server/schema/NameFormSyntax.java
+++ b/opends/src/server/org/opends/server/schema/NameFormSyntax.java
@@ -51,7 +51,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -67,11 +69,6 @@
public class NameFormSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NameFormSyntax";
@@ -96,7 +93,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -107,8 +103,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -148,7 +142,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_NAME_FORM_NAME;
}
@@ -160,7 +153,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_NAME_FORM_OID;
}
@@ -172,7 +164,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_NAME_FORM_DESCRIPTION;
}
@@ -184,7 +175,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -196,7 +186,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -208,7 +197,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -220,7 +208,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -234,8 +221,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeNameForm method to determine if the value is
@@ -247,7 +232,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -283,7 +271,6 @@
boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeNameForm", String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -805,8 +792,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -868,8 +853,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -959,9 +942,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1045,8 +1025,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1203,10 +1181,6 @@
List<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
diff --git a/opends/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java
index 687cb1b..f920817 100644
--- a/opends/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/NumericStringEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -59,11 +58,6 @@
public class NumericStringEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NumericStringEqualityMatchingRule";
@@ -74,7 +68,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -96,8 +89,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -112,7 +103,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_NUMERIC_STRING_NAME;
}
@@ -126,7 +116,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_NUMERIC_STRING_OID;
}
@@ -141,7 +130,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -157,7 +145,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_NUMERIC_STRING_OID;
}
@@ -178,7 +165,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int valueLength = valueString.length();
@@ -231,8 +217,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java
index 69e4a6c..76337df 100644
--- a/opends/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/NumericStringOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class NumericStringOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NumericStringOrderingMatchingRule";
@@ -81,7 +75,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -119,7 +110,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_NUMERIC_STRING_NAME;
}
@@ -133,7 +123,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_NUMERIC_STRING_OID;
}
@@ -148,7 +137,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -164,7 +152,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_NUMERIC_STRING_OID;
}
@@ -185,7 +172,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int valueLength = valueString.length();
@@ -241,8 +227,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -264,8 +248,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compare", String.valueOf(b1),
- String.valueOf(b2));
int minLength = Math.min(b1.length, b2.length);
diff --git a/opends/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java
index e2b9c27..4ab97e9 100644
--- a/opends/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/NumericStringSubstringMatchingRule.java
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -58,11 +57,6 @@
public class NumericStringSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NumericStringSubstringMatchingRule";
@@ -73,7 +67,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -95,8 +88,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -111,7 +102,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_NUMERIC_STRING_NAME;
}
@@ -125,7 +115,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_NUMERIC_STRING_OID;
}
@@ -140,7 +129,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -156,7 +144,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -177,7 +164,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int valueLength = valueString.length();
@@ -232,8 +218,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring",
- String.valueOf(substring));
String valueString = substring.stringValue();
int valueLength = valueString.length();
@@ -295,9 +279,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/NumericStringSyntax.java b/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
index efa4e65..15fa3ac 100644
--- a/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/NumericStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class NumericStringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.NumericStringSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_NUMERIC_STRING_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_NUMERIC_STRING_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_NUMERIC_STRING_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_NUMERIC_STRING_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String valueString = value.stringValue();
int length = valueString.length();
diff --git a/opends/src/server/org/opends/server/schema/OIDSyntax.java b/opends/src/server/org/opends/server/schema/OIDSyntax.java
index 999784a..4c37f0f 100644
--- a/opends/src/server/org/opends/server/schema/OIDSyntax.java
+++ b/opends/src/server/org/opends/server/schema/OIDSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class OIDSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OIDSyntax";
@@ -82,7 +76,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -100,8 +93,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OID_OID);
@@ -131,7 +122,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_OID_NAME;
}
@@ -145,7 +135,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_OID_OID;
}
@@ -159,7 +148,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_OID_DESCRIPTION;
}
@@ -176,7 +164,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -193,7 +180,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -211,7 +197,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -228,7 +213,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -251,8 +235,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
String lowerValue = toLowerCase(value.stringValue());
return isValidSchemaElement(lowerValue, 0, lowerValue.length(),
diff --git a/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java b/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
index 557b4bb..240ea1e 100644
--- a/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
+++ b/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -52,7 +52,9 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.Schema;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -69,11 +71,6 @@
public class ObjectClassSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.ObjectClassSyntax";
@@ -98,7 +95,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -109,8 +105,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -150,7 +144,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_OBJECTCLASS_NAME;
}
@@ -162,7 +155,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_OBJECTCLASS_OID;
}
@@ -174,7 +166,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_OBJECTCLASS_DESCRIPTION;
}
@@ -186,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -198,7 +188,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -210,7 +199,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -222,7 +210,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -236,8 +223,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll use the decodeObjectClass method to determine if the value is
@@ -249,7 +234,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "valueIsAcceptable", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
invalidReason.append(de.getErrorMessage());
return false;
@@ -285,7 +273,6 @@
boolean allowUnknownElements)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeObjectClass", String.valueOf(value));
// Get string representations of the provided value using the provided form
@@ -882,8 +869,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readTokenName", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -945,8 +930,6 @@
StringBuilder valueBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1036,9 +1019,6 @@
StringBuilder lowerBuffer, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readQuotedString", String.valueOf(valueStr),
- String.valueOf(lowerStr), "java.lang.StringBuilder",
- "java.lang.StringBuilder", String.valueOf(startPos));
// Skip over any spaces at the beginning of the value.
@@ -1122,8 +1102,6 @@
int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readWOID", String.valueOf(lowerStr),
- "java.lang.StringBuilder", String.valueOf(startPos));
@@ -1280,10 +1258,6 @@
List<String> valueList, int startPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "readExtraParameterValues",
- String.valueOf(valueStr),
- "java.util.concurrent.CopyOnWriteArrayList<String>",
- String.valueOf(startPos));
// Skip over any leading spaces.
@@ -1403,8 +1377,6 @@
*/
private static boolean superiorChainIncludesTop(ObjectClass superiorClass)
{
- assert debugEnter(CLASS_NAME, "superiorChainIncludesTop",
- String.valueOf(superiorClass));
if (superiorClass == null)
{
diff --git a/opends/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java
index 0a941a2..a14884d 100644
--- a/opends/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/ObjectIdentifierEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -46,7 +46,6 @@
import org.opends.server.types.ObjectClass;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -63,11 +62,6 @@
public class ObjectIdentifierEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.ObjectIdentifierEqualityMatchingRule";
@@ -78,7 +72,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -100,8 +93,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -116,7 +107,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_OID_NAME;
}
@@ -130,7 +120,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_OID_OID;
}
@@ -145,7 +134,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -161,7 +149,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_OID_OID;
}
@@ -182,7 +169,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -283,8 +269,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// First, compare the normalized values to see if they are the same.
diff --git a/opends/src/server/org/opends/server/schema/ObjectIdentifierFirstComponentEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/ObjectIdentifierFirstComponentEqualityMatchingRule.java
index ac93f6d..0e4a98d 100644
--- a/opends/src/server/org/opends/server/schema/ObjectIdentifierFirstComponentEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/ObjectIdentifierFirstComponentEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -43,9 +43,6 @@
import org.opends.server.types.NameForm;
import org.opends.server.types.ObjectClass;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -62,11 +59,6 @@
public class ObjectIdentifierFirstComponentEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.schema." +
- "ObjectIdentifierFirstComponentEqualityMatchingRule";
@@ -77,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -99,8 +90,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -115,7 +104,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_OID_FIRST_COMPONENT_NAME;
}
@@ -129,7 +117,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_OID_FIRST_COMPONENT_OID;
}
@@ -144,7 +131,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -160,7 +146,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_OID_OID;
}
@@ -181,7 +166,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -232,8 +216,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// For this purpose, the first value will be considered the attribute value,
@@ -392,8 +374,6 @@
* @return The hash code generated for the provided attribute value.*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// In this case, we'll always return the same value because the matching
// isn't based on the entire value.
diff --git a/opends/src/server/org/opends/server/schema/OctetStringEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/OctetStringEqualityMatchingRule.java
index 797b4d6..17b89ae 100644
--- a/opends/src/server/org/opends/server/schema/OctetStringEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/OctetStringEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -51,11 +50,6 @@
public class OctetStringEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OctetStringEqualityMatchingRule";
@@ -66,7 +60,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -88,8 +81,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -104,7 +95,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_OCTET_STRING_NAME;
}
@@ -118,7 +108,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_OCTET_STRING_OID;
}
@@ -133,7 +122,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -149,7 +137,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_OCTET_STRING_OID;
}
@@ -170,7 +157,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
return new ASN1OctetString(value.value());
}
@@ -189,8 +175,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
index 0ff9913..dbf0f56 100644
--- a/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/OctetStringOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -37,7 +37,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.util.StaticUtils;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -50,11 +49,6 @@
public class OctetStringOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OctetStringOrderingMatchingRule";
@@ -75,7 +69,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -97,8 +90,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -113,7 +104,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_OCTET_STRING_NAME;
}
@@ -127,7 +117,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_OCTET_STRING_OID;
}
@@ -142,7 +131,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -158,7 +146,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_OCTET_STRING_OID;
}
@@ -179,7 +166,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
return new ASN1OctetString(value.value());
}
@@ -201,8 +187,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -224,8 +208,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(b1),
- String.valueOf(b2));
return StaticUtils.compare(b1, b2);
}
diff --git a/opends/src/server/org/opends/server/schema/OctetStringSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/OctetStringSubstringMatchingRule.java
index f583f73..0c618c5 100644
--- a/opends/src/server/org/opends/server/schema/OctetStringSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/OctetStringSubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -52,11 +51,6 @@
public class OctetStringSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OctetStringSubstringMatchingRule";
@@ -67,7 +61,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -89,8 +82,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -105,7 +96,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_OCTET_STRING_NAME;
}
@@ -119,7 +109,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_OCTET_STRING_OID;
}
@@ -134,7 +123,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -150,7 +138,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -171,7 +158,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
return new ASN1OctetString(value.value());
}
@@ -192,7 +178,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// This is exactly the same as normalizing a full value.
return new ASN1OctetString(substring.value());
@@ -221,9 +206,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/OctetStringSyntax.java b/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
index 633ff2c..fb0f789 100644
--- a/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/OctetStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class OctetStringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OctetStringSyntax";
@@ -85,7 +79,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -143,7 +134,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_OCTET_STRING_NAME;
}
@@ -157,7 +147,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_OCTET_STRING_OID;
}
@@ -171,7 +160,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_OCTET_STRING_DESCRIPTION;
}
@@ -188,7 +176,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +192,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +208,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +224,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +246,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the octet string syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java b/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
index e088189..e9dc274 100644
--- a/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
+++ b/opends/src/server/org/opends/server/schema/OtherMailboxSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class OtherMailboxSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.OtherMailboxSyntax";
@@ -83,7 +77,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -101,8 +94,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_LIST_OID);
@@ -132,7 +123,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_OTHER_MAILBOX_NAME;
}
@@ -146,7 +136,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_OTHER_MAILBOX_OID;
}
@@ -160,7 +149,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_OTHER_MAILBOX_DESCRIPTION;
}
@@ -177,7 +165,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -194,7 +181,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// Ordering matching is not allowed by default.
return null;
@@ -212,7 +198,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -229,7 +214,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matching is not allowed by default.
return null;
@@ -252,8 +236,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Check to see if the provided value was null. If so, then that's not
diff --git a/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java b/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
index 9f8d7b4..3b54901 100644
--- a/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
+++ b/opends/src/server/org/opends/server/schema/PostalAddressSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -58,11 +57,6 @@
public class PostalAddressSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.PostalAddressSyntax";
@@ -84,7 +78,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -102,8 +95,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -133,7 +124,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_POSTAL_ADDRESS_NAME;
}
@@ -147,7 +137,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_POSTAL_ADDRESS_OID;
}
@@ -161,7 +150,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_POSTAL_ADDRESS_DESCRIPTION;
}
@@ -178,7 +166,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -195,7 +182,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// Ordering matching will not be allowed by default.
return null;
@@ -213,7 +199,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -230,7 +215,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matching will not be allowed by default.
return null;
@@ -253,8 +237,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We'll allow any value.
return true;
diff --git a/opends/src/server/org/opends/server/schema/PresentationAddressEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/PresentationAddressEqualityMatchingRule.java
index 78792a6..5c7f3c6 100644
--- a/opends/src/server/org/opends/server/schema/PresentationAddressEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/PresentationAddressEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -53,12 +52,6 @@
public class PresentationAddressEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.PresentationAddressEqualityMatchingRule";
-
/**
@@ -68,7 +61,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -90,8 +82,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -106,7 +96,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_PRESENTATION_ADDRESS_NAME;
}
@@ -120,7 +109,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_PRESENTATION_ADDRESS_OID;
}
@@ -135,7 +123,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -151,7 +138,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_PRESENTATION_ADDRESS_OID;
}
@@ -172,7 +158,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -223,8 +208,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java b/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
index 17bb2e8..5b89c9f 100644
--- a/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
+++ b/opends/src/server/org/opends/server/schema/PresentationAddressSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class PresentationAddressSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.PresentationAddressSyntax";
@@ -88,7 +82,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -106,8 +99,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
DirectoryServer.getApproximateMatchingRule(AMR_DOUBLE_METAPHONE_OID);
@@ -155,7 +146,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_PRESENTATION_ADDRESS_NAME;
}
@@ -169,7 +159,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_PRESENTATION_ADDRESS_OID;
}
@@ -183,7 +172,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_PRESENTATION_ADDRESS_DESCRIPTION;
}
@@ -200,7 +188,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -217,7 +204,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -234,7 +220,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -251,7 +236,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -273,8 +257,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We will accept any value for this syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/PrintableString.java b/opends/src/server/org/opends/server/schema/PrintableString.java
index 9c28007..c39c677 100644
--- a/opends/src/server/org/opends/server/schema/PrintableString.java
+++ b/opends/src/server/org/opends/server/schema/PrintableString.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
-import static org.opends.server.loggers.Debug.*;
@@ -41,11 +40,6 @@
*/
public class PrintableString
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.PrintableString";
@@ -59,7 +53,6 @@
*/
public static boolean isPrintableCharacter(char c)
{
- assert debugEnter(CLASS_NAME, "isPrintableCharacter", String.valueOf(c));
switch (c)
{
@@ -155,7 +148,6 @@
*/
public static boolean isPrintableString(String s)
{
- assert debugEnter(CLASS_NAME, "isPrintableString", String.valueOf(s));
if (s == null)
{
diff --git a/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java b/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
index 125e4df..abb9e4e 100644
--- a/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
+++ b/opends/src/server/org/opends/server/schema/PrintableStringSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -58,11 +57,6 @@
public class PrintableStringSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.PrintableStringSyntax";
@@ -90,7 +84,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -108,8 +101,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
DirectoryServer.getApproximateMatchingRule(AMR_DOUBLE_METAPHONE_OID);
@@ -157,7 +148,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_PRINTABLE_STRING_NAME;
}
@@ -171,7 +161,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_PRINTABLE_STRING_OID;
}
@@ -185,7 +174,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_PRINTABLE_STRING_DESCRIPTION;
}
@@ -202,7 +190,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -219,7 +206,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -236,7 +222,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -253,7 +238,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -275,8 +259,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Check to see if the provided value was null. If so, then that's not
diff --git a/opends/src/server/org/opends/server/schema/ProtocolInformationEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/ProtocolInformationEqualityMatchingRule.java
index 4489242..411a4ab 100644
--- a/opends/src/server/org/opends/server/schema/ProtocolInformationEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/ProtocolInformationEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -53,11 +52,6 @@
public class ProtocolInformationEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.ProtocolInformationEqualityMatchingRule";
@@ -68,7 +62,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -90,8 +83,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -106,7 +97,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_PROTOCOL_INFORMATION_NAME;
}
@@ -120,7 +110,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_PROTOCOL_INFORMATION_OID;
}
@@ -135,7 +124,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -151,7 +139,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_PROTOCOL_INFORMATION_OID;
}
@@ -172,7 +159,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -223,8 +209,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java b/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
index cd3caf0..1831b2f 100644
--- a/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
+++ b/opends/src/server/org/opends/server/schema/ProtocolInformationSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class ProtocolInformationSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.ProtocolInformationSyntax";
@@ -88,7 +82,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -106,8 +99,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultApproximateMatchingRule =
DirectoryServer.getApproximateMatchingRule(AMR_DOUBLE_METAPHONE_OID);
@@ -155,7 +146,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_PROTOCOL_INFORMATION_NAME;
}
@@ -169,7 +159,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_PROTOCOL_INFORMATION_OID;
}
@@ -183,7 +172,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_PROTOCOL_INFORMATION_DESCRIPTION;
}
@@ -200,7 +188,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -217,7 +204,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -234,7 +220,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -251,7 +236,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return defaultApproximateMatchingRule;
}
@@ -273,8 +257,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We will accept any value for this syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java b/opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java
index 227f3b7..b5c3230 100644
--- a/opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java
+++ b/opends/src/server/org/opends/server/schema/RFC3672SubtreeSpecificationSyntax.java
@@ -22,13 +22,14 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.logError;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -56,11 +57,6 @@
*/
public final class RFC3672SubtreeSpecificationSyntax extends
AttributeSyntax {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- RFC3672SubtreeSpecificationSyntax.class.getName();
// The default equality matching rule for this syntax.
private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -136,8 +132,6 @@
*/
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException {
- assert debugEnter(CLASS_NAME, "initializeSyntax", String
- .valueOf(configEntry));
defaultEqualityMatchingRule = DirectoryServer
.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -170,7 +164,6 @@
* @return The common name for this attribute syntax.
*/
public String getSyntaxName() {
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_RFC3672_SUBTREE_SPECIFICATION_NAME;
}
@@ -181,7 +174,6 @@
* @return The OID for this attribute syntax.
*/
public String getOID() {
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_RFC3672_SUBTREE_SPECIFICATION_OID;
}
@@ -192,7 +184,6 @@
* @return A description for this attribute syntax.
*/
public String getDescription() {
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_RFC3672_SUBTREE_SPECIFICATION_DESCRIPTION;
}
@@ -207,7 +198,6 @@
* default.
*/
public EqualityMatchingRule getEqualityMatchingRule() {
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -222,7 +212,6 @@
* default.
*/
public OrderingMatchingRule getOrderingMatchingRule() {
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -237,7 +226,6 @@
* default.
*/
public SubstringMatchingRule getSubstringMatchingRule() {
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -252,7 +240,6 @@
* default.
*/
public ApproximateMatchingRule getApproximateMatchingRule() {
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -272,8 +259,6 @@
*/
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason) {
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String
- .valueOf(value), "java.lang.StringBuilder");
// Use the subtree specification code to make this determination.
try {
@@ -281,7 +266,10 @@
return true;
} catch (DirectoryException e) {
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
invalidReason.append(e.getErrorMessage());
return false;
diff --git a/opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java b/opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java
index 57e0aa6..7ebcf07 100644
--- a/opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java
+++ b/opends/src/server/org/opends/server/schema/RelativeSubtreeSpecificationSyntax.java
@@ -22,12 +22,13 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
-import static org.opends.server.loggers.Debug.debugEnter;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -56,11 +57,6 @@
*/
public final class RelativeSubtreeSpecificationSyntax extends
AttributeSyntax {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- RelativeSubtreeSpecificationSyntax.class.getName();
// The default equality matching rule for this syntax.
private EqualityMatchingRule defaultEqualityMatchingRule;
@@ -137,8 +133,6 @@
*/
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException {
- assert debugEnter(CLASS_NAME, "initializeSyntax", String
- .valueOf(configEntry));
defaultEqualityMatchingRule = DirectoryServer
.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -171,7 +165,6 @@
* @return The common name for this attribute syntax.
*/
public String getSyntaxName() {
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_RELATIVE_SUBTREE_SPECIFICATION_NAME;
}
@@ -182,7 +175,6 @@
* @return The OID for this attribute syntax.
*/
public String getOID() {
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_RELATIVE_SUBTREE_SPECIFICATION_OID;
}
@@ -193,7 +185,6 @@
* @return A description for this attribute syntax.
*/
public String getDescription() {
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_RELATIVE_SUBTREE_SPECIFICATION_DESCRIPTION;
}
@@ -208,7 +199,6 @@
* default.
*/
public EqualityMatchingRule getEqualityMatchingRule() {
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -223,7 +213,6 @@
* default.
*/
public OrderingMatchingRule getOrderingMatchingRule() {
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -238,7 +227,6 @@
* default.
*/
public SubstringMatchingRule getSubstringMatchingRule() {
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -253,7 +241,6 @@
* default.
*/
public ApproximateMatchingRule getApproximateMatchingRule() {
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -273,8 +260,6 @@
*/
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason) {
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String
- .valueOf(value), "java.lang.StringBuilder");
// Use the subtree specification code to make this determination.
try {
@@ -282,7 +267,10 @@
return true;
} catch (DirectoryException e) {
- assert debugException(CLASS_NAME, "valueIsAcceptable", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
invalidReason.append(e.getErrorMessage());
return false;
diff --git a/opends/src/server/org/opends/server/schema/SchemaConstants.java b/opends/src/server/org/opends/server/schema/SchemaConstants.java
index ee89f1f..f54fa1b 100644
--- a/opends/src/server/org/opends/server/schema/SchemaConstants.java
+++ b/opends/src/server/org/opends/server/schema/SchemaConstants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
diff --git a/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java b/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
index 8d8daee..822a54f 100644
--- a/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
+++ b/opends/src/server/org/opends/server/schema/SubstringAssertionSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class SubstringAssertionSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.SubstringAssertionSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_SUBSTRING_ASSERTION_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_SUBSTRING_ASSERTION_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matching will not be allowed by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get the string representation of the value and check its length. A
diff --git a/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java b/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
index 2c528ca..a85c213 100644
--- a/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
+++ b/opends/src/server/org/opends/server/schema/SupportedAlgorithmSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class SupportedAlgorithmSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.SupportedAlgorithmSyntax";
@@ -86,7 +80,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -104,8 +97,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_OCTET_STRING_OID);
@@ -144,7 +135,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_SUPPORTED_ALGORITHM_NAME;
}
@@ -158,7 +148,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_SUPPORTED_ALGORITHM_OID;
}
@@ -172,7 +161,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_SUPPORTED_ALGORITHM_DESCRIPTION;
}
@@ -189,7 +177,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -206,7 +193,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -223,7 +209,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -240,7 +225,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -263,8 +247,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// All values will be acceptable for the supported algorithm syntax.
return true;
diff --git a/opends/src/server/org/opends/server/schema/TelephoneNumberEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/TelephoneNumberEqualityMatchingRule.java
index 6d9e2d4..308cea5 100644
--- a/opends/src/server/org/opends/server/schema/TelephoneNumberEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/TelephoneNumberEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -53,12 +52,6 @@
public class TelephoneNumberEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.TelephoneNumberEqualityMatchingRule";
-
/**
@@ -68,7 +61,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -90,8 +82,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -106,7 +96,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_TELEPHONE_NAME;
}
@@ -120,7 +109,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_TELEPHONE_OID;
}
@@ -135,7 +123,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -151,7 +138,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_TELEPHONE_OID;
}
@@ -172,7 +158,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int valueLength = valueString.length();
@@ -208,8 +193,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java b/opends/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java
index f483f30..22fdef3 100644
--- a/opends/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/TelephoneNumberSubstringMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -53,11 +52,6 @@
public class TelephoneNumberSubstringMatchingRule
extends SubstringMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.TelephoneNumberSubstringMatchingRule";
@@ -69,7 +63,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -91,8 +84,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -107,7 +98,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return SMR_TELEPHONE_NAME;
}
@@ -121,7 +111,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SMR_TELEPHONE_OID;
}
@@ -136,7 +125,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -152,7 +140,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_SUBSTRING_ASSERTION_OID;
}
@@ -173,7 +160,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue();
int valueLength = valueString.length();
@@ -211,7 +197,6 @@
public ByteString normalizeSubstring(ByteString substring)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeSubstring");
// In this case, the logic used to normalize a substring is identical to the
@@ -242,9 +227,6 @@
List<ByteString> subAnyElements,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "valueMatchesSubstring",
- String.valueOf(value), String.valueOf(subInitial),
- String.valueOf(subAnyElements), String.valueOf(subFinal));
byte[] valueBytes = value.value();
diff --git a/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java b/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
index d6acd0b..86ec54e 100644
--- a/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
+++ b/opends/src/server/org/opends/server/schema/TelephoneNumberSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -51,7 +51,9 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -72,11 +74,6 @@
extends AttributeSyntax
implements ConfigurableComponent
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.TelephoneNumberSyntax";
@@ -104,7 +101,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -122,8 +118,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_TELEPHONE_OID);
@@ -170,7 +164,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "initializeSyntax", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -188,7 +185,6 @@
*/
public void finalizeSyntax()
{
- assert debugEnter(CLASS_NAME, "finalizeSyntax");
DirectoryServer.deregisterConfigurableComponent(this);
}
@@ -202,7 +198,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_TELEPHONE_NAME;
}
@@ -216,7 +211,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_TELEPHONE_OID;
}
@@ -230,7 +224,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_TELEPHONE_DESCRIPTION;
}
@@ -247,7 +240,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -264,7 +256,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -282,7 +273,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -299,7 +289,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -322,8 +311,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// No matter what, the value can't be empty or null.
@@ -416,7 +403,6 @@
*/
private boolean isSeparator(char c)
{
- assert debugEnter(CLASS_NAME, "isSeparator", String.valueOf(c));
switch (c)
{
@@ -439,7 +425,6 @@
*/
public DN getConfigurableComponentEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigurableComponentEntryDN");
return configEntryDN;
}
@@ -455,7 +440,6 @@
*/
public List<ConfigAttribute> getConfigurationAttributes()
{
- assert debugEnter(CLASS_NAME, "getConfigurationAttributes");
LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
@@ -487,8 +471,6 @@
public boolean hasAcceptableConfiguration(ConfigEntry configEntry,
List<String> unacceptableReasons)
{
- assert debugEnter(CLASS_NAME, "hasAcceptableConfiguration",
- String.valueOf(configEntry), "java.util.List<String>");
boolean configIsAcceptable = true;
@@ -510,7 +492,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
String message = getMessage(msgID, String.valueOf(configEntryDN),
@@ -544,9 +529,6 @@
public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry,
boolean detailedResults)
{
- assert debugEnter(CLASS_NAME, "applyNewConfiguration",
- String.valueOf(configEntry),
- String.valueOf(detailedResults));
ResultCode resultCode = ResultCode.SUCCESS;
@@ -580,7 +562,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hasAcceptableConfiguration", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
msgID = MSGID_ATTR_SYNTAX_TELEPHONE_CANNOT_DETERMINE_STRICT_MODE;
messages.add(getMessage(msgID, String.valueOf(configEntryDN),
diff --git a/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java b/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
index 71836d6..734ca26 100644
--- a/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
+++ b/opends/src/server/org/opends/server/schema/TeletexTerminalIdentifierSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -69,11 +68,6 @@
public class TeletexTerminalIdentifierSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.TeletexTerminalIdentifierSyntax";
@@ -116,7 +110,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -134,8 +127,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -174,7 +165,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_TELETEX_TERM_ID_NAME;
}
@@ -188,7 +178,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_TELETEX_TERM_ID_OID;
}
@@ -202,7 +191,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_TELETEX_TERM_ID_DESCRIPTION;
}
@@ -219,7 +207,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -236,7 +223,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -253,7 +239,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -270,7 +255,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -293,8 +277,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a lowercase string representation of the value and find its length.
diff --git a/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java b/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
index a51b4f9..1e31f85 100644
--- a/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
+++ b/opends/src/server/org/opends/server/schema/TelexNumberSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -56,11 +55,6 @@
public class TelexNumberSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.TelexNumberSyntax";
@@ -85,7 +79,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_CASE_IGNORE_OID);
@@ -143,7 +134,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_TELEX_NAME;
}
@@ -157,7 +147,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_TELEX_OID;
}
@@ -171,7 +160,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_TELEX_DESCRIPTION;
}
@@ -188,7 +176,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -205,7 +192,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -222,7 +208,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -239,7 +224,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -262,8 +246,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get a string representation of the value and find its length.
diff --git a/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java b/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
index 3a96055..f544902 100644
--- a/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
+++ b/opends/src/server/org/opends/server/schema/UTCTimeSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -49,8 +49,10 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -69,11 +71,6 @@
public class UTCTimeSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UTCTimeSyntax";
@@ -129,7 +126,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -147,8 +143,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_GENERALIZED_TIME_OID);
@@ -187,7 +181,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_UTC_TIME_NAME;
}
@@ -201,7 +194,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_UTC_TIME_OID;
}
@@ -215,7 +207,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_UTC_TIME_DESCRIPTION;
}
@@ -232,7 +223,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -249,7 +239,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -266,7 +255,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return defaultSubstringMatchingRule;
}
@@ -283,7 +271,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// Approximate matching will not be allowed by default.
return null;
@@ -306,8 +293,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// Get the value as a string and verify that it is at least long enough for
@@ -770,8 +755,6 @@
private boolean hasValidOffset(String value, int startPos,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "hasValidOffset", String.valueOf(value),
- String.valueOf(startPos), "java.lang.StringBuilder");
int offsetLength = value.length() - startPos;
@@ -899,8 +882,6 @@
*/
public static AttributeValue createUTCTimeValue(Date d)
{
- assert debugEnter(CLASS_NAME, "createUTCTimeValue",
- String.valueOf(d));
String valueString;
@@ -912,7 +893,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createUTCTimevalue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
valueString = null;
@@ -944,8 +928,6 @@
public static Date decodeUTCTimeValue(ByteString normalizedValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeUTCTimeValue",
- String.valueOf(normalizedValue));
String valueString = normalizedValue.stringValue();
try
@@ -968,7 +950,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decodeUTCTimeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_UTC_TIME_CANNOT_PARSE;
String message = getMessage(msgID, valueString, String.valueOf(e));
diff --git a/opends/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java
index 283f19d..273d1e5 100644
--- a/opends/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/UUIDEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -57,11 +56,6 @@
public class UUIDEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UUIDEqualityMatchingRule";
@@ -72,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -94,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -110,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_UUID_NAME;
}
@@ -124,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_UUID_OID;
}
@@ -139,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -155,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_UUID_OID;
}
@@ -176,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
byte[] valueBytes = value.value();
if (valueBytes.length != 36)
@@ -307,8 +293,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java b/opends/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
index 234d932..cccc008 100644
--- a/opends/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/UUIDOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,12 +40,10 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
-import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +54,6 @@
public class UUIDOrderingMatchingRule
extends OrderingMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UUIDOrderingMatchingRule";
@@ -81,7 +74,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +95,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -119,7 +109,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return OMR_UUID_NAME;
}
@@ -133,7 +122,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return OMR_UUID_OID;
}
@@ -148,7 +136,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -164,7 +151,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_UUID_OID;
}
@@ -185,7 +171,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
byte[] valueBytes = value.value();
if (valueBytes.length != 36)
@@ -319,8 +304,6 @@
*/
public int compareValues(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(value1),
- String.valueOf(value2));
return compare(value1.value(), value2.value());
}
@@ -342,8 +325,6 @@
*/
public int compare(byte[] b1, byte[] b2)
{
- assert debugEnter(CLASS_NAME, "compareValues", String.valueOf(b1),
- String.valueOf(b2));
int minLength = Math.min(b1.length, b2.length);
diff --git a/opends/src/server/org/opends/server/schema/UUIDSyntax.java b/opends/src/server/org/opends/server/schema/UUIDSyntax.java
index e72e96f..ed29215 100644
--- a/opends/src/server/org/opends/server/schema/UUIDSyntax.java
+++ b/opends/src/server/org/opends/server/schema/UUIDSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -40,7 +40,6 @@
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -55,11 +54,6 @@
public class UUIDSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UUIDSyntax";
@@ -81,7 +75,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -99,8 +92,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_UUID_OID);
@@ -130,7 +121,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_UUID_NAME;
}
@@ -144,7 +134,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_UUID_OID;
}
@@ -158,7 +147,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_UUID_DESCRIPTION;
}
@@ -175,7 +163,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -192,7 +179,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return defaultOrderingMatchingRule;
}
@@ -209,7 +195,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
// There is no substring matching rule by default.
return null;
@@ -227,7 +212,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -250,8 +234,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We will only accept values that look like valid UUIDs. This means that
@@ -267,7 +249,6 @@
return false;
}
-
// Next, iterate through each character. Make sure that the 9th, 14th,
// 19th, and 24th characters are dashes and the rest are hex digits.
for (int i=0; i < 36; i++)
diff --git a/opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
index 5ff34f1..a3cfe82 100644
--- a/opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/UniqueMemberEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -43,8 +43,10 @@
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.loggers.Error.*;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -61,11 +63,6 @@
public class UniqueMemberEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UniqueMemberEqualityMatchingRule";
@@ -76,7 +73,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -98,8 +94,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -114,7 +108,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_UNIQUE_MEMBER_NAME;
}
@@ -128,7 +121,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_UNIQUE_MEMBER_OID;
}
@@ -143,7 +135,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -159,7 +150,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_NAME_AND_OPTIONAL_UID_OID;
}
@@ -180,7 +170,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
String valueString = value.stringValue().trim();
@@ -211,12 +200,15 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "normalizeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize the DN for some reason. If we're supposed to use
// strict syntax enforcement, then throw an exception. Otherwise, log a
// message and just try our best.
- int msgID = MSGID_ATTR_SYNTAX_NAMEANDUID_INVALID_DN;
+ int msgID = MSGID_ATTR_SYNTAX_NAMEANDUID_INVALID_DN;
String message = getMessage(msgID, valueString,
stackTraceToSingleLineString(e));
@@ -300,8 +292,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
index 1907130..1025f5e 100644
--- a/opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/UserPasswordEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,9 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.schema.SchemaConstants.*;
@@ -54,11 +56,6 @@
public class UserPasswordEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UserPasswordEqualityMatchingRule";
@@ -69,7 +66,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -91,8 +87,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -107,7 +101,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_USER_PASSWORD_NAME;
}
@@ -121,7 +114,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_USER_PASSWORD_OID;
}
@@ -136,7 +128,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return EMR_USER_PASSWORD_DESCRIPTION;
@@ -152,7 +143,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_USER_PASSWORD_OID;
}
@@ -173,7 +163,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
// We will not alter the value in any way, but we'll create a new value
@@ -199,8 +188,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
@@ -227,9 +214,6 @@
public ConditionResult valuesMatch(ByteString attributeValue,
ByteString assertionValue)
{
- assert debugEnter(CLASS_NAME, "valuesMatch",
- String.valueOf(attributeValue),
- String.valueOf(assertionValue));
// We must be able to decode the attribute value using the user password
@@ -242,7 +226,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "valuesMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return ConditionResult.FALSE;
}
@@ -289,8 +276,6 @@
*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// Because of the variable encoding that may be used, we have no way of
diff --git a/opends/src/server/org/opends/server/schema/UserPasswordExactEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/UserPasswordExactEqualityMatchingRule.java
index b1b5422..ec844cd 100644
--- a/opends/src/server/org/opends/server/schema/UserPasswordExactEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/UserPasswordExactEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -38,7 +38,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
@@ -51,11 +50,6 @@
public class UserPasswordExactEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UserPasswordExactEqualityMatchingRule";
@@ -66,7 +60,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -88,8 +81,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -104,7 +95,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_USER_PASSWORD_EXACT_NAME;
}
@@ -118,7 +108,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_USER_PASSWORD_EXACT_OID;
}
@@ -133,7 +122,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return EMR_USER_PASSWORD_EXACT_DESCRIPTION;
@@ -149,7 +137,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_USER_PASSWORD_OID;
}
@@ -170,7 +157,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
// The normalized form of this matching rule is exactly equal to the
@@ -288,8 +274,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// Since the values are already normalized, we just need to compare the
// associated byte arrays.
diff --git a/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java b/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
index c63c75e..94f64d3 100644
--- a/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
+++ b/opends/src/server/org/opends/server/schema/UserPasswordSyntax.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -42,7 +42,6 @@
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.ResultCode;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
@@ -67,11 +66,6 @@
public class UserPasswordSyntax
extends AttributeSyntax
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.UserPasswordSyntax";
@@ -90,7 +84,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -108,8 +101,6 @@
public void initializeSyntax(ConfigEntry configEntry)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "initializeSyntax",
- String.valueOf(configEntry));
defaultEqualityMatchingRule =
DirectoryServer.getEqualityMatchingRule(EMR_USER_PASSWORD_EXACT_OID);
@@ -130,7 +121,6 @@
*/
public String getSyntaxName()
{
- assert debugEnter(CLASS_NAME, "getSyntaxName");
return SYNTAX_USER_PASSWORD_NAME;
}
@@ -144,7 +134,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return SYNTAX_USER_PASSWORD_OID;
}
@@ -158,7 +147,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return SYNTAX_USER_PASSWORD_DESCRIPTION;
}
@@ -175,7 +163,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return defaultEqualityMatchingRule;
}
@@ -192,7 +179,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
// There is no ordering matching rule by default.
return null;
@@ -210,7 +196,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
// There is no substring matching rule by default.
return null;
@@ -228,7 +213,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
// There is no approximate matching rule by default.
return null;
@@ -251,8 +235,6 @@
public boolean valueIsAcceptable(ByteString value,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "valueIsAcceptable", String.valueOf(value),
- "java.lang.StringBuilder");
// We have to accept any value here because in many cases the value will not
@@ -277,8 +259,6 @@
public static String[] decodeUserPassword(String userPasswordValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeUserPassword",
- String.valueOf(userPasswordValue));
// Make sure that there actually is a value to decode.
@@ -341,7 +321,6 @@
*/
public static boolean isEncoded(ByteString value)
{
- assert debugEnter(CLASS_NAME, "isEncoded", String.valueOf(value));
// If the value is null or empty, then it's not.
diff --git a/opends/src/server/org/opends/server/schema/WordEqualityMatchingRule.java b/opends/src/server/org/opends/server/schema/WordEqualityMatchingRule.java
index b564813..93a6713 100644
--- a/opends/src/server/org/opends/server/schema/WordEqualityMatchingRule.java
+++ b/opends/src/server/org/opends/server/schema/WordEqualityMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.schema;
@@ -37,7 +37,6 @@
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.schema.SchemaConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -66,11 +65,6 @@
public class WordEqualityMatchingRule
extends EqualityMatchingRule
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.schema.WordEqualityMatchingRule";
@@ -81,7 +75,6 @@
{
super();
- assert debugConstructor(CLASS_NAME);
}
@@ -103,8 +96,6 @@
public void initializeMatchingRule(ConfigEntry configEntry)
throws ConfigException, InitializationException
{
- assert debugEnter(CLASS_NAME, "initializeMatchingRule",
- String.valueOf(configEntry));
// No initialization is required.
}
@@ -119,7 +110,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return EMR_WORD_NAME;
}
@@ -133,7 +123,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return EMR_WORD_OID;
}
@@ -148,7 +137,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
// There is no standard description for this matching rule.
return null;
@@ -164,7 +152,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return SYNTAX_DIRECTORY_STRING_OID;
}
@@ -185,7 +172,6 @@
public ByteString normalizeValue(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalizeValue", String.valueOf(value));
StringBuilder buffer = new StringBuilder();
toLowerCase(value.value(), buffer, true);
@@ -236,8 +222,6 @@
*/
public boolean areEqual(ByteString value1, ByteString value2)
{
- assert debugEnter(CLASS_NAME, "areEqual", String.valueOf(value1),
- String.valueOf(value2));
// For this purpose, the first value will be considered the attribute value,
@@ -323,8 +307,6 @@
* @return The hash code generated for the provided attribute value.*/
public int generateHashCode(AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(attributeValue));
// In this case, we'll always return the same value because the matching
// isn't based on the entire value.
diff --git a/opends/src/server/org/opends/server/schema/package-info.java b/opends/src/server/org/opends/server/schema/package-info.java
index f67b6d8..b79640f 100644
--- a/opends/src/server/org/opends/server/schema/package-info.java
+++ b/opends/src/server/org/opends/server/schema/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/AckMessageList.java b/opends/src/server/org/opends/server/synchronization/changelog/AckMessageList.java
index 7527599..9ec4858 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/AckMessageList.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/AckMessageList.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/AckMessageListComparator.java b/opends/src/server/org/opends/server/synchronization/changelog/AckMessageListComparator.java
index a287b39..ca9288f 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/AckMessageListComparator.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/AckMessageListComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogAckMessageList.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogAckMessageList.java
index 0788ec3..aeda2ca 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogAckMessageList.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogAckMessageList.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDBException.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDBException.java
index a226de2..8e48e87 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDBException.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDBException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogData.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogData.java
index aa38563..70b44d0 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogData.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogData.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDbEnv.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDbEnv.java
index 4fe79d4..899ed59 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDbEnv.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogDbEnv.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIterator.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIterator.java
index 2a595a5..97a413f 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIterator.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIterator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIteratorComparator.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIteratorComparator.java
index 71dff9c..fe7632b 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIteratorComparator.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogIteratorComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogKey.java b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogKey.java
index 6c3ab5c..fb91ddb 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ChangelogKey.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ChangelogKey.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/MsgQueue.java b/opends/src/server/org/opends/server/synchronization/changelog/MsgQueue.java
index f411515..09a1b0a 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/MsgQueue.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/MsgQueue.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ServerHandler.java b/opends/src/server/org/opends/server/synchronization/changelog/ServerHandler.java
index c78d537..d3b5393 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ServerHandler.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ServerHandler.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ServerReader.java b/opends/src/server/org/opends/server/synchronization/changelog/ServerReader.java
index 1435bd2..3473f29 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ServerReader.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ServerReader.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/ServerWriter.java b/opends/src/server/org/opends/server/synchronization/changelog/ServerWriter.java
index f68db9c..f3a1ced 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/ServerWriter.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/ServerWriter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/UpdateComparator.java b/opends/src/server/org/opends/server/synchronization/changelog/UpdateComparator.java
index d3e3f06..8912451 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/UpdateComparator.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/UpdateComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.changelog;
diff --git a/opends/src/server/org/opends/server/synchronization/changelog/package-info.java b/opends/src/server/org/opends/server/synchronization/changelog/package-info.java
index 5d35f51..fabaa14 100644
--- a/opends/src/server/org/opends/server/synchronization/changelog/package-info.java
+++ b/opends/src/server/org/opends/server/synchronization/changelog/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
/**
diff --git a/opends/src/server/org/opends/server/synchronization/common/ChangeNumber.java b/opends/src/server/org/opends/server/synchronization/common/ChangeNumber.java
index 710f6a8..f5d566a 100644
--- a/opends/src/server/org/opends/server/synchronization/common/ChangeNumber.java
+++ b/opends/src/server/org/opends/server/synchronization/common/ChangeNumber.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.common;
diff --git a/opends/src/server/org/opends/server/synchronization/common/ServerState.java b/opends/src/server/org/opends/server/synchronization/common/ServerState.java
index a0b8346..16eeb5e 100644
--- a/opends/src/server/org/opends/server/synchronization/common/ServerState.java
+++ b/opends/src/server/org/opends/server/synchronization/common/ServerState.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.common;
diff --git a/opends/src/server/org/opends/server/synchronization/common/package-info.java b/opends/src/server/org/opends/server/synchronization/common/package-info.java
index 47307c4..cbe976e 100644
--- a/opends/src/server/org/opends/server/synchronization/common/package-info.java
+++ b/opends/src/server/org/opends/server/synchronization/common/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
/**
diff --git a/opends/src/server/org/opends/server/synchronization/package-info.java b/opends/src/server/org/opends/server/synchronization/package-info.java
index 02142d0..9058eb0 100644
--- a/opends/src/server/org/opends/server/synchronization/package-info.java
+++ b/opends/src/server/org/opends/server/synchronization/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
/**
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/AttrInfo.java b/opends/src/server/org/opends/server/synchronization/plugin/AttrInfo.java
index 90c7d91..408ba62 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/AttrInfo.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/AttrInfo.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/AttrInfoWithOptions.java b/opends/src/server/org/opends/server/synchronization/plugin/AttrInfoWithOptions.java
index ef00977..0bd8357 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/AttrInfoWithOptions.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/AttrInfoWithOptions.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/FakeOperation.java b/opends/src/server/org/opends/server/synchronization/plugin/FakeOperation.java
index 2cf5bed..1629815 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/FakeOperation.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/FakeOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/FakeOperationComparator.java b/opends/src/server/org/opends/server/synchronization/plugin/FakeOperationComparator.java
index 7c23ce1..9d16e11 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/FakeOperationComparator.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/FakeOperationComparator.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java b/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
index 2065217..65147be 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/HeartbeatMonitor.java
@@ -29,10 +29,8 @@
import org.opends.server.api.DirectoryThread;
import org.opends.server.synchronization.protocol.ProtocolSession;
-import static org.opends.server.loggers.Debug.debugMessage;
-import static org.opends.server.types.DebugLogCategory.SYNCHRONIZATION;
-import static org.opends.server.types.DebugLogSeverity.INFO;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
import java.io.IOException;
/**
@@ -41,11 +39,6 @@
*/
public class HeartbeatMonitor extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.synchronization.plugin.HeartbeatMonitor";
/**
@@ -97,9 +90,11 @@
@Override
public void run()
{
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat monitor is starting, expected interval is "
- + heartbeatInterval);
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat monitor is starting, expected interval is %d",
+ heartbeatInterval);
+ }
try
{
while (!shutdown)
@@ -109,10 +104,11 @@
if (now > lastReceiveTime + 2 * heartbeatInterval)
{
// Heartbeat is well overdue so the server is assumed to be dead.
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat monitor is closing the broker " +
- "session because it could not detect a " +
- "heartbeat.");
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat monitor is closing the broker session " +
+ "because it could not detect a heartbeat.");
+ }
session.close();
break;
}
@@ -132,8 +128,10 @@
}
finally
{
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat monitor is exiting.");
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat monitor is exiting.");
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/HistKey.java b/opends/src/server/org/opends/server/synchronization/plugin/HistKey.java
index 210d50f..eabf389 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/HistKey.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/HistKey.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/HistVal.java b/opends/src/server/org/opends/server/synchronization/plugin/HistVal.java
index 579f025..42614ed 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/HistVal.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/HistVal.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/Historical.java b/opends/src/server/org/opends/server/synchronization/plugin/Historical.java
index df26d97..14b5894 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/Historical.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/Historical.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/HistoricalCsnOrderingMatchingRule.java b/opends/src/server/org/opends/server/synchronization/plugin/HistoricalCsnOrderingMatchingRule.java
index ad23fd8..5a612ee 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/HistoricalCsnOrderingMatchingRule.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/HistoricalCsnOrderingMatchingRule.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/ListenerThread.java b/opends/src/server/org/opends/server/synchronization/plugin/ListenerThread.java
index 609df93..34d5b95 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/ListenerThread.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/ListenerThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/ModifyFakeOperation.java b/opends/src/server/org/opends/server/synchronization/plugin/ModifyFakeOperation.java
index bcdfb17..0e7496a 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/ModifyFakeOperation.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/ModifyFakeOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/MultimasterSynchronization.java b/opends/src/server/org/opends/server/synchronization/plugin/MultimasterSynchronization.java
index 2a3210d..54ad15b 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/MultimasterSynchronization.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/MultimasterSynchronization.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/PendingChange.java b/opends/src/server/org/opends/server/synchronization/plugin/PendingChange.java
index 328e7eb..78f44ff 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/PendingChange.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/PendingChange.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/SynchronizationMonitor.java b/opends/src/server/org/opends/server/synchronization/plugin/SynchronizationMonitor.java
index 5a1dc30..e37a5b2 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/SynchronizationMonitor.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/SynchronizationMonitor.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/ValueInfo.java b/opends/src/server/org/opends/server/synchronization/plugin/ValueInfo.java
index e1ed7a8..334b98c 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/ValueInfo.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/ValueInfo.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.plugin;
diff --git a/opends/src/server/org/opends/server/synchronization/plugin/package-info.java b/opends/src/server/org/opends/server/synchronization/plugin/package-info.java
index 51330f9..7751bda 100644
--- a/opends/src/server/org/opends/server/synchronization/plugin/package-info.java
+++ b/opends/src/server/org/opends/server/synchronization/plugin/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
/**
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
index e9c5f55..7d7d4ed 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/AckMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/AddContext.java b/opends/src/server/org/opends/server/synchronization/protocol/AddContext.java
index 9859af9..796793c 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/AddContext.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/AddContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/AddMsg.java b/opends/src/server/org/opends/server/synchronization/protocol/AddMsg.java
index 6cc8fb2..b4ef2f8 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/AddMsg.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/AddMsg.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ChangelogStartMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/ChangelogStartMessage.java
index 2684c12..7fbe340 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ChangelogStartMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ChangelogStartMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/DeleteContext.java b/opends/src/server/org/opends/server/synchronization/protocol/DeleteContext.java
index ae1dabc..6e7f6a7 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/DeleteContext.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/DeleteContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/DeleteMsg.java b/opends/src/server/org/opends/server/synchronization/protocol/DeleteMsg.java
index e3d17b4..e3b362e 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/DeleteMsg.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/DeleteMsg.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/HeartbeatThread.java b/opends/src/server/org/opends/server/synchronization/protocol/HeartbeatThread.java
index 1121dad..19ce2a1 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/HeartbeatThread.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/HeartbeatThread.java
@@ -28,10 +28,9 @@
package org.opends.server.synchronization.protocol;
import org.opends.server.api.DirectoryThread;
-import static org.opends.server.loggers.Debug.debugMessage;
-import static org.opends.server.types.DebugLogCategory.SYNCHRONIZATION;
-import static org.opends.server.types.DebugLogSeverity.INFO;
-import static org.opends.server.types.DebugLogSeverity.VERBOSE;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
import java.io.IOException;
@@ -42,12 +41,6 @@
*/
public class HeartbeatThread extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.synchronization.plugin.HeartbeatThread";
-
/**
* For test purposes only to simulate loss of heartbeats.
@@ -95,25 +88,30 @@
{
try
{
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat thread is starting, interval is " +
- heartbeatInterval);
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat thread is starting, interval is %d",
+ heartbeatInterval);
+ }
HeartbeatMessage heartbeatMessage = new HeartbeatMessage();
while (!shutdown)
{
long now = System.currentTimeMillis();
- debugMessage(SYNCHRONIZATION, VERBOSE, CLASS_NAME, "run",
- "Heartbeat thread awoke at " + now +
- ", last message was sent at " +
- session.getLastPublishTime());
+ if (debugEnabled())
+ {
+ debugVerbose("Heartbeat thread awoke at %d, last message was sent " +
+ "at %d", now, session.getLastPublishTime());
+ }
if (now > session.getLastPublishTime() + heartbeatInterval)
{
if (!heartbeatsDisabled)
{
- debugMessage(SYNCHRONIZATION, VERBOSE, CLASS_NAME, "run",
- "Heartbeat sent at " + now);
+ if (debugEnabled())
+ {
+ debugVerbose("Heartbeat sent at %d", now);
+ }
session.publish(heartbeatMessage);
}
}
@@ -121,14 +119,16 @@
try
{
long sleepTime = session.getLastPublishTime() +
- heartbeatInterval - now;
+ heartbeatInterval - now;
if (sleepTime <= 0)
{
sleepTime = heartbeatInterval;
}
- debugMessage(SYNCHRONIZATION, VERBOSE, CLASS_NAME, "run",
- "Heartbeat thread sleeping for " + sleepTime);
+ if (debugEnabled())
+ {
+ debugVerbose("Heartbeat thread sleeping for %d", sleepTime);
+ }
Thread.sleep(sleepTime);
}
catch (InterruptedException e)
@@ -139,14 +139,18 @@
}
catch (IOException e)
{
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat thread could not send a heartbeat.");
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat thread could not send a heartbeat.");
+ }
// This will be caught in another thread.
}
finally
{
- debugMessage(SYNCHRONIZATION, INFO, CLASS_NAME, "run",
- "Heartbeat thread is exiting.");
+ if (debugEnabled())
+ {
+ debugInfo("Heartbeat thread is exiting.");
+ }
}
}
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ModifyContext.java b/opends/src/server/org/opends/server/synchronization/protocol/ModifyContext.java
index 93f9f32..dd007d4 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ModifyContext.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ModifyContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ModifyDNMsg.java b/opends/src/server/org/opends/server/synchronization/protocol/ModifyDNMsg.java
index 42b00fe..a427eea 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ModifyDNMsg.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ModifyDNMsg.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ModifyDnContext.java b/opends/src/server/org/opends/server/synchronization/protocol/ModifyDnContext.java
index 3847c43..373ee7b 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ModifyDnContext.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ModifyDnContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ModifyMsg.java b/opends/src/server/org/opends/server/synchronization/protocol/ModifyMsg.java
index 47f2b3b..1b97bab 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ModifyMsg.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ModifyMsg.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/OperationContext.java b/opends/src/server/org/opends/server/synchronization/protocol/OperationContext.java
index e88e32a..a1ff9e7 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/OperationContext.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/OperationContext.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ProtocolSession.java b/opends/src/server/org/opends/server/synchronization/protocol/ProtocolSession.java
index 947243c..47589f6 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ProtocolSession.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ProtocolSession.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/ServerStartMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/ServerStartMessage.java
index 97cf84c..a706721 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/ServerStartMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/ServerStartMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java b/opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java
index 3b1185f..95b7712 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/SynchronizationMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/SynchronizationMessage.java
index 8aab0f5..57364f8 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/SynchronizationMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/SynchronizationMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/UpdateMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/UpdateMessage.java
index 287122c..b039236 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/UpdateMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/UpdateMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/WindowMessage.java b/opends/src/server/org/opends/server/synchronization/protocol/WindowMessage.java
index e2e5f92..1f6f5b9 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/WindowMessage.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/WindowMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.synchronization.protocol;
diff --git a/opends/src/server/org/opends/server/synchronization/protocol/package-info.java b/opends/src/server/org/opends/server/synchronization/protocol/package-info.java
index 705ffcd..c6e6d8e 100644
--- a/opends/src/server/org/opends/server/synchronization/protocol/package-info.java
+++ b/opends/src/server/org/opends/server/synchronization/protocol/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
/**
diff --git a/opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java b/opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java
index 483b4a8..38b9e30 100644
--- a/opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java
+++ b/opends/src/server/org/opends/server/tasks/AddSchemaFileTask.java
@@ -55,7 +55,6 @@
import org.opends.server.types.Schema;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.TaskMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -69,11 +68,6 @@
public class AddSchemaFileTask
extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.AddSchemaFileTask";
@@ -89,7 +83,6 @@
public void initializeTask()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -196,7 +189,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// Obtain a write lock on the server schema so that we can be sure nothing
diff --git a/opends/src/server/org/opends/server/tasks/BackupTask.java b/opends/src/server/org/opends/server/tasks/BackupTask.java
index 9d60704..9c3c4ea 100644
--- a/opends/src/server/org/opends/server/tasks/BackupTask.java
+++ b/opends/src/server/org/opends/server/tasks/BackupTask.java
@@ -26,7 +26,6 @@
*/
package org.opends.server.tasks;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.core.DirectoryServer.getAttributeType;
import static org.opends.server.messages.TaskMessages.*;
@@ -73,11 +72,6 @@
*/
public class BackupTask extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.BackupTask";
@@ -106,7 +100,6 @@
*/
@Override public void initializeTask() throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -541,7 +534,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
if (!argumentsAreValid())
{
diff --git a/opends/src/server/org/opends/server/tasks/ExportTask.java b/opends/src/server/org/opends/server/tasks/ExportTask.java
index 73d0e0a..a93d3fc 100644
--- a/opends/src/server/org/opends/server/tasks/ExportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ExportTask.java
@@ -26,7 +26,6 @@
*/
package org.opends.server.tasks;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.core.DirectoryServer.getAttributeType;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.messages.TaskMessages.*;
@@ -65,11 +64,6 @@
*/
public class ExportTask extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.ExportTask";
@@ -92,7 +86,6 @@
*/
@Override public void initializeTask() throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -204,7 +197,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// See if there were any user-defined sets of include/exclude attributes or
// filters. If so, then process them.
diff --git a/opends/src/server/org/opends/server/tasks/ImportTask.java b/opends/src/server/org/opends/server/tasks/ImportTask.java
index 6321313..3064ddb 100644
--- a/opends/src/server/org/opends/server/tasks/ImportTask.java
+++ b/opends/src/server/org/opends/server/tasks/ImportTask.java
@@ -29,7 +29,9 @@
import static org.opends.server.messages.TaskMessages.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import static org.opends.server.config.ConfigConstants.*;
@@ -66,11 +68,6 @@
*/
public class ImportTask extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.ImportTask";
@@ -97,7 +94,6 @@
*/
@Override public void initializeTask() throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -221,7 +217,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// See if there were any user-defined sets of include/exclude attributes or
// filters. If so, then process them.
@@ -489,7 +484,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
@@ -516,7 +514,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_CANNOT_LOCK_BACKEND;
String message = getMessage(msgID, backend.getBackendID(),
@@ -534,7 +535,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "runTask", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIFIMPORT_ERROR_DURING_IMPORT;
String message = getMessage(msgID, de.getErrorMessage());
@@ -544,7 +548,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_ERROR_DURING_IMPORT;
String message = getMessage(msgID, stackTraceToSingleLineString(e));
@@ -571,7 +578,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIFIMPORT_CANNOT_UNLOCK_BACKEND;
String message = getMessage(msgID, backend.getBackendID(),
@@ -592,7 +602,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
diff --git a/opends/src/server/org/opends/server/tasks/RestartTaskThread.java b/opends/src/server/org/opends/server/tasks/RestartTaskThread.java
index 6a226ee..ac3b712 100644
--- a/opends/src/server/org/opends/server/tasks/RestartTaskThread.java
+++ b/opends/src/server/org/opends/server/tasks/RestartTaskThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tasks;
@@ -30,7 +30,6 @@
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
@@ -52,7 +51,7 @@
extends Thread
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tasks.RestartTaskThread";
@@ -74,7 +73,6 @@
{
super("Restart Task Thread");
- assert debugConstructor(CLASS_NAME, String.valueOf(shutdownMessage));
this.shutdownMessage = shutdownMessage;
}
@@ -86,7 +84,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
DirectoryServer.restart(CLASS_NAME, shutdownMessage);
}
diff --git a/opends/src/server/org/opends/server/tasks/RestoreTask.java b/opends/src/server/org/opends/server/tasks/RestoreTask.java
index 740cf37..6896166 100644
--- a/opends/src/server/org/opends/server/tasks/RestoreTask.java
+++ b/opends/src/server/org/opends/server/tasks/RestoreTask.java
@@ -26,15 +26,15 @@
*/
package org.opends.server.tasks;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.core.DirectoryServer.getAttributeType;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.messages.TaskMessages.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
-import static org.opends.server.loggers.Error.logError;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.backends.task.Task;
import org.opends.server.backends.task.TaskState;
@@ -67,11 +67,6 @@
*/
public class RestoreTask extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.RestoreTask";
@@ -86,7 +81,6 @@
*/
@Override public void initializeTask() throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// If the client connection is available, then make sure the associated
@@ -206,7 +200,6 @@
*/
protected TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// Open the backup directory and make sure it is valid.
BackupDirectory backupDir;
@@ -268,7 +261,10 @@
}
catch (ConfigException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_RESTOREDB_NO_BACKENDS_FOR_DN;
String message = getMessage(msgID, backupDirectory,
configEntryDN.toString());
@@ -304,7 +300,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
@@ -365,7 +364,10 @@
}
catch (DirectoryException e)
{
- assert debugException(CLASS_NAME, "runTask", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
logError(ErrorLogCategory.BACKEND, ErrorLogSeverity.SEVERE_ERROR,
e.getErrorMessage(), e.getErrorMessageID());
diff --git a/opends/src/server/org/opends/server/tasks/ShutdownTask.java b/opends/src/server/org/opends/server/tasks/ShutdownTask.java
index 6c7615b..dd4f081 100644
--- a/opends/src/server/org/opends/server/tasks/ShutdownTask.java
+++ b/opends/src/server/org/opends/server/tasks/ShutdownTask.java
@@ -45,7 +45,6 @@
import org.opends.server.types.ResultCode;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.TaskMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -59,11 +58,6 @@
public class ShutdownTask
extends Task
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tasks.ShutdownTask";
@@ -89,7 +83,6 @@
public void initializeTask()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "initializeTask");
// See if the entry contains a shutdown message. If so, then use it.
@@ -177,7 +170,6 @@
*/
public TaskState runTask()
{
- assert debugEnter(CLASS_NAME, "runTask");
// This is a unique case in that the shutdown cannot finish until this task
diff --git a/opends/src/server/org/opends/server/tasks/ShutdownTaskThread.java b/opends/src/server/org/opends/server/tasks/ShutdownTaskThread.java
index 8901536..279b7f2 100644
--- a/opends/src/server/org/opends/server/tasks/ShutdownTaskThread.java
+++ b/opends/src/server/org/opends/server/tasks/ShutdownTaskThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tasks;
@@ -31,7 +31,6 @@
import org.opends.server.api.DirectoryThread;
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
@@ -44,7 +43,7 @@
extends DirectoryThread
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tasks.ShutdownTaskThread";
@@ -66,7 +65,6 @@
{
super("Shutdown Task Thread");
- assert debugConstructor(CLASS_NAME, String.valueOf(shutdownMessage));
this.shutdownMessage = shutdownMessage;
@@ -80,7 +78,6 @@
*/
public void run()
{
- assert debugEnter(CLASS_NAME, "run");
DirectoryServer.shutDown(CLASS_NAME, shutdownMessage);
}
diff --git a/opends/src/server/org/opends/server/tasks/TaskUtils.java b/opends/src/server/org/opends/server/tasks/TaskUtils.java
index 6c13527..5268784 100644
--- a/opends/src/server/org/opends/server/tasks/TaskUtils.java
+++ b/opends/src/server/org/opends/server/tasks/TaskUtils.java
@@ -22,11 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tasks;
-import static org.opends.server.loggers.Debug.debugException;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
@@ -41,6 +42,7 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.ModifyOperation;
import org.opends.server.loggers.Error;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.messages.TaskMessages;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.ldap.LDAPAttribute;
@@ -66,10 +68,6 @@
*/
public class TaskUtils
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.tasks.TaskUtils";
@@ -413,7 +411,10 @@
}
catch (NumberFormatException e)
{
- assert debugException(CLASS_NAME, "getSingleValueInteger", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/tools/BackUpDB.java b/opends/src/server/org/opends/server/tools/BackUpDB.java
index e95b401..7927fe6 100644
--- a/opends/src/server/org/opends/server/tools/BackUpDB.java
+++ b/opends/src/server/org/opends/server/tools/BackUpDB.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/ClientException.java b/opends/src/server/org/opends/server/tools/ClientException.java
index 9742a6a..2d9d9dc 100644
--- a/opends/src/server/org/opends/server/tools/ClientException.java
+++ b/opends/src/server/org/opends/server/tools/ClientException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/ConfigureDS.java b/opends/src/server/org/opends/server/tools/ConfigureDS.java
index 3268b62..afa443f 100644
--- a/opends/src/server/org/opends/server/tools/ConfigureDS.java
+++ b/opends/src/server/org/opends/server/tools/ConfigureDS.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -77,7 +77,7 @@
public class ConfigureDS
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tools.ConfigureDS";
diff --git a/opends/src/server/org/opends/server/tools/EncodePassword.java b/opends/src/server/org/opends/server/tools/EncodePassword.java
index cdd26cb..f77ca35 100644
--- a/opends/src/server/org/opends/server/tools/EncodePassword.java
+++ b/opends/src/server/org/opends/server/tools/EncodePassword.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/ExportLDIF.java b/opends/src/server/org/opends/server/tools/ExportLDIF.java
index cd2565e..8fb66da 100644
--- a/opends/src/server/org/opends/server/tools/ExportLDIF.java
+++ b/opends/src/server/org/opends/server/tools/ExportLDIF.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/ImportLDIF.java b/opends/src/server/org/opends/server/tools/ImportLDIF.java
index 640b269..dfaac1d 100644
--- a/opends/src/server/org/opends/server/tools/ImportLDIF.java
+++ b/opends/src/server/org/opends/server/tools/ImportLDIF.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/InstallDS.java b/opends/src/server/org/opends/server/tools/InstallDS.java
index 9447387..3caf3f0 100644
--- a/opends/src/server/org/opends/server/tools/InstallDS.java
+++ b/opends/src/server/org/opends/server/tools/InstallDS.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -70,7 +70,7 @@
public class InstallDS
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.InstallDS";
diff --git a/opends/src/server/org/opends/server/tools/LDAPCompare.java b/opends/src/server/org/opends/server/tools/LDAPCompare.java
index ba5d156..bf9d461 100644
--- a/opends/src/server/org/opends/server/tools/LDAPCompare.java
+++ b/opends/src/server/org/opends/server/tools/LDAPCompare.java
@@ -51,6 +51,7 @@
import org.opends.server.protocols.ldap.ProtocolOp;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.NullOutputStream;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.util.Base64;
import org.opends.server.util.PasswordReader;
import org.opends.server.util.args.ArgumentException;
@@ -60,7 +61,8 @@
import org.opends.server.util.args.IntegerArgument;
import org.opends.server.util.args.StringArgument;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
@@ -75,7 +77,7 @@
public class LDAPCompare
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tools.LDAPCompare";
@@ -208,11 +210,15 @@
LDAPMessage.decode(ASN1Sequence.decodeAsSequence(element));
} catch(ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "executeCompare", ae);
- if(!compareOptions.continueOnError())
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
+ if (!compareOptions.continueOnError())
{
throw new IOException(ae.getMessage());
- } else
+ }
+ else
{
msgID = MSGID_OPERATION_FAILED;
String msg = getMessage(msgID, "COMPARE", line, ae.getMessage());
@@ -594,7 +600,10 @@
}
catch (ParseException e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_COMPARE_CANNOT_BASE64_DECODE_ASSERTION_VALUE;
err.println(wrapText(getMessage(msgID), MAX_LINE_WIDTH));
@@ -631,7 +640,10 @@
portNumber = port.getIntValue();
} catch (ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -648,7 +660,10 @@
connectionOptions.setVersionNumber(versionNumber);
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -667,7 +682,10 @@
bindPasswordValue = new String(pwChars);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "main", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -845,19 +863,28 @@
}
} catch(LDAPException le)
{
- assert debugException(CLASS_NAME, "main", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
int code = le.getResultCode();
return code;
} catch(LDAPConnectionException lce)
{
- assert debugException(CLASS_NAME, "main", lce);
- err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
- int code = lce.getErrorCode();
- return code;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, lce);
+ }
+ err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
+ int code = lce.getErrorCode();
+ return code;
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
} finally
diff --git a/opends/src/server/org/opends/server/tools/LDAPCompareOptions.java b/opends/src/server/org/opends/server/tools/LDAPCompareOptions.java
index b08e458..9ffb36e 100644
--- a/opends/src/server/org/opends/server/tools/LDAPCompareOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPCompareOptions.java
@@ -22,11 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
-import static org.opends.server.loggers.Debug.*;
@@ -36,11 +35,6 @@
*/
public class LDAPCompareOptions extends LDAPToolOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPCompareOptions";
/**
* Creates the options instance.
@@ -48,7 +42,6 @@
*/
public LDAPCompareOptions()
{
- assert debugConstructor(CLASS_NAME);
}
}
diff --git a/opends/src/server/org/opends/server/tools/LDAPConnection.java b/opends/src/server/org/opends/server/tools/LDAPConnection.java
index b4897e1..4e8bd5c 100644
--- a/opends/src/server/org/opends/server/tools/LDAPConnection.java
+++ b/opends/src/server/org/opends/server/tools/LDAPConnection.java
@@ -46,8 +46,10 @@
import org.opends.server.protocols.ldap.LDAPControl;
import org.opends.server.protocols.ldap.LDAPMessage;
import org.opends.server.types.Control;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.CoreMessages.
MSGID_RESULT_CLIENT_SIDE_CONNECT_ERROR;
@@ -64,11 +66,6 @@
*/
public class LDAPConnection
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPConnection";
// The hostname to connect to.
private String hostName = null;
@@ -176,7 +173,10 @@
throw new LDAPConnectionException(msg, CLIENT_SIDE_CONNECT_ERROR, ce);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "connectToHost", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
throw new LDAPConnectionException(ex.getMessage(), ex);
}
@@ -194,7 +194,10 @@
msg = LDAPMessage.decode(asn1Reader.readElement().decodeAsSequence());
} catch (Exception ex1)
{
- assert debugException(CLASS_NAME, "connectToHost", ex1);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex1);
+ }
throw new LDAPConnectionException(ex1.getMessage(), ex1);
}
ExtendedResponseProtocolOp res = msg.getExtendedResponseProtocolOp();
@@ -242,7 +245,10 @@
throw new LDAPConnectionException(msg, CLIENT_SIDE_CONNECT_ERROR, ce);
} catch(Exception ex2)
{
- assert debugException(CLASS_NAME, "connectToHost", ex2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex2);
+ }
throw new LDAPConnectionException(ex2.getMessage(), ex2);
}
@@ -254,7 +260,10 @@
socket.setReuseAddress(true);
} catch(IOException e)
{
- assert debugException(CLASS_NAME, "connectToHost", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// It doesn't matter too much if this throws, so ignore it.
}
@@ -392,11 +401,17 @@
}
} catch(ClientException ce)
{
- assert debugException(CLASS_NAME, "connectToHost", ce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ce);
+ }
throw new LDAPConnectionException(ce.getMessage(), ce.getExitCode(), ce);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "connectToHost", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
throw new LDAPConnectionException(ex.getMessage(), ex);
}
diff --git a/opends/src/server/org/opends/server/tools/LDAPConnectionException.java b/opends/src/server/org/opends/server/tools/LDAPConnectionException.java
index 1846279..505a122 100644
--- a/opends/src/server/org/opends/server/tools/LDAPConnectionException.java
+++ b/opends/src/server/org/opends/server/tools/LDAPConnectionException.java
@@ -22,27 +22,17 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown during the course of
* creating an LDAP connection to the server.
*/
public class LDAPConnectionException extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPConnectionException";
@@ -70,7 +60,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
}
@@ -84,7 +73,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
this.errorCode = errorCode;
}
@@ -101,8 +89,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
}
@@ -120,8 +106,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
this.errorCode = errorCode;
}
diff --git a/opends/src/server/org/opends/server/tools/LDAPConnectionOptions.java b/opends/src/server/org/opends/server/tools/LDAPConnectionOptions.java
index a7f2383..6be7604 100644
--- a/opends/src/server/org/opends/server/tools/LDAPConnectionOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPConnectionOptions.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -32,7 +32,6 @@
import java.util.List;
import java.util.Map;
-import static org.opends.server.loggers.Debug.*;
@@ -42,11 +41,6 @@
*/
public class LDAPConnectionOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPConnectionOptions";
private boolean reportAuthzID = false;
private boolean useSSL = false;
@@ -65,7 +59,6 @@
*/
public LDAPConnectionOptions()
{
- assert debugConstructor(CLASS_NAME);
}
/**
diff --git a/opends/src/server/org/opends/server/tools/LDAPDelete.java b/opends/src/server/org/opends/server/tools/LDAPDelete.java
index 9b6a5c5..341e0d3 100644
--- a/opends/src/server/org/opends/server/tools/LDAPDelete.java
+++ b/opends/src/server/org/opends/server/tools/LDAPDelete.java
@@ -49,6 +49,7 @@
import org.opends.server.protocols.ldap.LDAPMessage;
import org.opends.server.protocols.ldap.ProtocolOp;
import org.opends.server.types.NullOutputStream;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.util.PasswordReader;
import org.opends.server.util.args.ArgumentException;
import org.opends.server.util.args.ArgumentParser;
@@ -57,7 +58,8 @@
import org.opends.server.util.args.IntegerArgument;
import org.opends.server.util.args.StringArgument;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
@@ -72,7 +74,7 @@
public class LDAPDelete
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDAPDelete";
@@ -192,11 +194,15 @@
ASN1Sequence.decodeAsSequence(element));
} catch(ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "executeDelete", ae);
- if(!deleteOptions.continueOnError())
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
+ if (!deleteOptions.continueOnError())
{
throw new IOException(ae.getMessage());
- } else
+ }
+ else
{
msgID = MSGID_OPERATION_FAILED;
String msg = getMessage(msgID, "DELETE", line, ae.getMessage());
@@ -524,7 +530,10 @@
portNumber = port.getIntValue();
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -541,7 +550,10 @@
connectionOptions.setVersionNumber(versionNumber);
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -559,7 +571,10 @@
bindPasswordValue = new String(pwChars);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "main", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -726,19 +741,28 @@
}
} catch(LDAPException le)
{
- assert debugException(CLASS_NAME, "main", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
int code = le.getResultCode();
return code;
} catch(LDAPConnectionException lce)
{
- assert debugException(CLASS_NAME, "main", lce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, lce);
+ }
err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
int code = lce.getErrorCode();
return code;
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
} finally
diff --git a/opends/src/server/org/opends/server/tools/LDAPDeleteOptions.java b/opends/src/server/org/opends/server/tools/LDAPDeleteOptions.java
index b6623ec..8f9ffd0 100644
--- a/opends/src/server/org/opends/server/tools/LDAPDeleteOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPDeleteOptions.java
@@ -22,11 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
-import static org.opends.server.loggers.Debug.*;
@@ -36,11 +35,6 @@
*/
public class LDAPDeleteOptions extends LDAPToolOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPDeleteOptions";
private boolean deleteSubtree = false;
@@ -50,7 +44,6 @@
*/
public LDAPDeleteOptions()
{
- assert debugConstructor(CLASS_NAME);
}
/**
diff --git a/opends/src/server/org/opends/server/tools/LDAPModify.java b/opends/src/server/org/opends/server/tools/LDAPModify.java
index 38e0831..d15a5a4 100644
--- a/opends/src/server/org/opends/server/tools/LDAPModify.java
+++ b/opends/src/server/org/opends/server/tools/LDAPModify.java
@@ -61,6 +61,7 @@
import org.opends.server.types.Attribute;
import org.opends.server.types.LDIFImportConfig;
import org.opends.server.types.NullOutputStream;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.util.AddChangeRecordEntry;
import org.opends.server.util.ChangeRecordEntry;
import org.opends.server.util.LDIFException;
@@ -75,7 +76,8 @@
import org.opends.server.util.args.IntegerArgument;
import org.opends.server.util.args.StringArgument;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.protocols.ldap.LDAPResultCode.*;
@@ -91,7 +93,7 @@
public class LDAPModify
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDAPModify";
@@ -161,8 +163,11 @@
reader = new LDIFReader(importConfig);
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "readAndExecute", e);
- int msgID = MSGID_LDIF_FILE_CANNOT_OPEN_FOR_READ;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ int msgID = MSGID_LDIF_FILE_CANNOT_OPEN_FOR_READ;
String message = getMessage(msgID, is, String.valueOf(e));
throw new IOException(message);
}
@@ -176,24 +181,32 @@
entry = reader.readChangeRecord(modifyOptions.getDefaultAdd());
} catch (LDIFException le)
{
- assert debugException(CLASS_NAME, "readAndExecute", le);
- if(!modifyOptions.continueOnError())
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
+ if (!modifyOptions.continueOnError())
{
try
{
reader.close();
- } catch (Exception e)
+ }
+ catch (Exception e)
{
- assert debugException(CLASS_NAME, "readAndExecute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
- int msgID = MSGID_LDIF_FILE_INVALID_LDIF_ENTRY;
+ int msgID = MSGID_LDIF_FILE_INVALID_LDIF_ENTRY;
String message = getMessage(msgID, le.getLineNumber(), fileName,
String.valueOf(le));
throw new IOException(message);
- } else
+ }
+ else
{
- int msgID = MSGID_LDIF_FILE_INVALID_LDIF_ENTRY;
+ int msgID = MSGID_LDIF_FILE_INVALID_LDIF_ENTRY;
String message = getMessage(msgID, le.getLineNumber(), fileName,
String.valueOf(le));
err.println(wrapText(message, MAX_LINE_WIDTH));
@@ -201,9 +214,12 @@
}
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "readAndExecute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- if(!modifyOptions.continueOnError())
+ if (!modifyOptions.continueOnError())
{
try
{
@@ -211,15 +227,19 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "readAndExecute", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
}
- int msgID = MSGID_LDIF_FILE_READ_ERROR;
+ int msgID = MSGID_LDIF_FILE_READ_ERROR;
String message = getMessage(msgID, fileName, String.valueOf(e));
throw new IOException(message);
- } else
+ }
+ else
{
- int msgID = MSGID_LDIF_FILE_READ_ERROR;
+ int msgID = MSGID_LDIF_FILE_READ_ERROR;
String message = getMessage(msgID, fileName, String.valueOf(e));
err.println(wrapText(message, MAX_LINE_WIDTH));
continue;
@@ -235,7 +255,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readAndExecute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
break;
@@ -317,12 +340,15 @@
LDAPMessage.decode(ASN1Sequence.decodeAsSequence(element));
} catch(ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "readAndExecute", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
msgID = MSGID_OPERATION_FAILED;
String message = getMessage(msgID, operationType, asn1OctetStr,
ae.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
- if(!modifyOptions.continueOnError())
+ if (!modifyOptions.continueOnError())
{
throw new IOException(ae.getMessage());
}
@@ -811,7 +837,10 @@
portNumber = port.getIntValue();
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -828,7 +857,10 @@
connectionOptions.setVersionNumber(versionNumber);
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -846,7 +878,10 @@
bindPasswordValue = new String(pwChars);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "main", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -1060,19 +1095,28 @@
ldapModify.readAndExecute(connection, is, modifyOptions);
} catch(LDAPException le)
{
- assert debugException(CLASS_NAME, "main", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
int code = le.getResultCode();
return code;
} catch(LDAPConnectionException lce)
{
- assert debugException(CLASS_NAME, "main", lce);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, lce);
+ }
err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
int code = lce.getErrorCode();
return code;
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
} finally
diff --git a/opends/src/server/org/opends/server/tools/LDAPModifyOptions.java b/opends/src/server/org/opends/server/tools/LDAPModifyOptions.java
index 0398875..d37ee63 100644
--- a/opends/src/server/org/opends/server/tools/LDAPModifyOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPModifyOptions.java
@@ -22,11 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
-import static org.opends.server.loggers.Debug.*;
@@ -36,11 +35,6 @@
*/
public class LDAPModifyOptions extends LDAPToolOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPModifyOptions";
private boolean defaultAdd = false;
@@ -50,7 +44,6 @@
*/
public LDAPModifyOptions()
{
- assert debugConstructor(CLASS_NAME);
}
/**
diff --git a/opends/src/server/org/opends/server/tools/LDAPPasswordModify.java b/opends/src/server/org/opends/server/tools/LDAPPasswordModify.java
index 126e79a..6345b6e 100644
--- a/opends/src/server/org/opends/server/tools/LDAPPasswordModify.java
+++ b/opends/src/server/org/opends/server/tools/LDAPPasswordModify.java
@@ -82,7 +82,7 @@
public class LDAPPasswordModify
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tools.LDAPPasswordModify";
diff --git a/opends/src/server/org/opends/server/tools/LDAPSearch.java b/opends/src/server/org/opends/server/tools/LDAPSearch.java
index d12ba23..cf26e52 100644
--- a/opends/src/server/org/opends/server/tools/LDAPSearch.java
+++ b/opends/src/server/org/opends/server/tools/LDAPSearch.java
@@ -69,8 +69,10 @@
import org.opends.server.protocols.ldap.SearchResultReferenceProtocolOp;
import org.opends.server.types.DN;
import org.opends.server.types.NullOutputStream;
+import org.opends.server.types.DebugLogLevel;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
@@ -88,7 +90,7 @@
public class LDAPSearch
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDAPSearch";
@@ -324,7 +326,10 @@
} catch(ASN1Exception ae)
{
- assert debugException(CLASS_NAME, "executeSearch", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
throw new IOException(ae.getMessage());
}
}
@@ -854,7 +859,10 @@
filters.add(LDAPFilter.decode(filterString));
} catch(LDAPException le)
{
- assert debugException(CLASS_NAME, "main", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -909,7 +917,10 @@
portNumber = port.getIntValue();
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -927,7 +938,10 @@
connectionOptions.setVersionNumber(versionNumber);
} catch(ArgumentException ae)
{
- assert debugException(CLASS_NAME, "main", ae);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ae);
+ }
err.println(wrapText(ae.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -954,7 +968,10 @@
bindPasswordValue = new String(pwChars);
} catch(Exception ex)
{
- assert debugException(CLASS_NAME, "main", ex);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ex);
+ }
err.println(wrapText(ex.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -1278,7 +1295,10 @@
}
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
}
@@ -1429,19 +1449,28 @@
} catch(LDAPException le)
{
- assert debugException(CLASS_NAME, "main", le);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, le);
+ }
err.println(wrapText(le.getMessage(), MAX_LINE_WIDTH));
int code = le.getResultCode();
return code;
} catch(LDAPConnectionException lce)
{
- assert debugException(CLASS_NAME, "main", lce);
- err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
- int code = lce.getErrorCode();
- return code;
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, lce);
+ }
+ err.println(wrapText(lce.getMessage(), MAX_LINE_WIDTH));
+ int code = lce.getErrorCode();
+ return code;
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "main", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
err.println(wrapText(e.getMessage(), MAX_LINE_WIDTH));
return 1;
} finally
diff --git a/opends/src/server/org/opends/server/tools/LDAPSearchOptions.java b/opends/src/server/org/opends/server/tools/LDAPSearchOptions.java
index 8913370..aaf3daf 100644
--- a/opends/src/server/org/opends/server/tools/LDAPSearchOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPSearchOptions.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -31,7 +31,6 @@
import org.opends.server.types.DereferencePolicy;
import org.opends.server.types.SearchScope;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.types.DereferencePolicy.*;
@@ -45,11 +44,6 @@
*/
public class LDAPSearchOptions extends LDAPToolOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPSearchOptions";
private DereferencePolicy dereferencePolicy = NEVER_DEREF_ALIASES;
private SearchScope searchScope = WHOLE_SUBTREE;
@@ -64,7 +58,6 @@
*/
public LDAPSearchOptions()
{
- assert debugConstructor(CLASS_NAME);
}
/**
diff --git a/opends/src/server/org/opends/server/tools/LDAPToolOptions.java b/opends/src/server/org/opends/server/tools/LDAPToolOptions.java
index 5a9165f..85a15b1 100644
--- a/opends/src/server/org/opends/server/tools/LDAPToolOptions.java
+++ b/opends/src/server/org/opends/server/tools/LDAPToolOptions.java
@@ -29,7 +29,6 @@
import java.util.ArrayList;
import org.opends.server.protocols.ldap.LDAPControl;
-import static org.opends.server.loggers.Debug.*;
@@ -39,11 +38,6 @@
*/
public class LDAPToolOptions
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPToolOptions";
private boolean showOperations = false;
private boolean verbose = false;
@@ -57,7 +51,6 @@
*/
public LDAPToolOptions()
{
- assert debugConstructor(CLASS_NAME);
}
/**
diff --git a/opends/src/server/org/opends/server/tools/LDAPToolUtils.java b/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
index d17fc47..f56304b 100644
--- a/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
+++ b/opends/src/server/org/opends/server/tools/LDAPToolUtils.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -34,7 +34,6 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.protocols.ldap.LDAPControl;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -45,11 +44,6 @@
*/
public class LDAPToolUtils
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.LDAPToolUtils";
/**
diff --git a/opends/src/server/org/opends/server/tools/LDIFDiff.java b/opends/src/server/org/opends/server/tools/LDIFDiff.java
index 3ace5ef..d941540 100644
--- a/opends/src/server/org/opends/server/tools/LDIFDiff.java
+++ b/opends/src/server/org/opends/server/tools/LDIFDiff.java
@@ -89,7 +89,7 @@
public class LDIFDiff
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDIFDiff";
diff --git a/opends/src/server/org/opends/server/tools/LDIFModify.java b/opends/src/server/org/opends/server/tools/LDIFModify.java
index e00f2b1..0a67737 100644
--- a/opends/src/server/org/opends/server/tools/LDIFModify.java
+++ b/opends/src/server/org/opends/server/tools/LDIFModify.java
@@ -88,7 +88,7 @@
public class LDIFModify
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDIFModify";
diff --git a/opends/src/server/org/opends/server/tools/LDIFSearch.java b/opends/src/server/org/opends/server/tools/LDIFSearch.java
index dae5818..561399d 100644
--- a/opends/src/server/org/opends/server/tools/LDIFSearch.java
+++ b/opends/src/server/org/opends/server/tools/LDIFSearch.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -73,7 +73,7 @@
public class LDIFSearch
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.LDIFSearch";
diff --git a/opends/src/server/org/opends/server/tools/ListBackends.java b/opends/src/server/org/opends/server/tools/ListBackends.java
index 6c80a9f..7d23dbc 100644
--- a/opends/src/server/org/opends/server/tools/ListBackends.java
+++ b/opends/src/server/org/opends/server/tools/ListBackends.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/PromptTrustManager.java b/opends/src/server/org/opends/server/tools/PromptTrustManager.java
index d04f96e..7357398 100644
--- a/opends/src/server/org/opends/server/tools/PromptTrustManager.java
+++ b/opends/src/server/org/opends/server/tools/PromptTrustManager.java
@@ -37,7 +37,6 @@
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -56,11 +55,6 @@
public class PromptTrustManager
implements X509TrustManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.PromptTrustManager";
@@ -75,7 +69,6 @@
*/
private PromptTrustManager()
{
- assert debugConstructor(CLASS_NAME);
// No implementation is required.
}
@@ -93,7 +86,6 @@
*/
public static TrustManager[] getTrustManagers()
{
- assert debugEnter(CLASS_NAME, "getTrustManagers");
return trustManagerArray;
}
@@ -114,8 +106,6 @@
public void checkClientTrusted(X509Certificate[] chain, String authType)
throws CertificateException
{
- assert debugEnter(CLASS_NAME, "checkClientTrusted",
- String.valueOf(chain), String.valueOf(authType));
int msgID = MSGID_PROMPTTM_REJECTING_CLIENT_CERT;
String message = getMessage(msgID);
@@ -137,8 +127,6 @@
public void checkServerTrusted(X509Certificate[] chain, String authType)
throws CertificateException
{
- assert debugEnter(CLASS_NAME, "checkServerTrusted",
- String.valueOf(chain), String.valueOf(authType));
if ((chain == null) || (chain.length == 0))
{
@@ -209,7 +197,6 @@
*/
public X509Certificate[] getAcceptedIssuers()
{
- assert debugEnter(CLASS_NAME, "getAcceptedIssuers");
return new X509Certificate[0];
}
diff --git a/opends/src/server/org/opends/server/tools/RestoreDB.java b/opends/src/server/org/opends/server/tools/RestoreDB.java
index befdf5a..f4cddbd 100644
--- a/opends/src/server/org/opends/server/tools/RestoreDB.java
+++ b/opends/src/server/org/opends/server/tools/RestoreDB.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/SSLConnectionException.java b/opends/src/server/org/opends/server/tools/SSLConnectionException.java
index c55beb1..2d43a0e 100644
--- a/opends/src/server/org/opends/server/tools/SSLConnectionException.java
+++ b/opends/src/server/org/opends/server/tools/SSLConnectionException.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown during the course of
* creating an SSL connection.
@@ -39,11 +34,6 @@
public class SSLConnectionException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.tools.SSLConnectionException";
@@ -67,7 +57,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
}
@@ -84,8 +73,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
}
diff --git a/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java b/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
index ebdf6eb..01a466f 100644
--- a/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
+++ b/opends/src/server/org/opends/server/tools/SSLConnectionFactory.java
@@ -45,8 +45,9 @@
import static org.opends.server.messages.ToolMessages.*;
import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
@@ -54,8 +55,6 @@
*/
public class SSLConnectionFactory
{
- private static final String CLASS_NAME =
- "org.opends.server.tools.SSLConnectionFactory";
private SSLSocketFactory sslSocketFactory = null;
@@ -246,7 +245,10 @@
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "getKeyManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TOOLS_CANNOT_LOAD_KEYSTORE_FILE;
throw new SSLConnectionException(getMessage(msgID, keyStoreFile), e);
}
@@ -261,7 +263,10 @@
return keyManagerFactory.getKeyManagers();
} catch(Exception ke)
{
- assert debugException(CLASS_NAME, "getKeyManagers", ke);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ke);
+ }
int msgID = MSGID_TOOLS_CANNOT_INIT_KEYMANAGER;
throw new SSLConnectionException(getMessage(msgID, keyStoreFile), ke);
}
@@ -332,7 +337,10 @@
inputStream.close();
} catch(Exception e)
{
- assert debugException(CLASS_NAME, "getTrustManagers", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_TOOLS_CANNOT_LOAD_TRUSTSTORE_FILE;
throw new SSLConnectionException(getMessage(msgID, trustStoreFile), e);
}
@@ -347,7 +355,10 @@
return trustManagerFactory.getTrustManagers();
} catch(Exception ke)
{
- assert debugException(CLASS_NAME, "getTrustManagers", ke);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ke);
+ }
int msgID = MSGID_TOOLS_CANNOT_INIT_TRUSTMANAGER;
throw new SSLConnectionException(getMessage(msgID, trustStoreFile), ke);
}
diff --git a/opends/src/server/org/opends/server/tools/StopDS.java b/opends/src/server/org/opends/server/tools/StopDS.java
index 7a7fe2e..8c4ba44 100644
--- a/opends/src/server/org/opends/server/tools/StopDS.java
+++ b/opends/src/server/org/opends/server/tools/StopDS.java
@@ -80,7 +80,7 @@
public class StopDS
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME = "org.opends.server.tools.StopDS";
diff --git a/opends/src/server/org/opends/server/tools/ToolConstants.java b/opends/src/server/org/opends/server/tools/ToolConstants.java
index 590e1c8..3a7e80d 100644
--- a/opends/src/server/org/opends/server/tools/ToolConstants.java
+++ b/opends/src/server/org/opends/server/tools/ToolConstants.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/VerifyIndex.java b/opends/src/server/org/opends/server/tools/VerifyIndex.java
index ae89764..76bcde9 100644
--- a/opends/src/server/org/opends/server/tools/VerifyIndex.java
+++ b/opends/src/server/org/opends/server/tools/VerifyIndex.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
diff --git a/opends/src/server/org/opends/server/tools/WaitForFileDelete.java b/opends/src/server/org/opends/server/tools/WaitForFileDelete.java
index 09ed4b6..50d10ac 100644
--- a/opends/src/server/org/opends/server/tools/WaitForFileDelete.java
+++ b/opends/src/server/org/opends/server/tools/WaitForFileDelete.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools;
@@ -52,7 +52,7 @@
public class WaitForFileDelete
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tools.WaitForFileDelete";
diff --git a/opends/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java b/opends/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java
index 5135417..c548adf 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/AttributeValueTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/Branch.java b/opends/src/server/org/opends/server/tools/makeldif/Branch.java
index 9b9a699..fd1a3fe 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/Branch.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/Branch.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/DNTag.java b/opends/src/server/org/opends/server/tools/makeldif/DNTag.java
index 235f44b..6490e21 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/DNTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/DNTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/EntryWriter.java b/opends/src/server/org/opends/server/tools/makeldif/EntryWriter.java
index 8c3ef08..139b74b 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/EntryWriter.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/EntryWriter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/FileTag.java b/opends/src/server/org/opends/server/tools/makeldif/FileTag.java
index 6e9d115..0917907 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/FileTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/FileTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/FirstNameTag.java b/opends/src/server/org/opends/server/tools/makeldif/FirstNameTag.java
index 5c14b3e..1817542 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/FirstNameTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/FirstNameTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/GUIDTag.java b/opends/src/server/org/opends/server/tools/makeldif/GUIDTag.java
index 5c048eb..46082f3 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/GUIDTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/GUIDTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java b/opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java
index 98fd2dc..83c01dd 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/IfAbsentTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java b/opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java
index ea6b1c5..2a99587 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/IfPresentTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/LastNameTag.java b/opends/src/server/org/opends/server/tools/makeldif/LastNameTag.java
index 95d7a7d..c2032e5 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/LastNameTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/LastNameTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIF.java b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIF.java
index 6a661b9..be9f14b 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIF.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIF.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
@@ -59,7 +59,7 @@
implements EntryWriter
{
/**
- * The fully-qualified name of this class for debugging purposes.
+ * The fully-qualified name of this class.
*/
private static final String CLASS_NAME =
"org.opends.server.tools.makeldif.MakeLDIF";
diff --git a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java
index 252be8b..4c27270 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStream.java b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStream.java
index d53db9c..6614c53 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStream.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStream.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStreamThread.java b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStreamThread.java
index b86e5c2..82ba0be 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStreamThread.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/MakeLDIFInputStreamThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/ParentDNTag.java b/opends/src/server/org/opends/server/tools/makeldif/ParentDNTag.java
index 3dcfe20..c44747b 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/ParentDNTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/ParentDNTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/PresenceTag.java b/opends/src/server/org/opends/server/tools/makeldif/PresenceTag.java
index 29b8d9c..e467c25 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/PresenceTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/PresenceTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/RDNTag.java b/opends/src/server/org/opends/server/tools/makeldif/RDNTag.java
index 7951f05..5dc5b8c 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/RDNTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/RDNTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java b/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
index d5dc7f1..0585ead 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/SequentialTag.java b/opends/src/server/org/opends/server/tools/makeldif/SequentialTag.java
index 8242167..32c2374 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/SequentialTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/SequentialTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/StaticTextTag.java b/opends/src/server/org/opends/server/tools/makeldif/StaticTextTag.java
index 208c646..85e7084 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/StaticTextTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/StaticTextTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/Tag.java b/opends/src/server/org/opends/server/tools/makeldif/Tag.java
index 0601fba..918f0a3 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/Tag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/Tag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/TagResult.java b/opends/src/server/org/opends/server/tools/makeldif/TagResult.java
index 3312adc..b83b078 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/TagResult.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/TagResult.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/Template.java b/opends/src/server/org/opends/server/tools/makeldif/Template.java
index 8274f6e..c6865f5 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/Template.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/Template.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/TemplateFile.java b/opends/src/server/org/opends/server/tools/makeldif/TemplateFile.java
index 8a7b801..cc995d6 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/TemplateFile.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/TemplateFile.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/TemplateLine.java b/opends/src/server/org/opends/server/tools/makeldif/TemplateLine.java
index 6706937..5c6c6f8 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/TemplateLine.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/TemplateLine.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/TemplateValue.java b/opends/src/server/org/opends/server/tools/makeldif/TemplateValue.java
index 0c2b702..151b61a 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/TemplateValue.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/TemplateValue.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java b/opends/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java
index 3702b24..ac56225 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/UnderscoreDNTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java b/opends/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java
index 39b3a84..d7d6a4c 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/UnderscoreParentDNTag.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.tools.makeldif;
diff --git a/opends/src/server/org/opends/server/tools/package-info.java b/opends/src/server/org/opends/server/tools/package-info.java
index 8222d93..4fbc754 100644
--- a/opends/src/server/org/opends/server/tools/package-info.java
+++ b/opends/src/server/org/opends/server/tools/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/types/AcceptRejectWarn.java b/opends/src/server/org/opends/server/types/AcceptRejectWarn.java
index 52b5009..6f204e5 100644
--- a/opends/src/server/org/opends/server/types/AcceptRejectWarn.java
+++ b/opends/src/server/org/opends/server/types/AcceptRejectWarn.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/AccountStatusNotification.java b/opends/src/server/org/opends/server/types/AccountStatusNotification.java
index 2311153..f65da95 100644
--- a/opends/src/server/org/opends/server/types/AccountStatusNotification.java
+++ b/opends/src/server/org/opends/server/types/AccountStatusNotification.java
@@ -22,27 +22,17 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data type for storing information associated
* with an account status notification.
*/
public class AccountStatusNotification
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.AccountStatusNotification";
@@ -77,9 +67,6 @@
AccountStatusNotificationType notificationType,
DN userDN, int messageID, String message)
{
- assert debugEnter(CLASS_NAME, String.valueOf(notificationType),
- String.valueOf(messageID),
- String.valueOf(message));
this.notificationType = notificationType;
this.userDN = userDN;
@@ -98,7 +85,6 @@
*/
public AccountStatusNotificationType getNotificationType()
{
- assert debugEnter(CLASS_NAME, "getNotificationType");
return notificationType;
}
@@ -114,7 +100,6 @@
*/
public DN getUserDN()
{
- assert debugEnter(CLASS_NAME, "getUserDN");
return userDN;
}
@@ -130,7 +115,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
@@ -146,7 +130,6 @@
*/
public String getMessage()
{
- assert debugEnter(CLASS_NAME, "getMessage");
return message;
}
@@ -162,7 +145,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
return "AccountStatusNotification(type=" +
notificationType.getNotificationTypeName() + ",dn=" +
diff --git a/opends/src/server/org/opends/server/types/AccountStatusNotificationType.java b/opends/src/server/org/opends/server/types/AccountStatusNotificationType.java
index b51ed23..3e7144a 100644
--- a/opends/src/server/org/opends/server/types/AccountStatusNotificationType.java
+++ b/opends/src/server/org/opends/server/types/AccountStatusNotificationType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/AddressMask.java b/opends/src/server/org/opends/server/types/AddressMask.java
index 193ab40..856244e 100644
--- a/opends/src/server/org/opends/server/types/AddressMask.java
+++ b/opends/src/server/org/opends/server/types/AddressMask.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -48,12 +48,6 @@
public final class AddressMask
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.AddressMask";
-
/**
* Types of rules we have.
*
diff --git a/opends/src/server/org/opends/server/types/Attribute.java b/opends/src/server/org/opends/server/types/Attribute.java
index d5d440d..1ce5d61 100644
--- a/opends/src/server/org/opends/server/types/Attribute.java
+++ b/opends/src/server/org/opends/server/types/Attribute.java
@@ -40,7 +40,10 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.util.Base64;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
@@ -52,11 +55,6 @@
*/
public class Attribute
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.Attribute";
@@ -82,8 +80,6 @@
*/
public Attribute(AttributeType attributeType)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(attributeType));
this.attributeType = attributeType;
this.name = attributeType.getPrimaryName();
@@ -102,8 +98,6 @@
*/
public Attribute(AttributeType attributeType, String name)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(name));
this.attributeType = attributeType;
this.name = name;
@@ -124,9 +118,6 @@
public Attribute(AttributeType attributeType, String name,
LinkedHashSet<AttributeValue> values)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(name),
- String.valueOf(values));
this.attributeType = attributeType;
this.name = name;
@@ -179,10 +170,6 @@
LinkedHashSet<String> options,
LinkedHashSet<AttributeValue> values)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(name),
- String.valueOf(options),
- String.valueOf(values));
this.attributeType = attributeType;
this.name = name;
@@ -215,7 +202,6 @@
*/
public AttributeType getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -229,7 +215,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return name;
}
@@ -243,7 +228,6 @@
*/
public LinkedHashSet<String> getOptions()
{
- assert debugEnter(CLASS_NAME, "getOptions");
return options;
}
@@ -260,8 +244,6 @@
*/
public boolean hasOption(String option)
{
- assert debugEnter(CLASS_NAME, "hasOption",
- String.valueOf(option));
return options.contains(option);
}
@@ -276,7 +258,6 @@
*/
public boolean hasOptions()
{
- assert debugEnter(CLASS_NAME, "hasOptions");
return ((options != null) && (! options.isEmpty()));
}
@@ -296,8 +277,6 @@
*/
public boolean hasOptions(Collection<String> options)
{
- assert debugEnter(CLASS_NAME, "hasOptions",
- String.valueOf(options));
if (options == null)
{
@@ -330,8 +309,6 @@
*/
public boolean optionsEqual(Set<String> options)
{
- assert debugEnter(CLASS_NAME, "optionsEqual",
- String.valueOf(options));
if (options == null)
{
@@ -369,7 +346,6 @@
*/
public LinkedHashSet<AttributeValue> getValues()
{
- assert debugEnter(CLASS_NAME, "getValues");
return values;
}
@@ -383,8 +359,6 @@
*/
public void setValues(LinkedHashSet<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "setValues",
- String.valueOf(values));
if (values == null)
{
@@ -406,7 +380,6 @@
*/
public boolean hasValue()
{
- assert debugEnter(CLASS_NAME, "hasValue");
return (! values.isEmpty());
}
@@ -423,7 +396,6 @@
*/
public boolean hasValue(AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "hasValue", String.valueOf(value));
return values.contains(value);
}
@@ -443,8 +415,6 @@
*/
public boolean hasAllValues(Collection<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "hasAllValues",
- String.valueOf(values));
for (AttributeValue value : values)
{
@@ -473,8 +443,6 @@
*/
public boolean hasAnyValue(Collection<AttributeValue> values)
{
- assert debugEnter(CLASS_NAME, "hasAnyValue",
- String.valueOf(values));
for (AttributeValue value : values)
{
@@ -509,10 +477,6 @@
List<ByteString> subAny,
ByteString subFinal)
{
- assert debugEnter(CLASS_NAME, "matchesSubstring",
- String.valueOf(subInitial),
- String.valueOf(subAny),
- String.valueOf(subFinal));
SubstringMatchingRule matchingRule =
@@ -537,7 +501,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "matchesSubstring", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The substring couldn't be normalized. We have to return
// "undefined".
@@ -564,7 +531,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "matchesSubstring", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The substring couldn't be normalized. We have to return
// "undefined".
@@ -588,7 +558,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "matchesSubstring", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The substring couldn't be normalized. We have to return
// "undefined".
@@ -613,7 +586,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "matchesSubstring", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// The value couldn't be normalized. If we can't find a
// definite match, then we should return "undefined".
@@ -639,8 +615,6 @@
*/
public ConditionResult greaterThanOrEqualTo(AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "greaterThanOrEqualTo",
- String.valueOf(value));
OrderingMatchingRule matchingRule =
@@ -657,7 +631,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "greaterThanOrEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize the provided value. We should return
// "undefined".
@@ -679,7 +656,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "greaterThanOrEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the attribute values. If we
// can't find a definite match, then we should return
@@ -706,8 +686,6 @@
*/
public ConditionResult lessThanOrEqualTo(AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "lessThanOrEqualTo",
- String.valueOf(value));
OrderingMatchingRule matchingRule =
@@ -724,7 +702,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lessThanOrEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize the provided value. We should return
// "undefined".
@@ -746,7 +727,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lessThanOrEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the attribute values. If we
// can't find a definite match, then we should return
@@ -773,8 +757,6 @@
*/
public ConditionResult approximatelyEqualTo(AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "approximatelyEqualTo",
- String.valueOf(value));
ApproximateMatchingRule matchingRule =
@@ -791,7 +773,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "approximatelyEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize the provided value. We should return
// "undefined".
@@ -811,7 +796,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "approximatelyEqualTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the attribute values. If we
// can't find a definite match, then we should return
@@ -834,7 +822,6 @@
*/
public Attribute duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
return duplicate(false);
}
@@ -852,8 +839,6 @@
*/
public Attribute duplicate(boolean omitValues)
{
- assert debugEnter(CLASS_NAME, "duplicate",
- String.valueOf(omitValues));
LinkedHashSet<String> optionsCopy =
new LinkedHashSet<String>(options.size());
@@ -894,7 +879,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -936,7 +920,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int hashCode = attributeType.hashCode();
for (AttributeValue value : values)
@@ -956,7 +939,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -974,8 +956,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("Attribute(");
buffer.append(name);
@@ -1005,7 +985,6 @@
*/
public String toLDIF()
{
- assert debugEnter(CLASS_NAME, "toLDIF");
StringBuilder buffer = new StringBuilder();
toLDIF(buffer);
@@ -1023,8 +1002,6 @@
*/
public void toLDIF(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toLDIF",
- "java.lang.StringBuilder");
for (AttributeValue value : values)
{
diff --git a/opends/src/server/org/opends/server/types/AttributeType.java b/opends/src/server/org/opends/server/types/AttributeType.java
index 6f26802..1c01425 100644
--- a/opends/src/server/org/opends/server/types/AttributeType.java
+++ b/opends/src/server/org/opends/server/types/AttributeType.java
@@ -40,7 +40,10 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.schema.AttributeTypeSyntax;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -67,11 +70,6 @@
extends CommonSchemaElements
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.AttributeType";
@@ -266,24 +264,6 @@
super(primaryName, typeNames, oid, description, isObsolete,
extraProperties);
- assert debugConstructor(CLASS_NAME,
- String.valueOf(definition),
- String.valueOf(primaryName),
- String.valueOf(typeNames),
- String.valueOf(oid),
- String.valueOf(description),
- String.valueOf(superiorType),
- String.valueOf(syntax),
- String.valueOf(approximateMatchingRule),
- String.valueOf(equalityMatchingRule),
- String.valueOf(orderingMatchingRule),
- String.valueOf(substringMatchingRule),
- String.valueOf(attributeUsage),
- String.valueOf(isCollective),
- String.valueOf(isNoUserModification),
- String.valueOf(isObsolete),
- String.valueOf(isSingleValue),
- String.valueOf(extraProperties));
ensureNotNull(definition, oid);
@@ -385,7 +365,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -431,7 +410,6 @@
*/
public AttributeType getSuperiorType()
{
- assert debugEnter(CLASS_NAME, "getSuperiorType");
return superiorType;
}
@@ -455,7 +433,6 @@
*/
boolean mayHaveSubordinateTypes()
{
- assert debugEnter(CLASS_NAME, "mayHaveSubordinateTypes");
return mayHaveSubordinateTypes;
}
@@ -470,7 +447,6 @@
*/
void setMayHaveSubordinateTypes()
{
- assert debugEnter(CLASS_NAME, "setMayHaveSubordinateTypes");
mayHaveSubordinateTypes = true;
}
@@ -484,7 +460,6 @@
*/
public AttributeSyntax getSyntax()
{
- assert debugEnter(CLASS_NAME, "getSyntax");
return syntax;
}
@@ -500,7 +475,6 @@
*/
public String getSyntaxOID()
{
- assert debugEnter(CLASS_NAME, "getSyntaxOID");
return syntax.getOID();
}
@@ -516,7 +490,6 @@
*/
public ApproximateMatchingRule getApproximateMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule");
return approximateMatchingRule;
}
@@ -532,7 +505,6 @@
*/
public EqualityMatchingRule getEqualityMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule");
return equalityMatchingRule;
}
@@ -548,7 +520,6 @@
*/
public OrderingMatchingRule getOrderingMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule");
return orderingMatchingRule;
}
@@ -564,7 +535,6 @@
*/
public SubstringMatchingRule getSubstringMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule");
return substringMatchingRule;
}
@@ -578,7 +548,6 @@
*/
public AttributeUsage getUsage()
{
- assert debugEnter(CLASS_NAME, "getUsage");
return attributeUsage;
}
@@ -596,7 +565,6 @@
*/
public boolean isOperational()
{
- assert debugEnter(CLASS_NAME, "isOperational");
return attributeUsage.isOperational();
}
@@ -611,7 +579,6 @@
*/
public boolean isCollective()
{
- assert debugEnter(CLASS_NAME, "isCollective");
return isCollective;
}
@@ -627,7 +594,6 @@
*/
public boolean isNoUserModification()
{
- assert debugEnter(CLASS_NAME, "isNoUserModification");
return isNoUserModification;
}
@@ -642,7 +608,6 @@
*/
public boolean isSingleValue()
{
- assert debugEnter(CLASS_NAME, "isSingleValue");
return isSingleValue;
}
@@ -659,7 +624,6 @@
*/
public boolean isObjectClassType()
{
- assert debugEnter(CLASS_NAME, "isObjectClassType");
return isObjectClassType;
}
@@ -682,7 +646,6 @@
public ByteString normalize(ByteString value)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "normalize", String.valueOf(value));
if (equalityMatchingRule == null)
{
@@ -713,8 +676,6 @@
*/
public int generateHashCode(AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "generateHashCode",
- String.valueOf(value));
try
{
@@ -737,7 +698,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "generateHashCode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -745,7 +709,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "generateHashCode", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
return 0;
}
@@ -759,8 +726,6 @@
*/
protected void toStringContent(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toStringContent",
- "java.lang.StringBuilder");
if (superiorType != null)
{
diff --git a/opends/src/server/org/opends/server/types/AttributeUsage.java b/opends/src/server/org/opends/server/types/AttributeUsage.java
index 7535cec..b510ed0 100644
--- a/opends/src/server/org/opends/server/types/AttributeUsage.java
+++ b/opends/src/server/org/opends/server/types/AttributeUsage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/AttributeValue.java b/opends/src/server/org/opends/server/types/AttributeValue.java
index e526e99..5757aea 100644
--- a/opends/src/server/org/opends/server/types/AttributeValue.java
+++ b/opends/src/server/org/opends/server/types/AttributeValue.java
@@ -31,7 +31,10 @@
import org.opends.server.api.EqualityMatchingRule;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
@@ -48,12 +51,6 @@
*/
public class AttributeValue
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.AttributeValue";
-
// The normalized form of this value.
@@ -78,8 +75,6 @@
*/
public AttributeValue(AttributeType attributeType, ByteString value)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(value));
ensureNotNull(attributeType, value);
@@ -101,8 +96,6 @@
*/
public AttributeValue(AttributeType attributeType, String value)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(value));
ensureNotNull(attributeType, value);
@@ -126,8 +119,6 @@
*/
public AttributeValue(ByteString value, ByteString normalizedValue)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(value),
- String.valueOf(normalizedValue));
ensureNotNull(value, normalizedValue);
@@ -146,7 +137,6 @@
*/
public ByteString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -160,7 +150,6 @@
*/
public byte[] getValueBytes()
{
- assert debugEnter(CLASS_NAME, "getValueBytes");
return value.value();
}
@@ -176,7 +165,6 @@
*/
public String getStringValue()
{
- assert debugEnter(CLASS_NAME, "getStringValue");
return value.stringValue();
}
@@ -196,7 +184,6 @@
public ByteString getNormalizedValue()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getNormalizedValue");
if (normalizedValue == null)
{
@@ -223,7 +210,6 @@
public byte[] getNormalizedValueBytes()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getValueBytes");
return getNormalizedValue().value();
}
@@ -245,7 +231,6 @@
public String getNormalizedStringValue()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getNormalizedStringValue");
if (normalizedValue == null)
{
@@ -266,7 +251,6 @@
*/
public String getDNStringValue()
{
- assert debugEnter(CLASS_NAME, "getDNStringValue");
return getDNValue(getStringValue());
}
@@ -288,7 +272,6 @@
public String getNormalizedDNStringValue()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getNormalizedDNStringValue");
return getDNValue(getNormalizedStringValue());
}
@@ -306,8 +289,6 @@
*/
private static String getDNValue(String value)
{
- assert debugEnter(CLASS_NAME, "getDNValue",
- String.valueOf(value));
if ((value == null) || (value.length() == 0))
{
@@ -384,7 +365,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -438,7 +418,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return value.equals(attrValue.getValue());
}
@@ -458,7 +441,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
try
{
@@ -480,7 +462,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hashCode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return value.hashCode();
}
@@ -495,7 +480,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
if (value == null)
{
@@ -518,8 +502,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append(value.toString());
}
diff --git a/opends/src/server/org/opends/server/types/AttributeValueIterable.java b/opends/src/server/org/opends/server/types/AttributeValueIterable.java
index 7240281..335292b 100644
--- a/opends/src/server/org/opends/server/types/AttributeValueIterable.java
+++ b/opends/src/server/org/opends/server/types/AttributeValueIterable.java
@@ -22,15 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import java.util.HashSet;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -48,9 +43,6 @@
*/
public final class AttributeValueIterable implements
Iterable<AttributeValue> {
- // Fully qualified class name for debugging purposes.
- private static final String CLASS_NAME =
- AttributeValueIterable.class.getName();
// The set of attributes having the same type and options.
private Iterable<Attribute> attributes;
@@ -70,7 +62,6 @@
public AttributeValueIterable(Iterable<Attribute> attributes) {
this(attributes, null);
- assert debugConstructor(CLASS_NAME);
}
/**
@@ -85,7 +76,6 @@
*/
public AttributeValueIterable(Iterable<Attribute> attributes,
HashSet<String> options) {
- assert debugConstructor(CLASS_NAME);
this.attributes = attributes;
this.options = options;
@@ -95,7 +85,6 @@
* {@inheritDoc}
*/
public Iterator<AttributeValue> iterator() {
- assert debugEnter(CLASS_NAME, "iterator");
return new AttributeValueIterator();
}
@@ -118,7 +107,6 @@
* Create a new attribute value iterator over the attribute set.
*/
private AttributeValueIterator() {
- assert debugConstructor(CLASS_NAME);
this.valueIterator = null;
@@ -135,7 +123,6 @@
* {@inheritDoc}
*/
public boolean hasNext() {
- assert debugEnter(CLASS_NAME, "hasNext");
return hasNext;
}
@@ -144,7 +131,6 @@
* {@inheritDoc}
*/
public AttributeValue next() {
- assert debugEnter(CLASS_NAME, "next");
if (hasNext == false) {
throw new NoSuchElementException();
@@ -165,7 +151,6 @@
* {@inheritDoc}
*/
public void remove() {
- assert debugEnter(CLASS_NAME, "remove");
throw new UnsupportedOperationException();
}
@@ -179,7 +164,6 @@
* <code>false</code> otherwise.
*/
private boolean skipNonMatchingAttributes() {
- assert debugEnter(CLASS_NAME, "skipNonMatchingAttributes");
while (attributeIterator.hasNext()) {
Attribute attribute = attributeIterator.next();
diff --git a/opends/src/server/org/opends/server/types/AuthenticationInfo.java b/opends/src/server/org/opends/server/types/AuthenticationInfo.java
index bde9e7d..94af625 100644
--- a/opends/src/server/org/opends/server/types/AuthenticationInfo.java
+++ b/opends/src/server/org/opends/server/types/AuthenticationInfo.java
@@ -33,7 +33,6 @@
import java.util.Iterator;
import java.util.Set;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.Validator.*;
@@ -47,11 +46,6 @@
*/
public class AuthenticationInfo
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.AuthenticationInfo";
@@ -90,7 +84,6 @@
*/
public AuthenticationInfo()
{
- assert debugConstructor(CLASS_NAME);
isAuthenticated = false;
isRoot = false;
@@ -116,9 +109,6 @@
*/
public AuthenticationInfo(Entry authenticationEntry, boolean isRoot)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(authenticationEntry),
- String.valueOf(isRoot));
this.authenticationEntry = authenticationEntry;
this.isRoot = isRoot;
@@ -151,10 +141,6 @@
public AuthenticationInfo(Entry authenticationEntry,
ByteString simplePassword, boolean isRoot)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(authenticationEntry),
- String.valueOf(simplePassword),
- String.valueOf(isRoot));
ensureNotNull(authenticationEntry, simplePassword);
@@ -190,10 +176,6 @@
public AuthenticationInfo(Entry authenticationEntry,
String saslMechanism, boolean isRoot)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(authenticationEntry),
- String.valueOf(saslMechanism),
- String.valueOf(isRoot));
ensureNotNull(authenticationEntry, saslMechanism);
@@ -238,11 +220,6 @@
Entry authorizationEntry,
String saslMechanism, boolean isRoot)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(authenticationEntry),
- String.valueOf(authorizationEntry),
- String.valueOf(saslMechanism),
- String.valueOf(isRoot));
ensureNotNull(authenticationEntry, saslMechanism);
@@ -272,7 +249,6 @@
*/
public boolean isAuthenticated()
{
- assert debugEnter(CLASS_NAME, "isAuthenticated");
return isAuthenticated;
}
@@ -285,7 +261,6 @@
*/
public void setUnauthenticated()
{
- assert debugEnter(CLASS_NAME, "setUnauthenticated");
isAuthenticated = false;
isRoot = false;
@@ -308,7 +283,6 @@
*/
public boolean isRoot()
{
- assert debugEnter(CLASS_NAME, "isRoot");
return isRoot;
}
@@ -325,7 +299,6 @@
*/
public boolean mustChangePassword()
{
- assert debugEnter(CLASS_NAME, "mustChangePassword");
return mustChangePassword;
}
@@ -343,8 +316,6 @@
*/
public void setMustChangePassword(boolean mustChangePassword)
{
- assert debugEnter(CLASS_NAME, "setMustChangePassword",
- String.valueOf(mustChangePassword));
this.mustChangePassword = mustChangePassword;
}
@@ -364,8 +335,6 @@
public boolean hasAuthenticationType(AuthenticationType
authenticationType)
{
- assert debugEnter(CLASS_NAME, "hasAuthenticationType",
- String.valueOf(authenticationType));
return authenticationTypes.contains(authenticationType);
}
@@ -386,8 +355,6 @@
public boolean hasAnyAuthenticationType(
Collection<AuthenticationType> types)
{
- assert debugEnter(CLASS_NAME, "hasAnyAuthenticationType",
- String.valueOf(types));
for (AuthenticationType t : types)
{
@@ -410,7 +377,6 @@
*/
public Set<AuthenticationType> getAuthenticationTypes()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationTypes");
return authenticationTypes;
}
@@ -429,7 +395,6 @@
public void addAuthenticationType(AuthenticationType
authenticationType)
{
- assert debugEnter(CLASS_NAME, "addAuthenticationType");
authenticationTypes.add(authenticationType);
}
@@ -446,7 +411,6 @@
*/
public Entry getAuthenticationEntry()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationEntry");
return authenticationEntry;
}
@@ -461,7 +425,6 @@
*/
public DN getAuthenticationDN()
{
- assert debugEnter(CLASS_NAME, "getAuthenticationDN");
if (authenticationEntry == null)
{
@@ -486,7 +449,6 @@
*/
public Entry getAuthorizationEntry()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationEntry");
return authorizationEntry;
}
@@ -504,7 +466,6 @@
*/
public DN getAuthorizationDN()
{
- assert debugEnter(CLASS_NAME, "getAuthorizationDN");
if (authorizationEntry == null)
{
@@ -528,7 +489,6 @@
*/
public ByteString getSimplePassword()
{
- assert debugEnter(CLASS_NAME, "getSimplePassword");
return simplePassword;
}
@@ -548,8 +508,6 @@
*/
public boolean hasSASLMechanism(String saslMechanism)
{
- assert debugEnter(CLASS_NAME, "hasSASLMechanism",
- String.valueOf(saslMechanism));
return saslMechanisms.contains(saslMechanism);
}
@@ -569,8 +527,6 @@
*/
public boolean hasAnySASLMechanism(Collection<String> mechanisms)
{
- assert debugEnter(CLASS_NAME, "hasAnySASLMechanism",
- String.valueOf(mechanisms));
for (String s : mechanisms)
{
@@ -595,7 +551,6 @@
*/
public Set<String> getSASLMechanisms()
{
- assert debugEnter(CLASS_NAME, "getSASLMechanisms");
return saslMechanisms;
}
@@ -614,8 +569,6 @@
*/
public void addSASLMechanism(String saslMechanism)
{
- assert debugEnter(CLASS_NAME, "addSASLMechanism",
- String.valueOf(saslMechanism));
saslMechanisms.add(saslMechanism);
}
@@ -631,7 +584,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -650,8 +602,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("AuthenticationInfo(isAuthenticated=");
buffer.append(isAuthenticated);
@@ -751,9 +701,6 @@
public AuthenticationInfo duplicate(Entry newAuthenticationEntry,
Entry newAuthorizationEntry)
{
- assert debugEnter(CLASS_NAME, "duplicate",
- String.valueOf(newAuthenticationEntry),
- String.valueOf(newAuthorizationEntry));
AuthenticationInfo authInfo = new AuthenticationInfo();
diff --git a/opends/src/server/org/opends/server/types/AuthenticationType.java b/opends/src/server/org/opends/server/types/AuthenticationType.java
index 46ef86b..3358ef7 100644
--- a/opends/src/server/org/opends/server/types/AuthenticationType.java
+++ b/opends/src/server/org/opends/server/types/AuthenticationType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/BackupConfig.java b/opends/src/server/org/opends/server/types/BackupConfig.java
index 3940e54..dff2a37 100644
--- a/opends/src/server/org/opends/server/types/BackupConfig.java
+++ b/opends/src/server/org/opends/server/types/BackupConfig.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure for holding configuration
* information to use when performing a backup of a Directory Server
@@ -51,11 +46,6 @@
*/
public class BackupConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.BackupConfig";
@@ -106,10 +96,6 @@
public BackupConfig(BackupDirectory backupDirectory,
String backupID, boolean isIncremental)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(backupDirectory),
- String.valueOf(backupID),
- String.valueOf(isIncremental));
this.backupDirectory = backupDirectory;
this.backupID = backupID;
@@ -127,7 +113,6 @@
*/
public BackupDirectory getBackupDirectory()
{
- assert debugEnter(CLASS_NAME, "getBackupDirectory");
return backupDirectory;
}
@@ -145,7 +130,6 @@
*/
public String getBackupID()
{
- assert debugEnter(CLASS_NAME, "getBackupID");
return backupID;
}
@@ -163,7 +147,6 @@
*/
public boolean isIncremental()
{
- assert debugEnter(CLASS_NAME, "isIncremental");
return isIncremental;
}
@@ -182,7 +165,6 @@
*/
public String getIncrementalBaseID()
{
- assert debugEnter(CLASS_NAME, "getIncrementalBaseID");
return incrementalBaseID;
}
@@ -199,8 +181,6 @@
*/
public void setIncrementalBaseID(String incrementalBaseID)
{
- assert debugEnter(CLASS_NAME, "setIncrementalBaseID",
- String.valueOf(incrementalBaseID));
this.incrementalBaseID = incrementalBaseID;
}
@@ -217,7 +197,6 @@
*/
public boolean compressData()
{
- assert debugEnter(CLASS_NAME, "compressData");
return compressData;
}
@@ -233,8 +212,6 @@
*/
public void setCompressData(boolean compressData)
{
- assert debugEnter(CLASS_NAME, "setCompressData",
- String.valueOf(compressData));
this.compressData = compressData;
}
@@ -251,7 +228,6 @@
*/
public boolean encryptData()
{
- assert debugEnter(CLASS_NAME, "encryptData");
return encryptData;
}
@@ -267,8 +243,6 @@
*/
public void setEncryptData(boolean encryptData)
{
- assert debugEnter(CLASS_NAME, "setEncryptData",
- String.valueOf(encryptData));
this.encryptData = encryptData;
}
@@ -286,7 +260,6 @@
*/
public boolean hashData()
{
- assert debugEnter(CLASS_NAME, "hashData");
return hashData;
}
@@ -302,8 +275,6 @@
*/
public void setHashData(boolean hashData)
{
- assert debugEnter(CLASS_NAME, "setHashData",
- String.valueOf(hashData));
this.hashData = hashData;
}
@@ -322,7 +293,6 @@
*/
public boolean signHash()
{
- assert debugEnter(CLASS_NAME, "signHash");
return signHash;
}
@@ -338,8 +308,6 @@
*/
public void setSignHash(boolean signHash)
{
- assert debugEnter(CLASS_NAME, "setSignHash",
- String.valueOf(signHash));
this.signHash = signHash;
}
diff --git a/opends/src/server/org/opends/server/types/BackupDirectory.java b/opends/src/server/org/opends/server/types/BackupDirectory.java
index bf62ce6..b4dd07e 100644
--- a/opends/src/server/org/opends/server/types/BackupDirectory.java
+++ b/opends/src/server/org/opends/server/types/BackupDirectory.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -39,7 +39,10 @@
import org.opends.server.config.ConfigException;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -55,11 +58,6 @@
*/
public class BackupDirectory
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.BackupDirectory";
@@ -98,8 +96,6 @@
*/
public BackupDirectory(String path, DN configEntryDN)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(path),
- String.valueOf(configEntryDN));
this.path = path;
this.configEntryDN = configEntryDN;
@@ -124,9 +120,6 @@
public BackupDirectory(String path, DN configEntryDN,
LinkedHashMap<String,BackupInfo> backups)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(path),
- String.valueOf(configEntryDN),
- String.valueOf(backups));
this.path = path;
this.configEntryDN = configEntryDN;
@@ -151,7 +144,6 @@
*/
public String getPath()
{
- assert debugEnter(CLASS_NAME, "getPath");
return path;
}
@@ -167,7 +159,6 @@
*/
public DN getConfigEntryDN()
{
- assert debugEnter(CLASS_NAME, "getConfigEntryDN");
return configEntryDN;
}
@@ -184,7 +175,6 @@
*/
public LinkedHashMap<String,BackupInfo> getBackups()
{
- assert debugEnter(CLASS_NAME, "getBackups");
return backups;
}
@@ -202,8 +192,6 @@
*/
public BackupInfo getBackupInfo(String backupID)
{
- assert debugEnter(CLASS_NAME, "getBackupInfo",
- String.valueOf(backupID));
return backups.get(backupID);
}
@@ -220,7 +208,6 @@
*/
public BackupInfo getLatestBackup()
{
- assert debugEnter(CLASS_NAME, "getLatestBackup");
BackupInfo latestBackup = null;
for (BackupInfo backup : backups.values())
@@ -257,8 +244,6 @@
public void addBackup(BackupInfo backupInfo)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "addBackup",
- String.valueOf(backupInfo));
String backupID = backupInfo.getBackupID();
if (backups.containsKey(backupID))
@@ -288,8 +273,6 @@
public void removeBackup(String backupID)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "removeBackup",
- String.valueOf(backupID));
if (! backups.containsKey(backupID))
{
@@ -323,7 +306,6 @@
*/
public String getDescriptorPath()
{
- assert debugEnter(CLASS_NAME, "getDescriptorPath");
return path + File.separator + BACKUP_DIRECTORY_DESCRIPTOR_FILE;
}
@@ -339,7 +321,6 @@
public void writeBackupDirectoryDescriptor()
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeBackupDirectoryDescriptor");
// First make sure that the target directory exists. If it
@@ -353,8 +334,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "writeBackupDirectoryDescriptor", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BACKUPDIRECTORY_CANNOT_CREATE_DIRECTORY;
String message = getMessage(msgID, path,
@@ -425,11 +408,13 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "writeBackupDirectoryDescriptor", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID =
- MSGID_BACKUPDIRECTORY_CANNOT_DELETE_SAVED_DESCRIPTOR;
+ int msgID =
+ MSGID_BACKUPDIRECTORY_CANNOT_DELETE_SAVED_DESCRIPTOR;
String message = getMessage(msgID, savedDescriptorFilePath,
stackTraceToSingleLineString(e),
newDescriptorFilePath,
@@ -444,11 +429,13 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "writeBackupDirectoryDescriptor", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
- MSGID_BACKUPDIRECTORY_CANNOT_RENAME_CURRENT_DESCRIPTOR;
+ MSGID_BACKUPDIRECTORY_CANNOT_RENAME_CURRENT_DESCRIPTOR;
String message = getMessage(msgID, descriptorFilePath,
savedDescriptorFilePath,
stackTraceToSingleLineString(e),
@@ -465,8 +452,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "writeBackupDirectoryDescriptor", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_BACKUPDIRECTORY_CANNOT_RENAME_NEW_DESCRIPTOR;
String message = getMessage(msgID, newDescriptorFilePath,
@@ -500,8 +489,6 @@
readBackupDirectoryDescriptor(String path)
throws IOException, ConfigException
{
- assert debugEnter(CLASS_NAME, "readBackupDirectoryDescriptor",
- String.valueOf(path));
// Make sure that the descriptor file exists.
diff --git a/opends/src/server/org/opends/server/types/BackupInfo.java b/opends/src/server/org/opends/server/types/BackupInfo.java
index 3c71ad0..27d4fa4 100644
--- a/opends/src/server/org/opends/server/types/BackupInfo.java
+++ b/opends/src/server/org/opends/server/types/BackupInfo.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -38,7 +38,10 @@
import org.opends.server.config.ConfigException;
import org.opends.server.util.Base64;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -52,11 +55,6 @@
*/
public class BackupInfo
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.BackupInfo";
@@ -205,20 +203,6 @@
HashSet<String> dependencies,
HashMap<String,String> backupProperties)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(backupDirectory),
- String.valueOf(backupID),
- String.valueOf(backupDate),
- String.valueOf(isIncremental),
- String.valueOf(isCompressed),
- String.valueOf(isEncrypted),
- String.valueOf(unsignedHash),
- String.valueOf(signedHash),
- String.valueOf(dependencies),
- String.valueOf(backupProperties)
- });
this.backupDirectory = backupDirectory;
this.backupID = backupID;
@@ -259,7 +243,6 @@
*/
public BackupDirectory getBackupDirectory()
{
- assert debugEnter(CLASS_NAME, "getBackupDirectory");
return backupDirectory;
}
@@ -273,7 +256,6 @@
*/
public String getBackupID()
{
- assert debugEnter(CLASS_NAME, "getBackupID");
return backupID;
}
@@ -300,7 +282,6 @@
*/
public boolean isIncremental()
{
- assert debugEnter(CLASS_NAME, "isIncremental");
return isIncremental;
}
@@ -315,7 +296,6 @@
*/
public boolean isCompressed()
{
- assert debugEnter(CLASS_NAME, "isCompressed");
return isCompressed;
}
@@ -330,7 +310,6 @@
*/
public boolean isEncrypted()
{
- assert debugEnter(CLASS_NAME, "isEncrypted");
return isEncrypted;
}
@@ -346,7 +325,6 @@
*/
public byte[] getUnsignedHash()
{
- assert debugEnter(CLASS_NAME, "getUnsignedHash");
return unsignedHash;
}
@@ -362,7 +340,6 @@
*/
public byte[] getSignedHash()
{
- assert debugEnter(CLASS_NAME, "getSignedHash");
return signedHash;
}
@@ -382,7 +359,6 @@
*/
public HashSet<String> getDependencies()
{
- assert debugEnter(CLASS_NAME, "getDependencies");
return dependencies;
}
@@ -402,8 +378,6 @@
*/
public boolean dependsOn(String backupID)
{
- assert debugEnter(CLASS_NAME, "dependsOn",
- String.valueOf(backupID));
return dependencies.contains(backupID);
}
@@ -425,7 +399,6 @@
*/
public HashMap<String,String> getBackupProperties()
{
- assert debugEnter(CLASS_NAME, "getBackupProperties");
return backupProperties;
}
@@ -443,8 +416,6 @@
*/
public String getBackupProperty(String name)
{
- assert debugEnter(CLASS_NAME, "getBackupProperty",
- String.valueOf(name));
return backupProperties.get(name);
}
@@ -461,7 +432,6 @@
*/
public LinkedList<String> encode()
{
- assert debugEnter(CLASS_NAME, "encode");
LinkedList<String> list = new LinkedList<String>();
SimpleDateFormat dateFormat =
@@ -538,8 +508,6 @@
LinkedList<String> encodedInfo)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "decode",
- String.valueOf(encodedInfo));
String backupID = null;
Date backupDate = null;
@@ -639,9 +607,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_BACKUPINFO_CANNOT_DECODE;
+ int msgID = MSGID_BACKUPINFO_CANNOT_DECODE;
String message = getMessage(msgID, backupPath,
stackTraceToSingleLineString(e));
throw new ConfigException(msgID, message, e);
@@ -682,7 +653,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -700,8 +670,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
LinkedList<String> lines = encode();
for (String line : lines)
diff --git a/opends/src/server/org/opends/server/types/ByteString.java b/opends/src/server/org/opends/server/types/ByteString.java
index ccc830c..42f6588 100644
--- a/opends/src/server/org/opends/server/types/ByteString.java
+++ b/opends/src/server/org/opends/server/types/ByteString.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/ByteStringFactory.java b/opends/src/server/org/opends/server/types/ByteStringFactory.java
index 82078a5..7558f32 100644
--- a/opends/src/server/org/opends/server/types/ByteStringFactory.java
+++ b/opends/src/server/org/opends/server/types/ByteStringFactory.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -30,7 +30,6 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
@@ -40,11 +39,6 @@
*/
public final class ByteStringFactory
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.ByteStringFactory";
@@ -55,7 +49,6 @@
*/
public static ByteString create()
{
- assert debugEnter(CLASS_NAME, "create");
return new ASN1OctetString();
}
@@ -74,8 +67,6 @@
*/
public static ByteString create(byte[] value)
{
- assert debugEnter(CLASS_NAME, "create",
- "byte[" + value.length + "]");
return new ASN1OctetString(value);
}
@@ -94,7 +85,6 @@
*/
public static ByteString create(String value)
{
- assert debugEnter(CLASS_NAME, "create", value);
return new ASN1OctetString(value);
}
diff --git a/opends/src/server/org/opends/server/types/CacheEntry.java b/opends/src/server/org/opends/server/types/CacheEntry.java
index b03b6fd..2e70123 100644
--- a/opends/src/server/org/opends/server/types/CacheEntry.java
+++ b/opends/src/server/org/opends/server/types/CacheEntry.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -30,7 +30,6 @@
import org.opends.server.api.Backend;
-import static org.opends.server.loggers.Debug.*;
@@ -40,11 +39,6 @@
*/
public class CacheEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.CacheEntry";
@@ -68,9 +62,6 @@
*/
public CacheEntry(Entry entry, Backend backend, long entryID)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(entry),
- String.valueOf(backend),
- String.valueOf(entryID));
this.entry = entry;
this.backend = backend;
@@ -86,7 +77,6 @@
*/
public Entry getEntry()
{
- assert debugEnter(CLASS_NAME, "getEntry");
return entry;
}
@@ -100,7 +90,6 @@
*/
public void setEntry(Entry entry)
{
- assert debugEnter(CLASS_NAME, "setEntry", String.valueOf(entry));
this.entry = entry;
}
@@ -114,7 +103,6 @@
*/
public Backend getBackend()
{
- assert debugEnter(CLASS_NAME, "getBackend");
return backend;
}
@@ -128,8 +116,6 @@
*/
public void setBackend(Backend backend)
{
- assert debugEnter(CLASS_NAME, "setBackend",
- String.valueOf(backend));
this.backend = backend;
}
@@ -143,7 +129,6 @@
*/
public long getEntryID()
{
- assert debugEnter(CLASS_NAME, "getEntryID");
return entryID;
}
@@ -157,7 +142,6 @@
*/
public void setEntryID(long entryID)
{
- assert debugEnter(CLASS_NAME, "setEntryID");
this.entryID = entryID;
}
@@ -171,7 +155,6 @@
*/
public DN getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return entry.getDN();
}
@@ -186,7 +169,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return (int) entryID;
}
@@ -205,7 +187,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
diff --git a/opends/src/server/org/opends/server/types/CancelRequest.java b/opends/src/server/org/opends/server/types/CancelRequest.java
index 88c6c84..776c32d 100644
--- a/opends/src/server/org/opends/server/types/CancelRequest.java
+++ b/opends/src/server/org/opends/server/types/CancelRequest.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure that can be used to hold
* information about a request to cancel or abandon an operation in
@@ -39,11 +34,6 @@
*/
public class CancelRequest
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.CancelRequest";
@@ -74,9 +64,6 @@
public CancelRequest(boolean notifyOriginalRequestor,
String cancelReason)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(notifyOriginalRequestor),
- String.valueOf(cancelReason));
this.notifyOriginalRequestor = notifyOriginalRequestor;
this.cancelReason = cancelReason;
@@ -103,10 +90,6 @@
String cancelReason,
StringBuilder responseMessage)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(notifyOriginalRequestor),
- String.valueOf(cancelReason),
- "java.lang.StringBuilder");
this.notifyOriginalRequestor = notifyOriginalRequestor;
this.cancelReason = cancelReason;
@@ -125,7 +108,6 @@
*/
public final boolean notifyOriginalRequestor()
{
- assert debugEnter(CLASS_NAME, "notifyOriginalRequestor");
return notifyOriginalRequestor;
}
@@ -141,7 +123,6 @@
*/
public final String getCancelReason()
{
- assert debugEnter(CLASS_NAME, "getCancelReason");
return cancelReason;
}
@@ -159,7 +140,6 @@
*/
public final StringBuilder getResponseMessage()
{
- assert debugEnter(CLASS_NAME, "getResponseMessage");
return responseMessage;
}
@@ -175,8 +155,6 @@
*/
public final void addResponseMessage(String message)
{
- assert debugEnter(CLASS_NAME, "addResponseMessage",
- String.valueOf(message));
responseMessage.append(message);
}
diff --git a/opends/src/server/org/opends/server/types/CancelResult.java b/opends/src/server/org/opends/server/types/CancelResult.java
index 527eed8..7f03e59 100644
--- a/opends/src/server/org/opends/server/types/CancelResult.java
+++ b/opends/src/server/org/opends/server/types/CancelResult.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/CancelledOperationException.java b/opends/src/server/org/opends/server/types/CancelledOperationException.java
index 4872036..18e60ce 100644
--- a/opends/src/server/org/opends/server/types/CancelledOperationException.java
+++ b/opends/src/server/org/opends/server/types/CancelledOperationException.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown if the operation
* being processed is cancelled for some reason (e.g., an abandon or
@@ -40,11 +35,6 @@
public class CancelledOperationException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.CancelledOperationException";
@@ -78,7 +68,6 @@
{
super();
- assert debugConstructor(CLASS_NAME, String.valueOf(cancelResult));
this.cancelResult = cancelResult;
this.messageID = -1;
@@ -103,9 +92,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(cancelResult),
- String.valueOf(message),
- String.valueOf(messageID));
this.cancelResult = cancelResult;
this.messageID = messageID;
@@ -122,7 +108,6 @@
*/
public final CancelResult getCancelResult()
{
- assert debugEnter(CLASS_NAME, "getCancelResult");
return cancelResult;
}
@@ -139,7 +124,6 @@
*/
public final int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/types/CommonSchemaElements.java b/opends/src/server/org/opends/server/types/CommonSchemaElements.java
index d91916d..b0832ae 100644
--- a/opends/src/server/org/opends/server/types/CommonSchemaElements.java
+++ b/opends/src/server/org/opends/server/types/CommonSchemaElements.java
@@ -26,10 +26,6 @@
*/
package org.opends.server.types;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.toLowerCase;
import static org.opends.server.util.Validator.*;
@@ -69,11 +65,6 @@
* protocol may be associated with a particular schema file.
*/
public abstract class CommonSchemaElements {
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.CommonSchemaElements";
// Indicates whether this definition is declared "obsolete".
private final boolean isObsolete;
@@ -134,10 +125,6 @@
boolean isObsolete, Map<String, List<String>> extraProperties)
throws NullPointerException {
- assert debugConstructor(CLASS_NAME, String.valueOf(primaryName),
- String.valueOf(names), String.valueOf(oid), String
- .valueOf(description), String.valueOf(isObsolete), String
- .valueOf(extraProperties));
// Make sure mandatory parameters are specified.
if (oid == null) {
@@ -197,7 +184,6 @@
* <code>null</code> if there is no primary name.
*/
public final String getPrimaryName() {
- assert debugEnter(CLASS_NAME, "getPrimaryName");
return primaryName;
}
@@ -211,7 +197,6 @@
* type, or <code>null</code> if there is no primary name.
*/
public final String getNormalizedPrimaryName() {
- assert debugEnter(CLASS_NAME, "getNormalizedPrimaryName");
return lowerName;
}
@@ -228,7 +213,6 @@
* may be used to reference this schema definition.
*/
public final Iterable<String> getNormalizedNames() {
- assert debugEnter(CLASS_NAME, "getNormalizedNames");
return names.keySet();
}
@@ -243,7 +227,6 @@
* that may be used to reference this schema definition.
*/
public final Iterable<String> getUserDefinedNames() {
- assert debugEnter(CLASS_NAME, "getUserDefinedNames");
return names.values();
}
@@ -259,8 +242,6 @@
* this schema definition, or <code>false</code> if not.
*/
public final boolean hasName(String lowerName) {
- assert debugEnter(CLASS_NAME, "hasName", String
- .valueOf(lowerName));
return names.containsKey(lowerName);
}
@@ -273,7 +254,6 @@
* @return The OID for this schema definition.
*/
public final String getOID() {
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -288,7 +268,6 @@
* @return The name or OID for this schema definition.
*/
public final String getNameOrOID() {
- assert debugEnter(CLASS_NAME, "getNameOrOID");
if (primaryName != null) {
return primaryName;
@@ -311,8 +290,6 @@
* or <code>false</code> if not.
*/
public final boolean hasNameOrOID(String lowerValue) {
- assert debugEnter(CLASS_NAME, "hasNameOrOID", String
- .valueOf(lowerValue));
if (names.containsKey(lowerValue)) {
return true;
@@ -332,7 +309,6 @@
* is not known or if it is not stored in any schema file.
*/
public final String getSchemaFile() {
- assert debugEnter(CLASS_NAME, "getSchemaFile");
List<String> values = extraProperties
.get(SCHEMA_PROPERTY_FILENAME);
@@ -356,8 +332,6 @@
* definition for this schema element.
*/
public final void setSchemaFile(String schemaFile) {
- assert debugEnter(CLASS_NAME, "setSchemaFile",
- String.valueOf(schemaFile));
setExtraProperty(SCHEMA_PROPERTY_FILENAME, schemaFile);
}
@@ -371,7 +345,6 @@
* <code>null</code> if there is no description.
*/
public final String getDescription() {
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -385,7 +358,6 @@
* "obsolete", or <code>false</code> if not.
*/
public final boolean isObsolete() {
- assert debugEnter(CLASS_NAME, "isObsolete");
return isObsolete;
}
@@ -400,7 +372,6 @@
* associated with this schema definition.
*/
public final Iterable<String> getExtraPropertyNames() {
- assert debugEnter(CLASS_NAME, "getExtraPropertyNames");
return extraProperties.keySet();
}
@@ -419,8 +390,6 @@
* <code>null</code> if no such property is defined.
*/
public final Iterable<String> getExtraProperty(String name) {
- assert debugEnter(CLASS_NAME, "getExtraProperty", String
- .valueOf(name));
return extraProperties.get(name);
}
@@ -440,8 +409,6 @@
* removed.
*/
public final void setExtraProperty(String name, String value) {
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(value));
ensureNotNull(name);
@@ -475,8 +442,6 @@
*/
public final void setExtraProperty(String name,
List<String> values) {
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(values));
ensureNotNull(name);
@@ -504,7 +469,6 @@
* this schema definition, or <code>false</code> if not.
*/
public final boolean equals(Object o) {
- assert debugEnter(CLASS_NAME, "equals");
if (this == o) {
return true;
@@ -527,7 +491,6 @@
* @return The hash code for this schema definition.
*/
public final int hashCode() {
- assert debugEnter(CLASS_NAME, "hashCode");
return oid.hashCode();
}
@@ -542,7 +505,6 @@
* the form specified in RFC 2252.
*/
public final String toString() {
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, true);
@@ -564,9 +526,6 @@
*/
public final void toString(StringBuilder buffer,
boolean includeFileElement) {
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(includeFileElement));
buffer.append("( ");
buffer.append(oid);
diff --git a/opends/src/server/org/opends/server/types/ConfigChangeResult.java b/opends/src/server/org/opends/server/types/ConfigChangeResult.java
index bf3abf4..bb60fd6 100644
--- a/opends/src/server/org/opends/server/types/ConfigChangeResult.java
+++ b/opends/src/server/org/opends/server/types/ConfigChangeResult.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -32,7 +32,6 @@
import java.util.Iterator;
import java.util.List;
-import static org.opends.server.loggers.Debug.*;
@@ -42,11 +41,6 @@
*/
public class ConfigChangeResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.ConfigChangeResult";
@@ -78,8 +72,6 @@
public ConfigChangeResult(ResultCode resultCode,
boolean adminActionRequired)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(adminActionRequired));
this.resultCode = resultCode;
this.adminActionRequired = adminActionRequired;
@@ -105,9 +97,6 @@
boolean adminActionRequired,
ArrayList<String> messages)
{
- assert debugEnter(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(adminActionRequired),
- String.valueOf(messages));
this.resultCode = resultCode;
this.adminActionRequired = adminActionRequired;
@@ -123,7 +112,6 @@
*/
public ResultCode getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -138,8 +126,6 @@
*/
public void setResultCode(ResultCode resultCode)
{
- assert debugEnter(CLASS_NAME, "setResultCode",
- String.valueOf(resultCode));
this.resultCode = resultCode;
}
@@ -156,7 +142,6 @@
*/
public boolean adminActionRequired()
{
- assert debugEnter(CLASS_NAME, "adminActionRequired");
return adminActionRequired;
}
@@ -174,8 +159,6 @@
*/
public void setAdminActionRequired(boolean adminActionRequired)
{
- assert debugEnter(CLASS_NAME, "setAdminActionRequired",
- String.valueOf(adminActionRequired));
this.adminActionRequired = adminActionRequired;
}
@@ -192,7 +175,6 @@
*/
public List<String> getMessages()
{
- assert debugEnter(CLASS_NAME, "getMessages");
return messages;
}
@@ -208,8 +190,6 @@
*/
public void addMessage(String message)
{
- assert debugEnter(CLASS_NAME, "addMessage",
- String.valueOf(message));
messages.add(message);
}
@@ -223,7 +203,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -241,8 +220,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("ConfigChangeResult(result=");
buffer.append(resultCode.toString());
diff --git a/opends/src/server/org/opends/server/types/Control.java b/opends/src/server/org/opends/server/types/Control.java
index ccd9680..a287d28 100644
--- a/opends/src/server/org/opends/server/types/Control.java
+++ b/opends/src/server/org/opends/server/types/Control.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -30,7 +30,6 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
@@ -40,11 +39,6 @@
*/
public class Control
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.Control";
@@ -69,8 +63,6 @@
*/
public Control(String oid, boolean isCritical)
{
- assert debugEnter(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical));
this.oid = oid;
this.isCritical = isCritical;
@@ -91,9 +83,6 @@
public Control(String oid, boolean isCritical,
ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, String.valueOf(oid),
- String.valueOf(isCritical),
- String.valueOf(value));
this.oid = oid;
this.isCritical = isCritical;
@@ -109,7 +98,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -123,7 +111,6 @@
*/
public void setOID(String oid)
{
- assert debugEnter(CLASS_NAME, "setOID", String.valueOf(oid));
this.oid = oid;
}
@@ -139,7 +126,6 @@
*/
public boolean isCritical()
{
- assert debugEnter(CLASS_NAME, "isCritical");
return isCritical;
}
@@ -156,8 +142,6 @@
*/
public void setCritical(boolean isCritical)
{
- assert debugEnter(CLASS_NAME, "setCritical",
- String.valueOf(isCritical));
this.isCritical = isCritical;
}
@@ -172,7 +156,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -187,7 +170,6 @@
*/
public boolean hasValue()
{
- assert debugEnter(CLASS_NAME, "hasValue");
return (value != null);
}
@@ -201,7 +183,6 @@
*/
public void setValue(ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
this.value = value;
}
@@ -215,7 +196,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -233,8 +213,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("Control(oid=");
buffer.append(oid);
diff --git a/opends/src/server/org/opends/server/types/CryptoManager.java b/opends/src/server/org/opends/server/types/CryptoManager.java
index a3d04a1..ffb9bfd 100644
--- a/opends/src/server/org/opends/server/types/CryptoManager.java
+++ b/opends/src/server/org/opends/server/types/CryptoManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -48,7 +48,10 @@
import org.opends.server.config.ConfigException;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.util.StaticUtils.*;
@@ -65,11 +68,6 @@
*/
public class CryptoManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.CryptoManager";
@@ -103,7 +101,6 @@
public CryptoManager()
throws ConfigException, InitializationException
{
- assert debugConstructor(CLASS_NAME);
// FIXME -- Get the defaults from the configuration rather than
// hard-coding them.
@@ -125,7 +122,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Number this.
throw new InitializationException(-1,
@@ -140,7 +140,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Number this.
throw new InitializationException(-1,
@@ -155,7 +158,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<init>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// FIXME -- Number this.
throw new InitializationException(-1,
@@ -173,7 +179,6 @@
*/
public SecureRandom getSecureRandom()
{
- assert debugEnter(CLASS_NAME, "getSecureRandom");
// FIXME -- Is this threadsafe? Can we share a single instance
// among all threads?
@@ -189,8 +194,6 @@
*/
public String getPreferredMessageDigestAlgorithm()
{
- assert debugEnter(CLASS_NAME,
- "getPreferredMessageDigestAlgorithm");
return preferredDigestAlgorithm;
}
@@ -211,7 +214,6 @@
public MessageDigest getPreferredMessageDigest()
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "getPreferredMessageDigest");
return MessageDigest.getInstance(preferredDigestAlgorithm);
}
@@ -235,8 +237,6 @@
public MessageDigest getMessageDigest(String digestAlgorithm)
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "getMessageDigest",
- String.valueOf(digestAlgorithm));
return MessageDigest.getInstance(digestAlgorithm);
}
@@ -258,8 +258,6 @@
public byte[] digest(byte[] data)
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest",
- "byte[" + data.length + "]");
return MessageDigest.getInstance(preferredDigestAlgorithm).
digest(data);
@@ -284,9 +282,6 @@
public byte[] digest(String digestAlgorithm, byte[] data)
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest",
- String.valueOf(digestAlgorithm),
- "byte[" + data.length + "]");
return MessageDigest.getInstance(digestAlgorithm).digest(data);
}
@@ -314,7 +309,6 @@
public byte[] digest(InputStream inputStream)
throws IOException, NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest", "java.io.InputStream");
MessageDigest digest =
MessageDigest.getInstance(preferredDigestAlgorithm);
@@ -360,7 +354,6 @@
InputStream inputStream)
throws IOException, NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest", "java.io.InputStream");
MessageDigest digest = MessageDigest.getInstance(digestAlgorithm);
@@ -388,8 +381,6 @@
*/
public String getPreferredMACAlgorithm()
{
- assert debugEnter(CLASS_NAME,
- "getPreferredMessageDigestAlgorithm");
return preferredMACAlgorithm;
}
@@ -412,7 +403,6 @@
public Mac getPreferredMACProvider()
throws NoSuchAlgorithmException, InvalidKeyException
{
- assert debugEnter(CLASS_NAME, "getPreferredMACProvider");
Mac mac = Mac.getInstance(preferredMACAlgorithm);
mac.init(secretKey);
@@ -440,8 +430,6 @@
public Mac getMACProvider(String macAlgorithm)
throws NoSuchAlgorithmException, InvalidKeyException
{
- assert debugEnter(CLASS_NAME, "getMACProvider",
- String.valueOf(macAlgorithm));
Mac mac = Mac.getInstance(macAlgorithm);
mac.init(secretKey);
@@ -466,7 +454,6 @@
public byte[] mac(byte[] data)
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "mac", "byte[" + data.length + "]");
return Mac.getInstance(preferredMACAlgorithm).doFinal(data);
}
@@ -489,8 +476,6 @@
public byte[] mac(String macAlgorithm, byte[] data)
throws NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "mac", String.valueOf(macAlgorithm),
- "byte[" + data.length + "]");
return Mac.getInstance(macAlgorithm).doFinal(data);
}
@@ -518,7 +503,6 @@
public byte[] mac(InputStream inputStream)
throws IOException, NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest", "java.io.InputStream");
Mac mac = Mac.getInstance(preferredMACAlgorithm);
@@ -561,9 +545,6 @@
public byte[] mac(String macAlgorithm, InputStream inputStream)
throws IOException, NoSuchAlgorithmException
{
- assert debugEnter(CLASS_NAME, "digest",
- String.valueOf(macAlgorithm),
- "java.io.InputStream");
Mac mac = Mac.getInstance(macAlgorithm);
@@ -591,7 +572,6 @@
*/
public String getPreferredCipherAlgorithm()
{
- assert debugEnter(CLASS_NAME, "getPreferredCipherAlgorithm");
return preferredCipher;
}
@@ -629,8 +609,6 @@
InvalidKeyException,
InvalidAlgorithmParameterException
{
- assert debugEnter(CLASS_NAME, "getPreferredCipher",
- String.valueOf(cipherMode));
Cipher cipher = Cipher.getInstance(preferredCipher);
@@ -676,9 +654,6 @@
InvalidKeyException,
InvalidAlgorithmParameterException
{
- assert debugEnter(CLASS_NAME, "getCipher",
- String.valueOf(cipherAlgorithm),
- String.valueOf(cipherMode));
Cipher cipher = Cipher.getInstance(cipherAlgorithm);
@@ -708,8 +683,6 @@
public byte[] encrypt(byte[] data)
throws GeneralSecurityException
{
- assert debugEnter(CLASS_NAME, "encrypt",
- "byte[" + data.length + "]");
Cipher cipher = Cipher.getInstance(preferredCipher);
@@ -738,8 +711,6 @@
public byte[] decrypt(byte[] data)
throws GeneralSecurityException
{
- assert debugEnter(CLASS_NAME, "decrypt",
- "byte[" + data.length + "]");
Cipher cipher = Cipher.getInstance(preferredCipher);
@@ -770,8 +741,6 @@
public byte[] encrypt(String cipherAlgorithm, byte[] data)
throws GeneralSecurityException
{
- assert debugEnter(CLASS_NAME, "encrypt",
- "byte[" + data.length + "]");
Cipher cipher = Cipher.getInstance(cipherAlgorithm);
@@ -802,8 +771,6 @@
public byte[] decrypt(String cipherAlgorithm, byte[] data)
throws GeneralSecurityException
{
- assert debugEnter(CLASS_NAME, "decrypt",
- "byte[" + data.length + "]");
Cipher cipher = Cipher.getInstance(cipherAlgorithm);
diff --git a/opends/src/server/org/opends/server/types/DITContentRule.java b/opends/src/server/org/opends/server/types/DITContentRule.java
index 3bd23d4..05eac21 100644
--- a/opends/src/server/org/opends/server/types/DITContentRule.java
+++ b/opends/src/server/org/opends/server/types/DITContentRule.java
@@ -38,8 +38,6 @@
import org.opends.server.schema.DITContentRuleSyntax;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -57,11 +55,6 @@
public final class DITContentRule
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.DITContentRule";
@@ -138,16 +131,6 @@
boolean isObsolete,
Map<String,List<String>> extraProperties)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(definition),
- String.valueOf(structuralClass),
- String.valueOf(names),
- String.valueOf(description),
- String.valueOf(auxiliaryClasses),
- String.valueOf(requiredAttributes),
- String.valueOf(optionalAttributes),
- String.valueOf(prohibitedAttributes),
- String.valueOf(isObsolete),
- String.valueOf(extraProperties));
ensureNotNull(definition, structuralClass);
@@ -229,7 +212,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -273,7 +255,6 @@
*/
public ObjectClass getStructuralClass()
{
- assert debugEnter(CLASS_NAME, "getStructuralClass");
return structuralClass;
}
@@ -291,7 +272,6 @@
*/
public Map<String,String> getNames()
{
- assert debugEnter(CLASS_NAME, "getNames");
return names;
}
@@ -307,7 +287,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
if (names.isEmpty())
{
@@ -334,8 +313,6 @@
*/
public boolean hasName(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasName",
- String.valueOf(lowerName));
return names.containsKey(lowerName);
}
@@ -352,7 +329,6 @@
*/
public String getSchemaFile()
{
- assert debugEnter(CLASS_NAME, "getSchemaFile");
List<String> values =
extraProperties.get(SCHEMA_PROPERTY_FILENAME);
@@ -375,8 +351,6 @@
*/
public void setSchemaFile(String schemaFile)
{
- assert debugEnter(CLASS_NAME, "setSchemaFile",
- String.valueOf(schemaFile));
setExtraProperty(SCHEMA_PROPERTY_FILENAME, schemaFile);
}
@@ -391,7 +365,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -407,7 +380,6 @@
*/
public Set<ObjectClass> getAuxiliaryClasses()
{
- assert debugEnter(CLASS_NAME, "getAuxiliaryClasses");
return auxiliaryClasses;
}
@@ -427,7 +399,6 @@
*/
public boolean isAllowedAuxiliaryClass(ObjectClass auxiliaryClass)
{
- assert debugEnter(CLASS_NAME, "isAllowedAuxiliaryClass");
return auxiliaryClasses.contains(auxiliaryClass);
}
@@ -443,7 +414,6 @@
*/
public Set<AttributeType> getRequiredAttributes()
{
- assert debugEnter(CLASS_NAME, "getRequiredAttributes");
return requiredAttributes;
}
@@ -462,8 +432,6 @@
*/
public boolean isRequired(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isRequired",
- String.valueOf(attributeType));
return requiredAttributes.contains(attributeType);
}
@@ -479,7 +447,6 @@
*/
public Set<AttributeType> getOptionalAttributes()
{
- assert debugEnter(CLASS_NAME, "getOptionalAttributes");
return optionalAttributes;
}
@@ -498,8 +465,6 @@
*/
public boolean isOptional(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isOptional",
- String.valueOf(attributeType));
return optionalAttributes.contains(attributeType);
}
@@ -519,8 +484,6 @@
*/
public boolean isRequiredOrOptional(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isRequiredOrOptional",
- String.valueOf(attributeType));
return (requiredAttributes.contains(attributeType) ||
optionalAttributes.contains(attributeType));
@@ -547,8 +510,6 @@
public boolean isRequiredOrOptional(AttributeType attributeType,
boolean acceptEmpty)
{
- assert debugEnter(CLASS_NAME, "isRequiredOrOptional",
- String.valueOf(attributeType));
if (acceptEmpty &&
(requiredAttributes.isEmpty() ||
@@ -572,7 +533,6 @@
*/
public Set<AttributeType> getProhibitedAttributes()
{
- assert debugEnter(CLASS_NAME, "getProhibitedAttributes");
return prohibitedAttributes;
}
@@ -592,8 +552,6 @@
*/
public boolean isProhibited(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isProhibited",
- String.valueOf(attributeType));
return prohibitedAttributes.contains(attributeType);
}
@@ -608,7 +566,6 @@
*/
public boolean isObsolete()
{
- assert debugEnter(CLASS_NAME, "isObsolete");
return isObsolete;
}
@@ -626,7 +583,6 @@
*/
public Map<String,List<String>> getExtraProperties()
{
- assert debugEnter(CLASS_NAME, "getExtraProperties");
return extraProperties;
}
@@ -646,8 +602,6 @@
*/
public List<String> getExtraProperty(String propertyName)
{
- assert debugEnter(CLASS_NAME, "getExtraProperty",
- String.valueOf(propertyName));
return extraProperties.get(propertyName);
}
@@ -665,8 +619,6 @@
*/
public void setExtraProperty(String name, String value)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(value));
ensureNotNull(name);
@@ -696,8 +648,6 @@
*/
public void setExtraProperty(String name, List<String> values)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(values));
ensureNotNull(name);
@@ -730,7 +680,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals");
if (this == o)
{
@@ -775,7 +724,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return structuralClass.hashCode();
}
@@ -791,7 +739,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, true);
@@ -814,9 +761,6 @@
public void toString(StringBuilder buffer,
boolean includeFileElement)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(includeFileElement));
buffer.append("( ");
buffer.append(structuralClass.getOID());
diff --git a/opends/src/server/org/opends/server/types/DITStructureRule.java b/opends/src/server/org/opends/server/types/DITStructureRule.java
index 9046ef2..0b058c0 100644
--- a/opends/src/server/org/opends/server/types/DITStructureRule.java
+++ b/opends/src/server/org/opends/server/types/DITStructureRule.java
@@ -38,8 +38,6 @@
import org.opends.server.schema.DITStructureRuleSyntax;
-import static org.opends.server.loggers.Debug.*;
-import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -55,11 +53,6 @@
public final class DITStructureRule
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.DITStructureRule";
@@ -118,14 +111,6 @@
Set<DITStructureRule> superiorRules,
Map<String,List<String>> extraProperties)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(definition),
- String.valueOf(names),
- String.valueOf(ruleID),
- String.valueOf(description),
- String.valueOf(isObsolete),
- String.valueOf(nameForm),
- String.valueOf(superiorRules),
- String.valueOf(extraProperties));
ensureNotNull(definition);
@@ -177,7 +162,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -225,7 +209,6 @@
*/
public Map<String,String> getNames()
{
- assert debugEnter(CLASS_NAME, "getNames");
return names;
}
@@ -243,8 +226,6 @@
*/
public boolean hasName(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasName",
- String.valueOf(lowerName));
return names.containsKey(lowerName);
}
@@ -258,7 +239,6 @@
*/
public int getRuleID()
{
- assert debugEnter(CLASS_NAME, "getRuleID");
return ruleID;
}
@@ -274,7 +254,6 @@
*/
public String getNameOrRuleID()
{
- assert debugEnter(CLASS_NAME, "getNameOrRuleID");
if (names.isEmpty())
{
@@ -298,7 +277,6 @@
*/
public String getSchemaFile()
{
- assert debugEnter(CLASS_NAME, "getSchemaFile");
List<String> values =
extraProperties.get(SCHEMA_PROPERTY_FILENAME);
@@ -321,8 +299,6 @@
*/
public void setSchemaFile(String schemaFile)
{
- assert debugEnter(CLASS_NAME, "setSchemaFile",
- String.valueOf(schemaFile));
setExtraProperty(SCHEMA_PROPERTY_FILENAME, schemaFile);
}
@@ -336,7 +312,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -350,7 +325,6 @@
*/
public NameForm getNameForm()
{
- assert debugEnter(CLASS_NAME, "getNameForm");
return nameForm;
}
@@ -366,7 +340,6 @@
*/
public ObjectClass getStructuralClass()
{
- assert debugEnter(CLASS_NAME, "getStructuralObjectClass");
return nameForm.getStructuralClass();
}
@@ -380,7 +353,6 @@
*/
public Set<DITStructureRule> getSuperiorRules()
{
- assert debugEnter(CLASS_NAME, "getSuperiorRules");
return superiorRules;
}
@@ -396,7 +368,6 @@
*/
public boolean hasSuperiorRules()
{
- assert debugEnter(CLASS_NAME, "hasSuperiorRules");
return ((superiorRules != null) && (! superiorRules.isEmpty()));
}
@@ -411,7 +382,6 @@
*/
public boolean isObsolete()
{
- assert debugEnter(CLASS_NAME, "isObsolete");
return isObsolete;
}
@@ -429,7 +399,6 @@
*/
public Map<String,List<String>> getExtraProperties()
{
- assert debugEnter(CLASS_NAME, "getExtraProperties");
return extraProperties;
}
@@ -449,8 +418,6 @@
*/
public List<String> getExtraProperty(String propertyName)
{
- assert debugEnter(CLASS_NAME, "getExtraProperty",
- String.valueOf(propertyName));
return extraProperties.get(propertyName);
}
@@ -468,8 +435,6 @@
*/
public void setExtraProperty(String name, String value)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(value));
ensureNotNull(name);
@@ -499,8 +464,6 @@
*/
public void setExtraProperty(String name, List<String> values)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(values));
ensureNotNull(name);
@@ -529,7 +492,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals");
if (this == o)
{
@@ -554,7 +516,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return ruleID;
}
@@ -570,7 +531,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, true);
@@ -593,9 +553,6 @@
public void toString(StringBuilder buffer,
boolean includeFileElement)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(includeFileElement));
buffer.append("( ");
buffer.append(ruleID);
diff --git a/opends/src/server/org/opends/server/types/DN.java b/opends/src/server/org/opends/server/types/DN.java
index e860873..05757ee 100644
--- a/opends/src/server/org/opends/server/types/DN.java
+++ b/opends/src/server/org/opends/server/types/DN.java
@@ -45,7 +45,10 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.SchemaMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -60,11 +63,6 @@
public class DN
implements Comparable<DN>, Serializable
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.DN";
@@ -121,8 +119,6 @@
*/
public DN(RDN[] rdnComponents)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(rdnComponents));
if (rdnComponents == null)
{
@@ -149,8 +145,6 @@
*/
public DN(ArrayList<RDN> rdnComponents)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(rdnComponents));
if ((rdnComponents == null) || rdnComponents.isEmpty())
{
@@ -176,7 +170,6 @@
*/
public static DN nullDN()
{
- assert debugEnter(CLASS_NAME, "nullDN");
return NULL_DN;
}
@@ -193,7 +186,6 @@
*/
public boolean isNullDN()
{
- assert debugEnter(CLASS_NAME, "isNullDN");
return (numComponents == 0);
}
@@ -207,7 +199,6 @@
*/
public int getNumComponents()
{
- assert debugEnter(CLASS_NAME, "getNumComponents");
return numComponents;
}
@@ -224,7 +215,6 @@
*/
public RDN getRDN()
{
- assert debugEnter(CLASS_NAME, "getRDN");
if (numComponents == 0)
{
@@ -249,7 +239,6 @@
*/
public RDN getRDN(int pos)
{
- assert debugEnter(CLASS_NAME, "getRDN", String.valueOf(pos));
return rdnComponents[pos];
}
@@ -268,7 +257,6 @@
*/
public DN getParent()
{
- assert debugEnter(CLASS_NAME, "getParent");
if (numComponents <= 1)
{
@@ -298,7 +286,6 @@
*/
public DN getParentDNInSuffix()
{
- assert debugEnter(CLASS_NAME, "getParent");
if ((numComponents <= 1) ||
DirectoryServer.isNamingContext(this))
@@ -325,7 +312,6 @@
*/
public DN concat(RDN rdn)
{
- assert debugEnter(CLASS_NAME, "concat", String.valueOf(rdn));
RDN[] newComponents = new RDN[rdnComponents.length+1];
newComponents[0] = rdn;
@@ -349,8 +335,6 @@
*/
public DN concat(RDN[] rdnComponents)
{
- assert debugEnter(CLASS_NAME, "concat",
- String.valueOf(rdnComponents));
RDN[] newComponents =
new RDN[rdnComponents.length+this.rdnComponents.length];
@@ -378,8 +362,6 @@
*/
public DN concat(DN relativeBaseDN)
{
- assert debugEnter(CLASS_NAME, "concat",
- String.valueOf(relativeBaseDN));
RDN[] newComponents =
new RDN[rdnComponents.length+
@@ -408,8 +390,6 @@
*/
public boolean isDescendantOf(DN dn)
{
- assert debugEnter(CLASS_NAME, "isDescendantOf",
- String.valueOf(dn));
int offset = numComponents - dn.numComponents;
if (offset < 0)
@@ -442,7 +422,6 @@
*/
public boolean isAncestorOf(DN dn)
{
- assert debugEnter(CLASS_NAME, "isAncestorOf", String.valueOf(dn));
int offset = dn.numComponents - numComponents;
if (offset < 0)
@@ -477,7 +456,6 @@
public static DN decode(ByteString dnString)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(dnString));
// A null or empty DN is acceptable.
@@ -882,7 +860,6 @@
public static DN decode(String dnString)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(dnString));
// A null or empty DN is acceptable.
@@ -1282,9 +1259,6 @@
boolean allowExceptions)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "parseAttributeName",
- String.valueOf(dnBytes), String.valueOf(pos),
- "java.lang.StringBuilder");
int length = dnBytes.length;
@@ -1704,9 +1678,6 @@
boolean allowExceptions)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "parseAttributeName",
- String.valueOf(dnString), String.valueOf(pos),
- "java.lang.StringBuilder");
int length = dnString.length();
@@ -2117,9 +2088,6 @@
ByteString attributeValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "parseAttributeValue",
- String.valueOf(dnBytes), String.valueOf(pos),
- "java.lang.StringBuilder");
// All leading spaces have already been stripped so we can start
@@ -2228,7 +2196,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "parseAttributeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE;
String message = getMessage(msgID, new String(dnBytes),
@@ -2275,7 +2246,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "parseAttributeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen. Just in case, work around it by
// converting to a string and back.
@@ -2348,7 +2322,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "parseAttributeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen. Just in case, work around it by
// converting to a string and back.
@@ -2384,9 +2361,6 @@
ByteString attributeValue)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "parseAttributeValue",
- String.valueOf(dnString), String.valueOf(pos),
- "java.lang.StringBuilder");
// All leading spaces have already been stripped so we can start
@@ -2492,7 +2466,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "parseAttributeValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE;
String message = getMessage(msgID, dnString,
@@ -2721,9 +2698,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "appendHexChars", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE;
+ int msgID = MSGID_ATTR_SYNTAX_DN_ATTR_VALUE_DECODE_FAILURE;
String message = getMessage(msgID, dnString, String.valueOf(e));
throw new DirectoryException(ResultCode.INVALID_DN_SYNTAX,
message, msgID);
@@ -2745,7 +2725,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -2768,7 +2747,10 @@
// return false on an exception than to perform the checks to
// see if it meets the appropriate
// conditions.
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return false;
}
@@ -2784,7 +2766,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return normalizedDN.hashCode();
}
@@ -2798,7 +2779,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
if (dnString == null)
{
@@ -2835,8 +2815,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append(toString());
}
@@ -2850,7 +2828,6 @@
*/
public String toNormalizedString()
{
- assert debugEnter(CLASS_NAME, "toNormalizedString");
if (normalizedDN == null)
{
@@ -2887,8 +2864,6 @@
*/
public void toNormalizedString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toNormalizedString",
- "java.lang.StringBuilder");
buffer.append(toNormalizedString());
}
@@ -2910,7 +2885,6 @@
*/
public int compareTo(DN dn)
{
- assert debugEnter(CLASS_NAME, "compareTo", String.valueOf(dn));
if (equals(dn))
{
diff --git a/opends/src/server/org/opends/server/types/DebugLogCategory.java b/opends/src/server/org/opends/server/types/DebugLogCategory.java
deleted file mode 100644
index 1e03a59..0000000
--- a/opends/src/server/org/opends/server/types/DebugLogCategory.java
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.types;
-
-
-
-import java.util.HashMap;
-
-import static org.opends.server.messages.CoreMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.util.ServerConstants.*;
-
-
-
-/**
- * This enumeration defines the set of possible categories that may be
- * used when writing a message to a debug logger.
- */
-public enum DebugLogCategory
-{
- /**
- * The category that will be used for debug messages relating to
- * access control processing.
- */
- ACCESS_CONTROL(MSGID_DEBUG_CATEGORY_ACCESS_CONTROL),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * backend processing.
- */
- BACKEND(MSGID_DEBUG_CATEGORY_BACKEND),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * configuration processing.
- */
- CONFIGURATION(MSGID_DEBUG_CATEGORY_CONFIG),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * connection handling.
- */
- CONNECTION_HANDLING(MSGID_DEBUG_CATEGORY_CONNECTION_HANDLING),
-
-
-
- /**
- * The category that will be used to indicate that a constructor has
- * been invoked.
- */
- CONSTRUCTOR(MSGID_DEBUG_CATEGORY_CONSTRUCTOR),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * core server processing.
- */
- CORE_SERVER(MSGID_DEBUG_CATEGORY_CORE_SERVER),
-
-
-
- /**
- * The category that will be used for debug messages relating to raw
- * data read from a client.
- */
- DATA_READ(MSGID_DEBUG_CATEGORY_DATA_READ),
-
-
-
- /**
- * The category that will be used for debug messages relating to raw
- * data written to a client.
- */
- DATA_WRITE(MSGID_DEBUG_CATEGORY_DATA_WRITE),
-
-
-
- /**
- * The category that will be used for debug messages containing
- * details about an exception that was caught.
- */
- EXCEPTION(MSGID_DEBUG_CATEGORY_EXCEPTION),
-
-
-
- /**
- * The category that will be used for debug messages related to
- * processing an extended operation.
- */
- EXTENDED_OPERATION(MSGID_DEBUG_CATEGORY_EXTENDED_OPERATION),
-
-
-
- /**
- * The category that will be used for debug messages related to
- * processing in the directory server extensions.
- */
- EXTENSIONS(MSGID_DEBUG_CATEGORY_EXTENSIONS),
-
-
-
- /**
- * The category that will be used to indicate that a method has been
- * entered.
- */
- METHOD_ENTER(MSGID_DEBUG_CATEGORY_ENTER),
-
-
-
- /**
- * The category that will be used for debug messages related to
- * password policy processing.
- */
- PASSWORD_POLICY(MSGID_DEBUG_CATEGORY_PASSWORD_POLICY),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * plugin processing.
- */
- PLUGIN(MSGID_DEBUG_CATEGORY_PLUGIN),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * protocol elements read from a client.
- */
- PROTOCOL_READ(MSGID_DEBUG_CATEGORY_PROTOCOL_READ),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * protocol elements written to a client.
- */
- PROTOCOL_WRITE(MSGID_DEBUG_CATEGORY_PROTOCOL_WRITE),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * processing a SASL bind.
- */
- SASL_MECHANISM(MSGID_DEBUG_CATEGORY_SASL_MECHANISM),
-
-
-
- /**
- * The category that will be used for debug messages generated
- * during processing related to schema elements.
- */
- SCHEMA(MSGID_DEBUG_CATEGORY_SCHEMA),
-
-
-
- /**
- * The category that will be used for debug messages generated
- * during the Directory Server shutdown process.
- */
- SHUTDOWN(MSGID_DEBUG_CATEGORY_SHUTDOWN),
-
-
-
- /**
- * The category that will be used for debug messages generated
- * during the Directory Server startup process.
- */
- STARTUP(MSGID_DEBUG_CATEGORY_STARTUP),
-
-
-
- /***
- * The category that will be used for debug messages relating to
- * synchronization processing.
- */
- SYNCHRONIZATION(MSGID_DEBUG_CATEGORY_SYNCHRONIZATION),
-
-
-
- /**
- * The category that will be used for debug messages relating to raw
- * data read from the database.
- */
- DATABASE_READ(MSGID_DEBUG_CATEGORY_DATABASE_READ),
-
-
-
- /**
- * The category that will be used for debug messages relating to raw
- * data written to the database.
- */
- DATABASE_WRITE(MSGID_DEBUG_CATEGORY_DATABASE_WRITE),
-
-
-
- /**
- * The category that will be used for debug messages relating to
- * access to the database.
- */
- DATABASE_ACCESS(MSGID_DEBUG_CATEGORY_DATABASE_ACCESS);
-
-
-
- // The static hash mapping category names to their associated
- // category.
- private static HashMap<String,DebugLogCategory> nameMap;
-
- // The unique ID that indicates the category for the debug message.
- private int categoryID;
-
- // The short human-readable name for the category.
- private String categoryName;
-
-
-
- static
- {
- nameMap = new HashMap<String,DebugLogCategory>(19);
- nameMap.put(DEBUG_CATEGORY_ACCESS_CONTROL, ACCESS_CONTROL);
- nameMap.put(DEBUG_CATEGORY_BACKEND, BACKEND);
- nameMap.put(DEBUG_CATEGORY_CONFIG, CONFIGURATION);
- nameMap.put(DEBUG_CATEGORY_CONNECTION_HANDLING,
- CONNECTION_HANDLING);
- nameMap.put(DEBUG_CATEGORY_CONSTRUCTOR, CONSTRUCTOR);
- nameMap.put(DEBUG_CATEGORY_CORE_SERVER, CORE_SERVER);
- nameMap.put(DEBUG_CATEGORY_DATA_READ, DATA_READ);
- nameMap.put(DEBUG_CATEGORY_DATA_WRITE, DATA_WRITE);
- nameMap.put(DEBUG_CATEGORY_ENTER, METHOD_ENTER);
- nameMap.put(DEBUG_CATEGORY_EXCEPTION, EXCEPTION);
- nameMap.put(DEBUG_CATEGORY_EXTENDED_OPERATION,
- EXTENDED_OPERATION);
- nameMap.put(DEBUG_CATEGORY_EXTENSIONS, EXTENSIONS);
- nameMap.put(DEBUG_CATEGORY_PASSWORD_POLICY, PASSWORD_POLICY);
- nameMap.put(DEBUG_CATEGORY_PLUGIN, PLUGIN);
- nameMap.put(DEBUG_CATEGORY_PROTOCOL_READ, PROTOCOL_READ);
- nameMap.put(DEBUG_CATEGORY_PROTOCOL_WRITE, PROTOCOL_WRITE);
- nameMap.put(DEBUG_CATEGORY_SASL_MECHANISM, SASL_MECHANISM);
- nameMap.put(DEBUG_CATEGORY_SCHEMA, SCHEMA);
- nameMap.put(DEBUG_CATEGORY_SHUTDOWN, SHUTDOWN);
- nameMap.put(DEBUG_CATEGORY_STARTUP, STARTUP);
- nameMap.put(DEBUG_CATEGORY_SYNCHRONIZATION, SYNCHRONIZATION);
- nameMap.put(DEBUG_CATEGORY_DATABASE_READ, DATABASE_READ);
- nameMap.put(DEBUG_CATEGORY_DATABASE_WRITE, DATABASE_WRITE);
- nameMap.put(DEBUG_CATEGORY_DATABASE_ACCESS, DATABASE_ACCESS);
- }
-
-
-
- /**
- * Creates a new debug log category with the specified ID.
- *
- * @param categoryID The unique ID that indicates the category for
- * the debug message.
- */
- private DebugLogCategory(int categoryID)
- {
- this.categoryID = categoryID;
- this.categoryName = null;
- }
-
-
-
- /**
- * Retrieves the debug log category for the specified name. The
- * name used must be the default English name for that category.
- *
- * @param name The name of the debug log category to retrieve.
- *
- * @return The debug log category for the specified name, or
- * <CODE>null</CODE> if no such category exists.
- */
- public static DebugLogCategory getByName(String name)
- {
- return nameMap.get(name);
- }
-
-
-
- /**
- * Retrieves the category ID for this debug log category.
- *
- * @return The category ID for this debug log category.
- */
- public int getCategoryID()
- {
- return categoryID;
- }
-
-
-
- /**
- * Retrieves the category name for this debug log category.
- *
- * @return The category name for this debug log category.
- */
- public String getCategoryName()
- {
- if (categoryName == null)
- {
- categoryName = getMessage(categoryID);
- }
-
- return categoryName;
- }
-
-
-
- /**
- * Retrieves a string representation of this debug log category.
- *
- * @return A string representation of this debug log category.
- */
- public String toString()
- {
- return getCategoryName();
- }
-}
-
diff --git a/opends/src/server/org/opends/server/types/DebugLogLevel.java b/opends/src/server/org/opends/server/types/DebugLogLevel.java
new file mode 100644
index 0000000..c1ad59d
--- /dev/null
+++ b/opends/src/server/org/opends/server/types/DebugLogLevel.java
@@ -0,0 +1,81 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License"). You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE
+ * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at
+ * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
+ * add the following below this CDDL HEADER, with the fields enclosed
+ * by brackets "[]" replaced with your own identifying * information:
+ * Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ *
+ *
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ */
+package org.opends.server.types;
+
+import static org.opends.server.util.ServerConstants.*;
+import org.opends.server.loggers.LogLevel;
+
+/**
+ * Logging levels for the debug log messages.
+ */
+public class DebugLogLevel extends LogLevel
+{
+
+ /**
+ * The log level that will be used for verbose messages.
+ */
+ public static final LogLevel VERBOSE = new DebugLogLevel(
+ DEBUG_SEVERITY_VERBOSE, 100);
+
+
+
+ /**
+ * The log level that will be used for informational messages.
+ */
+ public static final LogLevel INFO = new DebugLogLevel(
+ DEBUG_SEVERITY_INFO, 200);
+
+
+
+ /**
+ * The log level that will be used for warning messages.
+ */
+ public static final LogLevel WARNING = new DebugLogLevel(
+ DEBUG_SEVERITY_WARNING, 300);
+
+
+
+ /**
+ * The log level that will be used for error messages.
+ */
+ public static final LogLevel ERROR = new DebugLogLevel(
+ DEBUG_SEVERITY_ERROR, 400);
+
+
+
+ /**
+ * Constructor for the DebugLogLevel class.
+ *
+ * @param name The name of the level.
+ * @param value The value of the level.
+ */
+ protected DebugLogLevel(String name, int value)
+ {
+ super(name, value);
+ }
+}
+
diff --git a/opends/src/server/org/opends/server/types/DebugLogSeverity.java b/opends/src/server/org/opends/server/types/DebugLogSeverity.java
deleted file mode 100644
index 90b81b7..0000000
--- a/opends/src/server/org/opends/server/types/DebugLogSeverity.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE
- * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at
- * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
- * add the following below this CDDL HEADER, with the fields enclosed
- * by brackets "[]" replaced with your own identifying * information:
- * Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- *
- *
- * Portions Copyright 2006 Sun Microsystems, Inc.
- */
-package org.opends.server.types;
-
-
-
-import java.util.HashMap;
-
-import static org.opends.server.messages.CoreMessages.*;
-import static org.opends.server.messages.MessageHandler.*;
-import static org.opends.server.util.ServerConstants.*;
-
-
-
-/**
- * This enumeration defines the set of severity levels that may be
- * used when writing a message to a debug logger.
- */
-public enum DebugLogSeverity
-{
- /**
- * The severity level that will be used for highly verbose debug
- * information in cases that do not indicate any kind of error
- * condition.
- */
- VERBOSE(MSGID_DEBUG_SEVERITY_VERBOSE),
-
-
-
- /**
- * The severity level that will be used for providing informational
- * notices for use when debugging the server.
- */
- INFO(MSGID_DEBUG_SEVERITY_INFO),
-
-
-
- /**
- * The severity level that will be used for providing messages that
- * may offer additional information about a warning.
- */
- WARNING(MSGID_DEBUG_SEVERITY_WARNING),
-
-
-
- /**
- * The severity level that will be used for providing messages that
- * may offer additional information about an error.
- */
- ERROR(MSGID_DEBUG_SEVERITY_ERROR),
-
-
-
- /**
- * The severity level that will be used for debug information about
- * the communication between the server and its clients.
- */
- COMMUNICATION(MSGID_DEBUG_SEVERITY_COMMUNICATION);
-
-
-
- // The static hash mapping severity names to their associated
- // severity.
- private static HashMap<String,DebugLogSeverity> nameMap;
-
- // The unique identifier assigned to this debug log severity.
- int severityID;
-
- // The short human-readable name of this debug log severity.
- String severityName;
-
-
-
- static
- {
- nameMap = new HashMap<String,DebugLogSeverity>(5);
- nameMap.put(DEBUG_SEVERITY_COMMUNICATION, COMMUNICATION);
- nameMap.put(DEBUG_SEVERITY_ERROR, ERROR);
- nameMap.put(DEBUG_SEVERITY_INFO, INFO);
- nameMap.put(DEBUG_SEVERITY_VERBOSE, VERBOSE);
- nameMap.put(DEBUG_SEVERITY_WARNING, WARNING);
- }
-
-
-
- /**
- * Creates a new debug log severity with the specified ID.
- *
- * @param severityID The unique identifier assigned to this debug
- * log severity.
- */
- private DebugLogSeverity(int severityID)
- {
- this.severityID = severityID;
- this.severityName = null;
- }
-
-
-
- /**
- * Retrieves the debug log severity for the specified name. The
- * name used must be the default English name for that severity.
- *
- * @param name The name of the debug log severity to retrieve.
- *
- * @return The debug log severity for the specified name, or
- * <CODE>null</CODE> if no such severity exists.
- */
- public static DebugLogSeverity getByName(String name)
- {
- return nameMap.get(name);
- }
-
-
-
- /**
- * Retrieves the unique identifier assigned to this debug log
- * severity.
- *
- * @return The unique identifier assigned to this debug log
- * severity.
- */
- public int getSeverityID()
- {
- return severityID;
- }
-
-
-
- /**
- * Retrieves the human-readable name of this debug log severity.
- *
- * @return The human-readable name of this debug log severity.
- */
- public String getSeverityName()
- {
- if (severityName == null)
- {
- severityName = getMessage(severityID);
- }
-
- return severityName;
- }
-
-
-
- /**
- * Retrieves a string representation of this debug log severity.
- *
- * @return A string representation of this debug log severity.
- */
- public String toString()
- {
- return getSeverityName();
- }
-}
-
diff --git a/opends/src/server/org/opends/server/types/DereferencePolicy.java b/opends/src/server/org/opends/server/types/DereferencePolicy.java
index 3a3e818..5c62e18 100644
--- a/opends/src/server/org/opends/server/types/DereferencePolicy.java
+++ b/opends/src/server/org/opends/server/types/DereferencePolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/DirectoryConfig.java b/opends/src/server/org/opends/server/types/DirectoryConfig.java
index 60e15ac..df4d65e 100644
--- a/opends/src/server/org/opends/server/types/DirectoryConfig.java
+++ b/opends/src/server/org/opends/server/types/DirectoryConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -49,7 +49,6 @@
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
@@ -65,11 +64,6 @@
*/
public final class DirectoryConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.DirectoryConfig";
@@ -80,7 +74,6 @@
*/
public static final CryptoManager getCryptoManager()
{
- assert debugEnter(CLASS_NAME, "getCryptoManager");
return DirectoryServer.getCryptoManager();
}
@@ -96,7 +89,6 @@
*/
public static final OperatingSystem getOperatingSystem()
{
- assert debugEnter(CLASS_NAME, "getOperatingSystem");
return DirectoryServer.getOperatingSystem();
}
@@ -112,7 +104,6 @@
*/
public static final ConfigHandler getConfigHandler()
{
- assert debugEnter(CLASS_NAME, "getConfigHandler");
return DirectoryServer.getConfigHandler();
}
@@ -134,8 +125,6 @@
public static final ConfigEntry getConfigEntry(DN entryDN)
throws ConfigException
{
- assert debugEnter(CLASS_NAME, "getConfigEntry",
- String.valueOf(entryDN));
return DirectoryServer.getConfigEntry(entryDN);
}
@@ -151,7 +140,6 @@
*/
public static final String getServerRoot()
{
- assert debugEnter(CLASS_NAME, "getServerRoot");
return DirectoryServer.getServerRoot();
}
@@ -167,7 +155,6 @@
*/
public static final long getStartTime()
{
- assert debugEnter(CLASS_NAME, "getStartTime");
return DirectoryServer.getStartTime();
}
@@ -183,7 +170,6 @@
*/
public static final String getStartTimeUTC()
{
- assert debugEnter(CLASS_NAME, "getStartTimeUTC");
return DirectoryServer.getStartTimeUTC();
}
@@ -197,7 +183,6 @@
*/
public static final Schema getSchema()
{
- assert debugEnter(CLASS_NAME, "getSchema");
return DirectoryServer.getSchema();
}
@@ -217,7 +202,6 @@
*/
public static Map<String,MatchingRule> getMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getMatchingRules");
return DirectoryServer.getMatchingRules();
}
@@ -235,8 +219,6 @@
*/
public static final MatchingRule getMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getMatchingRule",
- String.valueOf(lowerName));
return DirectoryServer.getMatchingRule(lowerName);
}
@@ -257,8 +239,6 @@
public static final ApproximateMatchingRule
getApproximateMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule",
- String.valueOf(lowerName));
return DirectoryServer.getApproximateMatchingRule(lowerName);
}
@@ -279,8 +259,6 @@
public static final EqualityMatchingRule
getEqualityMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule",
- String.valueOf(lowerName));
return DirectoryServer.getEqualityMatchingRule(lowerName);
}
@@ -301,8 +279,6 @@
public static final OrderingMatchingRule
getOrderingMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule",
- String.valueOf(lowerName));
return DirectoryServer.getOrderingMatchingRule(lowerName);
}
@@ -323,8 +299,6 @@
public static final SubstringMatchingRule
getSubstringMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule",
- String.valueOf(lowerName));
return DirectoryServer.getSubstringMatchingRule(lowerName);
}
@@ -344,7 +318,6 @@
*/
public static final Map<String,ObjectClass> getObjectClasses()
{
- assert debugEnter(CLASS_NAME, "getObjectClasses");
return DirectoryServer.getObjectClasses();
}
@@ -370,9 +343,6 @@
public static final ObjectClass
getObjectClass(String lowerName, boolean returnDefault)
{
- assert debugEnter(CLASS_NAME, "getObjectClass",
- String.valueOf(lowerName),
- String.valueOf(returnDefault));
return DirectoryServer.getObjectClass(lowerName, returnDefault);
}
@@ -388,7 +358,6 @@
*/
public static final ObjectClass getTopObjectClass()
{
- assert debugEnter(CLASS_NAME, "getTopObjectClass");
return DirectoryServer.getTopObjectClass();
}
@@ -408,7 +377,6 @@
*/
public static final Map<String,AttributeType> getAttributeTypes()
{
- assert debugEnter(CLASS_NAME, "getAttributeTypes");
return DirectoryServer.getAttributeTypes();
}
@@ -434,9 +402,6 @@
public static final AttributeType
getAttributeType(String lowerName, boolean returnDefault)
{
- assert debugEnter(CLASS_NAME, "getAttributeType",
- String.valueOf(lowerName),
- String.valueOf(returnDefault));
return DirectoryServer.getAttributeType(lowerName, returnDefault);
}
@@ -450,7 +415,6 @@
*/
public static final AttributeType getObjectClassAttributeType()
{
- assert debugEnter(CLASS_NAME, "getObjectClassAttributeType");
return DirectoryServer.getObjectClassAttributeType();
}
@@ -469,7 +433,6 @@
public static final Map<String,AttributeSyntax>
getAttributeSyntaxes()
{
- assert debugEnter(CLASS_NAME, "getAttributeSyntaxes");
return DirectoryServer.getAttributeSyntaxes();
}
@@ -492,9 +455,6 @@
public static final AttributeSyntax
getAttributeSyntax(String oid, boolean allowDefault)
{
- assert debugEnter(CLASS_NAME, "getAttributeSyntax",
- String.valueOf(oid),
- String.valueOf(allowDefault));
return DirectoryServer.getAttributeSyntax(oid, allowDefault);
}
@@ -510,7 +470,6 @@
*/
public static final AttributeSyntax getDefaultAttributeSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultAttributeSyntax");
return DirectoryServer.getDefaultAttributeSyntax();
}
@@ -528,7 +487,6 @@
*/
public static final AttributeSyntax getDefaultBinarySyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultBinarySyntax");
return DirectoryServer.getDefaultBinarySyntax();
}
@@ -546,7 +504,6 @@
*/
public static final AttributeSyntax getDefaultBooleanSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultBooleanSyntax");
return DirectoryServer.getDefaultBooleanSyntax();
}
@@ -564,7 +521,6 @@
*/
public static final AttributeSyntax getDefaultDNSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultDNSyntax");
return DirectoryServer.getDefaultDNSyntax();
}
@@ -582,7 +538,6 @@
*/
public static final AttributeSyntax getDefaultIntegerSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultIntegerSyntax");
return DirectoryServer.getDefaultIntegerSyntax();
}
@@ -600,7 +555,6 @@
*/
public static final AttributeSyntax getDefaultStringSyntax()
{
- assert debugEnter(CLASS_NAME, "getDefaultStringSyntax");
return DirectoryServer.getDefaultStringSyntax();
}
@@ -619,7 +573,6 @@
public static final Map<MatchingRule,MatchingRuleUse>
getMatchingRuleUses()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUses");
return DirectoryServer.getMatchingRuleUses();
}
@@ -639,8 +592,6 @@
public static final MatchingRuleUse
getMatchingRuleUse(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUse",
- String.valueOf(matchingRule));
return DirectoryServer.getMatchingRuleUse(matchingRule);
}
@@ -659,7 +610,6 @@
public static final Map<ObjectClass,DITContentRule>
getDITContentRules()
{
- assert debugEnter(CLASS_NAME, "getDITContentRules");
return DirectoryServer.getDITContentRules();
}
@@ -679,8 +629,6 @@
public static final DITContentRule
getDITContentRule(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getDITContentRule",
- String.valueOf(objectClass));
return DirectoryServer.getDITContentRule(objectClass);
}
@@ -699,7 +647,6 @@
public static final Map<NameForm,DITStructureRule>
getDITStructureRules()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRules");
return DirectoryServer.getDITStructureRules();
}
@@ -718,8 +665,6 @@
*/
public static final DITStructureRule getDITStructureRule(int ruleID)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(ruleID));
return DirectoryServer.getDITStructureRule(ruleID);
}
@@ -739,8 +684,6 @@
public static final DITStructureRule
getDITStructureRule(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(nameForm));
return DirectoryServer.getDITStructureRule(nameForm);
}
@@ -757,7 +700,6 @@
*/
public static final Map<ObjectClass,NameForm> getNameForms()
{
- assert debugEnter(CLASS_NAME, "getNameForms");
return DirectoryServer.getNameForms();
}
@@ -776,8 +718,6 @@
*/
public static final NameForm getNameForm(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getNameForm",
- String.valueOf(objectClass));
return DirectoryServer.getNameForm(objectClass);
}
@@ -796,8 +736,6 @@
*/
public static final NameForm getNameForm(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getNameForm",
- String.valueOf(lowerName));
return DirectoryServer.getNameForm(lowerName);
}
@@ -813,8 +751,6 @@
public static final void registerConfigurableComponent(
ConfigurableComponent component)
{
- assert debugEnter(CLASS_NAME, "registerConfigurableComponent",
- String.valueOf(component));
DirectoryServer.registerConfigurableComponent(component);
}
@@ -830,8 +766,6 @@
public static final void deregisterConfigurableComponent(
ConfigurableComponent component)
{
- assert debugEnter(CLASS_NAME, "deregisterConfigurableComponent",
- String.valueOf(component));
DirectoryServer.deregisterConfigurableComponent(component);
}
@@ -847,8 +781,6 @@
public static final void registerInvokableComponent(
InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "registerInvokableComponent",
- String.valueOf(component));
DirectoryServer.registerInvokableComponent(component);
}
@@ -864,8 +796,6 @@
public static final void deregisterInvokableComponent(
InvokableComponent component)
{
- assert debugEnter(CLASS_NAME, "deregisterInvokableComponent",
- String.valueOf(component));
DirectoryServer.deregisterInvokableComponent(component);
}
@@ -880,7 +810,6 @@
public static final void registerAlertGenerator(
AlertGenerator alertGenerator)
{
- assert debugEnter(CLASS_NAME, "registerAlertGenerator");
DirectoryServer.registerAlertGenerator(alertGenerator);
}
@@ -896,7 +825,6 @@
public static final void deregisterAlertGenerator(
AlertGenerator alertGenerator)
{
- assert debugEnter(CLASS_NAME, "deregisterAlertGenerator");
DirectoryServer.deregisterAlertGenerator(alertGenerator);
}
@@ -919,11 +847,6 @@
String alertType, int alertID,
String alertMessage)
{
- assert debugEnter(CLASS_NAME, "sendAlertNotification",
- String.valueOf(generator),
- String.valueOf(alertType),
- String.valueOf(alertID),
- String.valueOf(alertMessage));
DirectoryServer.sendAlertNotification(generator, alertType,
alertID, alertMessage);
@@ -940,7 +863,6 @@
*/
public static final ResultCode getServerErrorResultCode()
{
- assert debugEnter(CLASS_NAME, "getServerErrorResultCode");
return DirectoryServer.getServerErrorResultCode();
}
@@ -964,8 +886,6 @@
public static final Entry getEntry(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getEntry",
- String.valueOf(entryDN));
return DirectoryServer.getEntry(entryDN);
}
@@ -989,8 +909,6 @@
public static final boolean entryExists(DN entryDN)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "entryExists",
- String.valueOf(entryDN));
return DirectoryServer.entryExists(entryDN);
}
@@ -1006,7 +924,6 @@
*/
public static final Set<String> getSupportedControls()
{
- assert debugEnter(CLASS_NAME, "getSupportedControls");
return DirectoryServer.getSupportedControls();
}
@@ -1026,8 +943,6 @@
*/
public static final boolean isSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "isSupportedControl",
- String.valueOf(controlOID));
return DirectoryServer.isSupportedControl(controlOID);
}
@@ -1044,8 +959,6 @@
*/
public static final void registerSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "registerSupportedControl",
- String.valueOf(controlOID));
DirectoryServer.registerSupportedControl(controlOID);
}
@@ -1063,8 +976,6 @@
public static final void
deregisterSupportedControl(String controlOID)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedControl",
- String.valueOf(controlOID));
DirectoryServer.deregisterSupportedControl(controlOID);
}
@@ -1080,7 +991,6 @@
*/
public static final Set<String> getSupportedFeatures()
{
- assert debugEnter(CLASS_NAME, "getSupportedFeatures");
return DirectoryServer.getSupportedFeatures();
}
@@ -1100,8 +1010,6 @@
*/
public static final boolean isSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "isSupportedFeature",
- String.valueOf(featureOID));
return DirectoryServer.isSupportedFeature(featureOID);
}
@@ -1118,8 +1026,6 @@
*/
public static final void registerSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "registerSupportedFeature",
- String.valueOf(featureOID));
DirectoryServer.registerSupportedFeature(featureOID);
}
@@ -1137,8 +1043,6 @@
public static final void
deregisterSupportedFeature(String featureOID)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedFeature",
- String.valueOf(featureOID));
DirectoryServer.deregisterSupportedFeature(featureOID);
}
@@ -1158,7 +1062,6 @@
public static final Map<String,ExtendedOperationHandler>
getSupportedExtensions()
{
- assert debugEnter(CLASS_NAME, "getSupportedExtensions");
return DirectoryServer.getSupportedExtensions();
}
@@ -1177,8 +1080,6 @@
public static final ExtendedOperationHandler
getExtendedOperationHandler(String oid)
{
- assert debugEnter(CLASS_NAME, "getExtendedOperationHandler",
- String.valueOf(oid));
return DirectoryServer.getExtendedOperationHandler(oid);
}
@@ -1196,8 +1097,6 @@
public static final void registerSupportedExtension(String oid,
ExtendedOperationHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerSupportedExtension",
- String.valueOf(oid), String.valueOf(handler));
DirectoryServer.registerSupportedExtension(oid, handler);
}
@@ -1212,8 +1111,6 @@
*/
public static final void deregisterSupportedExtension(String oid)
{
- assert debugEnter(CLASS_NAME, "deregisterSupportedExtension",
- String.valueOf(oid));
DirectoryServer.deregisterSupportedExtension(oid);
}
@@ -1232,7 +1129,6 @@
public static final Map<String,SASLMechanismHandler>
getSupportedSASLMechanisms()
{
- assert debugEnter(CLASS_NAME, "getSupportedSASLMechanisms");
return DirectoryServer.getSupportedSASLMechanisms();
}
@@ -1250,8 +1146,6 @@
public static final SASLMechanismHandler
getSASLMechanismHandler(String name)
{
- assert debugEnter(CLASS_NAME, "getSASLMechanismHandler",
- String.valueOf(name));
return DirectoryServer.getSASLMechanismHandler(name);
}
@@ -1270,8 +1164,6 @@
registerSASLMechanismHandler(String name,
SASLMechanismHandler handler)
{
- assert debugEnter(CLASS_NAME, "registerSASLMechanismHandler",
- String.valueOf(name), String.valueOf(handler));
DirectoryServer.registerSASLMechanismHandler(name, handler);
}
@@ -1286,8 +1178,6 @@
*/
public static final void deregisterSASLMechanismHandler(String name)
{
- assert debugEnter(CLASS_NAME, "deregisterSASLMechanismHandler",
- String.valueOf(name));
DirectoryServer.deregisterSASLMechanismHandler(name);
}
@@ -1306,9 +1196,6 @@
registerChangeNotificationListener(
ChangeNotificationListener changeListener)
{
- assert debugEnter(CLASS_NAME,
- "registerChangeNotificationListener",
- String.valueOf(changeListener));
DirectoryServer.registerChangeNotificationListener(
changeListener);
@@ -1327,9 +1214,6 @@
public static final void deregisterChangeNotificationListener(
ChangeNotificationListener changeListener)
{
- assert debugEnter(CLASS_NAME,
- "deregisterChangeNotificationListener",
- String.valueOf(changeListener));
DirectoryServer.deregisterChangeNotificationListener(
changeListener);
@@ -1347,8 +1231,6 @@
public static final void
registerShutdownListener(ServerShutdownListener listener)
{
- assert debugEnter(CLASS_NAME, "registerShutdownListener",
- String.valueOf(listener));
DirectoryServer.registerShutdownListener(listener);
}
@@ -1365,8 +1247,6 @@
public static final void
deregisterShutdownListener(ServerShutdownListener listener)
{
- assert debugEnter(CLASS_NAME, "deregisterShutdownListener",
- String.valueOf(listener));
DirectoryServer.deregisterShutdownListener(listener);
}
diff --git a/opends/src/server/org/opends/server/types/DirectoryException.java b/opends/src/server/org/opends/server/types/DirectoryException.java
index 8122556..ca71913 100644
--- a/opends/src/server/org/opends/server/types/DirectoryException.java
+++ b/opends/src/server/org/opends/server/types/DirectoryException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -30,7 +30,6 @@
import java.util.List;
-import static org.opends.server.loggers.Debug.*;
@@ -41,11 +40,6 @@
public class DirectoryException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.DirectoryException";
@@ -91,9 +85,6 @@
{
super(errorMessage);
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage),
- String.valueOf(errorMessageID));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -121,10 +112,6 @@
{
super(errorMessage, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage),
- String.valueOf(errorMessageID),
- String.valueOf(cause));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -154,11 +141,6 @@
{
super(errorMessage, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(resultCode),
- String.valueOf(errorMessage),
- String.valueOf(errorMessageID),
- String.valueOf(matchedDN),
- String.valueOf(cause));
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -191,16 +173,6 @@
{
super(errorMessage, cause);
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(resultCode),
- String.valueOf(errorMessage),
- String.valueOf(errorMessageID),
- String.valueOf(matchedDN),
- String.valueOf(referralURLs),
- String.valueOf(cause)
- });
this.resultCode = resultCode;
this.errorMessage = errorMessage;
@@ -218,7 +190,6 @@
*/
public final ResultCode getResultCode()
{
- assert debugEnter(CLASS_NAME, "getResultCode");
return resultCode;
}
@@ -232,7 +203,6 @@
*/
public final String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -248,7 +218,6 @@
*/
public final int getErrorMessageID()
{
- assert debugEnter(CLASS_NAME, "getErrorMessageID");
return errorMessageID;
}
@@ -263,7 +232,6 @@
*/
public final DN getMatchedDN()
{
- assert debugEnter(CLASS_NAME, "getMatchedDN");
return matchedDN;
}
@@ -278,7 +246,6 @@
*/
public final List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
diff --git a/opends/src/server/org/opends/server/types/DisconnectReason.java b/opends/src/server/org/opends/server/types/DisconnectReason.java
index c5e2c24..bd3caef 100644
--- a/opends/src/server/org/opends/server/types/DisconnectReason.java
+++ b/opends/src/server/org/opends/server/types/DisconnectReason.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/Entry.java b/opends/src/server/org/opends/server/types/Entry.java
index c9cd45e..069357f 100644
--- a/opends/src/server/org/opends/server/types/Entry.java
+++ b/opends/src/server/org/opends/server/types/Entry.java
@@ -51,7 +51,14 @@
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.util.LDIFException;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugWarning;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -83,11 +90,6 @@
public class Entry
implements ProtocolElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.Entry";
@@ -135,10 +137,6 @@
Map<AttributeType,List<Attribute>>
operationalAttributes)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(objectClasses),
- String.valueOf(userAttributes),
- String.valueOf(operationalAttributes));
attachment = null;
@@ -193,7 +191,6 @@
*/
public DN getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
@@ -207,7 +204,6 @@
*/
public void setDN(DN dn)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(dn));
if (dn == null)
{
@@ -232,7 +228,6 @@
*/
public Map<ObjectClass,String> getObjectClasses()
{
- assert debugEnter(CLASS_NAME, "getObjectClasses");
return objectClasses;
}
@@ -250,8 +245,6 @@
*/
public boolean hasObjectClass(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "hasObjectClass",
- String.valueOf(objectClass));
return objectClasses.containsKey(objectClass);
}
@@ -268,7 +261,6 @@
*/
public ObjectClass getStructuralObjectClass()
{
- assert debugEnter(CLASS_NAME, "getStructuralObjectClass");
ObjectClass structuralClass = null;
@@ -309,8 +301,6 @@
Collection<AttributeValue> objectClassNames)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "setObjectClasses",
- String.valueOf(objectClassNames));
attachment = null;
@@ -329,7 +319,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "addObjectClasses", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
lowerName = toLowerCase(v.getStringValue());
}
@@ -367,8 +360,6 @@
public void addObjectClass(AttributeValue objectClassName)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addObjectClass",
- String.valueOf(objectClassName));
attachment = null;
@@ -381,7 +372,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "addObjectClass", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
lowerName = toLowerCase(name);
}
@@ -412,8 +406,6 @@
public void addObjectClass(ObjectClass oc)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addObjectClass",
- String.valueOf(oc));
attachment = null;
@@ -447,8 +439,6 @@
Collection<AttributeValue> objectClassNames)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "addObjectClasses",
- String.valueOf(objectClassNames));
attachment = null;
@@ -469,7 +459,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "addObjectClasses", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
lowerName = toLowerCase(v.getStringValue());
}
@@ -528,7 +521,6 @@
*/
public List<Attribute> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
ArrayList<Attribute> attributes = new ArrayList<Attribute>();
@@ -563,7 +555,6 @@
*/
public Map<AttributeType,List<Attribute>> getUserAttributes()
{
- assert debugEnter(CLASS_NAME, "getUserAttributes");
return userAttributes;
}
@@ -580,7 +571,6 @@
*/
public Map<AttributeType,List<Attribute>> getOperationalAttributes()
{
- assert debugEnter(CLASS_NAME, "getOperationalAttributes");
return operationalAttributes;
}
@@ -597,7 +587,6 @@
*/
public Attribute getObjectClassAttribute()
{
- assert debugEnter(CLASS_NAME, "getObjectClassAttribute");
if ((objectClasses == null) || objectClasses.isEmpty())
{
@@ -630,8 +619,6 @@
*/
public boolean hasAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "hasAttribute",
- String.valueOf(attributeType));
if (userAttributes.containsKey(attributeType) ||
operationalAttributes.containsKey(attributeType))
@@ -672,9 +659,6 @@
public boolean hasAttribute(AttributeType attributeType,
Set<String> attributeOptions)
{
- assert debugEnter(CLASS_NAME, "hasAttribute",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions));
List<Attribute> attributes;
if (attributeType.mayHaveSubordinateTypes())
@@ -759,8 +743,6 @@
*/
public List<Attribute> getAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getAttribute",
- String.valueOf(attributeType));
if (attributeType.mayHaveSubordinateTypes())
{
@@ -858,8 +840,6 @@
*/
public List<Attribute> getAttribute(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getAttribute",
- String.valueOf(lowerName));
for (AttributeType attr : userAttributes.keySet())
{
@@ -908,9 +888,6 @@
public List<Attribute> getAttribute(AttributeType attributeType,
Set<String> options)
{
- assert debugEnter(CLASS_NAME, "getAttribute",
- String.valueOf(attributeType),
- String.valueOf(options));
List<Attribute> attributes = new LinkedList<Attribute>();
if (attributeType.mayHaveSubordinateTypes())
@@ -1021,9 +998,6 @@
public List<Attribute> getAttribute(String lowerName,
Set<String> options)
{
- assert debugEnter(CLASS_NAME, "getAttribute",
- String.valueOf(lowerName),
- String.valueOf(options));
for (AttributeType attr : userAttributes.keySet())
{
@@ -1084,8 +1058,6 @@
public final <T> T getAttributeValue(AttributeType attributeType,
AttributeValueDecoder<T> decoder) throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAttributeValue", String
- .valueOf(attributeType), decoder.getClass().getName());
List<Attribute> attributes = getAttribute(attributeType);
AttributeValueIterable values =
@@ -1134,8 +1106,6 @@
Collection<T> collection)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAttributeValues", String
- .valueOf(attributeType), decoder.getClass().getName());
List<Attribute> attributes = getAttribute(attributeType);
AttributeValueIterable values =
@@ -1162,8 +1132,6 @@
*/
public boolean hasUserAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "hasUserAttribute",
- String.valueOf(attributeType));
if (userAttributes.containsKey(attributeType))
{
@@ -1200,8 +1168,6 @@
*/
public List<Attribute> getUserAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getUserAttribute",
- String.valueOf(attributeType));
if (attributeType.mayHaveSubordinateTypes())
{
@@ -1256,9 +1222,6 @@
public List<Attribute> getUserAttribute(AttributeType attributeType,
Set<String> options)
{
- assert debugEnter(CLASS_NAME, "getUserAttribute",
- String.valueOf(attributeType),
- String.valueOf(options));
LinkedList<Attribute> attributes = new LinkedList<Attribute>();
List<Attribute> attrs = userAttributes.get(attributeType);
@@ -1314,8 +1277,6 @@
public List<Attribute> duplicateUserAttribute(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "duplicateUserAttribute",
- String.valueOf(attributeType));
LinkedList<Attribute> attributes = new LinkedList<Attribute>();
@@ -1373,10 +1334,6 @@
Set<String> options,
boolean omitValues)
{
- assert debugEnter(CLASS_NAME, "duplicateAttribute",
- String.valueOf(attrList),
- String.valueOf(options),
- String.valueOf(omitValues));
if (attrList == null)
{
@@ -1427,10 +1384,6 @@
Set<String> options,
boolean omitValues)
{
- assert debugEnter(CLASS_NAME, "duplicateUserAttribute",
- String.valueOf(attributeType),
- String.valueOf(options),
- String.valueOf(omitValues));
List<Attribute> currentList = getUserAttribute(attributeType);
return duplicateAttribute(currentList, options, omitValues);
@@ -1460,10 +1413,6 @@
Set<String> options,
boolean omitValues)
{
- assert debugEnter(CLASS_NAME, "duplicateOperationalAttribute",
- String.valueOf(attributeType),
- String.valueOf(options),
- String.valueOf(omitValues));
List<Attribute> currentList =
getOperationalAttribute(attributeType);
@@ -1483,8 +1432,6 @@
*/
public boolean hasOperationalAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "hasOperationalAttribute",
- String.valueOf(attributeType));
if (operationalAttributes.containsKey(attributeType))
{
@@ -1522,8 +1469,6 @@
public List<Attribute> getOperationalAttribute(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getOperationalAttribute",
- String.valueOf(attributeType));
if (attributeType.mayHaveSubordinateTypes())
{
@@ -1580,9 +1525,6 @@
AttributeType attributeType,
Set<String> options)
{
- assert debugEnter(CLASS_NAME, "getOperationalAttribute",
- String.valueOf(attributeType),
- String.valueOf(options));
LinkedList<Attribute> attributes = new LinkedList<Attribute>();
List<Attribute> attrs = operationalAttributes.get(attributeType);
@@ -1639,8 +1581,6 @@
public List<Attribute> duplicateOperationalAttribute(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "duplicateOperationalAttribute",
- String.valueOf(attributeType));
LinkedList<Attribute> attributes = new LinkedList<Attribute>();
@@ -1693,9 +1633,6 @@
public void putAttribute(AttributeType attributeType,
List<Attribute> attributeList)
{
- assert debugEnter(CLASS_NAME, "putAttribute",
- String.valueOf(attributeType),
- String.valueOf(attributeList));
attachment = null;
@@ -1744,9 +1681,6 @@
public void addAttribute(Attribute attribute,
List<AttributeValue> duplicateValues)
{
- assert debugEnter(CLASS_NAME, "addAttribute",
- String.valueOf(attribute),
- "java.util.List<AttributeValue>");
attachment = null;
@@ -1822,8 +1756,6 @@
*/
public boolean removeAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "removeAttribute",
- String.valueOf(attributeType));
attachment = null;
@@ -1862,8 +1794,6 @@
public boolean removeAttribute(AttributeType attributeType,
Set<String> options)
{
- assert debugEnter(CLASS_NAME, "removeAttribute",
- String.valueOf(attributeType));
attachment = null;
@@ -1934,9 +1864,6 @@
public boolean removeAttribute(Attribute attribute,
List<AttributeValue> missingValues)
{
- assert debugEnter(CLASS_NAME, "removeAttribute",
- String.valueOf(attribute),
- "java.util.List<AttributeValue>");
attachment = null;
@@ -1962,7 +1889,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "removeAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
ocName = toLowerCase(v.getStringValue());
}
@@ -2092,8 +2022,6 @@
*/
public boolean allowsAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "allowsAttribute",
- String.valueOf(attributeType));
for (ObjectClass o : objectClasses.keySet())
{
@@ -2121,8 +2049,6 @@
*/
public boolean requiresAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "requiresAttribute",
- String.valueOf(attributeType));
for (ObjectClass o : objectClasses.keySet())
{
@@ -2151,9 +2077,6 @@
public boolean hasValue(AttributeType attributeType,
Set<String> options, AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "hasValue",
- String.valueOf(attributeType),
- String.valueOf(options), String.valueOf(value));
List<Attribute> attrList = getAttribute(attributeType);
if ((attrList == null) || attrList.isEmpty())
@@ -2189,8 +2112,6 @@
public void applyModification(Modification mod)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "applyModification",
- String.valueOf(mod));
Attribute a = mod.getAttribute();
AttributeType t = a.getAttributeType();
@@ -2404,8 +2325,6 @@
public void applyModifications(List<Modification> mods)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "applyModifications",
- String.valueOf(mods));
for (Modification m : mods)
{
@@ -2471,8 +2390,6 @@
boolean validateStructureRules,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "conformsToSchema",
- "java.lang.StringBuilder");
// Get the structural objectclass for the entry. If there isn't
@@ -2915,8 +2832,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "conformsToSchema",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_ENTRY_SCHEMA_COULD_NOT_CHECK_DSR;
String message =
@@ -3024,8 +2943,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "conformsToSchema",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID =
MSGID_ENTRY_SCHEMA_COULD_NOT_CHECK_PARENT_DSR;
@@ -3197,7 +3118,6 @@
*/
public Object getAttachment()
{
- assert debugEnter(CLASS_NAME, "getAttachment");
return attachment;
}
@@ -3214,8 +3134,6 @@
*/
public void setAttachment(Object attachment)
{
- assert debugEnter(CLASS_NAME, "setAttachment",
- String.valueOf(attachment));
this.attachment = attachment;
}
@@ -3231,7 +3149,6 @@
*/
public Entry duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
HashMap<ObjectClass,String> objectClassesCopy =
new HashMap<ObjectClass,String>(objectClasses);
@@ -3267,7 +3184,6 @@
public Entry duplicateWithoutOperationalAttributes(
boolean typesOnly)
{
- assert debugEnter(CLASS_NAME, "duplicate");
HashMap<ObjectClass,String> objectClassesCopy;
if (typesOnly)
@@ -3349,7 +3265,6 @@
*/
public Entry duplicateWithoutAttributes()
{
- assert debugEnter(CLASS_NAME, "duplicate");
HashMap<ObjectClass,String> objectClassesCopy =
new HashMap<ObjectClass,String>(objectClasses.size());
@@ -3378,7 +3293,6 @@
*/
public boolean isReferral()
{
- assert debugEnter(CLASS_NAME, "isReferral");
ObjectClass referralOC =
DirectoryServer.getObjectClass(OC_REFERRAL);
@@ -3386,11 +3300,12 @@
{
// This should not happen -- The server doesn't have a referral
// objectclass defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "isReferral", "No " + OC_REFERRAL +
- " objectclass is defined in the server " +
- "schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s objectclass is defined in the server schema.",
+ OC_REFERRAL);
+ }
for (String ocName : objectClasses.values())
{
@@ -3414,11 +3329,12 @@
{
// This should not happen -- The server doesn't have a ref
// attribute type defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "isReferral", "No " + ATTR_REFERRAL_URL +
- " attribute type is defined in the " +
- "server schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s attribute type is defined in the server schema.",
+ ATTR_REFERRAL_URL);
+ }
return false;
}
@@ -3439,7 +3355,6 @@
*/
public LinkedHashSet<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
AttributeType referralType =
DirectoryServer.getAttributeType(ATTR_REFERRAL_URL);
@@ -3447,12 +3362,12 @@
{
// This should not happen -- The server doesn't have a ref
// attribute type defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING,
- CLASS_NAME, "getReferralURLs",
- "No " + ATTR_REFERRAL_URL +
- " attribute type is defined in the " +
- "server schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s attribute type is defined in the server schema.",
+ ATTR_REFERRAL_URL);
+ }
return null;
}
@@ -3490,18 +3405,18 @@
*/
public boolean isAlias()
{
- assert debugEnter(CLASS_NAME, "isAlias");
ObjectClass aliasOC = DirectoryServer.getObjectClass(OC_ALIAS);
if (aliasOC == null)
{
// This should not happen -- The server doesn't have an alias
// objectclass defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "isAlias", "No " + OC_ALIAS +
- " objectclass is defined in the server " +
- "schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s objectclass is defined in the server schema.",
+ OC_ALIAS);
+ }
for (String ocName : objectClasses.values())
{
@@ -3525,11 +3440,12 @@
{
// This should not happen -- The server doesn't have an
// aliasedObjectName attribute type defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "isAlias", "No " + ATTR_ALIAS_DN +
- " attribute type is defined in the " +
- "server schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s attribute type is defined in the server schema.",
+ ATTR_ALIAS_DN);
+ }
return false;
}
@@ -3554,7 +3470,6 @@
public DN getAliasedDN()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getAliasedDN");
AttributeType aliasType =
DirectoryServer.getAttributeType(ATTR_REFERRAL_URL);
@@ -3562,11 +3477,12 @@
{
// This should not happen -- The server doesn't have an
// aliasedObjectName attribute type defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "getAliasedDN", "No " + ATTR_ALIAS_DN +
- " attribute type is defined in the " +
- "server schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s attribute type is defined in the server schema.",
+ ATTR_ALIAS_DN);
+ }
return null;
}
@@ -3618,7 +3534,6 @@
*/
public boolean isLDAPSubentry()
{
- assert debugEnter(CLASS_NAME, "isLDAPSubentry");
ObjectClass ldapSubentryOC =
DirectoryServer.getObjectClass(OC_LDAP_SUBENTRY_LC);
@@ -3626,11 +3541,12 @@
{
// This should not happen -- The server doesn't have an
// ldapsubentry objectclass defined.
- assert debugMessage(DebugLogCategory.SCHEMA,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "isLDAPSubentry", "No " +
- OC_LDAP_SUBENTRY + " objectclass is " +
- "defined in the server schema.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "No %s objectclass is defined in the server schema.",
+ OC_LDAP_SUBENTRY);
+ }
for (String ocName : objectClasses.values())
{
@@ -3664,8 +3580,6 @@
*/
public boolean matchesBaseAndScope(DN baseDN, SearchScope scope)
{
- assert debugEnter(CLASS_NAME, "matchesBaseAndScope",
- String.valueOf(baseDN), String.valueOf(scope));
switch (scope)
{
@@ -3702,7 +3616,6 @@
*/
public List<StringBuilder> toLDIF()
{
- assert debugEnter(CLASS_NAME, "toLDIF");
LinkedList<StringBuilder> ldifLines =
new LinkedList<StringBuilder>();
@@ -3795,8 +3708,6 @@
public boolean toLDIF(LDIFExportConfig exportConfig)
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "toLDIF",
- String.valueOf(exportConfig));
// See if this entry should be included in the export at all.
@@ -3804,17 +3715,21 @@
{
if (! exportConfig.includeEntry(this))
{
- assert debugMessage(DebugLogCategory.PROTOCOL_WRITE,
- DebugLogSeverity.INFO, CLASS_NAME,
- "writeEntry", "Skipping entry " +
- String.valueOf(dn) +
- " because of the export configuration.");
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Skipping entry %s because of the export " +
+ "configuration.", String.valueOf(dn));
+ }
return false;
}
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "toLDIF", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_COULD_NOT_EVALUATE_FILTERS_FOR_EXPORT;
String message = getMessage(msgID, String.valueOf(dn),
@@ -3872,11 +3787,12 @@
}
else
{
- assert debugMessage(DebugLogCategory.PROTOCOL_WRITE,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "writeEntry", "Skipping objectclasses " +
- "for entry " + String.valueOf(dn) +
- " because of the export configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Skipping objectclasses for entry %s because of " +
+ "the export configuration.", String.valueOf(dn));
+ }
}
@@ -3922,12 +3838,13 @@
}
else
{
- assert debugMessage(DebugLogCategory.PROTOCOL_WRITE,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "writeEntry", "Skipping user attribute " +
- attrType.getNameOrOID() + " for entry " +
- String.valueOf(dn) +
- " because of the export configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Skipping user attribute %s for entry %s because of " +
+ "the export configuration.",
+ attrType.getNameOrOID(), String.valueOf(dn));
+ }
}
}
@@ -3978,28 +3895,27 @@
}
else
{
- assert debugMessage(DebugLogCategory.PROTOCOL_WRITE,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "writeEntry",
- "Skipping operational attribute " +
- attrType.getNameOrOID() +
- " for entry " + String.valueOf(dn) +
- " because of the export " +
- "configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Skipping operational attribute %s for entry %s " +
+ "because of the export configuration.",
+ attrType.getNameOrOID(), String.valueOf(dn));
+ }
}
}
}
else
{
- assert debugMessage(DebugLogCategory.PROTOCOL_WRITE,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "writeEntry", "Skipping all operational " +
- "attributes for entry " +
- String.valueOf(dn) +
- " because of the export configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Skipping all operational attributes for entry %s " +
+ "because of the export configuration.",
+ String.valueOf(dn));
+ }
}
-
// Make sure there is a blank line after the entry.
writer.newLine();
@@ -4018,7 +3934,6 @@
*/
public String getProtocolElementName()
{
- assert debugEnter(CLASS_NAME, "getProtocolElementName");
return "Entry";
}
@@ -4032,7 +3947,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -4050,8 +3964,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("Entry(dn=\"");
dn.toString(buffer);
@@ -4113,9 +4025,6 @@
*/
public void toString(StringBuilder buffer, int indent)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(indent));
StringBuilder indentBuf = new StringBuilder(indent);
for (int i=0 ; i < indent; i++)
@@ -4140,7 +4049,6 @@
*/
public String toSingleLineString()
{
- assert debugEnter(CLASS_NAME, "toSingleLineString");
StringBuilder buffer = new StringBuilder();
toSingleLineString(buffer);
@@ -4158,8 +4066,6 @@
*/
public void toSingleLineString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toSingleLineString",
- "java.lang.StringBuilder");
buffer.append("Entry(dn=\"");
dn.toString(buffer);
diff --git a/opends/src/server/org/opends/server/types/ErrorLogCategory.java b/opends/src/server/org/opends/server/types/ErrorLogCategory.java
index d41f4a1..5df30b1 100644
--- a/opends/src/server/org/opends/server/types/ErrorLogCategory.java
+++ b/opends/src/server/org/opends/server/types/ErrorLogCategory.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/ErrorLogSeverity.java b/opends/src/server/org/opends/server/types/ErrorLogSeverity.java
index c13df74..f1c6c70 100644
--- a/opends/src/server/org/opends/server/types/ErrorLogSeverity.java
+++ b/opends/src/server/org/opends/server/types/ErrorLogSeverity.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/ExistingFileBehavior.java b/opends/src/server/org/opends/server/types/ExistingFileBehavior.java
index 71aeba9..ecbd397 100644
--- a/opends/src/server/org/opends/server/types/ExistingFileBehavior.java
+++ b/opends/src/server/org/opends/server/types/ExistingFileBehavior.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/FilePermission.java b/opends/src/server/org/opends/server/types/FilePermission.java
index 69c165c..be54a9d 100644
--- a/opends/src/server/org/opends/server/types/FilePermission.java
+++ b/opends/src/server/org/opends/server/types/FilePermission.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -35,8 +35,9 @@
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.config.ConfigConstants.*;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -63,11 +64,6 @@
*/
public class FilePermission
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.FilePermission";
@@ -195,7 +191,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "<static>", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -585,9 +584,12 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getUsingUNIX", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
- int msgID = MSGID_FILEPERM_CANNOT_EXEC_CHMOD;
+ int msgID = MSGID_FILEPERM_CANNOT_EXEC_CHMOD;
String message = getMessage(msgID, f.getAbsolutePath(),
String.valueOf(e));
throw new DirectoryException(ResultCode.OTHER, message, msgID,
@@ -646,7 +648,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
}
@@ -671,7 +676,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
@@ -694,7 +702,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
}
@@ -719,7 +730,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
@@ -742,7 +756,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
}
@@ -767,7 +784,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "setUsingJava", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
exceptionThrown = true;
}
diff --git a/opends/src/server/org/opends/server/types/FilterType.java b/opends/src/server/org/opends/server/types/FilterType.java
index b03fe4f..92cd813 100644
--- a/opends/src/server/org/opends/server/types/FilterType.java
+++ b/opends/src/server/org/opends/server/types/FilterType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/HostPort.java b/opends/src/server/org/opends/server/types/HostPort.java
index 6f1e68d..0106c33 100644
--- a/opends/src/server/org/opends/server/types/HostPort.java
+++ b/opends/src/server/org/opends/server/types/HostPort.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure that combines an address and
* port number, as may be used to accept a connection from or initiate
@@ -39,12 +34,6 @@
*/
public final class HostPort
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.HostPort";
-
// The host for this object.
@@ -63,7 +52,6 @@
*/
public HostPort(int port)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(port));
this.host = null;
this.port = port;
@@ -81,8 +69,6 @@
*/
public HostPort(String host, int port)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(host),
- String.valueOf(port));
this.host = host;
this.port = port;
@@ -98,7 +84,6 @@
*/
public String getHost()
{
- assert debugEnter(CLASS_NAME, "getHost");
return host;
}
@@ -112,7 +97,6 @@
*/
public int getPort()
{
- assert debugEnter(CLASS_NAME, "getPort");
return port;
}
@@ -128,7 +112,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
if (host == null)
{
diff --git a/opends/src/server/org/opends/server/types/InitializationException.java b/opends/src/server/org/opends/server/types/InitializationException.java
index c0423dc..5b59fc0 100644
--- a/opends/src/server/org/opends/server/types/InitializationException.java
+++ b/opends/src/server/org/opends/server/types/InitializationException.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown if a problem
* occurs while trying to initialize a Directory Server component.
@@ -39,11 +34,6 @@
public class InitializationException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.InitializationException";
@@ -76,7 +66,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(message));
this.messageID = messageID;
}
@@ -99,8 +88,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(message),
- String.valueOf(cause));
this.messageID = messageID;
}
@@ -114,7 +101,6 @@
*/
public final int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
diff --git a/opends/src/server/org/opends/server/types/IntermediateResponse.java b/opends/src/server/org/opends/server/types/IntermediateResponse.java
index f2847dc..0d4ed9a 100644
--- a/opends/src/server/org/opends/server/types/IntermediateResponse.java
+++ b/opends/src/server/org/opends/server/types/IntermediateResponse.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -35,7 +35,6 @@
import org.opends.server.core.Operation;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
@@ -46,11 +45,6 @@
*/
public class IntermediateResponse
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.IntermediateResponse";
@@ -84,10 +78,6 @@
ASN1OctetString value,
List<Control> controls)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(operation),
- String.valueOf(oid),
- String.valueOf(value),
- String.valueOf(controls));
this.operation = operation;
this.oid = oid;
@@ -114,7 +104,6 @@
*/
public Operation getOperation()
{
- assert debugEnter(CLASS_NAME, "getOperation");
return operation;
}
@@ -129,7 +118,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -143,7 +131,6 @@
*/
public void setOID(String oid)
{
- assert debugEnter(CLASS_NAME, "setOID", String.valueOf(oid));
this.oid = oid;
}
@@ -158,7 +145,6 @@
*/
public ASN1OctetString getValue()
{
- assert debugEnter(CLASS_NAME, "getValue");
return value;
}
@@ -172,7 +158,6 @@
*/
public void setValue(ASN1OctetString value)
{
- assert debugEnter(CLASS_NAME, "setValue", String.valueOf(value));
this.value = value;
}
@@ -188,7 +173,6 @@
*/
public List<Control> getControls()
{
- assert debugEnter(CLASS_NAME, "getControls");
return controls;
}
@@ -202,7 +186,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -220,8 +203,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("IntermediateResponse(operation=");
operation.toString(buffer);
diff --git a/opends/src/server/org/opends/server/types/InvokableMethod.java b/opends/src/server/org/opends/server/types/InvokableMethod.java
index 4ae30d8..8d852cc 100644
--- a/opends/src/server/org/opends/server/types/InvokableMethod.java
+++ b/opends/src/server/org/opends/server/types/InvokableMethod.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -36,7 +36,9 @@
import org.opends.server.api.InvokableComponent;
import org.opends.server.config.ConfigAttribute;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
@@ -46,11 +48,6 @@
*/
public class InvokableMethod
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.InvokableMethod";
@@ -100,16 +97,6 @@
boolean retrievesComponentInfo,
boolean updatesComponentInfo)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(name),
- String.valueOf(description),
- String.valueOf(arguments),
- String.valueOf(returnType),
- String.valueOf(retrievesComponentInfo),
- String.valueOf(updatesComponentInfo)
- });
this.name = name;
this.description = description;
@@ -136,7 +123,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return name;
}
@@ -150,7 +136,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -164,7 +149,6 @@
*/
public ConfigAttribute[] getArguments()
{
- assert debugEnter(CLASS_NAME, "getArguments");
return arguments;
}
@@ -178,7 +162,6 @@
*/
public String getReturnType()
{
- assert debugEnter(CLASS_NAME, "getReturnType");
return returnType;
}
@@ -195,7 +178,6 @@
*/
public boolean retrievesComponentInfo()
{
- assert debugEnter(CLASS_NAME, "retrievesComponentInfo");
return retrievesComponentInfo;
}
@@ -212,7 +194,6 @@
*/
public boolean updatesComponentInfo()
{
- assert debugEnter(CLASS_NAME, "updatesComponentInfo");
return updatesComponentInfo;
}
@@ -228,7 +209,6 @@
*/
public MBeanOperationInfo toOperationInfo()
{
- assert debugEnter(CLASS_NAME, "toOperationInfo");
MBeanParameterInfo[] signature =
@@ -283,9 +263,6 @@
public boolean hasSignature(String methodName,
String[] argumentTypes)
{
- assert debugEnter(CLASS_NAME, "hasSignature",
- String.valueOf(methodName),
- String.valueOf(argumentTypes));
if (! methodName.equals(name))
{
@@ -331,8 +308,6 @@
Object[] parameters)
throws MBeanException
{
- assert debugEnter(CLASS_NAME, "invoke", String.valueOf(component),
- String.valueOf(parameters));
try
{
@@ -351,13 +326,19 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "invoke", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
throw new MBeanException(de, de.getErrorMessage());
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "invoke", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
throw new MBeanException(e);
}
diff --git a/opends/src/server/org/opends/server/types/LDAPURL.java b/opends/src/server/org/opends/server/types/LDAPURL.java
index 849330d..4af6a40 100644
--- a/opends/src/server/org/opends/server/types/LDAPURL.java
+++ b/opends/src/server/org/opends/server/types/LDAPURL.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -35,7 +35,9 @@
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -51,11 +53,6 @@
*/
public class LDAPURL
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.LDAPURL";
@@ -149,14 +146,6 @@
SearchScope scope, String rawFilter,
LinkedList<String> extensions)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(scheme),
- String.valueOf(host),
- String.valueOf(port),
- String.valueOf(rawBaseDN),
- String.valueOf(attributes),
- String.valueOf(scope),
- String.valueOf(rawFilter),
- String.valueOf(extensions));
this.host = toLowerCase(host);
@@ -249,14 +238,6 @@
LinkedHashSet<String> attributes, SearchScope scope,
SearchFilter filter, LinkedList<String> extensions)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(scheme),
- String.valueOf(host),
- String.valueOf(port),
- String.valueOf(baseDN),
- String.valueOf(attributes),
- String.valueOf(scope),
- String.valueOf(filter),
- String.valueOf(extensions));
this.host = toLowerCase(host);
@@ -351,7 +332,6 @@
public static LDAPURL decode(String url, boolean fullyDecode)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(url));
// Find the "://" component, which will separate the scheme from
@@ -443,7 +423,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "decode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDAPURL_CANNOT_DECODE_PORT;
String message = getMessage(msgID, String.valueOf(url),
@@ -711,7 +694,6 @@
private static String urlDecode(String s)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "urlDecode", String.valueOf(s));
if (s == null)
@@ -881,7 +863,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "urlDecode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
int msgID = MSGID_LDAPURL_CANNOT_CREATE_UTF8_STRING;
@@ -907,7 +892,6 @@
*/
private static String urlEncode(String s, boolean isExtension)
{
- assert debugEnter(CLASS_NAME, "urlEncode", String.valueOf(s));
if (s == null)
@@ -1012,7 +996,6 @@
*/
private static void hexEncode(char c, StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "hexEncode");
if ((c & (byte) 0xFF) == c)
@@ -1044,7 +1027,6 @@
*/
public String getScheme()
{
- assert debugEnter(CLASS_NAME, "getScheme");
return scheme;
}
@@ -1058,8 +1040,6 @@
*/
public void setScheme(String scheme)
{
- assert debugEnter(CLASS_NAME, "setScheme",
- String.valueOf(scheme));
if (scheme == null)
{
@@ -1081,7 +1061,6 @@
*/
public String getHost()
{
- assert debugEnter(CLASS_NAME, "getHost");
return host;
}
@@ -1095,7 +1074,6 @@
*/
public void setHost(String host)
{
- assert debugEnter(CLASS_NAME, "setHost", String.valueOf(host));
this.host = host;
}
@@ -1109,7 +1087,6 @@
*/
public int getPort()
{
- assert debugEnter(CLASS_NAME, "getPort");
return port;
}
@@ -1123,7 +1100,6 @@
*/
public void setPort(int port)
{
- assert debugEnter(CLASS_NAME, "setPort", String.valueOf(port));
if ((port <= 0) || (port > 65535))
{
@@ -1146,7 +1122,6 @@
*/
public String getRawBaseDN()
{
- assert debugEnter(CLASS_NAME, "getRawBaseDN");
return rawBaseDN;
}
@@ -1161,7 +1136,6 @@
*/
public void setRawBaseDN(String rawBaseDN)
{
- assert debugEnter(CLASS_NAME, "setRawBaseDN");
this.rawBaseDN = rawBaseDN;
this.baseDN = null;
@@ -1180,7 +1154,6 @@
public DN getBaseDN()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getBaseDN");
if (baseDN == null)
{
@@ -1204,7 +1177,6 @@
*/
public void setBaseDN(DN baseDN)
{
- assert debugEnter(CLASS_NAME, "setDN", String.valueOf(baseDN));
if (baseDN == null)
@@ -1229,7 +1201,6 @@
*/
public LinkedHashSet<String> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -1245,7 +1216,6 @@
*/
public SearchScope getScope()
{
- assert debugEnter(CLASS_NAME, "getScope");
return scope;
}
@@ -1259,7 +1229,6 @@
*/
public void setScope(SearchScope scope)
{
- assert debugEnter(CLASS_NAME, "setScope", String.valueOf(scope));
if (scope == null)
{
@@ -1282,7 +1251,6 @@
*/
public String getRawFilter()
{
- assert debugEnter(CLASS_NAME, "getRawFilter");
return rawFilter;
}
@@ -1297,8 +1265,6 @@
*/
public void setRawFilter(String rawFilter)
{
- assert debugEnter(CLASS_NAME, "setRawFilter",
- String.valueOf(rawFilter));
this.rawFilter = rawFilter;
this.filter = null;
@@ -1317,7 +1283,6 @@
public SearchFilter getFilter()
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "getFilter");
if (filter == null)
{
@@ -1343,8 +1308,6 @@
*/
public void setFilter(SearchFilter filter)
{
- assert debugEnter(CLASS_NAME, "setFilter",
- String.valueOf(filter));
if (filter == null)
@@ -1369,7 +1332,6 @@
*/
public LinkedList<String> getExtensions()
{
- assert debugEnter(CLASS_NAME, "getExtensions");
return extensions;
}
@@ -1386,7 +1348,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals");
if (o == null)
{
@@ -1441,7 +1402,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (rawBaseDN == null)
{
@@ -1476,7 +1440,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "equals", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (rawFilter == null)
{
@@ -1554,7 +1521,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int hashCode = 0;
@@ -1573,7 +1539,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hashCode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (rawBaseDN != null)
{
@@ -1594,7 +1563,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "hashCode", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
if (rawFilter != null)
{
@@ -1619,7 +1591,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, false);
@@ -1641,9 +1612,6 @@
*/
public void toString(StringBuilder buffer, boolean baseOnly)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(baseOnly));
urlEncode(scheme, false, buffer);
buffer.append("://");
diff --git a/opends/src/server/org/opends/server/types/LDIFExportConfig.java b/opends/src/server/org/opends/server/types/LDIFExportConfig.java
index 1fc9ae0..7bc7750 100644
--- a/opends/src/server/org/opends/server/types/LDIFExportConfig.java
+++ b/opends/src/server/org/opends/server/types/LDIFExportConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -40,7 +40,9 @@
import java.util.Set;
import java.util.zip.GZIPOutputStream;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
@@ -52,11 +54,6 @@
*/
public class LDIFExportConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.LDIFExportConfig";
@@ -139,8 +136,6 @@
public LDIFExportConfig(String ldifFile,
ExistingFileBehavior existingFileBehavior)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(ldifFile),
- String.valueOf(existingFileBehavior));
this.ldifFile = ldifFile;
this.existingFileBehavior = existingFileBehavior;
@@ -175,8 +170,6 @@
*/
public LDIFExportConfig(OutputStream ldifOutputStream)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(ldifOutputStream));
this.ldifOutputStream = ldifOutputStream;
ldifFile = null;
@@ -215,7 +208,6 @@
public BufferedWriter getWriter()
throws IOException
{
- assert debugEnter(CLASS_NAME, "getWriter");
if (writer == null)
{
@@ -285,7 +277,6 @@
*/
public boolean invokeExportPlugins()
{
- assert debugEnter(CLASS_NAME, "invokeExportPlugins");
return invokeExportPlugins;
}
@@ -302,8 +293,6 @@
*/
public void setInvokeExportPlugins(boolean invokeExportPlugins)
{
- assert debugEnter(CLASS_NAME, "setInvokeExportPlugins",
- String.valueOf(invokeExportPlugins));
this.invokeExportPlugins = invokeExportPlugins;
}
@@ -319,7 +308,6 @@
*/
public boolean compressData()
{
- assert debugEnter(CLASS_NAME, "compressData");
return compressData;
}
@@ -336,8 +324,6 @@
*/
public void setCompressData(boolean compressData)
{
- assert debugEnter(CLASS_NAME, "setCompressData",
- String.valueOf(compressData));
this.compressData = compressData;
}
@@ -353,7 +339,6 @@
*/
public boolean encryptData()
{
- assert debugEnter(CLASS_NAME, "encryptData");
return encryptData;
}
@@ -370,8 +355,6 @@
*/
public void setEncryptData(boolean encryptData)
{
- assert debugEnter(CLASS_NAME, "setEncryptData",
- String.valueOf(encryptData));
this.encryptData = encryptData;
}
@@ -387,7 +370,6 @@
*/
public boolean hashData()
{
- assert debugEnter(CLASS_NAME, "hashData");
return hashData;
}
@@ -404,8 +386,6 @@
*/
public void setHashData(boolean hashData)
{
- assert debugEnter(CLASS_NAME, "setHashData",
- String.valueOf(hashData));
this.hashData = hashData;
}
@@ -421,7 +401,6 @@
*/
public boolean signHash()
{
- assert debugEnter(CLASS_NAME, "signHash");
return signHash;
}
@@ -441,8 +420,6 @@
*/
public void setSignHash(boolean signHash)
{
- assert debugEnter(CLASS_NAME, "setSignHash",
- String.valueOf(signHash));
this.signHash = signHash;
}
@@ -460,7 +437,6 @@
*/
public boolean typesOnly()
{
- assert debugEnter(CLASS_NAME, "typesOnly");
return typesOnly;
}
@@ -478,8 +454,6 @@
*/
public void setTypesOnly(boolean typesOnly)
{
- assert debugEnter(CLASS_NAME, "setTypesOnly",
- String.valueOf(typesOnly));
this.typesOnly = typesOnly;
}
@@ -495,7 +469,6 @@
*/
public int getWrapColumn()
{
- assert debugEnter(CLASS_NAME, "getWrapColumn");
return wrapColumn;
}
@@ -512,8 +485,6 @@
*/
public void setWrapColumn(int wrapColumn)
{
- assert debugEnter(CLASS_NAME, "setWrapColumn",
- String.valueOf(wrapColumn));
this.wrapColumn = wrapColumn;
}
@@ -530,7 +501,6 @@
*/
public List<DN> getExcludeBranches()
{
- assert debugEnter(CLASS_NAME, "getExcludeBranches");
return excludeBranches;
}
@@ -546,8 +516,6 @@
*/
public void setExcludeBranches(List<DN> excludeBranches)
{
- assert debugEnter(CLASS_NAME, "setExcludeBranches",
- String.valueOf(excludeBranches));
if (excludeBranches == null)
{
@@ -571,7 +539,6 @@
*/
public List<DN> getIncludeBranches()
{
- assert debugEnter(CLASS_NAME, "getIncludeBranches");
return includeBranches;
}
@@ -587,8 +554,6 @@
*/
public void setIncludeBranches(List<DN> includeBranches)
{
- assert debugEnter(CLASS_NAME, "setIncludeBranches",
- String.valueOf(includeBranches));
if (includeBranches == null)
{
@@ -612,7 +577,6 @@
*/
public boolean includeObjectClasses()
{
- assert debugEnter(CLASS_NAME, "includeObjectClasses");
return includeObjectClasses;
}
@@ -628,7 +592,6 @@
*/
public boolean includeOperationalAttributes()
{
- assert debugEnter(CLASS_NAME, "includeOperationalAttributes");
return includeOperationalAttributes;
}
@@ -647,8 +610,6 @@
public void setIncludeOperationalAttributes(
boolean includeOperationalAttributes)
{
- assert debugEnter(CLASS_NAME, "setIncludeOperationalAttributes",
- String.valueOf(includeOperationalAttributes));
this.includeOperationalAttributes = includeOperationalAttributes;
}
@@ -665,7 +626,6 @@
*/
public Set<AttributeType> getExcludeAttributes()
{
- assert debugEnter(CLASS_NAME, "getExcludeAttributes");
return excludeAttributes;
}
@@ -683,8 +643,6 @@
public void setExcludeAttributes(
Set<AttributeType> excludeAttributes)
{
- assert debugEnter(CLASS_NAME, "setExcludeAttributes",
- String.valueOf(excludeAttributes));
if (excludeAttributes == null)
{
@@ -708,7 +666,6 @@
*/
public Set<AttributeType> getIncludeAttributes()
{
- assert debugEnter(CLASS_NAME, "getIncludeAttributes");
return includeAttributes;
}
@@ -726,8 +683,6 @@
public void setIncludeAttributes(
Set<AttributeType> includeAttributes)
{
- assert debugEnter(CLASS_NAME, "setIncludeAttributes",
- String.valueOf(includeAttributes));
if (includeAttributes == null)
{
@@ -754,8 +709,6 @@
*/
public boolean includeAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "includeAttribute",
- String.valueOf(attributeType));
if ((! excludeAttributes.isEmpty()) &&
excludeAttributes.contains(attributeType))
@@ -783,7 +736,6 @@
*/
public List<SearchFilter> getExcludeFilters()
{
- assert debugEnter(CLASS_NAME, "getExcludeFilters");
return excludeFilters;
}
@@ -800,8 +752,6 @@
*/
public void setExcludeFilters(List<SearchFilter> excludeFilters)
{
- assert debugEnter(CLASS_NAME, "setExcludeFilters",
- String.valueOf(excludeFilters));
if (excludeFilters == null)
{
@@ -825,7 +775,6 @@
*/
public List<SearchFilter> getIncludeFilters()
{
- assert debugEnter(CLASS_NAME, "getIncludeFilters");
return includeFilters;
}
@@ -842,8 +791,6 @@
*/
public void setIncludeFilters(List<SearchFilter> includeFilters)
{
- assert debugEnter(CLASS_NAME, "setIncludeFilters",
- String.valueOf(includeFilters));
if (includeFilters == null)
{
@@ -874,8 +821,6 @@
public boolean includeEntry(Entry entry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "includeEntry",
- String.valueOf(entry));
DN dn = entry.getDN();
if (! excludeBranches.isEmpty())
@@ -936,7 +881,6 @@
*/
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
// FIXME -- Need to add code to generate a signed hash of the LDIF
@@ -948,7 +892,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/types/LDIFImportConfig.java b/opends/src/server/org/opends/server/types/LDIFImportConfig.java
index c4cbff2..7fd01dd 100644
--- a/opends/src/server/org/opends/server/types/LDIFImportConfig.java
+++ b/opends/src/server/org/opends/server/types/LDIFImportConfig.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -49,7 +49,9 @@
import org.opends.server.tools.makeldif.MakeLDIFInputStream;
import org.opends.server.tools.makeldif.TemplateFile;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
@@ -61,11 +63,6 @@
*/
public class LDIFImportConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.LDIFImportConfig";
@@ -154,7 +151,6 @@
*/
public LDIFImportConfig(String ldifFile)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(ldifFile));
ldifFiles = new ArrayList<String>(1);
ldifFiles.add(ldifFile);
@@ -191,7 +187,6 @@
*/
public LDIFImportConfig(List<String> ldifFiles)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(ldifFiles));
this.ldifFiles = ldifFiles;
ldifFileIterator = ldifFiles.iterator();
@@ -226,8 +221,6 @@
*/
public LDIFImportConfig(InputStream ldifInputStream)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(ldifInputStream));
this.ldifInputStream = ldifInputStream;
bufferSize = DEFAULT_BUFFER_SIZE;
@@ -259,8 +252,6 @@
*/
public LDIFImportConfig(Reader ldifInputReader)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(ldifInputStream));
ldifInputStream = null;
bufferSize = DEFAULT_BUFFER_SIZE;
@@ -309,7 +300,7 @@
{
this(new MakeLDIFInputStream(templateFile));
- assert debugConstructor(CLASS_NAME, String.valueOf(templateFile));
+
}
@@ -328,7 +319,6 @@
public BufferedReader getReader()
throws IOException
{
- assert debugEnter(CLASS_NAME, "getReader");
if (reader == null)
{
@@ -376,7 +366,6 @@
public BufferedReader nextReader()
throws IOException
{
- assert debugEnter(CLASS_NAME, "nextReader");
if ((ldifFileIterator == null) || (! ldifFileIterator.hasNext()))
{
@@ -417,7 +406,6 @@
*/
public BufferedWriter getRejectWriter()
{
- assert debugEnter(CLASS_NAME, "getRejectWriter");
return rejectWriter;
}
@@ -444,9 +432,6 @@
ExistingFileBehavior existingFileBehavior)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeRejectedEntries",
- String.valueOf(rejectFile),
- String.valueOf(existingFileBehavior));
if (rejectFile == null)
{
@@ -503,8 +488,6 @@
*/
public void writeRejectedEntries(OutputStream outputStream)
{
- assert debugEnter(CLASS_NAME, "writeRejectedEntries",
- String.valueOf(outputStream));
if (outputStream == null)
{
@@ -536,7 +519,6 @@
*/
public boolean appendToExistingData()
{
- assert debugEnter(CLASS_NAME, "appendToExistingData");
return appendToExistingData;
}
@@ -553,8 +535,6 @@
*/
public void setAppendToExistingData(boolean appendToExistingData)
{
- assert debugEnter(CLASS_NAME, "setAppendToExistingData",
- String.valueOf(appendToExistingData));
this.appendToExistingData = appendToExistingData;
}
@@ -573,7 +553,6 @@
*/
public boolean replaceExistingEntries()
{
- assert debugEnter(CLASS_NAME, "replaceExistingEntries");
return replaceExistingEntries;
}
@@ -592,8 +571,6 @@
public void setReplaceExistingEntries(
boolean replaceExistingEntries)
{
- assert debugEnter(CLASS_NAME, "setReplaceExistingEntries",
- String.valueOf(replaceExistingEntries));
this.replaceExistingEntries = replaceExistingEntries;
}
@@ -610,7 +587,6 @@
*/
public boolean invokeImportPlugins()
{
- assert debugEnter(CLASS_NAME, "invokeImportPlugins");
return invokeImportPlugins;
}
@@ -628,8 +604,6 @@
*/
public void setInvokeImportPlugins(boolean invokeImportPlugins)
{
- assert debugEnter(CLASS_NAME, "setInvokeImportPlugins",
- String.valueOf(invokeImportPlugins));
this.invokeImportPlugins = invokeImportPlugins;
}
@@ -645,7 +619,6 @@
*/
public boolean isCompressed()
{
- assert debugEnter(CLASS_NAME, "isCompressed");
return isCompressed;
}
@@ -662,8 +635,6 @@
*/
public void setCompressed(boolean isCompressed)
{
- assert debugEnter(CLASS_NAME, "setCompressed",
- String.valueOf(isCompressed));
this.isCompressed = isCompressed;
}
@@ -679,7 +650,6 @@
*/
public boolean isEncrypted()
{
- assert debugEnter(CLASS_NAME, "isEncrypted");
return isEncrypted;
}
@@ -696,8 +666,6 @@
*/
public void setEncrypted(boolean isEncrypted)
{
- assert debugEnter(CLASS_NAME, "setEncrypted",
- String.valueOf(isEncrypted));
this.isEncrypted = isEncrypted;
}
@@ -714,7 +682,6 @@
*/
public boolean validateSchema()
{
- assert debugEnter(CLASS_NAME, "validateSchema");
return validateSchema;
}
@@ -730,8 +697,6 @@
*/
public void setValidateSchema(boolean validateSchema)
{
- assert debugEnter(CLASS_NAME, "setValidateSchema",
- String.valueOf(validateSchema));
this.validateSchema = validateSchema;
}
@@ -748,7 +713,6 @@
*/
public List<DN> getExcludeBranches()
{
- assert debugEnter(CLASS_NAME, "getExcludeBranches");
return excludeBranches;
}
@@ -764,8 +728,6 @@
*/
public void setExcludeBranches(List<DN> excludeBranches)
{
- assert debugEnter(CLASS_NAME, "setExcludeBranches",
- String.valueOf(excludeBranches));
if (excludeBranches == null)
{
@@ -789,7 +751,6 @@
*/
public List<DN> getIncludeBranches()
{
- assert debugEnter(CLASS_NAME, "getIncludeBranches");
return includeBranches;
}
@@ -805,8 +766,6 @@
*/
public void setIncludeBranches(List<DN> includeBranches)
{
- assert debugEnter(CLASS_NAME, "setIncludeBranches",
- String.valueOf(includeBranches));
if (includeBranches == null)
{
@@ -833,7 +792,6 @@
*/
public boolean includeEntry(DN dn)
{
- assert debugEnter(CLASS_NAME, "excludeDN", String.valueOf(dn));
if (! excludeBranches.isEmpty())
{
@@ -874,7 +832,6 @@
*/
public boolean includeObjectClasses()
{
- assert debugEnter(CLASS_NAME, "includeObjectClasses");
return includeObjectClasses;
}
@@ -891,8 +848,6 @@
*/
public void setIncludeObjectClasses(boolean includeObjectClasses)
{
- assert debugEnter(CLASS_NAME, "setIncludeObjectClasses",
- String.valueOf(includeObjectClasses));
this.includeObjectClasses = includeObjectClasses;
}
@@ -909,7 +864,6 @@
*/
public Set<AttributeType> getExcludeAttributes()
{
- assert debugEnter(CLASS_NAME, "getExcludeAttributes");
return excludeAttributes;
}
@@ -927,8 +881,6 @@
public void setExcludeAttributes(
Set<AttributeType> excludeAttributes)
{
- assert debugEnter(CLASS_NAME, "setExcludeAttributes",
- String.valueOf(excludeAttributes));
if (excludeAttributes == null)
{
@@ -952,7 +904,6 @@
*/
public Set<AttributeType> getIncludeAttributes()
{
- assert debugEnter(CLASS_NAME, "getIncludeAttributes");
return includeAttributes;
}
@@ -970,8 +921,6 @@
public void setIncludeAttributes(
Set<AttributeType> includeAttributes)
{
- assert debugEnter(CLASS_NAME, "setIncludeAttributes",
- String.valueOf(includeAttributes));
if (includeAttributes == null)
{
@@ -998,8 +947,6 @@
*/
public boolean includeAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "includeAttribute",
- String.valueOf(attributeType));
if ((! excludeAttributes.isEmpty()) &&
excludeAttributes.contains(attributeType))
@@ -1027,7 +974,6 @@
*/
public List<SearchFilter> getExcludeFilters()
{
- assert debugEnter(CLASS_NAME, "getExcludeFilters");
return excludeFilters;
}
@@ -1044,8 +990,6 @@
*/
public void setExcludeFilters(List<SearchFilter> excludeFilters)
{
- assert debugEnter(CLASS_NAME, "setExcludeFilters",
- String.valueOf(excludeFilters));
if (excludeFilters == null)
{
@@ -1069,7 +1013,6 @@
*/
public List<SearchFilter> getIncludeFilters()
{
- assert debugEnter(CLASS_NAME, "getIncludeFilters");
return includeFilters;
}
@@ -1086,8 +1029,6 @@
*/
public void setIncludeFilters(List<SearchFilter> includeFilters)
{
- assert debugEnter(CLASS_NAME, "setIncludeFilters",
- String.valueOf(includeFilters));
if (includeFilters == null)
{
@@ -1118,8 +1059,6 @@
public boolean includeEntry(Entry entry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "includeEntry",
- String.valueOf(entry));
if (! excludeFilters.isEmpty())
{
@@ -1159,7 +1098,6 @@
*/
public int getBufferSize()
{
- assert debugEnter(CLASS_NAME, "getBufferSize");
return bufferSize;
}
@@ -1175,8 +1113,6 @@
*/
public void setBufferSize(int bufferSize)
{
- assert debugEnter(CLASS_NAME, "setBufferSize",
- String.valueOf(bufferSize));
this.bufferSize = bufferSize;
}
@@ -1188,7 +1124,6 @@
*/
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
try
{
@@ -1196,7 +1131,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
if (rejectWriter != null)
@@ -1207,7 +1145,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/types/LockManager.java b/opends/src/server/org/opends/server/types/LockManager.java
index c124d6e..332978d 100644
--- a/opends/src/server/org/opends/server/types/LockManager.java
+++ b/opends/src/server/org/opends/server/types/LockManager.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -34,7 +34,12 @@
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugError;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugWarning;
import static org.opends.server.util.StaticUtils.*;
@@ -47,11 +52,6 @@
*/
public class LockManager
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.LockManager";
@@ -129,8 +129,6 @@
*/
public static Lock tryLockRead(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "tryLockRead",
- String.valueOf(entryDN));
int hashCode = (entryDN.hashCode() & 0x7FFFFFFF);
@@ -152,14 +150,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
- // This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unexpected exception while trying to obtain the " +
- "global lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ // This is not fine. Some unexpected error occurred.
+ debugError(
+ "Unexpected exception while trying to obtain the " +
+ "global lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
@@ -185,11 +185,12 @@
else
{
// This should never happen since we just created the lock.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unable to acquire read lock on " +
- "newly-created lock for entry " +
- entryDN.toString());
+ if (debugEnabled())
+ {
+ debugError(
+ "Unable to acquire read lock on newly-created lock " +
+ "for entry %s", entryDN);
+ }
return null;
}
}
@@ -205,26 +206,28 @@
else
{
// We couldn't get the read lock. Write a debug message.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "lockRead",
- "Unable to acquire a read lock for entry " +
- entryDN.toString() + " that was already " +
- "present in the lock table.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Unable to acquire a read lock for entry %s that " +
+ "was already present in the lock table.", entryDN);
+ }
return null;
}
}
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
- // This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unexpected exception while trying to obtain a " +
- "read lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ // This is not fine. Some unexpected error occurred.
+ debugError(
+ "Unexpected exception while trying to obtain a read " +
+ "lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
finally
@@ -253,8 +256,6 @@
*/
public static Lock lockRead(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "lockRead",
- String.valueOf(entryDN));
return lockRead(entryDN, DEFAULT_TIMEOUT);
}
@@ -279,8 +280,6 @@
*/
public static Lock lockRead(DN entryDN, long timeout)
{
- assert debugEnter(CLASS_NAME, "lockRead", String.valueOf(entryDN),
- String.valueOf(timeout));
int hashCode = (entryDN.hashCode() & 0x7FFFFFFF);
@@ -302,7 +301,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "lockRead", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// This is fine. The thread trying to acquire the lock was
// interrupted.
@@ -310,14 +312,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unexpected exception while trying to obtain the " +
- "global lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ if (debugEnabled())
+ {
+ debugError(
+ "Unexpected exception while trying to obtain the " +
+ "global lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
@@ -344,11 +351,12 @@
else
{
// This should never happen since we just created the lock.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unable to acquire read lock on " +
- "newly-created lock for entry " +
- entryDN.toString());
+ if (debugEnabled())
+ {
+ debugError(
+ "Unable to acquire read lock on newly-created lock " +
+ "for entry %s", entryDN);
+ }
return null;
}
}
@@ -365,19 +373,22 @@
else
{
// We couldn't get the read lock. Write a debug message.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "lockRead",
- "Unable to acquire a read lock for entry " +
- entryDN.toString() + " that was already " +
- "present in the lock table.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Unable to acquire a read lock for entry %s that " +
+ "was already present in the lock table.", entryDN);
+ }
return null;
}
}
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "lockRead", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// This is fine. The thread trying to acquire the lock was
// interrupted.
@@ -385,14 +396,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockRead", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockRead",
- "Unexpected exception while trying to obtain a " +
- "read lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ if (debugEnabled())
+ {
+ debugError(
+ "Unexpected exception while trying to obtain a read " +
+ "lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
finally
@@ -418,8 +434,6 @@
*/
public static Lock tryLockWrite(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "lockWrite",
- String.valueOf(entryDN));
int hashCode = (entryDN.hashCode() & 0x7FFFFFFF);
@@ -441,14 +455,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockWrite", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
- // This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unexpected exception while trying to obtain the " +
- "global lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ // This is not fine. Some unexpected error occurred.
+ debugError(
+ "Unexpected exception while trying to obtain the " +
+ "global lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
@@ -474,11 +490,12 @@
else
{
// This should never happen since we just created the lock.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unable to acquire write lock on " +
- "newly-created lock for entry " +
- entryDN.toString());
+ if (debugEnabled())
+ {
+ debugError(
+ "Unable to acquire write lock on newly-created " +
+ "lock for entry %s", entryDN);
+ }
return null;
}
}
@@ -495,26 +512,29 @@
else
{
// We couldn't get the write lock. Write a debug message.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "lockWrite",
- "Unable to acquire the write lock for entry " +
- entryDN.toString() + " that was already " +
- "present in the lock table.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Unable to acquire the write lock for entry %s " +
+ "that was already present in the lock table.",
+ entryDN);
+ }
return null;
}
}
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockWrite", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
- // This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unexpected exception while trying to obtain the " +
- "write lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ // This is not fine. Some unexpected error occurred.
+ debugError(
+ "Unexpected exception while trying to obtain the write " +
+ "lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
finally
@@ -541,8 +561,6 @@
*/
public static Lock lockWrite(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "lockWrite",
- String.valueOf(entryDN));
return lockWrite(entryDN, DEFAULT_TIMEOUT);
}
@@ -565,9 +583,6 @@
*/
public static Lock lockWrite(DN entryDN, long timeout)
{
- assert debugEnter(CLASS_NAME, "lockWrite",
- String.valueOf(entryDN),
- String.valueOf(timeout));
int hashCode = (entryDN.hashCode() & 0x7FFFFFFF);
@@ -589,7 +604,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "lockWrite", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// This is fine. The thread trying to acquire the lock was
// interrupted.
@@ -597,14 +615,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockWrite", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unexpected exception while trying to obtain the " +
- "global lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ if (debugEnabled())
+ {
+ debugError(
+ "Unexpected exception while trying to obtain the " +
+ "global lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
@@ -631,11 +654,12 @@
else
{
// This should never happen since we just created the lock.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unable to acquire write lock on " +
- "newly-created lock for entry " +
- entryDN.toString());
+ if (debugEnabled())
+ {
+ debugError(
+ "Unable to acquire write lock on newly-created " +
+ "lock for entry %s", entryDN.toString());
+ }
return null;
}
}
@@ -653,19 +677,23 @@
else
{
// We couldn't get the write lock. Write a debug message.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.WARNING, CLASS_NAME,
- "lockWrite",
- "Unable to acquire the write lock for entry " +
- entryDN.toString() + " that was already " +
- "present in the lock table.");
+ if (debugEnabled())
+ {
+ debugWarning(
+ "Unable to acquire the write lock for entry %s " +
+ "that was already present in the lock table.",
+ entryDN);
+ }
return null;
}
}
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "lockWrite", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// This is fine. The thread trying to acquire the lock was
// interrupted.
@@ -673,14 +701,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "lockWrite", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
- // This is not fine. Some unexpected error occurred.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "lockWrite",
- "Unexpected exception while trying to obtain the " +
- "write lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ // This is not fine. Some unexpected error occurred.
+ debugError(
+ "Unexpected exception while trying to obtain the write " +
+ "lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
+ }
return null;
}
finally
@@ -701,7 +731,6 @@
*/
public static void unlock(DN entryDN, Lock lock)
{
- assert debugEnter(CLASS_NAME, "unlock", String.valueOf(entryDN));
// Unlock the entry without grabbing any additional locks.
@@ -714,7 +743,10 @@
// This should never happen. However, if it does, then just
// capture the exception and continue because it may still be
// necessary to remove the lock for the entry from the table.
- assert debugException(CLASS_NAME, "unlock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
@@ -734,7 +766,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "unlock", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// The lock trying to acquire the lock was interrupted. In this
// case, we'll just return. The worst that could happen here is
@@ -744,17 +779,19 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "unlock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This is not fine. Some unexpected error occurred. But
// again, the worst that could happen is that we may not clean
// up an unheld lock, which isn't really that big a deal unless
// it happens too often.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "unlock",
- "Unexpected exception while trying to obtain the " +
- "global lock for entry " + entryDN.toString() +
- ": " + stackTraceToSingleLineString(e));
+ debugError(
+ "Unexpected exception while trying to obtain the global " +
+ "lock for entry %s: %s",
+ entryDN, stackTraceToSingleLineString(e));
return;
}
@@ -775,15 +812,16 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "unlock", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// This should never happen.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.ERROR, CLASS_NAME, "unlock",
- "Unexpected exception while trying to determine " +
- "whether the lock for entry " + entryDN.toString() +
- " can be removed: " +
- stackTraceToSingleLineString(e));
+ debugError(
+ "Unexpected exception while trying to determine whether " +
+ "the lock for entry %s can be removed: %s",
+ entryDN, stackTraceToSingleLineString(e));
}
finally
{
@@ -809,8 +847,6 @@
*/
public static ReentrantReadWriteLock destroyLock(DN entryDN)
{
- assert debugEnter(CLASS_NAME, "destroyLock",
- String.valueOf(entryDN));
return entryLocks.remove(entryDN);
}
@@ -825,7 +861,6 @@
*/
public static int lockTableSize()
{
- assert debugEnter(CLASS_NAME, "lockTableSize");
return entryLocks.size();
}
diff --git a/opends/src/server/org/opends/server/types/LockType.java b/opends/src/server/org/opends/server/types/LockType.java
index 9b4add2..5132a9c 100644
--- a/opends/src/server/org/opends/server/types/LockType.java
+++ b/opends/src/server/org/opends/server/types/LockType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/MatchingRuleUse.java b/opends/src/server/org/opends/server/types/MatchingRuleUse.java
index cfad455..123fbc3 100644
--- a/opends/src/server/org/opends/server/types/MatchingRuleUse.java
+++ b/opends/src/server/org/opends/server/types/MatchingRuleUse.java
@@ -39,7 +39,6 @@
import org.opends.server.api.MatchingRule;
import org.opends.server.schema.MatchingRuleUseSyntax;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
@@ -55,11 +54,6 @@
public final class MatchingRuleUse
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.MatchingRuleUse";
@@ -117,13 +111,6 @@
Set<AttributeType> attributes,
Map<String,List<String>> extraProperties)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(definition),
- String.valueOf(matchingRule),
- String.valueOf(names),
- String.valueOf(description),
- String.valueOf(isObsolete),
- String.valueOf(attributes),
- String.valueOf(extraProperties));
ensureNotNull(definition, matchingRule);
@@ -173,7 +160,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -217,7 +203,6 @@
*/
public MatchingRule getMatchingRule()
{
- assert debugEnter(CLASS_NAME, "getMatchingRule");
return matchingRule;
}
@@ -233,7 +218,6 @@
*/
public Map<String,String> getNames()
{
- assert debugEnter(CLASS_NAME, "getNames");
return names;
}
@@ -249,7 +233,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
if (names.isEmpty())
{
@@ -274,8 +257,6 @@
*/
public boolean hasName(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasName",
- String.valueOf(lowerName));
return names.containsKey(lowerName);
}
@@ -292,7 +273,6 @@
*/
public String getSchemaFile()
{
- assert debugEnter(CLASS_NAME, "getSchemaFile");
List<String> values =
extraProperties.get(SCHEMA_PROPERTY_FILENAME);
@@ -315,8 +295,6 @@
*/
public void setSchemaFile(String schemaFile)
{
- assert debugEnter(CLASS_NAME, "setSchemaFile",
- String.valueOf(schemaFile));
setExtraProperty(SCHEMA_PROPERTY_FILENAME, schemaFile);
}
@@ -331,7 +309,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -346,7 +323,6 @@
*/
public boolean isObsolete()
{
- assert debugEnter(CLASS_NAME, "isObsolete");
return isObsolete;
}
@@ -362,7 +338,6 @@
*/
public Set<AttributeType> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return attributes;
}
@@ -382,8 +357,6 @@
*/
public boolean appliesToAttribute(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "appliesToAttribute",
- String.valueOf(attributeType));
return attributes.contains(attributeType);
}
@@ -401,7 +374,6 @@
*/
public Map<String,List<String>> getExtraProperties()
{
- assert debugEnter(CLASS_NAME, "getExtraProperties");
return extraProperties;
}
@@ -421,8 +393,6 @@
*/
public List<String> getExtraProperty(String propertyName)
{
- assert debugEnter(CLASS_NAME, "getExtraProperty",
- String.valueOf(propertyName));
return extraProperties.get(propertyName);
}
@@ -440,8 +410,6 @@
*/
public void setExtraProperty(String name, String value)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(value));
ensureNotNull(name);
@@ -471,8 +439,6 @@
*/
public void setExtraProperty(String name, List<String> values)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(values));
ensureNotNull(name);
@@ -501,7 +467,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals");
if (this == o)
{
@@ -526,7 +491,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return matchingRule.hashCode();
}
@@ -542,7 +506,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, true);
@@ -565,9 +528,6 @@
public void toString(StringBuilder buffer,
boolean includeFileElement)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(includeFileElement));
buffer.append("( ");
buffer.append(matchingRule.getOID());
diff --git a/opends/src/server/org/opends/server/types/MemberList.java b/opends/src/server/org/opends/server/types/MemberList.java
index 52e94cf..9f6f64a 100644
--- a/opends/src/server/org/opends/server/types/MemberList.java
+++ b/opends/src/server/org/opends/server/types/MemberList.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a mechanism that may be used to iterate over the
* members of a group. It uses an interface that is similar to that
@@ -42,11 +37,6 @@
*/
public abstract class MemberList
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.MemberList";
@@ -73,7 +63,6 @@
public DN nextMemberDN()
throws MembershipException
{
- assert debugEnter(CLASS_NAME, "nextMemberDN");
Entry e = nextMemberEntry();
if (e == null)
diff --git a/opends/src/server/org/opends/server/types/MembershipException.java b/opends/src/server/org/opends/server/types/MembershipException.java
index 358cf1c..f808330 100644
--- a/opends/src/server/org/opends/server/types/MembershipException.java
+++ b/opends/src/server/org/opends/server/types/MembershipException.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown if a problem
* occurs while attempting to iterate across the members of a group.
@@ -39,11 +34,6 @@
public class MembershipException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.MembershipException";
@@ -96,10 +86,6 @@
{
super(errorMessage);
- assert debugConstructor(CLASS_NAME,
- String.valueOf(errorMessageID),
- String.valueOf(errorMessage),
- String.valueOf(continueIterating));
this.errorMessageID = errorMessageID;
this.errorMessage = errorMessage;
@@ -127,11 +113,6 @@
{
super(errorMessage, cause);
- assert debugConstructor(CLASS_NAME,
- String.valueOf(errorMessageID),
- String.valueOf(errorMessage),
- String.valueOf(continueIterating),
- String.valueOf(cause));
this.errorMessageID = errorMessageID;
this.errorMessage = errorMessage;
@@ -147,7 +128,6 @@
*/
public final int getErrorMessageID()
{
- assert debugEnter(CLASS_NAME, "getErrorMessageID");
return errorMessageID;
}
@@ -161,7 +141,6 @@
*/
public final String getErrorMessage()
{
- assert debugEnter(CLASS_NAME, "getErrorMessage");
return errorMessage;
}
@@ -178,7 +157,6 @@
*/
public final boolean continueIterating()
{
- assert debugEnter(CLASS_NAME, "continueIterating");
return continueIterating;
}
diff --git a/opends/src/server/org/opends/server/types/Modification.java b/opends/src/server/org/opends/server/types/Modification.java
index 1457bc5..aecc213 100644
--- a/opends/src/server/org/opends/server/types/Modification.java
+++ b/opends/src/server/org/opends/server/types/Modification.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
@@ -40,11 +39,6 @@
*/
public class Modification
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.Modification";
// The attribute for this modification.
@@ -70,9 +64,6 @@
public Modification(ModificationType modificationType,
Attribute attribute)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(modificationType),
- String.valueOf(attribute));
this.modificationType = modificationType;
this.attribute = attribute;
@@ -96,9 +87,6 @@
public Modification(ModificationType modificationType,
Attribute attribute, boolean isInternal)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(modificationType),
- String.valueOf(attribute));
this.modificationType = modificationType;
this.attribute = attribute;
@@ -114,7 +102,6 @@
*/
public ModificationType getModificationType()
{
- assert debugEnter(CLASS_NAME, "getModificationType");
return modificationType;
}
@@ -129,8 +116,6 @@
*/
public void setModificationType(ModificationType modificationType)
{
- assert debugEnter(CLASS_NAME, "setModificationType",
- String.valueOf(modificationType));
this.modificationType = modificationType;
}
@@ -144,7 +129,6 @@
*/
public Attribute getAttribute()
{
- assert debugEnter(CLASS_NAME, "getAttribute");
return attribute;
}
@@ -158,8 +142,6 @@
*/
public void setAttribute(Attribute attribute)
{
- assert debugEnter(CLASS_NAME, "setAttribute",
- String.valueOf(attribute));
this.attribute = attribute;
}
@@ -176,7 +158,6 @@
*/
public boolean isInternal()
{
- assert debugEnter(CLASS_NAME, "isInternal");
return isInternal;
}
@@ -195,8 +176,6 @@
*/
public void setInternal(boolean isInternal)
{
- assert debugEnter(CLASS_NAME, "setInternal",
- String.valueOf(isInternal));
this.isInternal = isInternal;
}
@@ -217,7 +196,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -249,7 +227,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return attribute.hashCode();
}
@@ -263,7 +240,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -281,8 +257,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("Modification(");
buffer.append(modificationType.toString());
@@ -301,7 +275,6 @@
*/
public String toLDIF()
{
- assert debugEnter(CLASS_NAME, "toLDIF");
StringBuilder buffer = new StringBuilder();
toLDIF(buffer);
@@ -319,8 +292,6 @@
*/
public void toLDIF(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toLDIF",
- "java.lang.StringBuilder");
buffer.append(modificationType.toString());
buffer.append(": ");
diff --git a/opends/src/server/org/opends/server/types/ModificationType.java b/opends/src/server/org/opends/server/types/ModificationType.java
index b667592..b96e766 100644
--- a/opends/src/server/org/opends/server/types/ModificationType.java
+++ b/opends/src/server/org/opends/server/types/ModificationType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/NameForm.java b/opends/src/server/org/opends/server/types/NameForm.java
index bc3390b..9c374c5 100644
--- a/opends/src/server/org/opends/server/types/NameForm.java
+++ b/opends/src/server/org/opends/server/types/NameForm.java
@@ -38,7 +38,6 @@
import org.opends.server.schema.NameFormSyntax;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
@@ -54,11 +53,6 @@
public final class NameForm
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.NameForm";
@@ -123,15 +117,6 @@
Set<AttributeType> optionalAttributes,
Map<String,List<String>> extraProperties)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(definition),
- String.valueOf(names),
- String.valueOf(oid),
- String.valueOf(description),
- String.valueOf(isObsolete),
- String.valueOf(structuralClass),
- String.valueOf(requiredAttributes),
- String.valueOf(optionalAttributes),
- String.valueOf(extraProperties));
ensureNotNull(definition, oid, structuralClass);
@@ -191,7 +176,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -236,7 +220,6 @@
*/
public Map<String,String> getNames()
{
- assert debugEnter(CLASS_NAME, "getNames");
return names;
}
@@ -255,8 +238,6 @@
*/
public boolean hasName(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasName",
- String.valueOf(lowerName));
return names.containsKey(lowerName);
}
@@ -270,7 +251,6 @@
*/
public String getOID()
{
- assert debugEnter(CLASS_NAME, "getOID");
return oid;
}
@@ -287,7 +267,6 @@
*/
public String getNameOrOID()
{
- assert debugEnter(CLASS_NAME, "getNameOrOID");
if (names.isEmpty())
{
@@ -315,8 +294,6 @@
*/
public boolean hasNameOrOID(String lowerValue)
{
- assert debugEnter(CLASS_NAME, "hasNameOrOID",
- String.valueOf(lowerValue));
if (names.containsKey(lowerValue))
{
@@ -338,7 +315,6 @@
*/
public String getSchemaFile()
{
- assert debugEnter(CLASS_NAME, "getSchemaFile");
List<String> values =
extraProperties.get(SCHEMA_PROPERTY_FILENAME);
@@ -361,8 +337,6 @@
*/
public void setSchemaFile(String schemaFile)
{
- assert debugEnter(CLASS_NAME, "setSchemaFile",
- String.valueOf(schemaFile));
setExtraProperty(SCHEMA_PROPERTY_FILENAME, schemaFile);
}
@@ -377,7 +351,6 @@
*/
public String getDescription()
{
- assert debugEnter(CLASS_NAME, "getDescription");
return description;
}
@@ -393,7 +366,6 @@
*/
public ObjectClass getStructuralClass()
{
- assert debugEnter(CLASS_NAME, "getStructuralClass");
return structuralClass;
}
@@ -407,7 +379,6 @@
*/
public Set<AttributeType> getRequiredAttributes()
{
- assert debugEnter(CLASS_NAME, "getRequiredAttributes");
return requiredAttributes;
}
@@ -426,8 +397,6 @@
*/
public boolean isRequired(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isRequired",
- String.valueOf(attributeType));
return requiredAttributes.contains(attributeType);
}
@@ -441,7 +410,6 @@
*/
public Set<AttributeType> getOptionalAttributes()
{
- assert debugEnter(CLASS_NAME, "getOptionalAttributes");
return optionalAttributes;
}
@@ -460,8 +428,6 @@
*/
public boolean isOptional(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isOptional",
- String.valueOf(attributeType));
return optionalAttributes.contains(attributeType);
}
@@ -481,8 +447,6 @@
*/
public boolean isRequiredOrOptional(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "isRequiredOrOptional",
- String.valueOf(attributeType));
return (requiredAttributes.contains(attributeType) ||
optionalAttributes.contains(attributeType));
@@ -498,7 +462,6 @@
*/
public boolean isObsolete()
{
- assert debugEnter(CLASS_NAME, "isObsolete");
return isObsolete;
}
@@ -516,7 +479,6 @@
*/
public Map<String,List<String>> getExtraProperties()
{
- assert debugEnter(CLASS_NAME, "getExtraProperties");
return extraProperties;
}
@@ -536,8 +498,6 @@
*/
public List<String> getExtraProperty(String propertyName)
{
- assert debugEnter(CLASS_NAME, "getExtraProperty",
- String.valueOf(propertyName));
return extraProperties.get(propertyName);
}
@@ -554,8 +514,6 @@
*/
public void setExtraProperty(String name, String value)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(value));
ensureNotNull(name);
@@ -584,8 +542,6 @@
*/
public void setExtraProperty(String name, List<String> values)
{
- assert debugEnter(CLASS_NAME, "setExtraProperty",
- String.valueOf(name), String.valueOf(values));
ensureNotNull(name);
@@ -614,7 +570,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals");
if (this == o)
{
@@ -639,7 +594,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
int oidLength = oid.length();
int hashCode = 0;
@@ -662,7 +616,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer, true);
@@ -685,9 +638,6 @@
public void toString(StringBuilder buffer,
boolean includeFileElement)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder",
- String.valueOf(includeFileElement));
buffer.append("( ");
buffer.append(oid);
diff --git a/opends/src/server/org/opends/server/types/NamedCharacterSet.java b/opends/src/server/org/opends/server/types/NamedCharacterSet.java
index dcf579b..635a1d1 100644
--- a/opends/src/server/org/opends/server/types/NamedCharacterSet.java
+++ b/opends/src/server/org/opends/server/types/NamedCharacterSet.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -33,7 +33,6 @@
import org.opends.server.config.ConfigException;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
import static org.opends.server.util.StaticUtils.*;
@@ -47,11 +46,6 @@
*/
public class NamedCharacterSet
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.NamedCharacterSet";
@@ -79,8 +73,6 @@
public NamedCharacterSet(String name, char[] characters)
throws ConfigException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(characters));
this.name = name;
this.characters = characters;
@@ -124,9 +116,6 @@
Random random)
throws ConfigException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(name),
- String.valueOf(characters),
- String.valueOf(random));
this.name = name;
this.characters = characters;
@@ -160,7 +149,6 @@
*/
public String getName()
{
- assert debugEnter(CLASS_NAME, "getName");
return name;
}
@@ -174,7 +162,6 @@
*/
public char[] getCharacters()
{
- assert debugEnter(CLASS_NAME, "getCharacters");
return characters;
}
@@ -189,7 +176,6 @@
*/
public char getRandomCharacter()
{
- assert debugEnter(CLASS_NAME, "getRandomCharacter");
if ((characters == null) || (characters.length == 0))
{
@@ -212,9 +198,6 @@
*/
public void getRandomCharacters(StringBuilder buffer, int count)
{
- assert debugEnter(CLASS_NAME, "getRandomCharacters",
- "java.lang.StringBuilder",
- String.valueOf(count));
if ((characters == null) || (characters.length == 0))
{
diff --git a/opends/src/server/org/opends/server/types/NullOutputStream.java b/opends/src/server/org/opends/server/types/NullOutputStream.java
index 75eae93..00e570d 100644
--- a/opends/src/server/org/opends/server/types/NullOutputStream.java
+++ b/opends/src/server/org/opends/server/types/NullOutputStream.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/ObjectClass.java b/opends/src/server/org/opends/server/types/ObjectClass.java
index 5852210..a6976ef 100644
--- a/opends/src/server/org/opends/server/types/ObjectClass.java
+++ b/opends/src/server/org/opends/server/types/ObjectClass.java
@@ -39,8 +39,6 @@
import org.opends.server.schema.ObjectClassSyntax;
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.Validator.*;
@@ -65,11 +63,6 @@
extends CommonSchemaElements
implements SchemaFileElement
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.ObjectClass";
// The set of optional attribute types for this objectclass.
private final Set<AttributeType> optionalAttributes;
@@ -154,16 +147,6 @@
super(primaryName, names, oid, description, isObsolete,
extraProperties);
- assert debugConstructor(CLASS_NAME, String.valueOf(primaryName),
- String.valueOf(names),
- String.valueOf(oid),
- String.valueOf(description),
- String.valueOf(superiorClass),
- String.valueOf(requiredAttributes),
- String.valueOf(optionalAttributes),
- String.valueOf(objectClassType),
- String.valueOf(isObsolete),
- String.valueOf(extraProperties));
ensureNotNull(definition, oid);
@@ -232,7 +215,6 @@
*/
public String getDefinition()
{
- assert debugEnter(CLASS_NAME, "getDefinition");
return definition;
}
@@ -276,7 +258,6 @@
* or <code>null</code> if there is none.
*/
public ObjectClass getSuperiorClass() {
- assert debugEnter(CLASS_NAME, "getSuperiorClass");
return superiorClass;
}
@@ -293,8 +274,6 @@
* of the provided class, or <code>false</code> if not.
*/
public boolean isDescendantOf(ObjectClass objectClass) {
- assert debugEnter(CLASS_NAME, "isDescendantOf", String
- .valueOf(objectClass));
if (superiorClass == null) {
return false;
@@ -315,7 +294,6 @@
* attributes for this objectclass.
*/
public Set<AttributeType> getRequiredAttributes() {
- assert debugEnter(CLASS_NAME, "getRequiredAttributes");
return requiredAttributes;
}
@@ -332,7 +310,6 @@
* objectclasses that it might have.
*/
public Set<AttributeType> getRequiredAttributeChain() {
- assert debugEnter(CLASS_NAME, "getRequiredAttributeChain");
return requiredAttributesChain;
}
@@ -351,8 +328,6 @@
* classes, or <code>false</code> if not.
*/
public boolean isRequired(AttributeType attributeType) {
- assert debugEnter(CLASS_NAME, "isRequired", String
- .valueOf(attributeType));
return requiredAttributesChain.contains(attributeType);
}
@@ -368,7 +343,6 @@
* attributes for this objectclass.
*/
public Set<AttributeType> getOptionalAttributes() {
- assert debugEnter(CLASS_NAME, "getOptionalAttributes");
return optionalAttributes;
}
@@ -385,7 +359,6 @@
* objectclasses that it might have.
*/
public Set<AttributeType> getOptionalAttributeChain() {
- assert debugEnter(CLASS_NAME, "getOptionalAttributeChain");
return optionalAttributesChain;
}
@@ -404,8 +377,6 @@
* classes, or <code>false</code> if not.
*/
public boolean isOptional(AttributeType attributeType) {
- assert debugEnter(CLASS_NAME, "isOptional", String
- .valueOf(attributeType));
if (optionalAttributesChain.contains(attributeType)) {
return true;
@@ -436,8 +407,6 @@
* superior classes, or <code>false</code> if it is not.
*/
public boolean isRequiredOrOptional(AttributeType attributeType) {
- assert debugEnter(CLASS_NAME, "isRequiredOrOptional", String
- .valueOf(attributeType));
return (isRequired(attributeType) || isOptional(attributeType));
}
@@ -450,7 +419,6 @@
* @return The objectclass type for this objectclass.
*/
public ObjectClassType getObjectClassType() {
- assert debugEnter(CLASS_NAME, "getObjectClassType");
return objectClassType;
}
@@ -466,7 +434,6 @@
* it is not.
*/
public boolean isExtensibleObject() {
- assert debugEnter(CLASS_NAME, "isExtensibleObject");
return isExtensibleObject;
}
@@ -477,8 +444,6 @@
* {@inheritDoc}
*/
protected void toStringContent(StringBuilder buffer) {
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
if (superiorClass != null) {
buffer.append(" SUP ");
diff --git a/opends/src/server/org/opends/server/types/ObjectClassType.java b/opends/src/server/org/opends/server/types/ObjectClassType.java
index 684b7bd..f28d987 100644
--- a/opends/src/server/org/opends/server/types/ObjectClassType.java
+++ b/opends/src/server/org/opends/server/types/ObjectClassType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/OperationType.java b/opends/src/server/org/opends/server/types/OperationType.java
index 7d6a2f9..eaa1353 100644
--- a/opends/src/server/org/opends/server/types/OperationType.java
+++ b/opends/src/server/org/opends/server/types/OperationType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/RDN.java b/opends/src/server/org/opends/server/types/RDN.java
index 9e2f8aa..7ef37bc 100644
--- a/opends/src/server/org/opends/server/types/RDN.java
+++ b/opends/src/server/org/opends/server/types/RDN.java
@@ -37,7 +37,9 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -52,11 +54,6 @@
public class RDN
implements Comparable<RDN>
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.RDN";
@@ -91,8 +88,6 @@
public RDN(AttributeType attributeType,
AttributeValue attributeValue)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(attributeValue));
attributeTypes = new AttributeType[] { attributeType };
attributeNames = new String[] { attributeType.getPrimaryName() };
@@ -118,9 +113,6 @@
public RDN(AttributeType attributeType, String attributeName,
AttributeValue attributeValue)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(attributeType),
- String.valueOf(attributeName),
- String.valueOf(attributeValue));
attributeTypes = new AttributeType[] { attributeType };
attributeNames = new String[] { attributeName };
@@ -151,10 +143,6 @@
List<String> attributeNames,
List<AttributeValue> attributeValues)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(attributeTypes),
- String.valueOf(attributeNames),
- String.valueOf(attributeValues));
this.attributeTypes = new AttributeType[attributeTypes.size()];
this.attributeNames = new String[attributeNames.size()];
@@ -188,10 +176,6 @@
public RDN(AttributeType[] attributeTypes, String[] attributeNames,
AttributeValue[] attributeValues)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(attributeTypes),
- String.valueOf(attributeNames),
- String.valueOf(attributeValues));
this.numValues = attributeTypes.length;
this.attributeTypes = attributeTypes;
@@ -217,9 +201,6 @@
public static RDN create(AttributeType attributeType,
AttributeValue attributeValue)
{
- assert debugEnter(CLASS_NAME, "create",
- String.valueOf(attributeType),
- String.valueOf(attributeValue));
return new RDN(attributeType, attributeValue);
}
@@ -235,7 +216,6 @@
*/
public int getNumValues()
{
- assert debugEnter(CLASS_NAME, "getNumValues");
return numValues;
}
@@ -253,8 +233,6 @@
*/
public boolean hasAttributeType(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "hasAttributeType",
- String.valueOf(attributeType));
for (AttributeType t : attributeTypes)
{
@@ -281,8 +259,6 @@
*/
public boolean hasAttributeType(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasAttributeType",
- String.valueOf(lowerName));
for (AttributeType t : attributeTypes)
{
@@ -316,8 +292,6 @@
*/
public AttributeType getAttributeType(int pos)
{
- assert debugEnter(CLASS_NAME, "getAttributeType",
- String.valueOf(pos));
return attributeTypes[pos];
}
@@ -336,8 +310,6 @@
*/
public String getAttributeName(int pos)
{
- assert debugEnter(CLASS_NAME, "getAttributeName",
- String.valueOf(pos));
return attributeNames[pos];
}
@@ -357,8 +329,6 @@
*/
public AttributeValue getAttributeValue(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getAttributeValue",
- String.valueOf(attributeType));
for (int i=0; i < numValues; i++)
{
@@ -385,8 +355,6 @@
*/
public AttributeValue getAttributeValue(int pos)
{
- assert debugEnter(CLASS_NAME, "getAttributeName",
- String.valueOf(pos));
return attributeValues[pos];
}
@@ -401,7 +369,6 @@
*/
public boolean isMultiValued()
{
- assert debugEnter(CLASS_NAME, "isMultiValued");
return (numValues > 1);
}
@@ -421,8 +388,6 @@
*/
public boolean hasValue(AttributeType type, AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "hasValue", String.valueOf(type),
- String.valueOf(value));
for (int i=0; i < numValues; i++)
{
@@ -453,8 +418,6 @@
boolean addValue(AttributeType type, String name,
AttributeValue value)
{
- assert debugEnter(CLASS_NAME, "addValue", String.valueOf(type),
- String.valueOf(name), String.valueOf(value));
for (int i=0; i < numValues; i++)
{
@@ -506,8 +469,6 @@
public static RDN decode(String rdnString)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decode",
- String.valueOf(rdnString));
// A null or empty RDN is not acceptable.
@@ -886,7 +847,6 @@
*/
public RDN duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
AttributeType[] newTypes = new AttributeType[numValues];
System.arraycopy(attributeTypes, 0, newTypes, 0, numValues);
@@ -916,7 +876,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (this == o)
{
@@ -942,7 +901,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
return toNormalizedString().hashCode();
}
@@ -989,8 +947,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append(toString());
}
@@ -1023,8 +979,6 @@
*/
public void toNormalizedString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toNormalizedString",
- "java.lang.StringBuilder");
if (normalizedRDN != null)
{
@@ -1046,7 +1000,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "toNormalizedString", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
buffer.append(attributeValues[0].getStringValue());
}
@@ -1067,7 +1024,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "toNormalizedString", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
b2.append(attributeValues[i].getStringValue());
}
@@ -1106,7 +1066,6 @@
*/
public int compareTo(RDN rdn)
{
- assert debugEnter(CLASS_NAME, "compareTo", String.valueOf(rdn));
if ((attributeTypes.length == 1) &&
(rdn.attributeTypes.length == 1))
@@ -1126,11 +1085,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "compareTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return attributeValues[0].getStringValue().
- compareTo(rdn.attributeValues[0].
- getStringValue());
+ compareTo(rdn.attributeValues[0].
+ getStringValue());
}
}
else
@@ -1143,11 +1105,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "compareTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
return omr.compareValues(
- attributeValues[0].getValue(),
- rdn.attributeValues[0].getValue());
+ attributeValues[0].getValue(),
+ rdn.attributeValues[0].getValue());
}
}
}
@@ -1214,11 +1179,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "compareTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
valueComparison =
- value1.getStringValue().compareTo(
- value2.getStringValue());
+ value1.getStringValue().compareTo(
+ value2.getStringValue());
}
}
else
@@ -1231,11 +1199,14 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "compareTo", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
valueComparison =
- omr.compareValues(value1.getValue(),
- value2.getValue());
+ omr.compareValues(value1.getValue(),
+ value2.getValue());
}
}
diff --git a/opends/src/server/org/opends/server/types/RestoreConfig.java b/opends/src/server/org/opends/server/types/RestoreConfig.java
index 86312f2..36d6668 100644
--- a/opends/src/server/org/opends/server/types/RestoreConfig.java
+++ b/opends/src/server/org/opends/server/types/RestoreConfig.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure for holding configuration
* information to use when restoring a backup of a Directory Server
@@ -49,11 +44,6 @@
*/
public class RestoreConfig
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.RestoreConfig";
@@ -86,9 +76,6 @@
public RestoreConfig(BackupDirectory backupDirectory,
String backupID, boolean verifyOnly)
{
- assert debugConstructor(CLASS_NAME,
- String.valueOf(backupDirectory),
- String.valueOf(backupID));
this.backupDirectory = backupDirectory;
this.backupID = backupID;
@@ -106,7 +93,6 @@
*/
public BackupDirectory getBackupDirectory()
{
- assert debugEnter(CLASS_NAME, "getBackupDirectory");
return backupDirectory;
}
@@ -122,7 +108,6 @@
*/
public String getBackupID()
{
- assert debugEnter(CLASS_NAME, "getBackupID");
return backupID;
}
@@ -146,7 +131,6 @@
*/
public boolean verifyOnly()
{
- assert debugEnter(CLASS_NAME, "verifyOnly");
return verifyOnly;
}
diff --git a/opends/src/server/org/opends/server/types/ResultCode.java b/opends/src/server/org/opends/server/types/ResultCode.java
index 099f033..c5cc7f5 100644
--- a/opends/src/server/org/opends/server/types/ResultCode.java
+++ b/opends/src/server/org/opends/server/types/ResultCode.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/SSLClientAuthPolicy.java b/opends/src/server/org/opends/server/types/SSLClientAuthPolicy.java
index cd22058..c6bc3e4 100644
--- a/opends/src/server/org/opends/server/types/SSLClientAuthPolicy.java
+++ b/opends/src/server/org/opends/server/types/SSLClientAuthPolicy.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/Schema.java b/opends/src/server/org/opends/server/types/Schema.java
index 8eda996..a46f0dc 100644
--- a/opends/src/server/org/opends/server/types/Schema.java
+++ b/opends/src/server/org/opends/server/types/Schema.java
@@ -42,7 +42,6 @@
import org.opends.server.api.SubstringMatchingRule;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -67,11 +66,6 @@
*/
public class Schema
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.Schema";
@@ -199,7 +193,6 @@
*/
public Schema()
{
- assert debugConstructor(CLASS_NAME);
attributeTypes = new ConcurrentHashMap<String,AttributeType>();
objectClasses = new ConcurrentHashMap<String,ObjectClass>();
@@ -255,7 +248,6 @@
public final ConcurrentHashMap<String,AttributeType>
getAttributeTypes()
{
- assert debugEnter(CLASS_NAME, "getAttributeTypes");
return attributeTypes;
}
@@ -269,7 +261,6 @@
*/
public final LinkedHashSet<AttributeValue> getAttributeTypeSet()
{
- assert debugEnter(CLASS_NAME, "getAttributeTypeSet");
return attributeTypeSet;
}
@@ -289,8 +280,6 @@
*/
public boolean hasAttributeType(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasAttributeType",
- String.valueOf(lowerName));
return attributeTypes.containsKey(lowerName);
}
@@ -310,8 +299,6 @@
*/
public final AttributeType getAttributeType(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getAttributeType",
- String.valueOf(lowerName));
return attributeTypes.get(lowerName);
}
@@ -337,9 +324,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerAttributeType",
- String.valueOf(attributeType),
- String.valueOf(overwriteExisting));
synchronized (attributeTypes)
{
@@ -414,8 +398,6 @@
public final void deregisterAttributeType(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "deregisterAttributeType",
- String.valueOf(attributeType));
synchronized (attributeTypes)
{
@@ -462,9 +444,6 @@
AttributeType attributeType,
AttributeType superiorType)
{
- assert debugEnter(CLASS_NAME, "registerSubordinateType",
- String.valueOf(attributeType),
- String.valueOf(superiorType));
List<AttributeType> subTypes = subordinateTypes.get(superiorType);
if (subTypes == null)
@@ -503,9 +482,6 @@
AttributeType attributeType,
AttributeType superiorType)
{
- assert debugEnter(CLASS_NAME, "deregisterSubordinateType",
- String.valueOf(attributeType),
- String.valueOf(superiorType));
List<AttributeType> subTypes = subordinateTypes.get(superiorType);
if (subTypes != null)
@@ -537,8 +513,6 @@
public final Iterable<AttributeType>
getSubTypes(AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "getSubordinateTypes",
- String.valueOf(attributeType));
List<AttributeType> subTypes =
subordinateTypes.get(attributeType);
@@ -566,7 +540,6 @@
public final ConcurrentHashMap<String,ObjectClass>
getObjectClasses()
{
- assert debugEnter(CLASS_NAME, "getObjectClasses");
return objectClasses;
}
@@ -580,7 +553,6 @@
*/
public final LinkedHashSet<AttributeValue> getObjectClassSet()
{
- assert debugEnter(CLASS_NAME, "getObjectClassSet");
return objectClassSet;
}
@@ -600,8 +572,6 @@
*/
public boolean hasObjectClass(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasObjectClass",
- String.valueOf(lowerName));
return objectClasses.containsKey(lowerName);
}
@@ -621,8 +591,6 @@
*/
public final ObjectClass getObjectClass(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getObjectClass",
- String.valueOf(lowerName));
return objectClasses.get(lowerName);
}
@@ -647,9 +615,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerObjectClass",
- String.valueOf(objectClass),
- String.valueOf(overwriteExisting));
synchronized (objectClasses)
{
@@ -716,8 +681,6 @@
*/
public final void deregisterObjectClass(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "deregisterObjectClass",
- String.valueOf(objectClass));
synchronized (objectClasses)
{
@@ -755,7 +718,6 @@
*/
public final ConcurrentHashMap<String,AttributeSyntax> getSyntaxes()
{
- assert debugEnter(CLASS_NAME, "getSyntaxes");
return syntaxes;
}
@@ -769,7 +731,6 @@
*/
public final LinkedHashSet<AttributeValue> getSyntaxSet()
{
- assert debugEnter(CLASS_NAME, "getSyntaxSet");
return syntaxSet;
}
@@ -789,8 +750,6 @@
*/
public boolean hasSyntax(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasSyntax",
- String.valueOf(lowerName));
return syntaxes.containsKey(lowerName);
}
@@ -808,8 +767,6 @@
*/
public final AttributeSyntax getSyntax(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getSyntax",
- String.valueOf(lowerName));
return syntaxes.get(lowerName);
}
@@ -835,9 +792,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerSyntax",
- String.valueOf(syntax),
- String.valueOf(overwriteExisting));
synchronized (syntaxes)
{
@@ -883,8 +837,6 @@
*/
public final void deregisterSyntax(AttributeSyntax syntax)
{
- assert debugEnter(CLASS_NAME, "deregisterSyntax",
- String.valueOf(syntax));
synchronized (syntaxes)
{
@@ -918,7 +870,6 @@
public final ConcurrentHashMap<String,MatchingRule>
getMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getMatchingRules");
return matchingRules;
}
@@ -932,7 +883,6 @@
*/
public final LinkedHashSet<AttributeValue> getMatchingRuleSet()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleSet");
return matchingRuleSet;
}
@@ -952,8 +902,6 @@
*/
public boolean hasMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasMatchingRule",
- String.valueOf(lowerName));
return matchingRules.containsKey(lowerName);
}
@@ -973,8 +921,6 @@
*/
public final MatchingRule getMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getMatchingRule",
- String.valueOf(lowerName));
return matchingRules.get(lowerName);
}
@@ -1000,9 +946,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
if (matchingRule instanceof ApproximateMatchingRule)
{
@@ -1096,8 +1039,6 @@
*/
public final void deregisterMatchingRule(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterMatchingRule",
- String.valueOf(matchingRule));
if (matchingRule instanceof ApproximateMatchingRule)
{
@@ -1163,7 +1104,6 @@
public final ConcurrentHashMap<String,ApproximateMatchingRule>
getApproximateMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRules");
return approximateMatchingRules;
}
@@ -1185,8 +1125,6 @@
public final ApproximateMatchingRule
getApproximateMatchingRule(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getApproximateMatchingRule",
- String.valueOf(lowerName));
return approximateMatchingRules.get(lowerName);
}
@@ -1213,9 +1151,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerApproximateMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
synchronized (matchingRules)
@@ -1291,8 +1226,6 @@
public final void deregisterApproximateMatchingRule(
ApproximateMatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterApproximateMatchingRule",
- String.valueOf(matchingRule));
synchronized (matchingRules)
{
@@ -1335,7 +1268,6 @@
public final ConcurrentHashMap<String,EqualityMatchingRule>
getEqualityMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRules");
return equalityMatchingRules;
}
@@ -1357,8 +1289,6 @@
public final EqualityMatchingRule getEqualityMatchingRule(
String lowerName)
{
- assert debugEnter(CLASS_NAME, "getEqualityMatchingRule",
- String.valueOf(lowerName));
return equalityMatchingRules.get(lowerName);
}
@@ -1384,9 +1314,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerEqualityMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
synchronized (matchingRules)
@@ -1462,8 +1389,6 @@
public final void deregisterEqualityMatchingRule(
EqualityMatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterEqualityMatchingRule",
- String.valueOf(matchingRule));
synchronized (matchingRules)
{
@@ -1507,7 +1432,6 @@
public final ConcurrentHashMap<String,OrderingMatchingRule>
getOrderingMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRules");
return orderingMatchingRules;
}
@@ -1529,8 +1453,6 @@
public final OrderingMatchingRule getOrderingMatchingRule(
String lowerName)
{
- assert debugEnter(CLASS_NAME, "getOrderingMatchingRule",
- String.valueOf(lowerName));
return orderingMatchingRules.get(lowerName);
}
@@ -1556,9 +1478,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerOrderingMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
synchronized (matchingRules)
@@ -1634,8 +1553,6 @@
public final void deregisterOrderingMatchingRule(
OrderingMatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterOrderingMatchingRule",
- String.valueOf(matchingRule));
synchronized (matchingRules)
{
@@ -1678,7 +1595,6 @@
public final ConcurrentHashMap<String,SubstringMatchingRule>
getSubstringMatchingRules()
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRules");
return substringMatchingRules;
}
@@ -1700,8 +1616,6 @@
public final SubstringMatchingRule getSubstringMatchingRule(
String lowerName)
{
- assert debugEnter(CLASS_NAME, "getSubstringMatchingRule",
- String.valueOf(lowerName));
return substringMatchingRules.get(lowerName);
}
@@ -1727,9 +1641,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerSubstringMatchingRule",
- String.valueOf(matchingRule),
- String.valueOf(overwriteExisting));
synchronized (matchingRules)
@@ -1805,8 +1716,6 @@
public final void deregisterSubstringMatchingRule(
SubstringMatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "deregisterSubstringMatchingRule",
- String.valueOf(matchingRule));
synchronized (matchingRules)
{
@@ -1849,7 +1758,6 @@
public final ConcurrentHashMap<MatchingRule,MatchingRuleUse>
getMatchingRuleUses()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUses");
return matchingRuleUses;
}
@@ -1863,7 +1771,6 @@
*/
public final LinkedHashSet<AttributeValue> getMatchingRuleUseSet()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUseSet");
return matchingRuleUseSet;
}
@@ -1882,8 +1789,6 @@
*/
public boolean hasMatchingRuleUse(MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "hasMatchingRuleUse",
- String.valueOf(matchingRule));
return matchingRuleUses.containsKey(matchingRule);
}
@@ -1903,8 +1808,6 @@
public final MatchingRuleUse getMatchingRuleUse(
MatchingRule matchingRule)
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleUse",
- String.valueOf(matchingRule));
return matchingRuleUses.get(matchingRule);
}
@@ -1931,9 +1834,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerMatchingRuleUse",
- String.valueOf(matchingRuleUse),
- String.valueOf(overwriteExisting));
synchronized (matchingRuleUses)
{
@@ -1983,8 +1883,6 @@
public final void deregisterMatchingRuleUse(
MatchingRuleUse matchingRuleUse)
{
- assert debugEnter(CLASS_NAME, "deregisterMatchingRuleUse",
- String.valueOf(matchingRuleUse));
synchronized (matchingRuleUses)
{
@@ -2018,7 +1916,6 @@
public final ConcurrentHashMap<ObjectClass,DITContentRule>
getDITContentRules()
{
- assert debugEnter(CLASS_NAME, "getDITContentRules");
return ditContentRules;
}
@@ -2032,7 +1929,6 @@
*/
public final LinkedHashSet<AttributeValue> getDITContentRuleSet()
{
- assert debugEnter(CLASS_NAME, "getDITContentRuleSet");
return ditContentRuleSet;
}
@@ -2051,8 +1947,6 @@
*/
public boolean hasDITContentRule(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "hasDITContentRule",
- String.valueOf(objectClass));
return ditContentRules.containsKey(objectClass);
}
@@ -2073,8 +1967,6 @@
public final DITContentRule getDITContentRule(
ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getDITContentRule",
- String.valueOf(objectClass));
return ditContentRules.get(objectClass);
}
@@ -2100,9 +1992,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerDITContentRule",
- String.valueOf(ditContentRule),
- String.valueOf(overwriteExisting));
synchronized (ditContentRules)
{
@@ -2151,8 +2040,6 @@
public final void deregisterDITContentRule(
DITContentRule ditContentRule)
{
- assert debugEnter(CLASS_NAME, "deregisterDITContentRule",
- String.valueOf(ditContentRule));
synchronized (ditContentRules)
{
@@ -2181,7 +2068,6 @@
*/
public final LinkedHashSet<AttributeValue> getDITStructureRuleSet()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRuleSet");
return ditStructureRuleSet;
}
@@ -2200,7 +2086,6 @@
public final ConcurrentHashMap<Integer,DITStructureRule>
getDITStructureRulesByID()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRulesByID");
return ditStructureRulesByID;
}
@@ -2219,7 +2104,6 @@
public final ConcurrentHashMap<NameForm,DITStructureRule>
getDITStructureRulesByNameForm()
{
- assert debugEnter(CLASS_NAME, "getDITStructureRulesByNameForm");
return ditStructureRulesByNameForm;
}
@@ -2237,8 +2121,6 @@
*/
public boolean hasDITStructureRule(int ruleID)
{
- assert debugEnter(CLASS_NAME, "hasDITStructureRule",
- String.valueOf(ruleID));
return ditStructureRulesByID.containsKey(ruleID);
}
@@ -2258,8 +2140,6 @@
*/
public boolean hasDITStructureRule(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "hasDITStructureRule",
- String.valueOf(nameForm));
return ditStructureRulesByNameForm.containsKey(nameForm);
}
@@ -2279,8 +2159,6 @@
*/
public final DITStructureRule getDITStructureRule(int ruleID)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(ruleID));
return ditStructureRulesByID.get(ruleID);
}
@@ -2300,8 +2178,6 @@
*/
public final DITStructureRule getDITStructureRule(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "getDITStructureRule",
- String.valueOf(nameForm));
return ditStructureRulesByNameForm.get(nameForm);
}
@@ -2327,9 +2203,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "ditStructureRule",
- String.valueOf(ditStructureRule),
- String.valueOf(overwriteExisting));
synchronized (ditStructureRulesByNameForm)
{
@@ -2377,9 +2250,9 @@
// a very expensive matching rule (OID first component match)
// that would kill performance.
String valueString = ditStructureRule.getDefinition();
- ASN1OctetString rawValue = new ASN1OctetString(valueString);
+ ASN1OctetString rawValue = new ASN1OctetString(valueString);
ASN1OctetString normValue =
- new ASN1OctetString(toLowerCase(valueString));
+ new ASN1OctetString(toLowerCase(valueString));
ditStructureRuleSet.add(new AttributeValue(rawValue,
normValue));
}
@@ -2397,8 +2270,6 @@
public final void deregisterDITStructureRule(
DITStructureRule ditStructureRule)
{
- assert debugEnter(CLASS_NAME, "deregisterDITStructureRule",
- String.valueOf(ditStructureRule));
synchronized (ditStructureRulesByNameForm)
{
@@ -2429,7 +2300,6 @@
*/
public final LinkedHashSet<AttributeValue> getNameFormSet()
{
- assert debugEnter(CLASS_NAME, "getNameFormSet");
return nameFormSet;
}
@@ -2448,7 +2318,6 @@
public final ConcurrentHashMap<ObjectClass,NameForm>
getNameFormsByObjectClass()
{
- assert debugEnter(CLASS_NAME, "getNameForms");
return nameFormsByOC;
}
@@ -2467,7 +2336,6 @@
public final ConcurrentHashMap<String,NameForm>
getNameFormsByNameOrOID()
{
- assert debugEnter(CLASS_NAME, "getNameForms");
return nameFormsByName;
}
@@ -2486,8 +2354,6 @@
*/
public boolean hasNameForm(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "hasNameForm",
- String.valueOf(objectClass));
return nameFormsByOC.containsKey(objectClass);
}
@@ -2507,8 +2373,6 @@
*/
public boolean hasNameForm(String lowerName)
{
- assert debugEnter(CLASS_NAME, "hasNameForm",
- String.valueOf(lowerName));
return nameFormsByName.containsKey(lowerName);
}
@@ -2526,8 +2390,6 @@
*/
public final NameForm getNameForm(ObjectClass objectClass)
{
- assert debugEnter(CLASS_NAME, "getNameForm",
- String.valueOf(objectClass));
return nameFormsByOC.get(objectClass);
}
@@ -2545,8 +2407,6 @@
*/
public final NameForm getNameForm(String lowerName)
{
- assert debugEnter(CLASS_NAME, "getNameForm",
- String.valueOf(lowerName));
return nameFormsByName.get(lowerName);
}
@@ -2570,9 +2430,6 @@
boolean overwriteExisting)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "registerNameForm",
- String.valueOf(nameForm),
- String.valueOf(overwriteExisting));
synchronized (nameFormsByOC)
{
@@ -2655,8 +2512,6 @@
*/
public final void deregisterNameForm(NameForm nameForm)
{
- assert debugEnter(CLASS_NAME, "deregisterNameForm",
- String.valueOf(nameForm));
synchronized (nameFormsByOC)
{
@@ -2693,7 +2548,6 @@
*/
public long getOldestModificationTime()
{
- assert debugEnter(CLASS_NAME, "getOldestModificationTime");
return oldestModificationTime;
}
@@ -2710,8 +2564,6 @@
*/
public void setOldestModificationTime(long oldestModificationTime)
{
- assert debugEnter(CLASS_NAME, "setOldestModificationTime",
- String.valueOf(oldestModificationTime));
this.oldestModificationTime = oldestModificationTime;
}
@@ -2728,7 +2580,6 @@
*/
public long getYoungestModificationTime()
{
- assert debugEnter(CLASS_NAME, "getYoungestModificationTime");
return youngestModificationTime;
}
@@ -2746,8 +2597,6 @@
public void setYoungestModificationTime(
long youngestModificationTime)
{
- assert debugEnter(CLASS_NAME, "setYoungestModificationTime",
- String.valueOf(youngestModificationTime));
this.youngestModificationTime = youngestModificationTime;
}
@@ -2799,8 +2648,6 @@
SchemaFileElement element)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "rebuildDependentElements",
- String.valueOf(element));
try
{
@@ -2845,8 +2692,6 @@
SchemaFileElement element, int depth)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "rebuildDependentElements",
- String.valueOf(element), String.valueOf(depth));
if (depth > 20)
{
@@ -3002,7 +2847,6 @@
*/
public final Schema duplicate()
{
- assert debugEnter(CLASS_NAME, "duplicate");
Schema dupSchema = new Schema();
diff --git a/opends/src/server/org/opends/server/types/SearchFilter.java b/opends/src/server/org/opends/server/types/SearchFilter.java
index 9f06cfe..b388854 100644
--- a/opends/src/server/org/opends/server/types/SearchFilter.java
+++ b/opends/src/server/org/opends/server/types/SearchFilter.java
@@ -42,7 +42,12 @@
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static
+ org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
import static org.opends.server.loggers.Error.*;
import static org.opends.server.messages.CoreMessages.*;
import static org.opends.server.messages.MessageHandler.*;
@@ -58,11 +63,6 @@
*/
public class SearchFilter
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.SearchFilter";
@@ -139,21 +139,6 @@
ByteString subFinalElement,
String matchingRuleID, boolean dnAttributes)
{
- assert debugConstructor(CLASS_NAME,
- new String[]
- {
- String.valueOf(filterType),
- String.valueOf(filterComponents),
- String.valueOf(notComponent),
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue),
- String.valueOf(subInitialElement),
- String.valueOf(subAnyElements),
- String.valueOf(subFinalElement),
- String.valueOf(matchingRuleID),
- String.valueOf(dnAttributes)
- });
// This used to happen in getSubAnyElements, but we do it here
// so that we can make this.subAnyElements final.
@@ -193,8 +178,6 @@
public static SearchFilter createANDFilter(List<SearchFilter>
filterComponents)
{
- assert debugEnter(CLASS_NAME, "createANDFilter",
- String.valueOf(filterComponents));
return new SearchFilter(FilterType.AND, filterComponents, null,
null, null, null, null, null, null, null,
@@ -214,8 +197,6 @@
public static SearchFilter createORFilter(List<SearchFilter>
filterComponents)
{
- assert debugEnter(CLASS_NAME, "createORFilter",
- String.valueOf(filterComponents));
return new SearchFilter(FilterType.OR, filterComponents, null,
null, null, null, null, null, null, null,
@@ -234,8 +215,6 @@
public static SearchFilter createNOTFilter(
SearchFilter notComponent)
{
- assert debugEnter(CLASS_NAME, "createNOTFilter",
- String.valueOf(notComponent));
return new SearchFilter(FilterType.NOT, null, notComponent, null,
null, null, null, null, null, null,
@@ -259,9 +238,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createEqualityFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.EQUALITY, null, null,
attributeType, null, assertionValue, null,
@@ -288,10 +264,6 @@
Set<String> attributeOptions,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createEqualityFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.EQUALITY, null, null,
attributeType, attributeOptions,
@@ -321,11 +293,6 @@
List<ByteString> subAnyElements,
ByteString subFinalElement)
{
- assert debugEnter(CLASS_NAME, "createSubstringFilter",
- String.valueOf(attributeType),
- String.valueOf(subInitialElement),
- String.valueOf(subAnyElements),
- String.valueOf(subFinalElement));
return new SearchFilter(FilterType.SUBSTRING, null, null,
attributeType, null, null,
@@ -358,12 +325,6 @@
List<ByteString> subAnyElements,
ByteString subFinalElement)
{
- assert debugEnter(CLASS_NAME, "createSubstringFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(subInitialElement),
- String.valueOf(subAnyElements),
- String.valueOf(subFinalElement));
return new SearchFilter(FilterType.SUBSTRING, null, null,
attributeType, attributeOptions, null,
@@ -388,9 +349,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createGreaterOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.GREATER_OR_EQUAL, null, null,
attributeType, null, assertionValue, null,
@@ -417,10 +375,6 @@
Set<String> attributeOptions,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createGreaterOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.GREATER_OR_EQUAL, null, null,
attributeType, attributeOptions,
@@ -445,9 +399,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createLessOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.LESS_OR_EQUAL, null, null,
attributeType, null, assertionValue, null,
@@ -474,10 +425,6 @@
Set<String> attributeOptions,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createLessOrEqualFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.LESS_OR_EQUAL, null, null,
attributeType, attributeOptions,
@@ -498,8 +445,6 @@
public static SearchFilter createPresenceFilter(
AttributeType attributeType)
{
- assert debugEnter(CLASS_NAME, "createPresenceFilter",
- String.valueOf(attributeType));
return new SearchFilter(FilterType.PRESENT, null, null,
attributeType, null, null, null, null,
@@ -522,9 +467,6 @@
AttributeType attributeType,
Set<String> attributeOptions)
{
- assert debugEnter(CLASS_NAME, "createPresenceFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions));
return new SearchFilter(FilterType.PRESENT, null, null,
attributeType, attributeOptions, null,
@@ -548,9 +490,6 @@
AttributeType attributeType,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createApproximateFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.APPROXIMATE_MATCH, null, null,
attributeType, null, assertionValue, null,
@@ -577,10 +516,6 @@
Set<String> attributeOptions,
AttributeValue assertionValue)
{
- assert debugEnter(CLASS_NAME, "createApproximateFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue));
return new SearchFilter(FilterType.APPROXIMATE_MATCH, null, null,
attributeType, attributeOptions,
@@ -611,11 +546,6 @@
String matchingRuleID,
boolean dnAttributes)
{
- assert debugEnter(CLASS_NAME, "createExtensibleMatchFilter",
- String.valueOf(attributeType),
- String.valueOf(assertionValue),
- String.valueOf(matchingRuleID),
- String.valueOf(dnAttributes));
return new SearchFilter(FilterType.EXTENSIBLE_MATCH, null, null,
attributeType, null, assertionValue, null,
@@ -649,12 +579,6 @@
String matchingRuleID,
boolean dnAttributes)
{
- assert debugEnter(CLASS_NAME, "createExtensibleMatchFilter",
- String.valueOf(attributeType),
- String.valueOf(attributeOptions),
- String.valueOf(assertionValue),
- String.valueOf(matchingRuleID),
- String.valueOf(dnAttributes));
return new SearchFilter(FilterType.EXTENSIBLE_MATCH, null, null,
attributeType, attributeOptions,
@@ -680,8 +604,6 @@
String filterString)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createFilterFromString",
- String.valueOf(filterString));
if (filterString == null)
@@ -700,13 +622,19 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "createFilterFromString", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
throw de;
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "createFilterFromString", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_SEARCH_FILTER_UNCAUGHT_EXCEPTION;
String message = getMessage(msgID, filterString,
@@ -741,10 +669,6 @@
int endPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "createFilterFromString",
- String.valueOf(filterString),
- String.valueOf(startPos),
- String.valueOf(endPos));
// Make sure that the length is sufficient for a valid search
@@ -1134,11 +1058,6 @@
int endPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeCompoundFilter",
- String.valueOf(filterType),
- String.valueOf(filterString),
- String.valueOf(startPos),
- String.valueOf(endPos));
// Create a list to hold the returned components.
@@ -1265,12 +1184,6 @@
int endPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeSubstringFilter",
- String.valueOf(filterString),
- String.valueOf(attrType),
- String.valueOf(options),
- String.valueOf(equalPos),
- String.valueOf(endPos));
// Get a binary representation of the value.
@@ -1885,11 +1798,6 @@
int equalPos, int endPos)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "decodeExtensibleMatchFilter",
- String.valueOf(filterString),
- String.valueOf(startPos),
- String.valueOf(equalPos),
- String.valueOf(endPos));
AttributeType attributeType = null;
@@ -2192,7 +2100,6 @@
*/
public FilterType getFilterType()
{
- assert debugEnter(CLASS_NAME, "getFilterType");
return filterType;
}
@@ -2207,7 +2114,6 @@
*/
public Set<SearchFilter> getFilterComponents()
{
- assert debugEnter(CLASS_NAME, "getFilterComponents");
return filterComponents;
}
@@ -2222,7 +2128,6 @@
*/
public SearchFilter getNotComponent()
{
- assert debugEnter(CLASS_NAME, "getNotComponent");
return notComponent;
}
@@ -2237,7 +2142,6 @@
*/
public AttributeType getAttributeType()
{
- assert debugEnter(CLASS_NAME, "getAttributeType");
return attributeType;
}
@@ -2252,7 +2156,6 @@
*/
public AttributeValue getAssertionValue()
{
- assert debugEnter(CLASS_NAME, "getAssertionValue");
return assertionValue;
}
@@ -2267,7 +2170,6 @@
*/
public ByteString getSubInitialElement()
{
- assert debugEnter(CLASS_NAME, "getSubInitialElement");
return subInitialElement;
}
@@ -2282,7 +2184,6 @@
*/
public List<ByteString> getSubAnyElements()
{
- assert debugEnter(CLASS_NAME, "getSubAnyElements");
return subAnyElements;
}
@@ -2296,7 +2197,6 @@
*/
public ByteString getSubFinalElement()
{
- assert debugEnter(CLASS_NAME, "getSubFinalElement");
return subFinalElement;
}
@@ -2312,7 +2212,6 @@
*/
public String getMatchingRuleID()
{
- assert debugEnter(CLASS_NAME, "getMatchingRuleID");
return matchingRuleID;
}
@@ -2328,7 +2227,6 @@
*/
public boolean getDNAttributes()
{
- assert debugEnter(CLASS_NAME, "getDNAttributes");
return dnAttributes;
}
@@ -2349,8 +2247,6 @@
public boolean matchesEntry(Entry entry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "matchesEntry",
- String.valueOf(entry));
ConditionResult result = matchesEntryInternal(this, entry, 0);
switch (result)
@@ -2399,9 +2295,6 @@
Entry entry, int depth)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "matchesEntryInternal",
- String.valueOf(completeFilter),
- String.valueOf(entry), String.valueOf(depth));
switch (filterType)
@@ -2425,10 +2318,10 @@
// "undefined" in RFC 2251, but is considered one of the
// TRUE/FALSE filters in RFC 4526, in which case we should
// always return true.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for LDAP TRUE filter (&)");
+ if (debugEnabled())
+ {
+ debugInfo("Returning TRUE for LDAP TRUE filter (&)");
+ }
return ConditionResult.TRUE;
}
else
@@ -2457,22 +2350,21 @@
case TRUE:
break;
case FALSE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for AND component " +
- f.toString() + " in filter " +
- completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for AND component %s in " +
+ "filter %s for entry %s",
+ f, completeFilter, entry.getDN());
+ }
return result;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result for AND component " +
- f.toString() + " in filter " +
- completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Undefined result for AND component %s in filter " +
+ "%s for entry %s", f, completeFilter, entry.getDN());
+ }
return result;
default:
int msgID = MSGID_SEARCH_FILTER_INVALID_RESULT_TYPE;
@@ -2489,13 +2381,12 @@
// If we have gotten here, then all the components must have
// matched.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for AND component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for AND component %s in filter %s " +
+ "for entry %s", this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
}
@@ -2519,10 +2410,10 @@
// "undefined" in RFC 2251, but is considered one of the
// TRUE/FALSE filters in RFC 4526, in which case we should
// always return false.
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for LDAP FALSE filter (|)");
+ if (debugEnabled())
+ {
+ debugInfo("Returning FALSE for LDAP FALSE filter (|)");
+ }
return ConditionResult.FALSE;
}
else
@@ -2548,24 +2439,24 @@
depth+1))
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for OR component " +
- f.toString() + " in filter " +
- completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for OR component %s in filter " +
+ "%s for entry %s",
+ f, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case FALSE:
break;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result for OR component " +
- f.toString() + " in filter " +
- completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Undefined result for OR component %s in filter " +
+ "%s for entry %s",
+ f, completeFilter, entry.getDN());
+ }
result = ConditionResult.UNDEFINED;
break;
default:
@@ -2582,13 +2473,13 @@
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning " + result + " for OR component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning %s for OR component %s in filter %s for " +
+ "entry %s", result, this, completeFilter,
+ entry.getDN());
+ }
return result;
}
@@ -2627,31 +2518,31 @@
switch (result)
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for NOT component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for NOT component %s in filter " +
+ "%s for entry %s",
+ notComponent, completeFilter, entry.getDN());
+ }
return ConditionResult.FALSE;
case FALSE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for NOT component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for NOT component %s in filter " +
+ "%s for entry %s",
+ notComponent, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result for NOT component " +
- notComponent.toString() + " in filter " +
- completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Undefined result for NOT component %s in filter " +
+ "%s for entry %s",
+ notComponent, completeFilter, entry.getDN());
+ }
return ConditionResult.UNDEFINED;
default:
int msgID = MSGID_SEARCH_FILTER_INVALID_RESULT_TYPE;
@@ -2696,15 +2587,15 @@
attributeOptions);
if ((attrs == null) || (attrs.isEmpty()))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for equality component " +
- toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for equality component %s in " +
+ "filter %s because entry %s didn't have attribute " +
+ "type %s",
+ this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID());
+ }
return ConditionResult.FALSE;
}
@@ -2714,27 +2605,27 @@
{
if (a.hasValue(assertionValue))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for equality component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for equality component %s in " +
+ "filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
}
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for equality component " +
- toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID() + " with value " +
- assertionValue.getStringValue());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for equality component %s in filter " +
+ "%s because entry %s didn't have attribute type " +
+ "%s with value %s",
+ this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID(),
+ assertionValue.getStringValue());
+ }
return ConditionResult.FALSE;
@@ -2770,15 +2661,15 @@
attrs = entry.getAttribute(attributeType, attributeOptions);
if ((attrs == null) || (attrs.isEmpty()))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for substring component " +
- toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for substring component %s in " +
+ "filter %s because entry %s didn't have attribute " +
+ "type %s",
+ this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID());
+ }
return ConditionResult.FALSE;
}
@@ -2792,37 +2683,37 @@
subFinalElement))
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for substring component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for substring component %s in " +
+ "filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case FALSE:
break;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result encountered for " +
- "substring component " + toString() +
- " in filter " + completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Undefined result encountered for substring " +
+ "component %s in filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
result = ConditionResult.UNDEFINED;
break;
default:
}
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning " + result + " for substring " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning %s for substring component %s in filter " +
+ "%s for entry %s",
+ result, this, completeFilter, entry.getDN());
+ }
return result;
@@ -2855,15 +2746,14 @@
attrs = entry.getAttribute(attributeType, attributeOptions);
if ((attrs == null) || (attrs.isEmpty()))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for greater-or-equal " +
- "component " + toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID());
+ if (debugEnabled())
+ {
+ debugVerbose("Returning FALSE for greater-or-equal " +
+ "component %s in filter %s because entry %s didn't " +
+ "have attribute type %s",
+ this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID());
+ }
return ConditionResult.FALSE;
}
@@ -2875,37 +2765,38 @@
switch (a.greaterThanOrEqualTo(assertionValue))
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for greater-or-equal " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for greater-or-equal component " +
+ "%s in filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case FALSE:
break;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result encountered for " +
- "greater-or-equal component " + toString() +
- " in filter " + completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Undefined result encountered for " +
+ "greater-or-equal component %s in filter %s " +
+ "for entry %s", this, completeFilter,
+ entry.getDN());
+ }
result = ConditionResult.UNDEFINED;
break;
default:
}
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning " + result + " for greater-or-equal " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning %s for greater-or-equal component %s in " +
+ "filter %s for entry %s",
+ result, this, completeFilter, entry.getDN());
+ }
return result;
@@ -2939,15 +2830,14 @@
attrs = entry.getAttribute(attributeType, attributeOptions);
if ((attrs == null) || (attrs.isEmpty()))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for less-or-equal component " +
- toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for less-or-equal component %s in " +
+ "filter %s because entry %s didn't have attribute " +
+ "type %s", this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID());
+ }
return ConditionResult.FALSE;
}
@@ -2959,37 +2849,38 @@
switch (a.lessThanOrEqualTo(assertionValue))
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for less-or-equal " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for less-or-equal component %s " +
+ "in filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case FALSE:
break;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result encountered for " +
- "less-or-equal component " + toString() +
- " in filter " + completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Undefined result encountered for " +
+ "less-or-equal component %s in filter %s " +
+ "for entry %s",
+ this, completeFilter, entry.getDN());
+ }
result = ConditionResult.UNDEFINED;
break;
default:
}
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning " + result + " for less-or-equal " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning %s for less-or-equal component %s in " +
+ "filter %s for entry %s",
+ result, this, completeFilter, entry.getDN());
+ }
return result;
@@ -3011,24 +2902,24 @@
// If so, then it's a match. If not, then it's not a match.
if (entry.hasAttribute(attributeType, attributeOptions))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for presence component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for presence component %s in " +
+ "filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
}
else
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for presence component " +
- toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for presence component %s in " +
+ "filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.FALSE;
}
@@ -3063,15 +2954,14 @@
attrs = entry.getAttribute(attributeType, attributeOptions);
if ((attrs == null) || (attrs.isEmpty()))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning FALSE for approximate component " +
- toString() + " in filter " +
- completeFilter.toString() +
- " because entry " + entry.getDN() +
- " didn't have attribute type " +
- attributeType.getNameOrOID());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning FALSE for approximate component %s in " +
+ "filter %s because entry %s didn't have attribute " +
+ "type %s", this, completeFilter, entry.getDN(),
+ attributeType.getNameOrOID());
+ }
return ConditionResult.FALSE;
}
@@ -3083,37 +2973,37 @@
switch (a.approximatelyEqualTo(assertionValue))
{
case TRUE:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning TRUE for approximate " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning TRUE for approximate component %s in " +
+ "filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
return ConditionResult.TRUE;
case FALSE:
break;
case UNDEFINED:
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Undefined result encountered for " +
- "approximate component " + toString() +
- " in filter " + completeFilter.toString() +
- " for entry " + entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Undefined result encountered for approximate " +
+ "component %s in filter %s for entry %s",
+ this, completeFilter, entry.getDN());
+ }
result = ConditionResult.UNDEFINED;
break;
default:
}
}
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "matchesEntryInternal",
- "Returning " + result + " for approximate " +
- "component " + toString() + " in filter " +
- completeFilter.toString() + " for entry " +
- entry.getDN());
+ if (debugEnabled())
+ {
+ debugVerbose(
+ "Returning %s for approximate component %s in filter " +
+ "%s for entry %s",
+ result, this, completeFilter, entry.getDN());
+ }
return result;
@@ -3159,9 +3049,6 @@
Entry entry)
throws DirectoryException
{
- assert debugEnter(CLASS_NAME, "processExtensibleMatch",
- String.valueOf(completeFilter),
- String.valueOf(entry));
// We must have an assertion value for which to make the
@@ -3187,13 +3074,13 @@
toLowerCase(matchingRuleID));
if (matchingRule == null)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "processExtensibleMatch",
- "Unknown matching rule " + matchingRuleID +
- " defined in extensibleMatch component of " +
- "filter " + toString() +
- " -- returning undefined.");
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Unknown matching rule %s defined in extensibleMatch " +
+ "component of filter %s -- returning undefined.",
+ matchingRuleID, this);
+ }
return ConditionResult.UNDEFINED;
}
}
@@ -3214,13 +3101,13 @@
matchingRule = attributeType.getEqualityMatchingRule();
if (matchingRule == null)
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "processExtensibleMatch",
- "Attribute type " +
- attributeType.getNameOrOID() +
- " does not have an equality matching rule -- " +
- "returning undefined.");
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Attribute type %s does not have an equality matching " +
+ "rule -- returning undefined.",
+ attributeType.getNameOrOID());
+ }
return ConditionResult.UNDEFINED;
}
}
@@ -3238,15 +3125,14 @@
{
if (! mru.appliesToAttribute(attributeType))
{
- assert debugMessage(DebugLogCategory.CORE_SERVER,
- DebugLogSeverity.INFO, CLASS_NAME,
- "processExtensibleMatch",
- "Attribute type " +
- attributeType.getNameOrOID() +
- " is not allowed for use with matching rule " +
- matchingRule.getNameOrOID() + " because of " +
- "matching rule use definition " +
- mru.getName());
+ if (debugEnabled())
+ {
+ debugInfo(
+ "Attribute type %s is not allowed for use with " +
+ "matching rule %s because of matching rule use " +
+ "definition %s", attributeType.getNameOrOID(),
+ matchingRule.getNameOrOID(), mru.getName());
+ }
return ConditionResult.UNDEFINED;
}
}
@@ -3262,7 +3148,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processExtensibleMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We can't normalize the assertion value, so the result must be
// undefined.
@@ -3312,8 +3201,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "processExtensibleMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the values. If we don't
// find a definite match, then we should return
@@ -3360,8 +3251,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "processExtensibleMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the values. If we don't
// find a definite match, then we should return
@@ -3401,8 +3294,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "processExtensibleMatch",
- e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the values. If we don't
// find a definite match, then we should return undefined.
@@ -3449,8 +3344,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "processExtensibleMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the values. If we don't
// find a definite match, then we should return
@@ -3511,8 +3408,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME,
- "processExtensibleMatch", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
// We couldn't normalize one of the values. If we don't
// find a definite match, then we should return undefined.
@@ -3540,7 +3439,6 @@
*/
public boolean equals(Object o)
{
- assert debugEnter(CLASS_NAME, "equals", String.valueOf(o));
if (o == null)
{
@@ -3720,7 +3618,6 @@
*/
public int hashCode()
{
- assert debugEnter(CLASS_NAME, "hashCode");
switch (filterType)
{
@@ -3806,7 +3703,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -3824,8 +3720,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
switch (filterType)
{
@@ -4029,9 +3923,6 @@
private void valueToFilterString(StringBuilder buffer,
ByteString value)
{
- assert debugEnter(CLASS_NAME, "valueToFilterString",
- "java.lang.StringBuilder",
- String.valueOf(value));
if (value == null)
{
diff --git a/opends/src/server/org/opends/server/types/SearchResultEntry.java b/opends/src/server/org/opends/server/types/SearchResultEntry.java
index 06d20ee..bec4c21 100644
--- a/opends/src/server/org/opends/server/types/SearchResultEntry.java
+++ b/opends/src/server/org/opends/server/types/SearchResultEntry.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -31,7 +31,6 @@
import java.util.ArrayList;
import java.util.List;
-import static org.opends.server.loggers.Debug.*;
@@ -48,11 +47,6 @@
public class SearchResultEntry
extends Entry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.SearchResultEntry";
@@ -76,7 +70,6 @@
entry.getUserAttributes(),
entry.getOperationalAttributes());
- assert debugConstructor(CLASS_NAME, String.valueOf(entry));
this.controls = new ArrayList<Control>(0);
}
@@ -100,8 +93,6 @@
entry.getUserAttributes(),
entry.getOperationalAttributes());
- assert debugConstructor(CLASS_NAME, String.valueOf(entry),
- String.valueOf(controls));
if (controls == null)
{
@@ -125,7 +116,6 @@
*/
public List<Control> getControls()
{
- assert debugEnter(CLASS_NAME, "getControls");
return controls;
}
diff --git a/opends/src/server/org/opends/server/types/SearchResultReference.java b/opends/src/server/org/opends/server/types/SearchResultReference.java
index f0e4351..7c3724f 100644
--- a/opends/src/server/org/opends/server/types/SearchResultReference.java
+++ b/opends/src/server/org/opends/server/types/SearchResultReference.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
@@ -32,7 +32,6 @@
import java.util.List;
import java.util.Iterator;
-import static org.opends.server.loggers.Debug.*;
@@ -42,11 +41,6 @@
*/
public class SearchResultReference
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.SearchResultReference";
@@ -67,7 +61,6 @@
*/
public SearchResultReference(String referralURL)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(referralURL));
referralURLs = new ArrayList<String>(1);
referralURLs.add(referralURL);
@@ -86,7 +79,6 @@
*/
public SearchResultReference(List<String> referralURLs)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(referralURLs));
if (referralURLs == null)
{
@@ -114,8 +106,6 @@
public SearchResultReference(List<String> referralURLs,
List<Control> controls)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(referralURLs),
- String.valueOf(controls));
if (referralURLs == null)
{
@@ -147,7 +137,6 @@
*/
public List<String> getReferralURLs()
{
- assert debugEnter(CLASS_NAME, "getReferralURLs");
return referralURLs;
}
@@ -163,7 +152,6 @@
*/
public String getReferralURLString()
{
- assert debugEnter(CLASS_NAME, "getReferralURLString");
if ((referralURLs == null) || (referralURLs.isEmpty()))
{
@@ -203,7 +191,6 @@
*/
public List<Control> getControls()
{
- assert debugEnter(CLASS_NAME, "getControls");
return controls;
}
diff --git a/opends/src/server/org/opends/server/types/SearchScope.java b/opends/src/server/org/opends/server/types/SearchScope.java
index 532cfb8..63b6c5e 100644
--- a/opends/src/server/org/opends/server/types/SearchScope.java
+++ b/opends/src/server/org/opends/server/types/SearchScope.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/SynchronizationProviderResult.java b/opends/src/server/org/opends/server/types/SynchronizationProviderResult.java
index 8b5ad3b..58be2e8 100644
--- a/opends/src/server/org/opends/server/types/SynchronizationProviderResult.java
+++ b/opends/src/server/org/opends/server/types/SynchronizationProviderResult.java
@@ -22,27 +22,17 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines a data structure that holds information about
* the result of processing by a synchronization provider.
*/
public class SynchronizationProviderResult
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.types.SynchronizationProviderResult";
@@ -62,7 +52,6 @@
public SynchronizationProviderResult(
boolean continueOperationProcessing)
{
- assert debugConstructor(CLASS_NAME);
this.continueOperationProcessing = continueOperationProcessing;
}
@@ -79,7 +68,6 @@
*/
public boolean continueOperationProcessing()
{
- assert debugEnter(CLASS_NAME, "continueOperationProcessing");
return continueOperationProcessing;
}
@@ -97,8 +85,6 @@
public void setContinueOperationProcessing(
boolean continueOperationProcessing)
{
- assert debugEnter(CLASS_NAME, "setContinueOperationProcessing",
- String.valueOf(continueOperationProcessing));
this.continueOperationProcessing = continueOperationProcessing;
}
@@ -114,7 +100,6 @@
*/
public String toString()
{
- assert debugEnter(CLASS_NAME, "toString");
StringBuilder buffer = new StringBuilder();
toString(buffer);
@@ -132,8 +117,6 @@
*/
public void toString(StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toString",
- "java.lang.StringBuilder");
buffer.append("SynchronizationProviderResult(" +
"continueOperationProcessing=");
diff --git a/opends/src/server/org/opends/server/types/WritabilityMode.java b/opends/src/server/org/opends/server/types/WritabilityMode.java
index 0ac914d..676dc2c 100644
--- a/opends/src/server/org/opends/server/types/WritabilityMode.java
+++ b/opends/src/server/org/opends/server/types/WritabilityMode.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types;
diff --git a/opends/src/server/org/opends/server/types/operation/InProgressOperation.java b/opends/src/server/org/opends/server/types/operation/InProgressOperation.java
index 468c45d..e9d7333 100644
--- a/opends/src/server/org/opends/server/types/operation/InProgressOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/InProgressOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PluginOperation.java b/opends/src/server/org/opends/server/types/operation/PluginOperation.java
index 13d1f13..a1df6ea 100644
--- a/opends/src/server/org/opends/server/types/operation/PluginOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PluginOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationAbandonOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationAbandonOperation.java
index 13510b6..19933db 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationAbandonOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationAbandonOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationAddOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationAddOperation.java
index 8c6dbdb..df24ae8 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationAddOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationAddOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationBindOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationBindOperation.java
index 851fa86..6300d2b 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationBindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationBindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationCompareOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationCompareOperation.java
index 993a8d4..661ae76 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationCompareOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationCompareOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationDeleteOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationDeleteOperation.java
index 7ecd551..d0f0c96 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationDeleteOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationDeleteOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationExtendedOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationExtendedOperation.java
index 6b5fe60..bf25527 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationExtendedOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationModifyDNOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationModifyDNOperation.java
index 6ea1fc6..2314d15 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationModifyDNOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationModifyOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationModifyOperation.java
index 79601b0..4b9a47a 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationModifyOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationModifyOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationOperation.java
index 66ba2cd..066d6e0 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationSearchOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationSearchOperation.java
index 7c5ae56..880650b 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationSearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationSearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostOperationUnbindOperation.java b/opends/src/server/org/opends/server/types/operation/PostOperationUnbindOperation.java
index b7d5196..501d53b 100644
--- a/opends/src/server/org/opends/server/types/operation/PostOperationUnbindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostOperationUnbindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseAddOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseAddOperation.java
index f2e09ee..8a06109 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseAddOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseAddOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseBindOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseBindOperation.java
index d5b2518..9e2b2b9 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseBindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseBindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseCompareOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseCompareOperation.java
index 33cce57..0d8f3a2 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseCompareOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseCompareOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseDeleteOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseDeleteOperation.java
index f5c7ed7..8505391 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseDeleteOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseDeleteOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseExtendedOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseExtendedOperation.java
index 21b148f..9351acb 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseExtendedOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseModifyDNOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseModifyDNOperation.java
index 580374f..6041af2 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseModifyDNOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseModifyOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseModifyOperation.java
index be3cd6d..c275dfe 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseModifyOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseModifyOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseOperation.java
index c1b795c..830b8c5 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PostResponseSearchOperation.java b/opends/src/server/org/opends/server/types/operation/PostResponseSearchOperation.java
index ac2636a..a408019 100644
--- a/opends/src/server/org/opends/server/types/operation/PostResponseSearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PostResponseSearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationAddOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationAddOperation.java
index 21d9f51..02c64c3 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationAddOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationAddOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationBindOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationBindOperation.java
index e487acb..a1314be 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationBindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationBindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationCompareOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationCompareOperation.java
index 4e536d0..bd49817 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationCompareOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationCompareOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationDeleteOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationDeleteOperation.java
index 1edbb14..96edecd 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationDeleteOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationDeleteOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationExtendedOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationExtendedOperation.java
index 48eee95..c6fb60a 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationExtendedOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationModifyDNOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationModifyDNOperation.java
index 657f7fc..09045fd 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationModifyDNOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationModifyOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationModifyOperation.java
index aab8f19..2148f69 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationModifyOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationModifyOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreOperationOperation.java b/opends/src/server/org/opends/server/types/operation/PreOperationOperation.java
index f1e8e3d..df9ef3c 100644
--- a/opends/src/server/org/opends/server/types/operation/PreOperationOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreOperationOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseAbandonOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseAbandonOperation.java
index 1093576..15d8803 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseAbandonOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseAbandonOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java
index 4fa7bbd..9af117b 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseAddOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java
index c7358a7..760cac2 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseBindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java
index ae446b3..bd8cb11 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseCompareOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java
index 45d5fff..bbf66f6 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseDeleteOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java
index aaa76e6..3942332 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseExtendedOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java
index bc5ec6f..3c829d3 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseModifyDNOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java
index c994d73..f4fa0b5 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseModifyOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseOperation.java
index 95098bc..77d8534 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java b/opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java
index a483090..ac3cad4 100644
--- a/opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/PreParseUnbindOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java b/opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java
index 6744d26..9326ddd 100644
--- a/opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/SearchEntrySearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java b/opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java
index b2c75a4..8175639 100644
--- a/opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java
+++ b/opends/src/server/org/opends/server/types/operation/SearchReferenceSearchOperation.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.types.operation;
diff --git a/opends/src/server/org/opends/server/types/operation/package-info.java b/opends/src/server/org/opends/server/types/operation/package-info.java
index 4772704..f0db059 100644
--- a/opends/src/server/org/opends/server/types/operation/package-info.java
+++ b/opends/src/server/org/opends/server/types/operation/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java b/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
index f73bf62..711ddc9 100644
--- a/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/AddChangeRecordEntry.java
@@ -22,14 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.Validator.*;
import java.util.ArrayList;
@@ -50,12 +46,6 @@
*/
public final class AddChangeRecordEntry extends ChangeRecordEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.AddChangeRecordEntry";
-
/**
* The entry attributes for this operation.
@@ -79,8 +69,6 @@
{
super(dn);
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(attributes));
ensureNotNull(attributes);
@@ -104,7 +92,6 @@
*/
public ChangeOperationType getChangeOperationType()
{
- assert debugEnter(CLASS_NAME, "getChangeOperationType");
return ChangeOperationType.ADD;
}
@@ -120,7 +107,6 @@
*/
public List<Attribute> getAttributes()
{
- assert debugEnter(CLASS_NAME, "getAttributes");
return Collections.unmodifiableList(attributes);
}
diff --git a/opends/src/server/org/opends/server/util/Base64.java b/opends/src/server/org/opends/server/util/Base64.java
index 43e4328..f534e6d 100644
--- a/opends/src/server/org/opends/server/util/Base64.java
+++ b/opends/src/server/org/opends/server/util/Base64.java
@@ -22,13 +22,12 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.UtilityMessages.*;
import static org.opends.server.util.Validator.*;
@@ -46,10 +45,6 @@
*/
public final class Base64
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.util.Base64";
@@ -76,7 +71,6 @@
*/
public static String encode(byte[] rawData)
{
- assert debugEnter(CLASS_NAME, "encode", String.valueOf(rawData));
ensureNotNull(rawData);
@@ -132,7 +126,6 @@
public static byte[] decode(String encodedData)
throws ParseException
{
- assert debugEnter(CLASS_NAME, "decode", String.valueOf(encodedData));
ensureNotNull(encodedData);
diff --git a/opends/src/server/org/opends/server/util/ChangeOperationType.java b/opends/src/server/org/opends/server/util/ChangeOperationType.java
index e10fd78..f2bdc17 100644
--- a/opends/src/server/org/opends/server/util/ChangeOperationType.java
+++ b/opends/src/server/org/opends/server/util/ChangeOperationType.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
diff --git a/opends/src/server/org/opends/server/util/ChangeRecordEntry.java b/opends/src/server/org/opends/server/util/ChangeRecordEntry.java
index 5cc8d86..f4f6b21 100644
--- a/opends/src/server/org/opends/server/util/ChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/ChangeRecordEntry.java
@@ -22,14 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.Validator.*;
import org.opends.server.types.DN;
@@ -43,11 +39,6 @@
*/
public abstract class ChangeRecordEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.ChangeRecordEntry";
// The DN for this entry.
@@ -62,7 +53,6 @@
*/
protected ChangeRecordEntry(DN dn)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
ensureNotNull(dn);
this.dn = dn;
@@ -76,7 +66,6 @@
*/
public final DN getDN()
{
- assert debugEnter(CLASS_NAME, "getDN");
return dn;
}
diff --git a/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java b/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
index 5ec6f41..6dbe787 100644
--- a/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/DeleteChangeRecordEntry.java
@@ -22,15 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
-
import org.opends.server.types.DN;
@@ -42,11 +37,6 @@
*/
public final class DeleteChangeRecordEntry extends ChangeRecordEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.DeleteChangeRecordEntry";
@@ -60,7 +50,6 @@
{
super(dn);
- assert debugConstructor(CLASS_NAME, String.valueOf(dn));
}
@@ -72,7 +61,6 @@
*/
public ChangeOperationType getChangeOperationType()
{
- assert debugEnter(CLASS_NAME, "getChangeOperationType");
return ChangeOperationType.DELETE;
}
diff --git a/opends/src/server/org/opends/server/util/EMailMessage.java b/opends/src/server/org/opends/server/util/EMailMessage.java
index 7bde79f..1ae3070 100644
--- a/opends/src/server/org/opends/server/util/EMailMessage.java
+++ b/opends/src/server/org/opends/server/util/EMailMessage.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
@@ -47,12 +47,11 @@
import org.opends.server.core.DirectoryServer;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
-import static org.opends.server.util.ServerConstants.*;
-import static org.opends.server.util.StaticUtils.*;
-
/**
@@ -62,11 +61,6 @@
*/
public class EMailMessage
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.EMailMessage";
@@ -99,8 +93,6 @@
*/
public EMailMessage(String sender, String recipient, String subject)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(sender),
- String.valueOf(recipient), String.valueOf(subject));
this.sender = sender;
this.subject = subject;
@@ -125,9 +117,6 @@
public EMailMessage(String sender, ArrayList<String> recipients,
String subject)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(sender),
- String.valueOf(recipients),
- String.valueOf(subject));
this.sender = sender;
this.recipients = recipients;
@@ -145,7 +134,6 @@
*/
public String getSender()
{
- assert debugEnter(CLASS_NAME, "getSender");
return sender;
}
@@ -159,7 +147,6 @@
*/
public void setSender(String sender)
{
- assert debugEnter(CLASS_NAME, "setSender", String.valueOf(sender));
this.sender = sender;
}
@@ -174,7 +161,6 @@
*/
public ArrayList<String> getRecipients()
{
- assert debugEnter(CLASS_NAME, "getRecipients");
return recipients;
}
@@ -188,7 +174,6 @@
*/
public void setRecipients(ArrayList<String> recipients)
{
- assert debugEnter(CLASS_NAME, "setRecipients", String.valueOf(recipients));
this.recipients = recipients;
}
@@ -202,7 +187,6 @@
*/
public void addRecipient(String recipient)
{
- assert debugEnter(CLASS_NAME, "addRecipient", String.valueOf(recipient));
recipients.add(recipient);
}
@@ -216,7 +200,6 @@
*/
public String getSubject()
{
- assert debugEnter(CLASS_NAME, "getSubject");
return subject;
}
@@ -230,7 +213,6 @@
*/
public void setSubject(String subject)
{
- assert debugEnter(CLASS_NAME, "setSubject", String.valueOf(subject));
this.subject = subject;
}
@@ -245,7 +227,6 @@
*/
public StringBuilder getBody()
{
- assert debugEnter(CLASS_NAME, "getBody");
return body;
}
@@ -259,7 +240,6 @@
*/
public void setBody(StringBuilder body)
{
- assert debugEnter(CLASS_NAME, "setBody", String.valueOf(body));
this.body = body;
}
@@ -273,7 +253,6 @@
*/
public void setBody(String bodyString)
{
- assert debugEnter(CLASS_NAME, "setBody", String.valueOf(bodyString));
body = new StringBuilder(bodyString);
}
@@ -287,7 +266,6 @@
*/
public void appendToBody(String text)
{
- assert debugEnter(CLASS_NAME, "appendToBody", String.valueOf(text));
body.append(text);
}
@@ -302,7 +280,6 @@
*/
public LinkedList<MimeBodyPart> getAttachments()
{
- assert debugEnter(CLASS_NAME, "getAttachments");
return attachments;
}
@@ -316,7 +293,6 @@
*/
public void addAttachment(MimeBodyPart attachment)
{
- assert debugEnter(CLASS_NAME, "addAttachment", String.valueOf(attachment));
attachments.add(attachment);
}
@@ -334,8 +310,6 @@
public void addAttachment(String attachmentText)
throws MessagingException
{
- assert debugEnter(CLASS_NAME, "addAttachment",
- String.valueOf(attachmentText));
MimeBodyPart attachment = new MimeBodyPart();
attachment.setText(attachmentText);
@@ -355,8 +329,6 @@
public void addAttachment(File attachmentFile)
throws MessagingException
{
- assert debugEnter(CLASS_NAME, "addAttachment",
- String.valueOf(attachmentFile));
MimeBodyPart attachment = new MimeBodyPart();
@@ -381,7 +353,6 @@
public void send()
throws MessagingException
{
- assert debugEnter(CLASS_NAME, "send");
// Get information about the available mail servers that we can use.
@@ -403,11 +374,14 @@
}
catch (MessagingException me)
{
- assert debugException(CLASS_NAME, "send", me);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, me);
+ }
- int msgID = MSGID_EMAILMSG_INVALID_SENDER_ADDRESS;
- String msg = getMessage(msgID, String.valueOf(sender),
- me.getMessage());
+ int msgID = MSGID_EMAILMSG_INVALID_SENDER_ADDRESS;
+ String msg = getMessage(msgID, String.valueOf(sender),
+ me.getMessage());
throw new MessagingException(msg, me);
}
@@ -426,11 +400,14 @@
}
catch (MessagingException me)
{
- assert debugException(CLASS_NAME, "send", me);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, me);
+ }
- int msgID = MSGID_EMAILMSG_INVALID_RECIPIENT_ADDRESS;
- String msg = getMessage(msgID, String.valueOf(recipient),
- me.getMessage());
+ int msgID = MSGID_EMAILMSG_INVALID_RECIPIENT_ADDRESS;
+ String msg = getMessage(msgID, String.valueOf(recipient),
+ me.getMessage());
throw new MessagingException(msg, me);
}
}
@@ -469,7 +446,10 @@
}
catch (SendFailedException sfe)
{
- assert debugException(CLASS_NAME, "send", sfe);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, sfe);
+ }
// We'll ignore this and hope that another server is available. If not,
// then at least save the exception so that we can throw it if all else
diff --git a/opends/src/server/org/opends/server/util/LDIFException.java b/opends/src/server/org/opends/server/util/LDIFException.java
index 05e70a0..2c19507 100644
--- a/opends/src/server/org/opends/server/util/LDIFException.java
+++ b/opends/src/server/org/opends/server/util/LDIFException.java
@@ -22,16 +22,11 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-import static org.opends.server.loggers.Debug.*;
-
-
-
/**
* This class defines an exception that may be thrown while attempting to parse
* LDIF content.
@@ -39,11 +34,6 @@
public final class LDIFException
extends Exception
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.LDIFException";
@@ -80,8 +70,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message));
this.messageID = messageID;
lineNumber = -1;
@@ -101,8 +89,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message), String.valueOf(cause));
this.messageID = messageID;
lineNumber = -1;
@@ -126,9 +112,6 @@
{
super(message);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message), String.valueOf(lineNumber),
- String.valueOf(canContinueReading));
this.messageID = messageID;
this.lineNumber = lineNumber;
@@ -155,10 +138,6 @@
{
super(message, cause);
- assert debugConstructor(CLASS_NAME, String.valueOf(messageID),
- String.valueOf(message), String.valueOf(lineNumber),
- String.valueOf(canContinueReading),
- String.valueOf(cause));
this.messageID = messageID;
this.lineNumber = lineNumber;
@@ -174,7 +153,6 @@
*/
public int getMessageID()
{
- assert debugEnter(CLASS_NAME, "getMessageID");
return messageID;
}
@@ -188,7 +166,6 @@
*/
public long getLineNumber()
{
- assert debugEnter(CLASS_NAME, "getLineNumber");
return lineNumber;
}
@@ -207,7 +184,6 @@
*/
public boolean canContinueReading()
{
- assert debugEnter(CLASS_NAME, "canContinueReading");
return canContinueReading;
}
diff --git a/opends/src/server/org/opends/server/util/LDIFReader.java b/opends/src/server/org/opends/server/util/LDIFReader.java
index ba873b1..d6e8959 100644
--- a/opends/src/server/org/opends/server/util/LDIFReader.java
+++ b/opends/src/server/org/opends/server/util/LDIFReader.java
@@ -28,7 +28,11 @@
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugVerbose;
+import static org.opends.server.loggers.debug.DebugLogger.debugInfo;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugProtocolElement;
import static org.opends.server.loggers.Error.logError;
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.messages.UtilityMessages.*;
@@ -58,8 +62,7 @@
import org.opends.server.types.AttributeValue;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
+import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.Entry;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
@@ -69,7 +72,6 @@
import org.opends.server.types.RDN;
-
/**
* This class provides the ability to read information from an LDIF file. It
* provides support for both standard entries and change entries (as would be
@@ -77,10 +79,6 @@
*/
public final class LDIFReader
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.util.LDIFReader";
@@ -137,7 +135,6 @@
public LDIFReader(LDIFImportConfig importConfig)
throws IOException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(importConfig));
ensureNotNull(importConfig);
this.importConfig = importConfig;
@@ -170,7 +167,6 @@
public Entry readEntry()
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "readEntry");
return readEntry(importConfig.validateSchema());
}
@@ -198,7 +194,6 @@
public Entry readEntry(boolean checkSchema)
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "readEntry");
while (true)
@@ -223,14 +218,14 @@
// read and return the next entry.
continue;
}
- else if (! importConfig.includeEntry(entryDN))
+ else if (!importConfig.includeEntry(entryDN))
{
- assert debugMessage(DebugLogCategory.PROTOCOL_READ,
- DebugLogSeverity.INFO, CLASS_NAME, "readEntry",
- "Skipping entry " + String.valueOf(entryDN) +
- " because the DN is not one that should be " +
- "included based on the include and exclude " +
- "branches.");
+ if (debugEnabled())
+ {
+ debugInfo("Skipping entry %s because the DN is not one that should " +
+ "be included based on the include and exclude branches.",
+ entryDN);
+ }
entriesRead++;
entriesIgnored++;
continue;
@@ -265,25 +260,28 @@
// import.
Entry entry = new Entry(entryDN, objectClasses, userAttributes,
operationalAttributes);
- assert debugProtocolElementRead(CLASS_NAME, "readEntry", entry);
+ debugProtocolElement(DebugLogLevel.VERBOSE, entry);
try
{
if (! importConfig.includeEntry(entry))
{
- assert debugMessage(DebugLogCategory.PROTOCOL_READ,
- DebugLogSeverity.INFO, CLASS_NAME, "readEntry",
- "Skipping entry " + String.valueOf(entryDN) +
- " because the DN is not one that should be " +
- "included based on the include and exclude " +
- "filters.");
+ if (debugEnabled())
+ {
+ debugInfo("Skipping entry %s because the DN is not one that " +
+ "should be included based on the include and exclude filters.",
+ entryDN);
+ }
entriesIgnored++;
continue;
}
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_COULD_NOT_EVALUATE_FILTERS_FOR_IMPORT;
String message = getMessage(msgID, String.valueOf(entry.getDN()),
@@ -345,7 +343,6 @@
public ChangeRecordEntry readChangeRecord(boolean defaultAdd)
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "readChangeRecord");
while (true)
{
@@ -430,7 +427,6 @@
private LinkedList<StringBuilder> readEntryLines()
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "readEntryLines");
// Read the entry lines into a buffer.
LinkedList<StringBuilder> lines = new LinkedList<StringBuilder>();
@@ -534,7 +530,6 @@
private DN readDN(LinkedList<StringBuilder> lines)
throws LDIFException
{
- assert debugEnter(CLASS_NAME, "readDN", String.valueOf(lines));
if (lines.isEmpty())
{
@@ -603,7 +598,10 @@
catch (Exception e)
{
// The value did not have a valid base64-encoding.
- assert debugException(CLASS_NAME, "readDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_COULD_NOT_BASE64_DECODE_DN;
String message = getMessage(msgID, lastEntryLineNumber, line,
@@ -620,7 +618,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "readDN", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lastEntryLineNumber, line.toString(),
@@ -632,7 +633,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lastEntryLineNumber, line.toString(),
@@ -661,7 +665,10 @@
}
catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "readDN", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lastEntryLineNumber, line.toString(),
@@ -673,7 +680,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "readDN", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lastEntryLineNumber, line.toString(),
@@ -703,7 +713,6 @@
private String readChangeType(LinkedList<StringBuilder> lines)
throws LDIFException
{
- assert debugEnter(CLASS_NAME, "readChangeType", String.valueOf(lines));
if (lines.isEmpty())
{
@@ -767,7 +776,10 @@
catch (Exception e)
{
// The value did not have a valid base64-encoding.
- assert debugException(CLASS_NAME, "readChangeType", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_COULD_NOT_BASE64_DECODE_DN;
String message = getMessage(msgID, lastEntryLineNumber, line,
@@ -821,12 +833,6 @@
HashMap<AttributeType,List<Attribute>> operationalAttributes)
throws LDIFException
{
- assert debugEnter(CLASS_NAME, "readAttribute",
- String.valueOf(line),
- String.valueOf(entryDN),
- String.valueOf(objectClasses),
- String.valueOf(userAttributes),
- String.valueOf(operationalAttributes));
// Parse the attribute type description.
int colonPos = parseColonPosition(lines, line);
@@ -846,12 +852,11 @@
{
if (! importConfig.includeObjectClasses())
{
- assert debugMessage(DebugLogCategory.PROTOCOL_READ,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "readAttribute",
- "Skipping objectclass " + String.valueOf(value) +
- " for entry " + String.valueOf(entryDN) +
- " due to the import configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose("Skipping objectclass %s for entry %s due to the " +
+ "import configuration.", value, entryDN);
+ }
return;
}
@@ -886,12 +891,11 @@
if (! importConfig.includeAttribute(attrType))
{
- assert debugMessage(DebugLogCategory.PROTOCOL_READ,
- DebugLogSeverity.VERBOSE, CLASS_NAME,
- "readAttribute",
- "Skipping attribute " + String.valueOf(attrName) +
- " for entry " + String.valueOf(entryDN) +
- " due to the import configuration.");
+ if (debugEnabled())
+ {
+ debugVerbose("Skipping attribute %s for entry %s due to the import " +
+ "configuration.", attrName, entryDN);
+ }
return;
}
@@ -996,11 +1000,6 @@
LinkedList<StringBuilder> lines, StringBuilder line, DN entryDN,
String attributeName) throws LDIFException
{
- assert debugEnter(CLASS_NAME, "readSingleValueAttribute",
- String.valueOf(lines),
- String.valueOf(line),
- String.valueOf(entryDN),
- String.valueOf(attributeName));
// Parse the attribute type description.
int colonPos = parseColonPosition(lines, line);
@@ -1041,7 +1040,6 @@
*/
public long getLastEntryLineNumber()
{
- assert debugEnter(CLASS_NAME, "getLastEntryLineNumber");
return lastEntryLineNumber;
}
@@ -1059,7 +1057,6 @@
*/
public void rejectLastEntry(String message)
{
- assert debugEnter(CLASS_NAME, "rejectLastEntry", String.valueOf(message));
entriesRejected++;
@@ -1091,7 +1088,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "rejectLastEntry", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -1103,7 +1103,6 @@
*/
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
importConfig.close();
}
@@ -1118,8 +1117,6 @@
*/
private static Attribute parseAttrDescription(String attrDescr)
{
- assert debugEnter(CLASS_NAME, "parseAttributeDescription",
- String.valueOf(attrDescr));
String attrName;
String lowerName;
@@ -1173,7 +1170,6 @@
*/
public long getEntriesRead()
{
- assert debugEnter(CLASS_NAME, "getEntriesRead");
return entriesRead;
}
@@ -1188,7 +1184,6 @@
*/
public long getEntriesIgnored()
{
- assert debugEnter(CLASS_NAME, "getEntriesIgnored");
return entriesIgnored;
}
@@ -1206,7 +1201,6 @@
*/
public long getEntriesRejected()
{
- assert debugEnter(CLASS_NAME, "getEntriesRejected");
return entriesRejected;
}
@@ -1226,10 +1220,6 @@
*/
private ChangeRecordEntry parseModifyDNChangeRecordEntry(DN entryDN,
LinkedList<StringBuilder> lines) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseModifyDNChangeRecordEntry",
- String.valueOf(entryDN),
- String.valueOf(lines),
- String.valueOf(lineNumber));
DN newSuperiorDN = null;
RDN newRDN = null;
@@ -1250,14 +1240,20 @@
newRDN = RDN.decode(rdnStr);
} catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "parse", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lineNumber, line.toString(),
de.getErrorMessage());
throw new LDIFException(msgID, message, lineNumber, true);
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "parse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lineNumber, line.toString(),
e.getMessage());
@@ -1306,14 +1302,20 @@
newSuperiorDN = DN.decode(dnStr);
} catch (DirectoryException de)
{
- assert debugException(CLASS_NAME, "parse", de);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, de);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lineNumber, line.toString(),
de.getErrorMessage());
throw new LDIFException(msgID, message, lineNumber, true);
} catch (Exception e)
{
- assert debugException(CLASS_NAME, "parse", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_INVALID_DN;
String message = getMessage(msgID, lineNumber, line.toString(),
e.getMessage());
@@ -1350,11 +1352,6 @@
DN entryDN,
String attributeName) throws LDIFException
{
- assert debugEnter(CLASS_NAME, "getModifyDNAttributeValue",
- String.valueOf(lines),
- String.valueOf(line),
- String.valueOf(entryDN),
- String.valueOf(attributeName));
Attribute attr =
readSingleValueAttribute(lines, line, entryDN, attributeName);
@@ -1380,10 +1377,6 @@
*/
private ChangeRecordEntry parseModifyChangeRecordEntry(DN entryDN,
LinkedList<StringBuilder> lines) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseModifyChangeRecordEntry",
- String.valueOf(entryDN),
- String.valueOf(lines),
- String.valueOf(lineNumber));
List<LDAPModification> modifications = new ArrayList<LDAPModification>();
while(!lines.isEmpty())
@@ -1459,12 +1452,8 @@
*/
private ChangeRecordEntry parseDeleteChangeRecordEntry(DN entryDN,
LinkedList<StringBuilder> lines) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseDeleteChangeRecordEntry",
- String.valueOf(entryDN),
- String.valueOf(lines),
- String.valueOf(lineNumber));
- if(!lines.isEmpty())
+ if (!lines.isEmpty())
{
int msgID = MSGID_LDIF_INVALID_DELETE_ATTRIBUTES;
String message = getMessage(msgID);
@@ -1490,10 +1479,6 @@
*/
private ChangeRecordEntry parseAddChangeRecordEntry(DN entryDN,
LinkedList<StringBuilder> lines) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseAddChangeRecordEntry",
- String.valueOf(entryDN),
- String.valueOf(lines),
- String.valueOf(lineNumber));
HashMap<ObjectClass,String> objectClasses =
new HashMap<ObjectClass,String>();
@@ -1536,9 +1521,6 @@
*/
private int parseColonPosition(LinkedList<StringBuilder> lines,
StringBuilder line) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseColonPosition",
- String.valueOf(lines),
- String.valueOf(lineNumber));
int colonPos = line.indexOf(":");
if (colonPos <= 0)
@@ -1576,12 +1558,6 @@
DN entryDN,
int colonPos,
String attrName) throws LDIFException {
- assert debugEnter(CLASS_NAME, "parseSingleValue",
- String.valueOf(lines),
- String.valueOf(line),
- String.valueOf(entryDN),
- String.valueOf(colonPos),
- String.valueOf(attrName));
// Look at the character immediately after the colon. If there is
// none, then assume an attribute with an empty value. If it is another
@@ -1613,7 +1589,10 @@
catch (Exception e)
{
// The value did not have a valid base64-encoding.
- assert debugException(CLASS_NAME, "readAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_COULD_NOT_BASE64_DECODE_ATTR;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1641,7 +1620,10 @@
catch (Exception e)
{
// The URL was malformed or had an invalid protocol.
- assert debugException(CLASS_NAME, "readAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_INVALID_URL;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1672,7 +1654,10 @@
{
// We were unable to read the contents of that URL for some
// reason.
- assert debugException(CLASS_NAME, "readAttribute", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
int msgID = MSGID_LDIF_URL_IO_ERROR;
String message = getMessage(msgID, String.valueOf(entryDN),
@@ -1730,9 +1715,6 @@
*/
private void logToRejectWriter(LinkedList<StringBuilder> lines,
String message) {
- assert debugEnter(CLASS_NAME, "logToRejectWriter",
- String.valueOf(lines),
- String.valueOf(message));
BufferedWriter rejectWriter = importConfig.getRejectWriter();
if (rejectWriter != null)
@@ -1752,7 +1734,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "logToRejectWriter", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/util/LDIFWriter.java b/opends/src/server/org/opends/server/util/LDIFWriter.java
index 686075e..234a275 100644
--- a/opends/src/server/org/opends/server/util/LDIFWriter.java
+++ b/opends/src/server/org/opends/server/util/LDIFWriter.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
@@ -44,7 +44,9 @@
import org.opends.server.types.Modification;
import org.opends.server.types.RDN;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.util.StaticUtils.*;
import static org.opends.server.util.Validator.*;
@@ -56,10 +58,6 @@
*/
public final class LDIFWriter
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.util.LDIFWriter";
// FIXME -- Add support for generating a hash when writing the data.
@@ -89,7 +87,6 @@
public LDIFWriter(LDIFExportConfig exportConfig)
throws IOException
{
- assert debugConstructor(CLASS_NAME, String.valueOf(exportConfig));
ensureNotNull(exportConfig);
this.exportConfig = exportConfig;
@@ -126,8 +123,6 @@
public void writeComment(String comment, int wrapColumn)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeComment", String.valueOf(comment),
- String.valueOf(wrapColumn));
ensureNotNull(comment);
@@ -223,7 +218,6 @@
*/
public boolean writeEntries(Collection <Entry> entries)
throws IOException, LDIFException {
- assert debugEnter(CLASS_NAME, "writeEntry", String.valueOf(entries));
boolean ret=true;
Iterator<Entry> i = entries.iterator();
@@ -251,7 +245,6 @@
public boolean writeEntry(Entry entry)
throws IOException, LDIFException
{
- assert debugEnter(CLASS_NAME, "writeEntry", String.valueOf(entry));
ensureNotNull(entry);
return entry.toLDIF(exportConfig);
@@ -272,8 +265,6 @@
public void writeAddChangeRecord(Entry entry)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeAddChangeRecord",
- String.valueOf(entry));
ensureNotNull(entry);
@@ -352,8 +343,6 @@
public void writeDeleteChangeRecord(Entry entry, boolean commentEntry)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeDeleteChangeRecord",
- String.valueOf(entry), String.valueOf(commentEntry));
ensureNotNull(entry);
@@ -433,8 +422,6 @@
public void writeModifyChangeRecord(DN dn, List<Modification> modifications)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeModifyChangeRecord", String.valueOf(dn),
- String.valueOf(modifications));
ensureNotNull(dn, modifications);
@@ -546,10 +533,6 @@
DN newSuperior)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeModifyDNChangeRecord",
- String.valueOf(dn), String.valueOf(newRDN),
- String.valueOf(deleteOldRDN),
- String.valueOf(newSuperior));
ensureNotNull(dn, newRDN);
@@ -619,7 +602,6 @@
public void flush()
throws IOException
{
- assert debugEnter(CLASS_NAME, "flush");
writer.flush();
}
@@ -634,7 +616,6 @@
public void close()
throws IOException
{
- assert debugEnter(CLASS_NAME, "close");
writer.flush();
writer.close();
@@ -657,9 +638,6 @@
public static void appendLDIFSeparatorAndValue(StringBuilder buffer,
byte[] valueBytes)
{
- assert debugEnter(CLASS_NAME, "appendLDIFSeparatorAndValue",
- "java.lang.StringBuilder",
- String.valueOf(valueBytes));
ensureNotNull(buffer, valueBytes);
@@ -689,7 +667,10 @@
catch (Exception e)
{
// This should never happen.
- assert debugException(CLASS_NAME, "appendLDIFSeparatorAndValue", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
buffer.append(new String(valueBytes));
}
}
@@ -713,9 +694,6 @@
boolean wrapLines, int wrapColumn)
throws IOException
{
- assert debugEnter(CLASS_NAME, "writeLDIFLine", String.valueOf(line),
- String.valueOf(writer), String.valueOf(wrapLines),
- String.valueOf(wrapColumn));
ensureNotNull(line, writer);
diff --git a/opends/src/server/org/opends/server/util/ModifyChangeRecordEntry.java b/opends/src/server/org/opends/server/util/ModifyChangeRecordEntry.java
index c509e98..7e64b2e 100644
--- a/opends/src/server/org/opends/server/util/ModifyChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/ModifyChangeRecordEntry.java
@@ -22,14 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.Validator.*;
import java.util.ArrayList;
@@ -49,11 +45,6 @@
*/
public final class ModifyChangeRecordEntry extends ChangeRecordEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.ModifyChangeRecordEntry";
/**
@@ -76,8 +67,6 @@
{
super(dn);
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(modifications));
ensureNotNull(modifications);
@@ -94,7 +83,6 @@
*/
public List<LDAPModification> getModifications()
{
- assert debugEnter(CLASS_NAME, "getModifications");
return Collections.unmodifiableList(modifications);
}
@@ -108,7 +96,6 @@
*/
public ChangeOperationType getChangeOperationType()
{
- assert debugEnter(CLASS_NAME, "getChangeOperationType");
return ChangeOperationType.MODIFY;
}
diff --git a/opends/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java b/opends/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java
index 3104374..0e610cf 100644
--- a/opends/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java
+++ b/opends/src/server/org/opends/server/util/ModifyDNChangeRecordEntry.java
@@ -22,14 +22,10 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
-
-
-import static org.opends.server.loggers.Debug.debugConstructor;
-import static org.opends.server.loggers.Debug.debugEnter;
import static org.opends.server.util.Validator.*;
import org.opends.server.types.DN;
@@ -44,11 +40,6 @@
*/
public final class ModifyDNChangeRecordEntry extends ChangeRecordEntry
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.ModifyDNChangeRecordEntry";
// The new RDN.
private final RDN newRDN;
@@ -78,10 +69,6 @@
DN newSuperiorDN)
{
super(dn);
- assert debugConstructor(CLASS_NAME, String.valueOf(dn),
- String.valueOf(newSuperiorDN),
- String.valueOf(newRDN),
- String.valueOf(deleteOldRDN));
ensureNotNull(newRDN);
@@ -99,7 +86,6 @@
*/
public RDN getNewRDN()
{
- assert debugEnter(CLASS_NAME, "getNewRDN");
return newRDN;
}
@@ -112,7 +98,6 @@
*/
public DN getNewSuperiorDN()
{
- assert debugEnter(CLASS_NAME, "getNewSuperiorDN");
return newSuperiorDN;
}
@@ -125,7 +110,6 @@
*/
public boolean deleteOldRDN()
{
- assert debugEnter(CLASS_NAME, "deleteOldRDN");
return deleteOldRDN;
}
@@ -137,7 +121,6 @@
*/
public ChangeOperationType getChangeOperationType()
{
- assert debugEnter(CLASS_NAME, "getChangeOperationType");
return ChangeOperationType.MODIFY_DN;
}
diff --git a/opends/src/server/org/opends/server/util/MultiOutputStream.java b/opends/src/server/org/opends/server/util/MultiOutputStream.java
index 62d6bdd..84ec62f 100644
--- a/opends/src/server/org/opends/server/util/MultiOutputStream.java
+++ b/opends/src/server/org/opends/server/util/MultiOutputStream.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
@@ -30,8 +30,9 @@
import java.io.OutputStream;
-import static org.opends.server.loggers.Debug.*;
-
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
/**
@@ -42,11 +43,6 @@
public final class MultiOutputStream
extends OutputStream
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME =
- "org.opends.server.util.MultiOutputStream";
@@ -65,7 +61,6 @@
*/
public MultiOutputStream(OutputStream... targetStreams)
{
- assert debugConstructor(CLASS_NAME, String.valueOf(targetStreams));
Validator.ensureNotNull(targetStreams);
@@ -79,7 +74,6 @@
*/
public void close()
{
- assert debugEnter(CLASS_NAME, "close");
for (OutputStream s : targetStreams)
{
@@ -89,7 +83,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "close", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -101,7 +98,6 @@
*/
public void flush()
{
- assert debugEnter(CLASS_NAME, "flush");
for (OutputStream s : targetStreams)
{
@@ -111,7 +107,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "flush", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -126,7 +125,6 @@
*/
public void write(byte[] b)
{
- assert debugEnter(CLASS_NAME, "write", "byte[" + b.length + "]");
for (OutputStream s : targetStreams)
{
@@ -136,7 +134,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "write", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -153,7 +154,6 @@
*/
public void write(byte[] b, int off, int len)
{
- assert debugEnter(CLASS_NAME, "write", "byte[" + b.length + "]");
for (OutputStream s : targetStreams)
{
@@ -163,7 +163,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "write", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
@@ -177,7 +180,6 @@
*/
public void write(int b)
{
- assert debugEnter(CLASS_NAME, "write", StaticUtils.byteToHex((byte) b));
for (OutputStream s : targetStreams)
{
@@ -187,7 +189,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "write", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/util/PasswordReader.java b/opends/src/server/org/opends/server/util/PasswordReader.java
index ae360ba..08e425d 100644
--- a/opends/src/server/org/opends/server/util/PasswordReader.java
+++ b/opends/src/server/org/opends/server/util/PasswordReader.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
diff --git a/opends/src/server/org/opends/server/util/ServerConstants.java b/opends/src/server/org/opends/server/util/ServerConstants.java
index 3fe29f0..0b1e518 100644
--- a/opends/src/server/org/opends/server/util/ServerConstants.java
+++ b/opends/src/server/org/opends/server/util/ServerConstants.java
@@ -790,33 +790,26 @@
/**
+ * The English name for the basic disabled log severity used for all
+ * log severities.
+ */
+ public static final String LOG_SEVERITY_DISABLED = "DISABLED";
+
+
+
+ /**
+ * The English name for the basic all log severity used for all log
+ * severities.
+ */
+ public static final String LOG_SEVERITY_ALL = "ALL";
+
+
+
+ /**
* The English name for the debug log category used for access control
* debugging.
*/
- public static final String DEBUG_CATEGORY_ACCESS_CONTROL = "ACCESS_CONTROL";
-
-
-
- /**
- * The English name for the debug log category used for backend debugging.
- */
- public static final String DEBUG_CATEGORY_BACKEND = "BACKEND";
-
-
-
- /**
- * The English name for the debug log category used for configuration
- * debugging.
- */
- public static final String DEBUG_CATEGORY_CONFIG = "CONFIG";
-
-
-
- /**
- * The English name for the debug log category used for connection handling
- * debugging.
- */
- public static final String DEBUG_CATEGORY_CONNECTION_HANDLING = "CONNECTION";
+ public static final String DEBUG_CATEGORY_MESSAGE = "MESSAGE";
@@ -828,48 +821,24 @@
/**
- * The English name for the debug log category used for core server debugging.
- */
- public static final String DEBUG_CATEGORY_CORE_SERVER = "CORE";
-
-
-
- /**
* The English name for the debug log category used for debugging raw data
* read.
*/
- public static final String DEBUG_CATEGORY_DATA_READ = "DATA_READ";
-
-
-
- /**
- * The English name for the debug log category used for debugging raw data
- * written.
- */
- public static final String DEBUG_CATEGORY_DATA_WRITE = "DATA_WRITE";
+ public static final String DEBUG_CATEGORY_DATA = "DATA";
/**
* The English name for the debug log category used for exception debugging.
*/
- public static final String DEBUG_CATEGORY_EXCEPTION = "EXCEPTION";
+ public static final String DEBUG_CATEGORY_THROWN = "THROWN";
/**
- * The English name for the debug log category used for extended operation
- * debugging.
+ * The English name for the debug log category used for exception debugging.
*/
- public static final String DEBUG_CATEGORY_EXTENDED_OPERATION = "EXTENDED_OP";
-
-
-
- /**
- * The English name for the debug log category used for server extensions
- * debugging.
- */
- public static final String DEBUG_CATEGORY_EXTENSIONS = "EXTENSIONS";
+ public static final String DEBUG_CATEGORY_COUGHT = "COUGHT";
@@ -882,91 +851,24 @@
/**
- * The English name for the debug log category used for password policy
+ * The English name for the debug log category used for method exit
* debugging.
*/
- public static final String DEBUG_CATEGORY_PASSWORD_POLICY = "PWPOLICY";
-
-
-
- /**
- * The English name for the debug log category used for plugin debugging.
- */
- public static final String DEBUG_CATEGORY_PLUGIN = "PLUGIN";
+ public static final String DEBUG_CATEGORY_EXIT = "EXIT";
/**
* The English name for the debug log category used for debugging protocol
- * elements read.
+ * elements.
*/
- public static final String DEBUG_CATEGORY_PROTOCOL_READ = "PROTOCOL_READ";
+ public static final String DEBUG_CATEGORY_PROTOCOL = "PROTOCOL";
/**
- * The English name for the debug log category used for debugging protocol
- * elements written.
- */
- public static final String DEBUG_CATEGORY_PROTOCOL_WRITE = "PROTOCOL_WRITE";
-
-
-
- /**
- * The English name for the debug log category used for SASL debugging.
- */
- public static final String DEBUG_CATEGORY_SASL_MECHANISM = "SASL";
-
-
-
- /**
- * The English name for the debug log category used for schema debugging.
- */
- public static final String DEBUG_CATEGORY_SCHEMA = "SCHEMA";
-
-
-
- /**
- * The English name for the debug log category used for shutdown debugging.
- */
- public static final String DEBUG_CATEGORY_SHUTDOWN = "SHUTDOWN";
-
-
-
- /**
- * The English name for the debug log category used for startup debugging.
- */
- public static final String DEBUG_CATEGORY_STARTUP = "STARTUP";
-
-
-
- /**
- * The English name for the debug log category used for synchronization
- * debugging.
- */
- public static final String DEBUG_CATEGORY_SYNCHRONIZATION = "SYNCH";
-
-
-
- /**
- * The English name for the debug log category used for raw data read
- * from the database.
- */
- public static final String DEBUG_CATEGORY_DATABASE_READ = "DATABASE_READ";
-
-
-
- /**
- * The English name for the debug log category used for raw data written
- * to the database.
- */
- public static final String DEBUG_CATEGORY_DATABASE_WRITE = "DATABASE_WRITE";
-
-
-
- /**
- * The English name for the debug log category used for access to the
- * database.
+ * The English name for the debug log category used for raw data access
+ * from the JE database.
*/
public static final String DEBUG_CATEGORY_DATABASE_ACCESS = "DATABASE_ACCESS";
diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index ace21e6..24ba52e 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -53,7 +53,9 @@
import org.opends.server.types.ObjectClass;
import org.opends.server.types.RDN;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.UtilityMessages.*;
import static org.opends.server.util.ServerConstants.*;
@@ -69,10 +71,6 @@
*/
public final class StaticUtils
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.util.StaticUtils";
@@ -122,7 +120,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "getBytes", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
try
{
@@ -130,7 +131,10 @@
}
catch (Exception e2)
{
- assert debugException(CLASS_NAME, "getBytes", e2);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e2);
+ }
return s.getBytes();
}
@@ -2012,8 +2016,6 @@
*/
public static boolean needsBase64Encoding(byte[] valueBytes)
{
- assert debugEnter(CLASS_NAME, "needsBase64Encoding",
- String.valueOf(valueBytes));
int length;
if ((valueBytes == null) || ((length = valueBytes.length) == 0))
@@ -2077,8 +2079,6 @@
*/
public static boolean needsBase64Encoding(String valueString)
{
- assert debugEnter(CLASS_NAME, "needsBase64Encoding",
- String.valueOf(valueString));
int length;
if ((valueString == null) || ((length = valueString.length()) == 0))
@@ -2134,7 +2134,6 @@
*/
public static boolean mayUseExec()
{
- assert debugEnter(CLASS_NAME, "mayUseExec");
String s = System.getProperty(PROPERTY_DISABLE_EXEC);
if (s == null)
@@ -2179,8 +2178,6 @@
Map<String,String> environment, List<String> output)
throws IOException, SecurityException
{
- assert debugEnter(CLASS_NAME, "exec", String.valueOf(command),
- String.valueOf(args));
// See whether we'll allow the use of exec on this system. If not, then
@@ -2226,7 +2223,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "exec", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// If this happens, then we have no choice but to forcefully terminate
// the process.
@@ -2236,7 +2236,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exec", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return process.exitValue();
@@ -2271,7 +2274,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exec", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
@@ -2281,7 +2287,10 @@
}
catch (InterruptedException ie)
{
- assert debugException(CLASS_NAME, "exec", ie);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, ie);
+ }
// If this happens, then we have no choice but to forcefully terminate
// the process.
@@ -2291,7 +2300,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "exec", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
return process.exitValue();
@@ -2321,9 +2333,6 @@
int endPos,
StringBuilder invalidReason)
{
- assert debugEnter(CLASS_NAME, "isValidSchemaElement",
- String.valueOf(element), String.valueOf(startPos),
- String.valueOf(endPos), "java.lang.StringBuilder");
if ((element == null) || (startPos >= endPos))
@@ -2462,7 +2471,6 @@
*/
public static String toLowerCase(String s)
{
- assert debugEnter(CLASS_NAME, "toLowerCase", String.valueOf(s));
if (s == null)
{
@@ -2490,8 +2498,6 @@
*/
public static void toLowerCase(String s, StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toLowerCase", String.valueOf(s),
- "java.lang.StringBuilder");
if (s == null)
{
@@ -2614,8 +2620,6 @@
*/
public static void toLowerCase(byte[] b, StringBuilder buffer, boolean trim)
{
- assert debugEnter(CLASS_NAME, "toLowerCase", String.valueOf(b),
- "java.lang.StringBuilder", String.valueOf(trim));
if (b == null)
{
@@ -2633,8 +2637,11 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "toLowerCase", e);
- buffer.append(new String(b, i, (length-i)).toLowerCase());
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ buffer.append(new String(b, i, (length - i)).toLowerCase());
}
break;
}
@@ -2768,7 +2775,6 @@
*/
public static String toUpperCase(String s)
{
- assert debugEnter(CLASS_NAME, "toUpperCase", String.valueOf(s));
if (s == null)
{
@@ -2796,8 +2802,6 @@
*/
public static void toUpperCase(String s, StringBuilder buffer)
{
- assert debugEnter(CLASS_NAME, "toUpperCase", String.valueOf(s),
- "java.lang.StringBuilder");
if (s == null)
{
@@ -2920,8 +2924,6 @@
*/
public static void toUpperCase(byte[] b, StringBuilder buffer, boolean trim)
{
- assert debugEnter(CLASS_NAME, "toUpperCase", String.valueOf(b),
- "java.lang.StringBuilder", String.valueOf(trim));
if (b == null)
{
@@ -2939,8 +2941,11 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "toUpperCase", e);
- buffer.append(new String(b, i, (length-i)).toUpperCase());
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
+ buffer.append(new String(b, i, (length - i)).toUpperCase());
}
break;
}
@@ -3090,7 +3095,6 @@
public static StringBuilder toRFC3641StringValue(StringBuilder builder,
String string)
{
- assert debugEnter(CLASS_NAME, "toRFC3641StringValue");
// Initial double-quote.
builder.append('"');
@@ -3124,7 +3128,6 @@
*/
public static String[] listToArray(List<String> stringList)
{
- assert debugEnter(CLASS_NAME, "listToArray", "java.util.List<String>");
if (stringList == null)
{
@@ -3147,7 +3150,6 @@
*/
public static ArrayList<String> arrayToList(String[] stringArray)
{
- assert debugEnter(CLASS_NAME, "arrayToList", String.valueOf(stringArray));
if (stringArray == null)
{
@@ -3177,7 +3179,6 @@
*/
public static boolean recursiveDelete(File file)
{
- assert debugEnter(CLASS_NAME, "recursiveDelete", String.valueOf(file));
boolean successful = true;
if (file.isDirectory())
@@ -3276,7 +3277,6 @@
*/
public static boolean isRelativePath(String path)
{
- assert debugEnter(CLASS_NAME, "isRelativePath", String.valueOf(path));
File f = new File(path);
return (! f.isAbsolute());
@@ -3296,7 +3296,6 @@
*/
public static File getFileForPath(String path)
{
- assert debugEnter(CLASS_NAME, "getFileForPath", String.valueOf(path));
File f = new File (path);
@@ -3338,7 +3337,6 @@
*/
public static Entry createEntry(DN dn)
{
- assert debugEnter(CLASS_NAME, "createEntry", String.valueOf(dn));
// If the provided DN was null or empty, then return null because we don't
diff --git a/opends/src/server/org/opends/server/util/TimeThread.java b/opends/src/server/org/opends/server/util/TimeThread.java
index 219b532..165e8c1 100644
--- a/opends/src/server/org/opends/server/util/TimeThread.java
+++ b/opends/src/server/org/opends/server/util/TimeThread.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util;
@@ -39,11 +39,12 @@
import org.opends.server.api.DirectoryThread;
-import static org.opends.server.loggers.Debug.*;
+import static org.opends.server.loggers.debug.DebugLogger.debugCought;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import org.opends.server.types.DebugLogLevel;
import static org.opends.server.util.ServerConstants.*;
-
/**
* This class defines a thread that will wake up periodically, get the current
* time, and store various representations of it. Note that only limited
@@ -53,10 +54,6 @@
public final class TimeThread
extends DirectoryThread
{
- /**
- * The fully-qualified name of this class for debugging purposes.
- */
- private static final String CLASS_NAME = "org.opends.server.util.TimeThread";
@@ -173,7 +170,10 @@
}
catch (Exception e)
{
- assert debugException(CLASS_NAME, "run", e);
+ if (debugEnabled())
+ {
+ debugCought(DebugLogLevel.ERROR, e);
+ }
}
}
}
diff --git a/opends/src/server/org/opends/server/util/Validator.java b/opends/src/server/org/opends/server/util/Validator.java
index 8be7580..68240f3 100644
--- a/opends/src/server/org/opends/server/util/Validator.java
+++ b/opends/src/server/org/opends/server/util/Validator.java
@@ -26,9 +26,8 @@
*/
package org.opends.server.util;
-import static org.opends.server.loggers.Debug.debugMessage;
-import org.opends.server.types.DebugLogCategory;
-import org.opends.server.types.DebugLogSeverity;
+import static org.opends.server.loggers.debug.DebugLogger.debugEnabled;
+import static org.opends.server.loggers.debug.DebugLogger.debugError;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.messages.UtilityMessages;
@@ -102,9 +101,6 @@
public static final boolean ENABLE_CHECKS = true;
- /** The fully-qualified class name for this class, which is used for
- * debugging purposes. */
- private static final String CLASS_NAME = Validator.class.getName();
/** A one-based array for parameter descriptions. */
@@ -390,8 +386,10 @@
String messageWithStack = message + ServerConstants.EOL + getCallingStack();
// Log to the debug log.
- debugMessage(DebugLogCategory.CORE_SERVER, DebugLogSeverity.ERROR,
- CLASS_NAME, "logError", messageWithStack);
+ if (debugEnabled())
+ {
+ debugError(messageWithStack);
+ }
// Log to the error log.
org.opends.server.loggers.Error.logError(ErrorLogCategory.CORE_SERVER,
diff --git a/opends/src/server/org/opends/server/util/args/Argument.java b/opends/src/server/org/opends/server/util/args/Argument.java
index a92d20a..5ed009e 100644
--- a/opends/src/server/org/opends/server/util/args/Argument.java
+++ b/opends/src/server/org/opends/server/util/args/Argument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/ArgumentException.java b/opends/src/server/org/opends/server/util/args/ArgumentException.java
index 8ffdfce..a821b17 100644
--- a/opends/src/server/org/opends/server/util/args/ArgumentException.java
+++ b/opends/src/server/org/opends/server/util/args/ArgumentException.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/ArgumentParser.java b/opends/src/server/org/opends/server/util/args/ArgumentParser.java
index 8a2d12b..c7d7380 100644
--- a/opends/src/server/org/opends/server/util/args/ArgumentParser.java
+++ b/opends/src/server/org/opends/server/util/args/ArgumentParser.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/BooleanArgument.java b/opends/src/server/org/opends/server/util/args/BooleanArgument.java
index a5af371..a5c21da 100644
--- a/opends/src/server/org/opends/server/util/args/BooleanArgument.java
+++ b/opends/src/server/org/opends/server/util/args/BooleanArgument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/FileBasedArgument.java b/opends/src/server/org/opends/server/util/args/FileBasedArgument.java
index a98fb98..6058be6 100644
--- a/opends/src/server/org/opends/server/util/args/FileBasedArgument.java
+++ b/opends/src/server/org/opends/server/util/args/FileBasedArgument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/IntegerArgument.java b/opends/src/server/org/opends/server/util/args/IntegerArgument.java
index eda9fe8..10f993c 100644
--- a/opends/src/server/org/opends/server/util/args/IntegerArgument.java
+++ b/opends/src/server/org/opends/server/util/args/IntegerArgument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/MultiChoiceArgument.java b/opends/src/server/org/opends/server/util/args/MultiChoiceArgument.java
index 425a8b5..f92f7ee 100644
--- a/opends/src/server/org/opends/server/util/args/MultiChoiceArgument.java
+++ b/opends/src/server/org/opends/server/util/args/MultiChoiceArgument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/StringArgument.java b/opends/src/server/org/opends/server/util/args/StringArgument.java
index f13355f..36f9811 100644
--- a/opends/src/server/org/opends/server/util/args/StringArgument.java
+++ b/opends/src/server/org/opends/server/util/args/StringArgument.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/SubCommand.java b/opends/src/server/org/opends/server/util/args/SubCommand.java
index 6248d9b..17619a0 100644
--- a/opends/src/server/org/opends/server/util/args/SubCommand.java
+++ b/opends/src/server/org/opends/server/util/args/SubCommand.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java b/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
index 76bb8ec..e11eda7 100644
--- a/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
+++ b/opends/src/server/org/opends/server/util/args/SubCommandArgumentParser.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
package org.opends.server.util.args;
diff --git a/opends/src/server/org/opends/server/util/args/package-info.java b/opends/src/server/org/opends/server/util/args/package-info.java
index 273ae35..b9d6769 100644
--- a/opends/src/server/org/opends/server/util/args/package-info.java
+++ b/opends/src/server/org/opends/server/util/args/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/src/server/org/opends/server/util/package-info.java b/opends/src/server/org/opends/server/util/package-info.java
index 6d03868..4be5f47 100644
--- a/opends/src/server/org/opends/server/util/package-info.java
+++ b/opends/src/server/org/opends/server/util/package-info.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Portions Copyright 2006 Sun Microsystems, Inc.
+ * Portions Copyright 2006-2007 Sun Microsystems, Inc.
*/
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
index bdfe861..bc13cfa 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/TestCaseUtils.java
@@ -56,7 +56,6 @@
import org.opends.server.extensions.ConfigFileHandler;
import org.opends.server.loggers.Access;
import org.opends.server.loggers.Error;
-import org.opends.server.loggers.Debug;
import org.opends.server.plugins.InvocationCounterPlugin;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.types.DN;
@@ -283,7 +282,6 @@
directoryServer.bootstrapServer();
directoryServer.initializeConfiguration(configClass, configFile);
Error.removeAllErrorLoggers(false);
- Debug.removeAllDebugLoggers(false);
Access.addAccessLogger(TestAccessLogger.getInstance());
Error.addErrorLogger(TestErrorLogger.getInstance());
directoryServer.startServer();
--
Gitblit v1.10.0